Modelling of Behavior for Inhibition Corrosion of Bronze Using Artificial Neural Network (ANN)

In this work, three models based on Artificial Neural Network (ANN) were developed to describe the behavior for the inhibition corrosion of bronze in 3.5% NaCl + 0.1 M Na2SO4, using the experimental data of Electrochemical Impedance Spectroscopy (EIS). The database was divided into training, validation, and test sets randomly. The parameters process used as the inputs of the ANN models were frequency, temperature, and inhibitor concentration. The outputs for each ANN model and the components in the EIS spectrum (Zre, Zim, and Zmod) were predicted. The transfer functions used for the learning process were the hyperbolic tangent sigmoid in the hidden layer and linear in the output layer, while the Levenberg–Marquardt algorithm was applied to determine the optimum values of the weights and biases. The statistical analysis of the results revealed that ANN models for Zre, Zim, and Zmod can successfully predict the inhibition corrosion behavior of bronze in different conditions, where what was considered included variability in temperature, frequency, and inhibitor concentration. In addition, these three input parameters were keys to describe the behavior according to a sensitivity analysis.


Introduction
Copper and alloys use are very common in the industry due to their multiple properties such as high electrical and thermal conductivities, mechanical workability, and corrosion resistance. One of the principal copper alloys is represented by bronze that forms a protective layer when it is exposed to the environment. However, the environmental pollutants are more aggressive and it is necessary to increase protection [1,2].
In order to decrease the effects of corrosion, organic inhibitors offer a good alternative. They are a practical and economically feasible strategy to attenuate the economic impact that is generated by the structural damage of material loss, and can contribute to the preservation of equipment and structures in optimal conditions [3,4]. The characteristics of organic compounds with the potential to protect metals from corrosion contain heteroatoms such as nitrogen, oxygen, sulfur, phosphorous or π bonds, which act as active centers to adsorb on the metal surface [5][6][7][8].
Recently, pharmaceutical drugs have attracted special attention given that they share a similar characteristic in their chemical structure. The azole group and derivatives have been used widely to protect copper and alloys. According to Antonijevic and Petrovic (2015) [9], the copper atom presents vacant d orbitals that form bonds with heteroatoms that donate electrons or generate an interaction with rings containing conjugated bonds, π electrons. The complex forms a protective film on the metallic surface that blocks aggressive ions [10][11][12].
Based on previous research, the electrochemical behavior of bronze was investigated in a corrosive electrolyte (3.5% NaCl + 0.1 M Na 2 SO 4 ) in the presence and absence of ketoconazole as a corrosion inhibitor at 25, 40, and 60 • C. The electrochemical evidence exhibited that ketoconazole inhibits the corrosion of the bronze, forming a protective layer with its conjugated bonds and nitrogen atoms that decrease both the charge transfer and the diffusion of aggressive species towards the metal surface. Hence, the ketoconazole acts as an adequate mixed type corrosion inhibitor [11].
Nowadays, it is necessary to develop other alternatives to better understand corrosion phenomena, reduce time, the number of experiments, as well as control the process. ANN models represent a good option to describe corrosion behavior [12,13]. This kind of a model is based on the biological functions of the brain where connections of neurons form a network. The prediction performance depends on a learning stage and corresponds to the correlation of the inputs and outputs of the model [14,15]. Some works have already demonstrated the efficiency of these models in corrosion systems using different conditions. For example, in the prediction of corrosion inhibition in pipeline steel [16][17][18], the resistance of dental metallic [19], to determine inhibitor efficiency applied in aluminium [20], and others [21][22][23][24][25][26][27][28].
Therefore, the present work aims to develop three ANN models based on the experimental data of EIS. These models are used to describe the behavior of the corrosion process of bronze with ketoconazole as an inhibitor and determine the different effects of the critical parameters, such as concentration, temperature, and frequency of the inhibitor in the EIS spectrum. Consequently, these models will be able to determine the corrosion in real time, decreasing the time and cost of experimentation for other conditions of the same system of bronze/electrolyte.

Experimental
The experimental database was prepared with the results obtained in EIS at 24 h, the bronze was exposed to the corrosive electrolyte (3.5% NaCl + 0.1 M Na 2 SO 4 ) at 25, 40, and 60 • C with inhibitor concentrations of 0, 5, 10, 25, 50, and 100 ppm. All electrochemical measurements were performed in a typical three-compartment glass cell using a calomel electrode and graphite as a reference and counter electrode, respectively [11].
EIS is widely used for the characterization of film inhibitor protection on the metal surface and to understand the physicochemical properties of the system mechanism reactions. This technique consists of applying low voltage as a perturbation signal allowing the measurement of the current response at a different frequency to develop the EIS diagram [27,29,30]. EIS spectrum classification is a Nyquist and Bode diagram; the first one contains Z re (Ω·cm 2 ) and Z im (Ω·cm 2 ); the second Z mod respect to frequency (Hz).

