{"id":349548,"date":"2026-04-06T00:30:00","date_gmt":"2026-04-06T04:30:00","guid":{"rendered":"https:\/\/inspenet.com\/?post_type=articulos&#038;p=349548"},"modified":"2026-04-07T09:36:14","modified_gmt":"2026-04-07T13:36:14","slug":"prediction-of-co2-corrosion-using-ann","status":"publish","type":"articulos","link":"https:\/\/inspenet.com\/en\/articles\/prediction-of-co2-corrosion-using-ann\/","title":{"rendered":"Artificial Neural Networks in predicting CO2 induced corrosion in the oil industry"},"content":{"rendered":"\n<p>In recent years, the integration of tools such as <strong><strong>Artificial Neural Networks<\/strong> (ANN)<\/strong> into the study of carbon dioxide (CO\u2082) induced corrosion in natural gas has emerged as a significant challenge for the energy industry, given its profound impact on the integrity of pipelines and metallic equipment. Within this context, <a href=\"https:\/\/www.sciencedirect.com\/science\/article\/abs\/pii\/S0896844616301474\" data-type=\"link\" data-id=\"https:\/\/www.sciencedirect.com\/science\/article\/abs\/pii\/S0896844616301474\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>ANN in CO\u2082 corrosion prediction<\/strong><\/a> has established itself as an advanced methodology for modeling complex phenomena, such as CO\u2082 corrosion, by providing reliable estimates of corrosion rates and potential localized damage based on the specific composition of natural gas.<\/p>\n\n\n\n<p>This phenomenon, commonly known as sweet corrosion, is heavily influenced by the chemical composition of the gas, the presence of water, and traces of H\u2082S, as well as critical temperature and pressure conditions. Accurate prediction of CO\u2082 corrosive trends allows for the implementation of more efficient mitigation strategies, thereby reducing operational risks and maintenance costs across the infrastructure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Fundamentals of CO\u2082 corrosion in natural gas<\/h2>\n\n\n\n<p>When CO\u2082 dissolves in the water present within pipelines or transport systems, it forms carbonic acid (H\u2082CO\u2083), which subsequently lowers the pH and increases the medium&#8217;s conductivity. In this environment, the iron found in carbon steels undergoes oxidation through an anodic reaction, releasing electrons and dissolving as Fe\u00b2\u207a. Simultaneously, these electrons participate in the cathodic reaction of proton reduction, effectively closing the electrochemical circuit.<\/p>\n\n\n\n<p>The formation of iron carbonate (FeCO\u2083) can act as a protective film, significantly reducing the corrosion rate. However, the effectiveness of this protection depends on factors such as pH, temperature, flow velocity, and CO\u2082 concentration; if these conditions change, the film can dissolve, reactivating the corrosion process. Furthermore, the presence of H\u2082S intensifies the damage, favoring the formation of iron sulfides (FeS) and increasing the risk of<strong> <a href=\"\/?categoria_articulos=low-stress-corrosion-cracking\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/inspenet.com\/articulos\/agrietamiento-por-corrosion-bajo-tension\/\" rel=\"noreferrer noopener\">pitting and <\/a><\/strong><a href=\"\/?categoria_articulos=low-stress-corrosion-cracking\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/inspenet.com\/articulos\/agrietamiento-por-corrosion-bajo-tension\/\" rel=\"noreferrer noopener\"><strong>Sulfide Stress Cracking (SSC)<\/strong><\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is an Artificial Neural Network (ANN)?<\/h2>\n\n\n\n<p>Artificial Neural Networks (ANN) constitute an advanced machine learning tool designed to identify complex patterns within multivariate datasets. Their operation is inspired by the human nervous system, where multiple interconnected \u201cneurons\u201d process information simultaneously. Although at first glance they may seem complex, they are actually composed of fundamental elements and structures that work together to process data and generate results.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Structure of the Artificial Neural Network (ANN)<\/h3>\n\n\n\n<p>The basic structure of a neural network is composed of different layers of interconnected neurons. The input layer is responsible for receiving the data and transmitting it throughout the network, while the output layer provides the final result. Between them, there are one or more hidden layers responsible for transforming and processing the information. The following image shows the conceptualization of a diagram of an <a href=\"https:\/\/hediyetapan.medium.com\/understanding-the-mathematics-behind-multilayer-perceptrons-mlps-0de46159fe5a\" data-type=\"link\" data-id=\"https:\/\/hediyetapan.medium.com\/understanding-the-mathematics-behind-multilayer-perceptrons-mlps-0de46159fe5a\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Artificial Neural Network as a Multilayer Perceptron (MLP) system<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/cdn.inspenet.com\/1-IMG-1-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-1024x576.webp\" alt=\"Conceptualizing an artificial neural network as a system.\" class=\"wp-image-349951\" style=\"width:766px;height:auto\" srcset=\"https:\/\/cdn.inspenet.com\/1-IMG-1-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-1024x576.webp 1024w, https:\/\/cdn.inspenet.com\/1-IMG-1-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-300x169.webp 300w, https:\/\/cdn.inspenet.com\/1-IMG-1-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-768x432.webp 768w, https:\/\/cdn.inspenet.com\/1-IMG-1-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-1536x864.webp 1536w, https:\/\/cdn.inspenet.com\/1-IMG-1-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado.webp 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Conceptualizing an artificial neural network as a system.<\/figcaption><\/figure>\n\n\n\n<p><strong>1. Input Layer (Inputs \u2013 X): On the left side, the input variables are shown, represented as:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>x\u2081, x\u2082, \u2026, x\u2099<\/li>\n<\/ul>\n\n\n\n<p>Each of these variables feeds the network with process information.<\/p>\n\n\n\n<p>The term +1 represents the bias, which allows the model to be adjusted and improves learning capability.<\/p>\n\n\n\n<p><strong>2. Synaptic Weights (W\u00b9 and W\u00b2): The connections between neurons are represented by lines, each with an associated weight:<\/strong><\/p>\n\n\n\n<p>W\u00b9: connects the input layer to the hidden layer<\/p>\n\n\n\n<p>W\u00b2: connects the hidden layer to the output layer<\/p>\n\n\n\n<p>These weights are fundamental because:<\/p>\n\n\n\n<p>They determine the importance of each variable<\/p>\n\n\n\n<p>They are adjusted during the training of the network<\/p>\n\n\n\n<p>They allow modeling of non-linear relationships<\/p>\n\n\n\n<p><strong>3. Hidden Layer: This is the core of the model, where processing occurs:<\/strong><\/p>\n\n\n\n<p>Each node (neuron) combines the inputs through a weighted sum<\/p>\n\n\n\n<p>Then it applies an activation function (not explicitly shown in the image)<\/p>\n\n\n\n<p>In this part, the network detects complex patterns<\/p>\n\n\n\n<p><strong>4. Output Layer (Outputs \u2013 Y): On the right side are the outputs:<\/strong><\/p>\n\n\n\n<p>y\u2081, y\u2082, \u2026, y\u2098<\/p>\n\n\n\n<p><strong>5. Information Flow: The process follows a clear direction:<\/strong><\/p>\n\n\n\n<p>During training: the weights are adjusted through backpropagation to minimize the error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How is data processed in an ANN applied to corrosion?<\/h2>\n\n\n\n<p>The use of ANNs allows anticipating corrosive behavior and optimizing mitigation strategies, reducing risks and increasing the service life of equipment. Thus, the combination of traditional partial pressure criteria with artificial intelligence techniques constitutes a powerful tool for corrosion management in the natural gas industry. Data processing in an ANN for corrosion prediction follows a structured sequence:<\/p>\n\n\n\n<p>First, representative system data are collected, including natural gas compositions, operating conditions, and historical corrosion records. This data is then cleaned, normalized, and organized to ensure consistency and avoid bias in the model.<\/p>\n\n\n\n<p>Next, the data is divided into training and validation sets. During training, the network adjusts its internal parameters using algorithms such as backpropagation, minimizing the error between predicted and observed values.<\/p>\n\n\n\n<p>In more advanced applications, probabilistic classifiers, such as Bayesian approaches, can be incorporated, allowing estimation of the probability of occurrence of specific corrosive scenarios, thereby increasing the robustness of the model.<\/p>\n\n\n\n<p>This approach is particularly useful in systems where corrosion depends on multiple interdependent variables, as occurs in environments with CO\u2082 and H\u2082S.<\/p>\n\n\n\n<p>The partial pressure of gases is a key factor in predicting the type of corrosion that may occur in a natural gas mixture, as it directly influences the chemical reactions affecting the materials. To evaluate this, CO\u2082 values are expressed in molar percentage and H\u2082S in parts per million (ppm). The relationship between the partial pressures of both gases allows determining the predominant corrosion mechanism, as described by Feng et al. (2018). The criteria are as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PpCO\u2082\/PpH\u2082S &lt; 20 \u21d2 Acidic H\u2082S corrosion:<\/strong> The corrosive action of hydrogen sulfide predominates, generating strong acids capable of attacking the metal.<\/li>\n\n\n\n<li><strong>20 &lt; PpCO\u2082\/PpH\u2082S &lt; 500 \u21d2 Combined H\u2082S + CO\u2082 corrosion:<\/strong> Both gases contribute to the corrosive process, generating a mixture of carbonic acid and hydrogen sulfide acid that accelerates material degradation.<\/li>\n\n\n\n<li><strong>PpCO\u2082\/PpH\u2082S &gt; 500 \u21d2 Sweet CO\u2082 corrosion:<\/strong> CO\u2082 is the dominant gas, primarily forming carbonic acid, which produces a more uniform and less aggressive attack than that caused by H\u2082S.<\/li>\n<\/ul>\n\n\n\n<p>These criteria allow engineers and corrosion specialists to anticipate the type of damage that could occur.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Application of ANN in CO\u2082 corrosion prediction<\/h2>\n\n\n\n<p>The usefulness of ANNs in the natural gas industry lies in the fact that corrosion does not depend on a single variable but on the simultaneous interaction of multiple factors, such as: chemical composition of the gas (CO\u2082, H\u2082S, CH\u2084, N\u2082, etc.), pressure and temperature, presence of liquid water, flow or static conditions. And taking into consideration predictions of the predominant corrosion mechanism based on partial pressure.<\/p>\n\n\n\n<p>Based on the above, to improve the accuracy of these predictions, Artificial Neural Networks (ANNs) can be employed. These artificial intelligence tools allow processing multiple variables simultaneously, such as gas partial pressure, temperature, water content, flow velocity, and material characteristics, and learning complex corrosion patterns that are not always evident through traditional methods, applying the Multilayer Perceptron (MLP) system model.<\/p>\n\n\n\n<p>The image represents the typical architecture of an Artificial Neural Network (ANN) used to model and predict complex phenomena, such as corrosive trends depending on operating variables and gas composition.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/cdn.inspenet.com\/1-IMG-2-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-1024x576.webp\" alt=\"ANN model for predicting corrosion\" class=\"wp-image-349963\" style=\"width:789px;height:auto\" srcset=\"https:\/\/cdn.inspenet.com\/1-IMG-2-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-1024x576.webp 1024w, https:\/\/cdn.inspenet.com\/1-IMG-2-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-300x169.webp 300w, https:\/\/cdn.inspenet.com\/1-IMG-2-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-768x432.webp 768w, https:\/\/cdn.inspenet.com\/1-IMG-2-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado-1536x864.webp 1536w, https:\/\/cdn.inspenet.com\/1-IMG-2-ING-IA-ANN-in-predicting-CO2-induced-corrosion-in-the-oil-industry_resultado.webp 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In this case, the variables <strong>x1, x2, \u2026, xn<\/strong> on the left correspond to system parameters, for example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Partial pressure of CO\u2082<\/li>\n\n\n\n<li>H\u2082S concentration<\/li>\n\n\n\n<li>Temperature<\/li>\n\n\n\n<li>Flow velocity<\/li>\n\n\n\n<li>pH or water content<\/li>\n<\/ul>\n\n\n\n<p>Each of these variables feeds the network with process information.<\/p>\n\n\n\n<p>On the right side are the outputs:<\/p>\n\n\n\n<p><strong>y1, y2, \u2026, ym<\/strong><\/p>\n\n\n\n<p>These represent the model predictions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Results and analysis<\/h2>\n\n\n\n<p>Recent studies show that ANNs outperform traditional empirical methods in prediction accuracy. Among the most relevant findings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Gases with more than 10% CO\u2082 show significant acceleration of corrosion.<\/li>\n\n\n\n<li>The CO\u2082 + H\u2082S combination generates critical scenarios for FeS and SSC formation.<\/li>\n\n\n\n<li>ANNs allow defining preventive strategies by optimally adjusting inhibitor injection.<\/li>\n<\/ul>\n\n\n\n<p>These results demonstrate how advanced modeling can anticipate risks and reduce the occurrence of unexpected structural failures, contributing to operational safety and efficiency.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p>Predicting CO\u2082 corrosive trends in natural gas using Neural Networks represents a major advancement in industrial corrosion management. This methodology enables the industry to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Evaluate how the specific composition of the gas affects the rate of corrosion.<\/li>\n\n\n\n<li>Anticipate the formation of pitting and SSC before significant damage occurs.<\/li>\n\n\n\n<li>Implement more precise and cost-effective mitigation strategies.<\/li>\n<\/ul>\n\n\n\n<p>The integration of ANN-based predictive models with real-time monitoring and laboratory analysis provides a robust tool for facing the challenges of CO\u2082 corrosion, ensuring both pipeline integrity and operational continuity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Nesic, S. (2007). <em>Key issues related to modeling of internal corrosion of oil and gas pipelines \u2013 A review.<\/em> Corrosion Science, 49(12), 4308\u20134338. https:\/\/doi.org\/10.1016\/j.corsci.2007.06.043<\/li>\n\n\n\n<li>Zhang, X., Zhang, Y., &amp; Li, X. (2020). <em>Prediction of CO\u2082 corrosion rates in pipelines using artificial neural networks.<\/em> Journal of Loss Prevention in the Process Industries, 65, 104142. https:\/\/doi.org\/10.1016\/j.jlp.2020.104142<\/li>\n\n\n\n<li>Uhlig, H. H., &amp; Revie, R. W. (2011). <em>Corrosion and Corrosion Control: An Introduction to Corrosion Science and Engineering<\/em> (4th ed.). Hoboken, NJ: Wiley.<\/li>\n\n\n\n<li>Da Silva, R. C., &amp; Spinac\u00e9, E. V. (2015). <em>Effect of CO\u2082 and H\u2082S on the corrosion of carbon steel in natural gas pipelines.<\/em> Materials Research, 18(4), 902\u2013912. https:\/\/doi.org\/10.1590\/1516-1439.327615<\/li>\n\n\n\n<li>Chen, Y., &amp; Sun, H. (2018). <em>Application of neural networks for prediction of internal corrosion in oil and gas pipelines.<\/em> Computers &amp; Chemical Engineering, 116, 239\u2013247. https:\/\/doi.org\/10.1016\/j.compchemeng.2018.05.011<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions (FAQs)<\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1775505866980\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is CO\u2082 corrosion in natural gas?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>It is a type of corrosion known as &#8220;sweet corrosion&#8221; that occurs when CO\u2082 dissolves in water to form carbonic acid (H\u2082CO\u2083), leading to the oxidation of carbon steel and resulting in pitting or uniform corrosion.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1775505872925\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How does natural gas composition affect corrosion?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The concentration of CO\u2082 and H\u2082S, the presence of methane, and overall humidity levels influence the severity. High CO\u2082 levels and traces of H\u2082S significantly increase the risk of pitting and Sulfide Stress Cracking (SSC).<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1775505879141\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What are Neural Networks and how do they help in prediction?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Artificial Neural Networks (ANNs) are machine learning models that correlate complex variables\u2014such as gas composition, pressure, temperature, and humidity\u2014with the corrosion rate, providing accurate predictions and early risk warnings.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1775505885519\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is the advantage of using ANN over empirical methods?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Unlike traditional methods, ANNs capture complex non-linear relationships between variables, significantly improving prediction accuracy and allowing for the optimization of mitigation strategies in real time.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1775505896205\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What mitigation measures can be applied based on the prediction?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Depending on the estimated risk, engineers can deploy chemical inhibitors, protective coatings, humidity control, or specific operational adjustments to reduce corrosion and prevent structural failures.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1775505910588\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What structural risks are associated with CO\u2082 + H\u2082S corrosion?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The combination of these gases can generate iron sulfides (FeS), increase the porosity of protective films, and promote Sulfide Stress Cracking (SSC), which can lead to sudden structural failures under mechanical stress.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Artificial Neural Networks help detect corrosion patterns and enhance preventive measures in natural gas facilities.<\/p>\n","protected":false},"author":18,"featured_media":349970,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categoria_articulos":[8105],"etiqueta_articulos":[11367],"class_list":["post-349548","articulos","type-articulos","status-publish","format-standard","has-post-thumbnail","hentry","categoria_articulos-corrosion-and-materials","etiqueta_articulos-corrosion-prevention-and-control"],"acf":[],"_links":{"self":[{"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/articulos\/349548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/articulos"}],"about":[{"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/types\/articulos"}],"author":[{"embeddable":true,"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/comments?post=349548"}],"version-history":[{"count":25,"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/articulos\/349548\/revisions"}],"predecessor-version":[{"id":350128,"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/articulos\/349548\/revisions\/350128"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/media\/349970"}],"wp:attachment":[{"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/media?parent=349548"}],"wp:term":[{"taxonomy":"categoria_articulos","embeddable":true,"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/categoria_articulos?post=349548"},{"taxonomy":"etiqueta_articulos","embeddable":true,"href":"https:\/\/inspenet.com\/en\/wp-json\/wp\/v2\/etiqueta_articulos?post=349548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}