Next Article in Journal
Inferential Composition Control of a Distillation Column Using Active Disturbance Rejection Control with Soft Sensors
Next Article in Special Issue
Implementation of a Hybrid Intelligence System Enabling the Effectiveness Assessment of Interaction Channels Use in HMI
Previous Article in Journal
Diffusion of White-Hat Botnet Using Lifespan with Controllable Ripple Effect for Malware Removal in IoT Networks
Previous Article in Special Issue
Comparison of the Usability of Apple M1 Processors for Various Machine Learning Tasks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of Neural Network in Predicting H2S from an Acid Gas Removal Unit (AGRU) with Different Compositions of Solvents

1
Department of Chemical Engineering, Universiti Teknologi PETRONAS, Seri Iskandar 32610, Malaysia
2
Department of Electrical and Electronics Engineering, Universiti Teknologi PETRONAS, Seri Iskandar 32610, Malaysia
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(2), 1020; https://doi.org/10.3390/s23021020
Submission received: 9 November 2022 / Revised: 29 December 2022 / Accepted: 9 January 2023 / Published: 16 January 2023
(This article belongs to the Special Issue Intelligent Sensors and Machine Learning)

Abstract

:
The gas sweetening process removes hydrogen sulfide (H2S) in an acid gas removal unit (AGRU) to meet the gas sales’ specification, known as sweet gas. Monitoring the concentration of H2S in sweet gas is crucial to avoid operational and environmental issues. This study shows the capability of artificial neural networks (ANN) to predict the concentration of H2S in sweet gas. The concentration of N-methyldiethanolamine (MDEA) and Piperazine (PZ), temperature and pressure as inputs, and the concentration of H2S in sweet gas as outputs have been used to create the ANN network. Two distinct backpropagation techniques with various transfer functions and numbers of neurons were used to train the ANN models. Multiple linear regression (MLR) was used to compare the outcomes of the ANN models. The models’ performance was assessed using the mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R2). The findings demonstrate that ANN trained by the Levenberg–Marquardt technique, equipped with a logistic sigmoid (logsig) transfer function with three neurons achieved the highest R2 (0.966) and the lowest MAE (0.066) and RMSE (0.122) values. The findings suggested that ANN can be a reliable and accurate prediction method in predicting the concentration of H2S in sweet gas.

1. Introduction

In recent decades, there has been a sharp increase in the demand for natural gas. Despite its significant contribution to the current global economy and progress, natural gas typically contains a number of pollutants that must be removed in order for it to meet the requirements for gas pipelines, such as acid gases (hydrogen sulfide (H2S) and carbon dioxide (CO2)) [1]. Due to human health and environmental concerns, numerous restrictions and regulations have been imposed on the gas sales’ specifications. The permitted concentration of H2S is between 4 and 20 part per million (ppm) and not more than 3% of CO2 [2]. Therefore, the acid gas must undergo a gas treatment process, namely gas sweetening. In the gas sweetening process, acid gasses, such as H2S and CO2, are removed to produce a sweet gas [3].
The gas sweetening processes can be divided into several categories, which include physical, chemical and hybrid solvents, adsorption processes and physical separation. Alkanolamine solvents for absorption have been the most extensively utilized commercial technology in a variety of industries in recent years [2]. Utilizing the solvents’ capacity and reducing the process’s operating costs are two common strategies put forth by researchers. Studies have shown that mixed tertiary amines, such as N-methyldiethanolamine (MDEA) and tri-ethanolamine (TEA), showed a positive impact as they reduced the process costs by up to 3% when 40% MDEA and 5% TEA were used [4]. According to Ammar and Samah (2020), a formulated solvent known as mixed amines, which contains MDEA as the primary solvent, is typically blended or added with one or more reactive amines such as piperazine, TEA, sulfolane, or diethanolamine (DEA) [2].
The purpose of mixing different amines is to combine each of their favourable characteristics to maximize the removal capacity of the acid gas. In contrast to primary and secondary amines, the tertiary amine MDEA has a lower vapour pressure, greater resilience to deterioration, and fewer corrosion issues [5]. Other than these advantages, the disadvantage is that it does not directly react with CO2, slowing down the absorption rate of CO2 in aqueous MDEA [6]. To increase the rate of absorption, activators, including piperazine (PZ), monoethanolamine (MEA), and sulfolane, are used with MDEA [7]. Using PZ as an activator has shown positive results in the past few years. CO2 is absorbed more quickly by MDEA when PZ is added than by MEA or DEA [8]. One study that established a detailed model to examine the solubility of CO2 into activated MDEA by PZ demonstrated that theoretically one mole of PZ can absorb two moles of CO2 [9].
It is necessary to establish the lean amine mixture’s ideal concentration, which matches the H2S and CO2 levels in sweet gas. A typical alkanolamine-based solvent ranges from 30 to 45 wt% MDEA and 5–20 wt% piperazine, with the rest made up of water [10]. Still, there is no guarantee of optimal removal efficiency for such a prescribed solvent. Given the increasing range of feed gas conditions and varying process operations, such as those encountered in current gas field practice, there is a need to consider a systematic approach for optimizing such solvents [11]. Artificial neural networks (ANNs) have been widely used in this context to solve engineering applications, particularly for the prediction of highly non-linear systems [12]. The growing body of research on ANN applications has demonstrated its advantages over traditional regression. This might be a result of how closely these networks resemble the human brain [13]. There are three layers that make up the ANN architecture: input, hidden, and output. Neurons make up for each of the layers and are linked by synapses with weighted coefficients [12].
When compared to other ANN types, the multilayer perceptron (MLP) with a backpropagation learning approach is employed the most frequently for problem-solving [14]. Several studies have shown the use of ANN in natural gas treatment. A study on the application of ANN in predicting the output parameter of gas sweetening regeneration column revealed that the developed ANN model produced a good consistency with the experimental data, which concluded that the model developed can be used for predicting the output parameters accurately [15]. Another study regarding predicting the solubility of H2S for both single and blended adsorbents has shown that the ANN model with 17 hidden neurons produced the highest R2 (0.9817) and the lowest mean square error MSE (0.0014) [12]. Furthermore, the experimental data and the predicted solubility of H2S is well aligned.
In order to find the optimum prediction model for predicting the H2S content in sweet gas, an ANN model based on MLP with various transfer functions and number of neurons was created for this study. The outcomes of ANN have also been evaluated with those of multiple linear regression (MLR). Section 2 of this paper describes the natural gas sweetening plant, flowsheet development and validation and proposed system models for predictions. Section 3 in this paper provides the results and discussion and is followed by the conclusion of this study in Section 4.