Database Preparation
The database was composed by three inputs at the ANN: Temperature ( • C), inhibitor concentration (ppm), and frequency (Hz). The outputs for each model were represented by Z re (Ω·cm 2 ), Z im (Ω·cm 2 ) and Z mod (Ω·cm 2 ). Table 1 shows the interval work for each input and output for the ANN model.

Normalization Input Data
A satisfactory normalization is one of the most important aspects of the training process, which represents a direct influence on the model and offers benefits such as suitable results and a considerable decrease in calculation time [31]; because of that, all samples were normalized in the range of 0 to 1. The input database x i,Real (from the training, validation, and test sets) were scaled to a new normalized value x i,Norm using Equation (1) [32,33]:

Development of ANN Models
Matlab ® software (R2015b, Mathworks ® , Natick, MA, USA) was used for the development of the three models, evaluating different combinations of activation functions and the number of neurons was increased until the best correlation between input and output variables was achieved. The training process was purposed to minimize the prediction error of the ANN through the different connections between weights and biases; it was possible using the hyperbolic tangent sigmoid transfer function in the hidden layer and linear transfer function in the output layer.
The Levenberg-Marquardt algorithm was used to determine the optimum values of the weights and biases using two parameters of the Mean Square Error (MSE) and the Coefficient of determination (R 2 ). The database was randomly divided into training (60%), test subsets (20%), and validation (20%). Remarking that the last percentage corresponds to new data meaning than the validation values were not used during training. In order to obtain a good performance model and the optimum architecture, it was necessary to decrease differences between experimental and simulated values, increasing the number of neurons in the hidden layer gradually and determining MSE and R 2 at the same time to find the minimum value for MSE and maximum for R 2 , ( Figure 1); when the MSE increased, the training was stopped because at this moment its generate overfitting in ANN and the performance associated to R 2 value could not improve, such as in Figure 2, where the plot represents the R 2 and MSE function of the number of neurons in the hidden layer for each ANN model. Matlab ® software (R2015b, Mathworks ® , Natick, MA, US) was used for the development of the three models, evaluating different combinations of activation functions and the number of neurons was increased until the best correlation between input and output variables was achieved. The training process was purposed to minimize the prediction error of the ANN through the different connections between weights and biases; it was possible using the hyperbolic tangent sigmoid transfer function in the hidden layer and linear transfer function in the output layer. The Levenberg-Marquardt algorithm was used to determine the optimum values of the weights and biases using two parameters of the Mean Square Error (MSE) and the Coefficient of determination (R 2 ). The database was randomly divided into training (60%), test subsets (20%), and validation (20%). Remarking that the last percentage corresponds to new data meaning than the validation values were not used during training. In order to obtain a good performance model and the optimum architecture, it was necessary to decrease differences between experimental and simulated values, increasing the number of neurons in the hidden layer gradually and determining MSE and R 2 at the same time to find the minimum value for MSE and maximum for R 2 , (Figure 1); when the MSE increased, the training was stopped because at this moment its generate overfitting in ANN and the performance associated to R 2 value could not improve, such as in Figure 2, where the plot represents the R 2 and MSE function of the number of neurons in the hidden layer for each ANN model.

Statistical Analysis of Experimental and Predicted Data
The MSE parameter is commonly used to quantify the differences between the experimental and simulated values of the developed models. The R 2 presents the strength of the linear proportion of variability in a dataset, and is the most often seen number between 0 and 1, and R 2 near to 1 indicates that a regression line fits that data well [32]. Furthermore, the intercept-slope test (slope = 1 and intercept = 0) was achieved to validate the linearity and exactitude model [34].
The results obtained with ANN models were compared with the experimental data. The statistical test parameters are describing in the following equations:

Statistical Analysis of Experimental and Predicted Data
The MSE parameter is commonly used to quantify the differences between the experimental and simulated values of the developed models. The R 2 presents the strength of the linear proportion of variability in a dataset, and is the most often seen number between 0 and 1, and R 2 near to 1 indicates that a regression line fits that data well [32]. Furthermore, the intercept-slope test (slope = 1 and intercept = 0) was achieved to validate the linearity and exactitude model [34]. The results obtained with ANN models were compared with the experimental data. The statistical test parameters are describing in the following equations:

Sensitivity Analysis
Finally, the sensitivity analysis was applied to find the level of impact of frequency, temperature, concentration as input variables in the modeling output variable can be found through the neural weight matrix. The equation required to carry out this analysis is known as the Garson equation based on the partitioning of connection weights: where I j is the relative importance of the frequency, temperature and concentration on the Z re , Z im and Z mod , N i and N h are the quantity of input and hidden neurons, respectively; W are connection weights, the superscripts "I", "h" and "o" refer to input, hidden and output layers, respectively; and subscripts "k", "m" and "n" refer to input, hidden and output neurons, respectively [35].

ANN Model
As mentioned earlier, an ANN training was used to predict the corrosion inhibition behavior for bronze in 3.5% M NaCl + 0.1 M Na 2 SO 4 solution with the EIS database at 24 h of exposure to electrolyte; finding that the best architectures were Z re (3:8:1), Z im (3:16:1) and Z mod (3:16:1) (see Figure 2) given that when the number of neurons is major to the values mentioned for each model, the coefficient R 2 decreases and the MSE is major then the performance model was lower. All ANN models developed are described by the following equation: where Z b = Z re , Z im , and Z mod , S is According to statistical analysis, the R 2 value is reasonably high, which indicates the predictive power of the models (see Figure 3) for Z re 0.9875, 0.9944 correspond to Z im , and finally 0.9876 for Z mod (Table 5). In order to validate the ANN models, the intercept-slope test with 99% confidence was applied to demonstrate the linearity model, as mentioned before. The results are shown in Table 5, which indicates that the model is adequate to describe the behavior for inhibition corrosion of bronze considering that the slope = 1 and intercept = 0.
In addition, the comparison between the experimental and simulated results was possible plotting the spectrum EIS at the different temperatures (25,40 and 60 • C) including inhibitor concentrations (0, 5, 10, 25, 50 and 100 ppm); the results obtained shows high correlation in Figure 4. Table 2. Weights values (W o , W i ) and biases (b 1 and b 2 ) for Z re model (3:8:1).   Table 3. Weights values (W o , W i ) and biases (b 1 and b 2 ) for Z im model (3:16:1).   Table 4. Weights values (W o , W i ) and biases (b 1 and b 2 ) for Z mod model (3:16:1).

Sensitive Analysis of Input Variables
On the other hand, the sensitive analysis presented the same order of relative importance for the three ANN models. According to the results in Figure 5, the concentration represented the major relative importance followed by temperature and finally, the lowest percentage corresponded to the frequency in all cases; then the correct concentration measure could be considered as a critical parameter in the EIS test.

Sensitive Analysis of Input Variables
On the other hand, the sensitive analysis presented the same order of relative importance for the three ANN models. According to the results in Figure 5, the concentration represented the major relative importance followed by temperature and finally, the lowest percentage corresponded to the frequency in all cases; then the correct concentration measure could be considered as a critical parameter in the EIS test.

Conclusions
Three ANN models were developed and validated satisfactorily to describe the behavior for the inhibition corrosion of bronze in 3.5% NaCl + 0.1 M Na2SO4 indicating coefficients of determination equivalent to R 2 = 0.9875, 0.9944, and 0.9876, for Zre, Zim, and Zmod respectively. Additionally, the models achieved the intercept-slope test requirements.
The sensitivity analysis revealed that, for the three ANN models, the variable with the greatest influence on the impedance response was the inhibitor concentration, followed by the temperature and the frequency. Therefore, the three proposed ANN models can be used to estimate the variables involved in the EIS spectrum in a wide range of conditions extrapolating to other conditions of the same system of bronze/electrolyte. Acknowledgments: The first author thank to the Consejo Nacional de Ciencia y Tecnología (CONACyT) for the economic support received for the development of this research.

Conclusions
Three ANN models were developed and validated satisfactorily to describe the behavior for the inhibition corrosion of bronze in 3.5% NaCl + 0.1 M Na 2 SO 4 indicating coefficients of determination equivalent to R 2 = 0.9875, 0.9944, and 0.9876, for Z re , Z im , and Z mod respectively. Additionally, the models achieved the intercept-slope test requirements.
The optimal architecture for Z re model was obtained with (3:8:1) neurons, whereas for Z im and Z mod (3:16:1) neurons were used in the (input: hidden: output) layer respectively.
The sensitivity analysis revealed that, for the three ANN models, the variable with the greatest influence on the impedance response was the inhibitor concentration, followed by the temperature and the frequency. Therefore, the three proposed ANN models can be used to estimate the variables involved in the EIS spectrum in a wide range of conditions extrapolating to other conditions of the same system of bronze/electrolyte.