2. Materials and Methods

The methods used to create the models that predict the H2S content of sweet gas are discussed in this section. MLR and ANN were used to train the data from a validated simulation. In contrast to linear regression, which was compared in this study due to its ease and widespread use in many applications and research, ANN was chosen due to its greater recognition and superior performance in predicting non-linear correlations. Figure 1 depicts the overall flow of the study’s work plan.

2.1. Process Description of Natural Gas Sweetening Plant

As mentioned, there are many methods used to treat acid gas. However, the amine process is currently the most widely used method in acid gas removal [15]. The reversible reaction for the gas sweetening process is as follows [16]:
2RNH2 + H2S ⇋ (RNH3)S
2RNH2 +CO2 ⇋ (RNH2)2H2CO3
where R is mono-, di- or tri-ethanol, while N, H, S, C and O represent nitrogen, hydrogen, sulphur, carbon and oxygen, respectively. The forward reaction of this process is exothermic, and its reversible reaction is endothermic. The endothermic reaction of this process can be promoted by heating the amine solution.
A typical process flow diagram for an amine-treating unit is shown in Figure 2. A simplified version of the process description is provided below to facilitate further discussion; the complete process description is also available from [17]. The sour feed gas is typically supplied into an input separator first to be cleansed and filtered of any free liquids and solids before being fed into the amine unit. The aqueous amine solution enters at the top of the amine absorber unit, and the sour gas is then fed into the bottom, flowing counter-currently while in contact with it. H2S in the gas phase is transported to the liquid phase during the absorber contact period in accordance with the reaction of Equation (1). The amine solution that absorbed the acid gas and emerged from the bottom of the absorber is the rich amine. Sweet gas is defined as sour gas that has been treated in an absorber where the H2S concentration has dropped to below the standard limit of 4 ppm and not more than 3 percent mole of CO2 leaves at the absorber’s top.
The rich amine flows into a flash separator at low pressure, removing the hydrocarbons through weight differences and separating gas components. Before entering the regenerator, the rich amine is pre-heated through a lean/rich heat exchanger, reducing the reboiler’s heat load. This is a preliminary step in removing H2S. When the rich amine is in touch with the high-temperature amine vapour phase created in the reboiler, regeneration takes place in the regenerator. As previously mentioned, a high temperature encourages the reversal of Equation (1). Lean amine, which has a high temperature and a low percentage of acid gas, is then cycled back to the absorber. In order to recover the vaporised amine, the rich amine’s stripped acid gas is cooled in a condenser before being refluxed back into the regenerator. Before they may be released into the atmosphere without harm, the acid gas that leave from the reflux’s top needs to undergo additional processing.

2.2. Sour Feed Gas Specification

Before moving forward with the data generation of MDEA and PZ, a validated flowsheet is required. Some of the conditions of the variables are adopted from the previous literature. The flow rate of the sour gas, its pressure and temperature are 7154.8 kmol/h, 54.03 bar and 52 °C. MDEA is commonly used between 30 to 50 wt%. As for this simulation, 48% of MDEA is used to simulate and compare with industrial data obtained from the previous literature [18]. The MDEA solution enters at the top of the absorption tower at a pressure and temperature of 54.32 bar and 55 °C, respectively. Table 1 shows the sour feed gas composition used for the simulation.

2.3. Simulation Validation

A case study was developed to validate the simulation results’ accuracy and reliability, which will then be used for data generation. The simulation was developed in Aspen HYSYS 12.1 with an acid gas fluid package, which is recommended for natural gas treatment [2]. Figure 3 shows the developed flowsheet for acid gas treatment. Table 2 shows the simulation and the industrial data’s flow rate of H2S and CO2 in sweet gas. The error comparison between the industrial and simulation data is calculated as follows:
Error   ( % ) = Industrial Simulation Industrial × 100
The actual comparison of the flow rate of H2S, CO2 and the total flow of sweet gas between the industrial, the previous literature and simulation data show a reasonably good agreement. Thus, the flowsheet can be used for data generation.

2.4. Data Generation

From the converged simulation and validated flowsheet, numerous data can be generated by simulating different values of a single variable using the Aspen Simulation Workbook. The choice of parameters and the range of manipulation for each parameter are decided based on the previous literature. These datasets are crucial as data-driven models depend heavily on a large dataset. The larger the dataset, the better the model. The data produced are further utilized to study the effects of manipulating several operational parameters of the system. Above all, data generation is conducted in three steps: simulation of acid gas treatment using a base case scenario, identification of input and output variables, which are the independent and dependent variables and rigorous simulation using multiple case scenarios involving the manipulation of input variables and obtaining the corresponding output variables.
In machine learning, identifying independent and dependent variables is vital to make predictions using data-driven models. Independent variables are input variables that do not depend on other variables but might cause changes in other variables. In contrast, dependent variables are output variables solely influenced by the changes implied in the independent variables. The determination of independent and dependent variables is purely supported by the literature where standard input and output variables are identified. Their corresponding lower and upper boundaries for generating outputs are based on various manipulated input variables. As for the MDEA and PZ, their lower and upper limits were obtained from a previous study [2]. As for the temperature and absorber pressure, the output was obtained through a sensitivity analysis. Sensitivity analysis analyses how a certain dependent variable is affected by a changed value of an independent variable under a specific set of assumptions. The range of the temperature and absorber for this work is set to be ±30% of the base value. Table 3 shows the independent and dependent variables corresponding to lower and upper limits. Table 4 shows the framework for the data generation with respect to their input and their combination of inputs.

2.5. Data Collection and Pre-Processing

A total of 15 simulation runs have been conducted with respect to their input and their combination. This generates a total of 3015 data points from the data generation section. The parameters reported in this study are the essential variables that affect the rate of absorption of H2S. The concentration of MDEA and PZ, the temperature of amine solvent and the pressure of the absorber are the input variables, and the concentration of H2S in sweet gas is the targeted output. A total of five combinations of outputs were considered to determine the concentration of H2S in sweet gas, shown in Table 5. The predictive models were developed by using MATLAB version R2022a [14]. First, the code for the neural network was developed by utilizing the neural net fitting toolbox in MATLAB. Then, different transfer functions were tested by altering the codes. Next, the function “fitlm” was used for linear regression to develop the regression model. Finally, correlation matrices were plotted through a scatter plot before training to analyse the relationship between the variables.

2.6. Model Development

2.6.1. Feedforward Neural Network-Based Model

A neural network is an algorithm that draws inspiration from the human brain and uses examples, patterns, and scenarios to learn and then applies them to solve problems [14]. The layers of neurons that make up a neural network serve as the network’s central processing units. In contrast to a model based on regression, ANN can handle noisy and non-linear data. Due to its simplicity of construction and ability to serve as a universal approximator, this study opts for a multilayer feedforward network or multilayer perceptron (MLP) with a single hidden layer [19]. A conceptual diagram of the created MLP used in this study is shown in Figure 4. The network receives inputs in its input layer, which has four input neurons, and predicts results in its output layer. Between the input and output, it has hidden layers where the majority of the network’s processing is needed and conducted. As an illustration, the hidden and output layer activation functions were performed using “tansig” and “purelin.” The MLP must be taught to recognise the ideal weights of connections between the neurons in order to obtain a minimal difference between the measured and predicted values of the dependent variable [20]. The most common method of training MLP is through a two-step approach of the backpropagation (BP) method. The first step is propagating the input signal to estimate the outputs [19]. In the second step, the weight vectors and biases between the layers are adjusted, the mean square error (MSE) between the observed and predicted results is reduced, and the model’s generalization is increased to make it more dependable [14].

2.6.2. Multiple Linear Regression (MLR)

Regression analysis is a crucial statistical tool that determines the correlation between the dependent (response) and independent (predictors) variables. Linear regression is one of the simplest yet most widely used models in determining the strength between the predictors and the response. Regression can be divided into simple linear regression (SLR) and multiple linear regression (MLR). In SLR, the response (outcome) is predicted based on a single independent variable, which is depicted in (1). MLR is another name for a statistical tool that is immensely useful in figuring out the optimal correlation between a dependent variable and a number of independent variables. Since there are multiple inputs in this investigation, a linear equation was fitted to the data as a primary building block for correlation. The MLR models were created using the four model specification parameters, namely linear, interaction, pure quadratic, and quadratic, which are given in (4)–(8) [21].
y = a 0 + a 1 x + ϵ
y = a 0 + i = 1 m a i x i + ϵ  
y = a 0 + i = 1 m a i x i + i , j = 1 ; i < j m a ij x i x j
y = a 0 + i = 1 ; p < 3 m a i x i p
y = a 0 + i = 1 ; p < 3 m , p < 3 a i x i p + i , j = 1 ; i < j ; p , q < 3 m a ij x i p x j q + i , j = 1 ; i j ; p , q < 3 ; p < q m a ij x i p x j q
where y is the predicted output, x, xi and xij are the independent input variables, a0 is a constant term, ai and aij are the regression coefficients, and ϵ is the residual error.

2.7. Model Training and Testing

To discover the model that best predicts values that are as close to the actual concentration of H2S in sweet gas as possible, model training was carried out using a variety of network configurations and learning parameters. Throughout the study, the data division for ANN and MLR was kept constant to compare their performances on equal grounds. Typically, 80% of the data is utilized for training and validation, and 20% is used for testing or verification [15]. Testing (verification) is used to evaluate the accuracy of the previously trained network by providing a dataset that has never been seen before by the network. Two types of BP algorithm, Levenberg–Marquardt (LM) and scale conjugate gradient (SCG) were involved in training the ANN models. Three distinct transfer functions, tangent sigmoid (tansig), logistic sigmoid (logsig), and radial basis function (radbas), were utilized to evaluate and optimise the ANN transfer function in the hidden layer. These functions have one thing in common: they all need to calculate ex [22]. The equation of logsig, tansig and radbas are given in (9)–(11), where x is the independent variable and j = 1, 2, …, 5. Meanwhile, the activation function for the output layer is set to be a linear transfer function, which is purelin for all models. This function returns the value passed to the neuron to calculate its output.
f ( x ) = 1 1 e x
f ( x ) = e x e x e x e x
f ( x ) = exp ( 1 2 σ j 2 | x x j | 2 )
The feedforward neural network with a single hidden layer used in this paper is shown in Figure 5. The first layer of the network model in the model has five nodes to represent the inputs (M, PZ, T, and P), while the last layer has one node to represent the output (concentration of H2S in sweet gas). The five-node hidden layer is represented by the middle layers. For instance, logsig and purelin were utilized as the activation functions for the hidden and output layers, as shown in Figure 5. Usually, purelin is used as the transfer function for the output layer. The combination of non-linear and linear transfer functions has achieved efficient training from a previous study [23]. The number of neurons was another criterion that was changed in this study. Input and output layer neurons should be equal in number to the number of independent and dependent variables [14]. Nevertheless, for determining the minimum and maximum number of neurons in the hidden layer, there are no established standards [24]. The number of neurons selected is crucial because too few neurons could make network learning more complex and too many neurons would need excessive training time. On the other hand, for testing the MLR models, the equations obtained through training are used by substituting the testing dataset.

2.8. Model Performance and Evaluation

The performance of the developed ANN model and the MLR models in predicting the concentration of H2S in sweet gas were evaluated through mean absolute error (MAE), root mean square error (RMSE) and coefficient of determination (R2). The differences between the actual and predicted outputs are commonly represented by the metrics MAE, RMSE, and R2 (in this case, the actual and predicted concentration of H2S in sweet gas). An ideal model should have the value of MAE and RMSE approaching zero, while R2 converges to unity [25]. Calculations of the three predictive indicators (MAE, RMSE and R2) are defined as follows [14]:
M A E = 1 n s k = 1 n s ( Y A , k Y P , k )
R M S E = 1 n s k = 1 n s ( Y A , k Y P , k ) 2
R 2 = k = 1 n s ( Y A , k Y P , k ) 2 k = 1 n s ( Y A , k Y A V G ) 2
where ns is the number of the data points, Y A is the actual H2S concentration and Y P is the predicted H2S concentration.

3. Results and Discussion

The correlation matrix shown in Figure 6 was used to examine the correlations between all factors. The response, or the concentration of H2S in sweet gas, and the predictors, namely MDEA, PZ, temperature, and pressure, could be seen to be linear. According to [26], the range of the correlation coefficient is 0.70–0.89, signifying a strong correlation; 0.40–0.69, a moderate correlation; and 0.10–0.39, a poor correlation. From Figure 6, it can be observed that PZ has a strong correlation (0.74) with the concentration of H2S in sweet gas, followed by pressure and MDEA, which is considered a moderate correlation and temperature (−0.26), which indicates a weak correlation. Additionally, no multicollinearity is observed between the predictors. Multicollinearity is a condition that includes a significant degree of correlation between two or more independent variables (predictors), which could raise the standard error of the coefficient. If this happens, some factors may not be statistically significant even if they ought to be [27]. ANN and MLR models were used to further study the relationship between the H2S content in the sweet gas and the input parameters. MAE, RMSE and R2 were used to evaluate their performances for this study.

3.1. Performances of ANN Models

The performance of the developed ANN models can be evaluated through Table 6. From Table 6, it can be observed that the network structure with an LM algorithm equipped with logsig transfer function and five neurons shows the best prediction accuracy compared to the others. Model 3’s combination of three predictors (PZ concentration, temperature, and pressure) proved to be the most effective in this structure. The MAE and RMSE values for the dataset were 0.066 and 0.112, respectively, while the R2 determination coefficient for the dataset was 0.966, which is the highest value. The fraction of model predictions that matches the data increases as R2 increases. Additionally, it shows that the interpretation of PZ, temperature, and pressure can account for at least 96% of the variation in H2S concentration in sweet gas, indicating the usefulness of utilizing ANN in this study. It is important to note that the models’ accuracy increases as the number of neurons rise from one to five. This can be supported by the decreasing values of MAE and RMSE as the number of neurons increases.
Between ANN-LM and ANN-SCG, LM showed better consistency in terms of prediction accuracy. The prediction accuracy increases as the number of neurons increases. This can be due to the increasing number of synapses used for learning and data fitting [12]. The accuracy of the SCG method does not appear to be correlated with the number of hidden neurons, as demonstrated by the inconsistent prediction accuracy values that SCG showed as the number of neurons increased. The conjugate directions and scaling of step size are used to create and derive the SCG algorithm [28], resulting in the algorithm being ideal for a large-scale, extremely non-linear prediction of thousands of data points [12]. The LM algorithm, on the other hand, addresses problems by iteratively altering a weighted computation until an acceptable answer is found. It is a non-linear optimization and minimisation of prediction error. Therefore, this algorithm is suggested to be suitable for complex–medium scale problems [29]. In the present study, with 3015 data points, a relatively superior prediction performance of ANN-LM is observed as compared to ANN-SCG.
The impacts of various transfer functions were also thoroughly studied. Although theoretically, neural networks might learn any mapping, they could require flexible “brain modules” or transfer functions that are suitable for problem-solving [30]. In comparison to tansig and radbas, it achieves a higher accuracy by utilizing the logsig transfer function with five neurons. The radbas transfer function, followed by logsig and tansig, yields superior results for the SCG algorithm. Each transfer function has its own advantages. As the logsig transfer function is differentiable, it is often employed in multilayer networks trained with the backpropagation technique [31]. Tansig decreases the chance of neuron saturation by providing stronger gradients than logsig. Additionally, it avoids the “biassing” of gradients and speeds up the training of backpropagation algorithms for networks with an extensive amount of connectivity, which can be seen in [32]. Radial basis functions (RBFs), on the other hand, have a tendency to learn more quickly because each RBF unit only covers a small portion of the input space. It works well in higher layers that are low-dimensional and in lower layers that are high-dimensional sigmoid [33].
The findings in this study are similar with the findings in [12], where ANN is implemented to predict the solubility of H2S since obtaining the experimental solubility of H2S is time consuming and costly. Temperature, pressure, adsorbents and their weight fractions are some factors that influence the solubility of H2S. Different numbers of neurons were used to compare three methods, including LM and SCG. Mean square error (MSE) and determination of coefficients (R2) was used to evaluate the performance of the models. With 17 neurons, LM-ANN achieved the most astounding prediction performance of H2S solubility throughout the investigation, with MSE of 0.0014 and R2 of 0.9817 as compared to SCG-ANN (0.0791,0.8626).
Furthermore, the effect of input parameters on the concentration of H2S in sweet gas was also investigated in this work. It can be observed that as the inputs change, the performance of the ANN models with various transfer functions changes. The results obtained using Dataset 4 showed lower accuracy, with a lower coefficient of determination (R2) and higher error values for both algorithms. The input parameter, Piperazine (PZ), is significant (0.74) towards the concentration of H2S in sweet gas, which is supported by the scatter plots in Figure 6. This indicates that the importance of having PZ as an input parameter and the absence of PZ reduces the prediction accuracy.

3.2. Performances of MLR Models

In this study, the effectiveness of ANN was compared to that of MLR. MLR was created based on four distinct model specifications: quadratic, interactions, pure quadratic, and linear. Table 7 displays the performance of each model. Higher range of R2 and lower range of MAE and RMSE resulted from regression through quadratic. The quadratic terms obtained the highest R2 value, 0.92, and the lowest, 0.53. Dataset 5, which contains all the input variables (MDEA, PZ, temperature and pressure), has shown the best performance in predicting the concentration of H2S in sweet gas, obtaining the lowest values of MAE and RMSE and the highest R2 value as compared to the other dataset. The MLR model with quadratic terms produced from Dataset 5 is shown in Equation (15).
Concentration   of   H 2 S   in   sweet   gas = 3.2440 + 0.0174 M 0.6617 PZ + 0.0819 T 0.0872 P + 0.0087 MPZ 0.0022 MT + 0.0008042 MP + 0.0040 PZT 0.0028 PZP 0.0009485 TP + 0.00012292 M 2 + 0.0431 PZ 2 + 0.00059214 T 2 + 0.00081678 P 2
In Table 7, from testing Dataset 4, which does not include PZ as the input parameter, it can be observed that all types of MLR gave low values of R2, ranging from 0.44 to 0.53. However, when PZ was incorporated as the input, all models’ accuracy improved, ranging from 0.59 to 0.92. This shows the significance of PZ as an input parameter towards the output. Furthermore, the accuracy of the models developed with different model specification increased in this order: linear (0.44–0.70), interaction (0.47–0.87), pure quadratic (0.51–0.91) and quadratic (0.53–0.92).

3.3. Comparison between ANN and MLR

The results obtained from ANN and MLR models during training and testing have been compared to evaluate their performances. In terms of values, the performance of ANN-LM in predicting the concentration of H2S in sweet gas is better compared to the other models. The results from Figure 7a, which compares the actual and predicted values of the output during training, reveal that the model achieved a high R2 value of 0.96 and low MAE (0.06) and RMSE (0.11) values. During the training, the R2 value from ANN-LM was 0.96, indicating that the model follows almost perfectly the actual data. The developed model can achieve a higher prediction accuracy when test datasets are used, as seen in Figure 7b. ANN-SCG model also depicts a high accuracy by obtaining a high R2 value for training (0.92) and testing (0.94) (refer to Figure 7c,d). On the other hand, MLR with quadratic terms showed a lower value of R2 for training (0.91) and testing (0.91), indicating that the model is less reliable in predicting the concentration of H2S in sweet gas as compared to the other models. The accuracy of the models developed in this study increased in this order: MLR, ANN-SCG and ANN-LM.
Figure 8 shows the residuals between each model’s actual and predicted data. The maximum residual for testing datasets for ANN-LM, ANN-SCG and MLR were determined to be around 0.87,0.76 and 1.25. These results reveal the capability of ANN in predicting the concentration of H2S in sweet gas, which provides better accuracy than MLR.

4. Conclusions

This work shows the capability of ANN in predicting the concentration of H2S in sweet gas, which is crucial for safety reasons and design requirements. To develop ANN and MLR models with high accuracy in predicting the concentration of H2S, the concentration of MDEA and PZ, temperature and pressure are used as the inputs, and H2S concentration in sweet gas is used as the output. Different learning methods, transfer functions and the number of neurons were investigated to obtain a suitable model. In this work, a model developed with three input parameters (Dataset 3), which include MDEA, PZ and pressure from Levenberg–Marquardt equipped with logsig transfer function with five neurons, showed the highest prediction accuracy, which obtained the highest R2 (0.966) value and the lowest MAE (0.066) and RMSE (0.122) as compared to the others. Throughout this study, the absence of PZ in the dataset reduced the prediction accuracy for both types of models, indicating the importance of PZ in predicting the concentration of H2S. Both models, ANN and MLR, could predict the overall desirability of concentration of H2S in sweet gas with relatively good adjustment and fit between 0.700–0.966. However, the ANN models showed better performance compared to MLR models. This study has shown the potential application of ANN as a modelling tool to predict the concentration of H2S in sweet gas in the oil and gas industry. This study contributes to the exploration of ANN as a prediction model for H2S in sweet gas. The utilization of ANN models as an alternative method throughout this work can be used as a context and guidance for the researchers and the industry. In future works, ANN could be utilized to determine the best composition of solvents and other sets of parameters for H2S absorption that reduce the time and cost for the intended solvent optimization study compared to conventional trial-and-error-based experimental methods.

Author Contributions

Data collection and analysis, M.H.; funding acquisition, M.B.O. and R.I.; investigation, M.H.; methodology, M.H.; resources, M.B.O. and R.I.; writing—original draft preparation, M.H.; writing—review and editing, M.B.O.; validation, M.B.O. and R.I. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Yayasan Universiti Teknologi PETRONAS, grant number 015LC0-362.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors would like to thank the Institute of Autonomous, Universiti Teknologi PETRONAS for supporting the project.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Salih, M.Q.; Hamadamin, R.R.; Hama, J.R. Emission and Exposure of Hydrogen Sulfide in the Air from Oil Refinery: Spatiotemporal Field Monitoring. Int. J. Environ. Sci. Technol. 2022, 1, 1–10. [Google Scholar] [CrossRef]
  2. Abd, A.A.; Naji, S.Z. Comparison Study of Activators Performance for MDEA Solution of Acid Gases Capturing from Natural Gas: Simulation-Based on a Real Plant. Environ. Technol. Innov. 2020, 17, 100562. [Google Scholar] [CrossRef]
  3. Sanni, S.E.; Agboola, O.; Fagbiele, O.; Yusuf, E.O.; Emetere, M.E. Optimization of Natural Gas Treatment for the Removal of CO2 and H2S in a Novel Alkaline-DEA Hybrid Scrubber. Egypt. J. Pet. 2020, 29, 83–94. [Google Scholar] [CrossRef]
  4. Fouad, W.A.; Berrouk, A.S. Using Mixed Tertiary Amines for Gas Sweetening Energy Requirement Reduction. J. Nat. Gas Sci. Eng. 2013, 11, 12–17. [Google Scholar] [CrossRef]
  5. Al-Lagtah, N.M.A.; Al-Habsi, S.; Onaizi, S.A. Optimization and Performance Improvement of Lekhwair Natural Gas Sweetening Plant Using Aspen HYSYS. J. Nat. Gas Sci. Eng. 2015, 26, 367–381. [Google Scholar] [CrossRef] [Green Version]
  6. Khan, S.N.; Hailegiorgis, S.M.; Man, Z.; Shariff, A.M.; Garg, S. Thermophysical Properties of Concentrated Aqueous Solution of N-Methyldiethanolamine (MDEA), Piperazine (PZ), and Ionic Liquids Hybrid Solvent for CO2 Capture. J. Mol. Liq. 2017, 229, 221–229. [Google Scholar] [CrossRef]
  7. Suleman, H.; Maulud, A.S.; Man, Z. Experimental Measurements and Modelling of Carbon Dioxide Solubility in Aqueous AMP/MDEA and Piperazine/MDEA Blends. Fluid Phase Equilib. 2018, 463, 142–148. [Google Scholar] [CrossRef]
  8. Bishnoi, S.; Rochelle, G.T. Absorption of Carbon Dioxide in Aqueous Piperazine/Methyldiethanolamine. AIChE J. 2002, 48, 2788–2799. [Google Scholar] [CrossRef]
  9. Samanta, A.; Bandyopadhyay, S.S. Absorption of Carbon Dioxide into Piperazine Activated Aqueous N-Methyldiethanolamine. Chem. Eng. J. 2011, 171, 734–741. [Google Scholar] [CrossRef]
  10. Khan, B.A.; Ullah, A.; Saleem, M.W.; Khan, A.N.; Faiq, M.; Haris, M. Energy Minimization in Piperazine Promoted MDEA-Based CO2 Capture Process. Sustainability 2020, 12, 8524. [Google Scholar] [CrossRef]
  11. Adib, H.; Sharifi, F.; Mehranbod, N.; Kazerooni, N.M.; Koolivand, M. Support Vector Machine Based Modeling of an Industrial Natural Gas Sweetening Plant. J. Nat. Gas Sci. Eng. 2013, 14, 121–131. [Google Scholar] [CrossRef]
  12. Nimmanterdwong, P.; Changpun, R.; Janthboon, P.; Nakrak, S.; Gao, H.; Liang, Z.; Tontiwachwuthikul, P.; Sema, T. Applied Artificial Neural Network for Hydrogen Sulfide Solubility in Natural Gas Purification. ACS Omega 2021, 6, 31321–31329. [Google Scholar] [CrossRef] [PubMed]
  13. Kumar, U.A. Comparison of Neural Networks and Regression Analysis: A New Insight. Expert Syst. Appl. 2005, 29, 424–430. [Google Scholar] [CrossRef]
  14. Salehuddin, N.F.; Omar, M.B.; Ibrahim, R.; Bingi, K. A Neural Network-Based Model for Predicting Saybolt Color of Petroleum Products. Sensors 2022, 22, 2796. [Google Scholar] [CrossRef] [PubMed]
  15. Koolivand Salooki, M.; Abedini, R.; Adib, H.; Koolivand, H. Design of Neural Network for Manipulating Gas Refinery Sweetening Regenerator Column Outputs. Sep. Purif. Technol. 2011, 82, 1–9. [Google Scholar] [CrossRef]
  16. Yusuf, M. Selection of Amine in Natural Gas Sweetening Process for Acid Gases Removal: A Review of Recent Studies. Pet. Petrochem. Eng. J. 2017, 1, 1–7. [Google Scholar] [CrossRef]
  17. Campbell, J.M.; Maddox, R.N. Gas Conditioning and Processing. Vol. 4: Gas and Liquid Sweetening, 3rd ed.; Campbell Petroleum Series: Norman, OK, USA, 1982. [Google Scholar]
  18. Sharifi, A.; Omidbakhsh Amiri, E. Effect of the Tower Type on the Gas Sweetening Process. Oil Gas Sci. Technol. 2017, 72, 24. [Google Scholar] [CrossRef] [Green Version]
  19. Sahoo, S.; Jha, M. Groundwater-Level Prediction Using Multiple Linear Regression and Artificial Neural Network Techniques: A Comparative Assessment. Hydrogeol. J. 2013, 21, 1865–1887. [Google Scholar] [CrossRef]
  20. Tiryaki, S.; Aydın, A. An Artificial Neural Network Model for Predicting Compression Strength of Heat Treated Woods and Comparison with a Multiple Linear Regression Model. Constr. Build. Mater. 2014, 62, 102–108. [Google Scholar] [CrossRef]
  21. Lin, C.-J.; Su, X.-Y.; Hu, C.-H.; Jian, B.-L.; Wu, L.-W.; Yau, H.-T. A Linear Regression Thermal Displacement Lathe Spindle Model. Energies 2020, 13, 949. [Google Scholar] [CrossRef]
  22. Sahin, I.; Koyuncu, I. Design and Implementation of Neural Networks Neurons with RadBas, LogSig, and TanSig Activation Functions on FPGA. Electron. Electr. Eng. 2012, 120, 51–54. [Google Scholar] [CrossRef] [Green Version]
  23. Abdullah, S.; Ismail, M.; Ahmed, A.N.; Abdullah, A.M. Forecasting Particulate Matter Concentration Using Linear and Non-Linear Approaches for Air Quality Decision Support. Atmosphere 2019, 10, 667. [Google Scholar] [CrossRef] [Green Version]
  24. Sun, G.; Hoff, S.; Zelle, B.; Smith, M. Development and Comparison of Backpropagation and Generalized Regression Neural Network Models to Predict Diurnal and Seasonal Gas and PM10 Concentrations and Emissions from Swine Buildings; American Society of Agricultural and Biological Engineers: St. Joseph, MI, USA, 2008; Volume 51. [Google Scholar]
  25. Bingi, K.; Prusty, B.R.; Kumra, A.; Chawla, A. Torque and Temperature Prediction for Permanent Magnet Synchronous Motor Using Neural Networks. In Proceedings of the 2020 3rd International Conference on Energy, Power and Environment: Towards Clean Energy Technologies, Shillong, Meghalaya, India, 5–7 March 2021; pp. 1–6. [Google Scholar]
  26. Schober, P.; Boer, C.; Schwarte, L. Correlation Coefficients: Appropriate Use and Interpretation. Anesth. Analg. 2018, 126, 1763–1768. [Google Scholar] [CrossRef] [PubMed]
  27. Daoud, J.I. Multicollinearity and Regression Analysis. J. Phys. Conf. Ser. 2017, 949, 12009. [Google Scholar] [CrossRef]
  28. Møller, M.F. A Scaled Conjugate Gradient Algorithm for Fast Supervised Learning. Neural Netw. 1993, 6, 525–533. [Google Scholar] [CrossRef]
  29. Kayri, M. Predictive Abilities of Bayesian Regularization and Levenberg–Marquardt Algorithms in Artificial Neural Networks: A Comparative Empirical Study on Social Data. Math. Comput. Appl. 2016, 21, 20. [Google Scholar] [CrossRef] [Green Version]
  30. Wlodzislaw, D.; Jankowski, N. Transfer Functions: Hidden Possibilities for Better Neural Networks. In Proceedings of the 9th European Symposium on Artificial Neural Networks, ESANN 2001, Bruges, Belgium, 25–27 April 2001. [Google Scholar]
  31. Dorofki, M.; Elshafie, A.; Jaafar, O.; A Karim, O.; Mastura, S. Comparison of Artificial Neural Network Transfer Functions Abilities to Simulate Extreme Runoff Data. Int. Proc. Chem. Biol. Environ. Eng. 2012, 33, 39–44. [Google Scholar]
  32. Sarkar, M.R.; Julai, S.; Hossain, M.S.; Chong, W.T.; Rahman, M. A Comparative Study of Activation Functions of NAR and NARX Neural Network for Long-Term Wind Speed Forecasting in Malaysia. Math. Probl. Eng. 2019, 2019, 6403081. [Google Scholar] [CrossRef]
  33. LeCun, Y.A.; Bottou, L.; Orr, G.B.; Müller, K.-R. Efficient BackProp BT—Neural Networks: Tricks of the Trade, 2nd ed.; Montavon, G., Orr, G.B., Müller, K.-R., Eds.; Springer Berlin Heidelberg: Berlin/Heidelberg, Germany, 2012; pp. 9–48. ISBN 978-3-642-35289-8. [Google Scholar]
Figure 1. Overall flow design of this study.
Figure 1. Overall flow design of this study.
Sensors 23 01020 g001
Figure 2. Typical process flow diagram of an amine-treating unit.
Figure 2. Typical process flow diagram of an amine-treating unit.
Sensors 23 01020 g002
Figure 3. Process flowsheet for acid gas treatment.
Figure 3. Process flowsheet for acid gas treatment.
Sensors 23 01020 g003
Figure 4. Feedforward neural network developed in this study.
Figure 4. Feedforward neural network developed in this study.
Sensors 23 01020 g004
Figure 5. Feedforward neural network model.
Figure 5. Feedforward neural network model.
Sensors 23 01020 g005
Figure 6. Scatter plots of concentration of H2S in sweet gas versus four parameters: MDEA (M), Piperazine (PZ), temperature (T) and pressure (P).
Figure 6. Scatter plots of concentration of H2S in sweet gas versus four parameters: MDEA (M), Piperazine (PZ), temperature (T) and pressure (P).
Sensors 23 01020 g006
Figure 7. Comparison of actual and predicted concentration of H2S in sweet gas of (a) training and (b) testing of ANN-LM, (c) training and (d) testing of ANN-SCG, (e) training and (f) testing of MLR.
Figure 7. Comparison of actual and predicted concentration of H2S in sweet gas of (a) training and (b) testing of ANN-LM, (c) training and (d) testing of ANN-SCG, (e) training and (f) testing of MLR.
Sensors 23 01020 g007
Figure 8. Residual comparison among (a) ANN-LM, (b) ANN-SCG, (c) MLR with the actual value of the concentration of H2S in sweet gas.
Figure 8. Residual comparison among (a) ANN-LM, (b) ANN-SCG, (c) MLR with the actual value of the concentration of H2S in sweet gas.
Sensors 23 01020 g008
Table 1. Sour feed gas composition used for the simulation.
Table 1. Sour feed gas composition used for the simulation.
CompositionMole Fraction
H2O0.00234
i-Pentane0.00520
n-Pentane0.00560
i-Butane0.01243
n-Butane0.02150
CO20.03001
H2S0.00024
Methane0.72583
Ethane0.11717
Propane0.07377
Table 2. Comparison of H2S, CO2 and total flow of sweet gas between industrial, literature and our simulation data.
Table 2. Comparison of H2S, CO2 and total flow of sweet gas between industrial, literature and our simulation data.
PropertiesIndustrialLiterature [18]Error (%)SimulationError (%)
H2S (kmol/h) *0.009590.010014.370.01015.31
CO2 (kmol/h) *170.87169.410.85171.090.13
Total flow (kmol/h) *7031.807029.470.0336974.000.82
* Units: Kilomol/hour (kmol/h).
Table 3. List of independent and dependent variables corresponding with their lower and upper limits for data generation.
Table 3. List of independent and dependent variables corresponding with their lower and upper limits for data generation.
ParametersLowerBaseUpperVariables
MDEA (%) [2]35.0040.0045.00Independent
Pz (%) [2]0.005.0010.00
Temperature (°C) [18]38.5055.0071.50
Absorber
Pressure (bar) [18]
Feed38.1254.0269.93
Lean amine38.3354.3270.32
Top37.3052.8568.41
Bottom37.6453.3369.03
Concentration of H2S (ppm) in sweet gas Dependent
Table 4. Data generation framework with respect to their input and their combination.
Table 4. Data generation framework with respect to their input and their combination.
Data GenerationInput
MDEA (%)PZ (%)Temperature (°C)Pressure (bar)
135.00–45.00BaseBaseBase
2Base0.00–10.00BaseBase
3BaseBase38.50–71.50Base
4BaseBaseBase37.30–70.32
535.00–45.000.00–10.00BaseBase
6Base0.00–10.0038.50–71.50Base
7BaseBase38.50–71.5037.30–70.32
835.00–45.00Base38.50–71.50Base
935.00–45.00BaseBase37.30–70.32
10Base0.00–10.0038.50–71.50Base
11Base0.00–10.00Base37.30–70.32
1235.00–45.000.00–10.0038.50–71.50Base
1335.00–45.000.00–10.00Base38.50–71.50
14Base0.00–10.0038.50–71.5038.50–71.50
1535.00–45.000.00–10.0038.50–71.5038.50–71.50
Table 5. Combination of input parameters in determining the concentration of H2S in sweet gas.
Table 5. Combination of input parameters in determining the concentration of H2S in sweet gas.
DatasetInputsOutputs
1Concentration of MDEA, PZ and temperatureConcentration of H2S (ppm) in sweet gas
2Concentration of MDEA, PZ and pressure
3Concentration of PZ, temperature and pressure
4Concentration of MDEA, temperature and pressure
5Concentration of MDEA, PZ, temperature and pressure
Table 6. Performance of ANN models with different transfer function and number of neurons during testing.
Table 6. Performance of ANN models with different transfer function and number of neurons during testing.
Number of Neurons1234 5
Training FunctionTransfer FunctionDatasetMAERMSER2MAERMSER2MAERMSER2MAERMSER2MAERMSER2
Levenberg–MarquardtLogsig10.1870.2570.7970.1750.2500.8090.1650.2410.8220.1580.2290.8390.1640.2310.836
20.1490.2270.8310.1330.2060.8610.1250.1880.8840.1270.1770.8980.1280.1810.893
30.1170.1790.9140.1050.1530.9370.0850.1370.9490.0780.1380.9490.0660.1120.966
40.2700.4130.4950.2510.3780.5760.2480.3770.5800.2450.3740.5860.2440.3730.588
50.1130.1600.9100.0980.1410.9300.0900.1270.9430.0830.1260.9440.0600.1040.962
Tansig10.1860.2570.7960.1870.2570.7970.1870.2540.8030.1680.2410.8210.1670.2340.832
20.1480.2280.8310.1330.2070.8600.1300.1880.8840.1190.1730.9020.1250.1780.897
30.1170.1790.9140.0990.1650.9270.0940.1460.9430.0860.1390.9480.0880.1370.949
40.2720.4120.4970.2500.3780.5760.2460.3760.5820.2470.3750.5840.2460.3730.587
50.1100.1590.9120.0880.1360.9350.0830.1280.9430.0770.1210.9480.0710.1090.958
Radbas10.1830.2570.7980.1770.2500.8090.1790.2480.8110.1560.2270.8420.1590.2290.839
20.1500.2390.8140.1340.2020.8670.1250.1820.8920.1270.1800.8950.1270.1820.892
30.1270.1820.8920.1050.1530.9370.0990.1540.9360.0890.1410.9470.0760.1330.953
40.2820.4110.5010.2640.3810.5690.2710.4120.4980.2540.3780.5780.2400.3710.591
50.1180.1810.8850.0900.1350.9360.0880.1360.9350.0640.1090.9580.0810.1210.949
Scaled conjugate gradientLogsig10.1870.2580.7960.1780.2510.8060.1850.2610.7910.1890.2720.7720.2190.3170.691
20.1480.2270.8310.1480.2200.8430.1500.2310.8260.1790.2540.7900.1480.2160.848
30.1210.1920.9010.1140.1770.9160.1080.1610.9300.1040.1760.9160.0870.1530.937
40.2870.4150.4910.2980.4170.4840.2970.4060.5120.2890.4190.4790.2880.4140.491
50.1120.1620.9080.1070.1580.9120.0950.1430.9280.1120.1590.9110.1570.2170.835
Tansig10.1900.2600.7930.1850.2570.7970.1860.2550.8000.1740.2430.8180.1770.2570.797
20.1540.2300.8270.1520.2250.8340.1530.2200.8420.1450.2160.8470.1450.2250.835
30.1140.1790.9140.0970.1650.9260.1100.1730.9200.1140.1770.9150.0850.1530.937
40.2710.4150.4890.2510.3760.5800.2540.3830.5660.2480.3750.5840.2460.3790.574
50.1140.1620.9080.1120.1590.9110.1040.1530.9180.0940.1420.9300.1050.1510.920
Radbas10.1850.2620.7900.1880.2600.7920.1890.2730.7710.1920.2620.7890.1830.2500.808
20.1540.2420.8090.1380.2190.8430.1560.2320.8240.1350.1950.8760.1440.2050.862
30.1250.2010.8910.1030.1540.9370.0880.1470.9420.1050.1650.9270.1640.2410.843
40.2910.4200.4770.2830.4170.4860.2960.4420.4200.2900.4190.4800.2620.3930.542
50.1250.2060.8510.1100.1610.9090.1010.1460.9250.0790.1240.9460.0840.1330.938
Table 7. MLR performance from different types of model specification during training and testing.
Table 7. MLR performance from different types of model specification during training and testing.
DatasetTypeTrainingTesting
MAERMSER2MAERMSER2
1Linear0.2690.3720.5700.2720.3670.590
20.2690.3720.5700.2720.3670.590
30.2360.3210.6600.2450.3340.700
40.3230.4350.4100.3220.4350.440
50.2490.3380.6700.2280.2980.690
1Interaction0.2190.3270.6700.2270.3250.680
20.2190.3270.6700.2270.3250.680
30.1520.2390.8200.1620.2370.850
40.3170.4310.4200.3110.4230.470
50.1570.2440.8300.1400.1900.870
1Pure quadratic0.1830.2640.7800.1870.2650.780
20.1830.2640.7800.1870.2650.780
30.1170.1850.8900.1190.1880.900
40.2950.4200.4500.2830.4070.510
50.1190.1930.8900.1090.1630.910
1Quadratic0.1810.2540.8000.1830.2540.800
20.1810.2540.8000.1830.2540.800
30.1060.1720.9000.1110.1770.920
40.3000.4060.4800.2920.3970.530
50.1070.1720.9100.1030.1550.920
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Hakimi, M.; Omar, M.B.; Ibrahim, R. Application of Neural Network in Predicting H2S from an Acid Gas Removal Unit (AGRU) with Different Compositions of Solvents. Sensors 2023, 23, 1020. https://doi.org/10.3390/s23021020

AMA Style

Hakimi M, Omar MB, Ibrahim R. Application of Neural Network in Predicting H2S from an Acid Gas Removal Unit (AGRU) with Different Compositions of Solvents. Sensors. 2023; 23(2):1020. https://doi.org/10.3390/s23021020

Chicago/Turabian Style

Hakimi, Mohd, Madiah Binti Omar, and Rosdiazli Ibrahim. 2023. "Application of Neural Network in Predicting H2S from an Acid Gas Removal Unit (AGRU) with Different Compositions of Solvents" Sensors 23, no. 2: 1020. https://doi.org/10.3390/s23021020

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop