Predicting the Solubility of Sulfur in Hydrogen Sulfide Using a Back- Propagation Neural Network

Size: px
Start display at page:

Download "Predicting the Solubility of Sulfur in Hydrogen Sulfide Using a Back- Propagation Neural Network"

Transcription

1 Predicting the Solubility of Sulfur in Hydrogen Sulfide Using a Back- Propagation Neural Network 1 Xiaodong Wu, 2 Han Wu *, 3 Guoqing Han, 4 Yongsheng An 1, First Author College of Petroleum Engineering, China University of Petroleum(Beijing), Beijing , China, wuxd308@263.net *2,Corresponding Author College of Petroleum Engineering, China University of Petroleum(Beijing), Beijing , China,wuhan @163.com 3,4 College of Petroleum Engineering, China University of Petroleum(Beijing), Beijing , China,hanguoqing@163.com, an_yongsheng@126.com Abstract An understanding of the solubility of sulfur in hydrogen sulfide is important to determine whether or not the formation of sulfur will form. At present, the experimental test, empirical model and conventional thermodynamic model have its limits. In this paper, based on error back-propagation algorithm artificial neural network and reliable experiment data reported in the literature on sulfur solubility in hydrogen sulfide, a back-propagation neural network model between temperature, pressure and the solubility of sulfur in hydrogen sulfide are established and then the model is validated by independent experimental data that is unused in neural network training process. The results show that good agreement between the predicted result and experimental data and indicate that the backpropagation neural network is an efficient tool to predict the solubility of sulfur in hydrogen sulfide Introduction Keywords: Solubility, Sulfur, Hydrogen Sulfide, Back-propagation Neural Network A serious problem in production of sour gas is precipitation of the sulfur in the formation, in well bores and in production facilities. Sulfur precipitation can impair well productivity and increase operation cost [1-4]. Therefore, accurate knowledge of sulfur solubility is important to avoid sulfur precipitation problems. At present, there are three methods to determine the solubility of sulfur in hydrogen sulfide, these are experimental test [5-8], empirical model [9] and conventional thermodynamic model [10-11]. However, experimental test is dangerous and high-cost due to the corrosivity and hypertoxicity of the hydrogen sulfide. The empirical model is a regression equation obtained by a certain experimental data, which causes narrow application range and bigger error. Modeling the solubility of sulfur in hydrogen sulfide by conventional thermodynamic model, many unknown parameters should be considered. In this paper, we present a back-propagation (BP) neural network model for predicting the solubility of sulfur in hydrogen sulfide at different temperature and pressure. This model eliminates any need for characterization parameters. The comparison between predictive result and experimental data indicates that BP neural network model can be applied to predict the solubility of sulfur in hydrogen sulfide. 2. Experimental data selection Reliable experimental data for establishing the BP neural network model is essential. So far many experimental studies have been done for the estimation of solubility of sulfur in hydrogen sulfide. According to the Karan's research achievement [10], the experimental data measured by Roof, Brunner, and Gu is reliable. Roof [6] measured solubility of sulfur in hydrogen sulfide in the range of Project supported by the Major National Science and Technology Program of China (No. 2011ZX HZ02). * Corresponding author. address: wuhan @163.com (Han WU) International Journal of Advancements in Computing Technology(IJACT) Volume4, Number8, May 2012 doi: /ijact.vol4.issue

2 temperature between 317K and 394 K and at pressure up to 31 MPa. Gu et al. [7] measured the solubility of sulfur in hydrogen sulfide at 363 K and pressure up to 40.5 MPa. Brunner and Woll [8] also measured the solubility of sulfur in hydrogen sulfide in a temperature range of K and at pressure up to 60 MPa. However, except the experimental data of Roof, the sulfur solubility in hydrogen sulfide is expressed in grams per cubic meter of gas at MPa and K, Therefore, the experimental data of Roof should be transformed into the standard condition, and the calculated formula is as follows: V Csc Cs (1) Vc Where C sc is the solubility at the standard condition, g/sm 3. C s is the solubility at the certain temperature and pressure, g/m 3. V c is the gas volume at the standard condition, sm 3. V is the gas volume at the certain temperature and pressure, m 3. As can be seen from the Equation (1), the key to transform the solubility is to precisely calculate the volume of hydrogen sulfide respectively under the standard situation and under the certain temperature and pressure. Because Gu provided two forms to express the sulfur solubility in hydrogen sulfide, one is grams per cubic meter of gas at MPa and K, the other is mole fraction. ys Ms Csc (2) Vc Where y s is mole fraction. M s is molar mass of the sulfur molecule, g/mol. According to Equation (2), firstly the state equations of SRK, PR, and BWRS are selected to calculate the volume of hydrogen sulfide, secondly the solubility can be calculated by mole fraction and the volume of hydrogen sulfide, and lastly calculated value is compared with experimental data to obtain the relative errors of each state equation. The relative error of different state equations are shown in Figure 1, it indicates that the BWRS state equation has the smallest average relative error among the three state equations which is suited to calculate the volumes of hydrogen sulfide at different temperature and pressure. Based on the state equation of BWRS, the experimental data of Roof is transformed into the standard condition, and all reliable experiment data is listed in Table 1, Table 2 and Table Relative Error(%) BWRS SRK PR Pressure(MPa) Figure 1. Relative error of different state equations 282

3 Table 1. Roof s experimental data for the solubility of sulfur in hydrogen sulfide Author Temperature Pressure Solubility (K) (MPa) (g/sm 3 ) Roof Table 2. Brunner s experimental data for the solubility of sulfur in hydrogen sulfide Author Temperature Pressure Solubility (K) (MPa) (g/sm 3 ) Brunner

4 Table 3. Gu s experimental data for the solubility of sulfur in hydrogen sulfide Author Temperature Pressure Solubility (K) (MPa) (g/sm 3 ) Gu Back-propagation neutral network model Artificial neutral network (ANN) algorithms are known to be effective in modeling complex systems. The ANNs are first subjected to a set of training data consisting of input data together with corresponding outputs. After a sufficient number of training iterations, the neural network learns the patterns in the data fed to it and creates an internal model, which it uses to make predictions for new inputs [12-15]. Among the various ANN, the back-propagation (BP) neutral network is the most frequently used which is known to be effective in representing the nonlinear relationships between variables in complex systems and can be regarded as a large regression method between input and output variables [16-18]. BP neural networks are usually designed with one input layer, one output layer, and hidden layers. The accuracy of model representation depends on the architecture and parameters of the neural network. In the BP algorithm, the input layer of the network receives all the input data and introduces scaled data to network. The data from the input neurons are propagated through the network via weighted interconnections. For the prediction the solubility of sulfur in Hydrogen sulfide, one hidden layer is sufficient, so a triple-layer BP network is selected, because temperature and pressure are two key factors that influence the solubility of sulfur in hydrogen sulfide, so input neurons are temperature and pressure, output neuron is solubility of sulfur in hydrogen sulfide, the activation function f, is sigmoid: f( x) 1 1 x, and 0,1 x e f x (3) Where x stands for parameter of activation function. The optimization algorithm chosen in this work is a Levenberg-Marquardt algorithm, which is specially indicated to optimize BP neutral network using a small learning sample size [19-20]. The determination of number of hidden layer neuron is a complex problem, as a rule, due to the wide range and frequent fluctuation of complicated nonlinear functions, it s necessary for BP neural network to adopt more neuron to enhance its mapping capability. However, with neurons increasing, BP neural network can achieve an arbitrary accuracy of input-output mapping, the operating efficiency and generalization ability of BP neural network will greatly reduce. To determine the optimum number of the hidden layer neuron, firstly, the number of hidden layer neuron was set for 2, the learning efficiency for Secondly, expected error was given to 10-3, the maximum training times for Then, the BP neural network training starts until the training time reached If the required expected error was not met, the training is stopped and the neuron number is increased to operate a new round of training until reaches 9. Based on the above, the relationship between the number of the hidden layer neuron and the network error, training time could be obtained within the same learning efficiency. Furthermore, in order to analyze the network properties at different learning efficiency, the training process is repeated as above on condition that learning efficiency is changed. The relationship between the number of the hidden layer neuron and the norm of relative error of the network under different learning efficiency are described in Figure 2. As can be seen from Figure 2, the learning efficiency has little effect on the norm of relative error of the network when number of the hidden layer neuron is more than 5. Figure 3 shows that the relationship between the number of the hidden layer neuron and training time under different learning efficiency, it indicates that when neuron number exceeds 5, the expected error could meet the requirements at different learning efficiency within 1000 time of training. From analysis discussed before, the optimum number of neurons in the hidden layer is 5, the optimum learning efficiency is

5 Training Error Learning Efficiency=0.04 Learning Efficiency=0.08 Learning Efficiency=0.12 Learning Efficiency=0.16 Learning Efficiency=0.2 Learning Efficiency=0.24 Learning Efficiency= Number of the Hidden Layer Neuron Figure 2. The relation curve between training error and number of the hidden layer neuron Traning Iterations Learning Efficiency=0.04 Learning Efficiency=0.08 Learning Efficiency=0.12 Learning Efficiency=0.16 Learning Efficiency=0.2 Learning Efficiency=0.24 Learning Efficiency= Number of the Hidden Layer Neuron Figure 3. The relation curve between training time and number of the hidden layer neuron After determining the number of the hidden layer neuron, the experimental data measured by Roof and Brunner is set as training sample and then the BP neutral network is trained, when it correctly emulates the input-output mapping, the training process is end. Figure 4 compares the training results of BP neutral network with experimental data. As can be seen, acceptable agreement is achieved and the average relative error is 4.05%, which meet the requirements of BP neural network prediction. Furthermore, the independent experimental data that is bolded in Table 1 and Table 3 is used to validate the generalization ability of the developed BP neural network, the predictive results are shown in Figure 4 and it shows that good agreement between the predicted results and experimental data, the average relative error is 3.65%. Therefore, the developed BP neural network can be applied to predict the solubility of sulfur in hydrogen sulfide at different temperature and pressure. 285

6 Simulated Solubility (g/sm 3 ) Experimental Solubilituy (g/sm 3 ) Figure 4. Predicted solubility of sulfur in hydrogen sulfide versus corresponding experimental data: ( ) data used for training; ( ) data used for validation 4. Conclusion In this paper, a back-propagation neutral network is developed to predict the solubility of sulfur in hydrogen sulfide at different temperature and pressure. The BP neutral network is trained and validated by using reliable experimental data reported in the literature. The error between the experimental data and predicted results is acceptable, which demonstrates that BP neural network can be applied to predict the solubility of sulfur in hydrogen sulfide. 5. Acknowledgements This research project was financially supported by the Major National Science and Technology Program of China (No. 2011ZX HZ02) 6. References [1] J.B.Hyne, Study Aids Prediction of Sulphur Deposition in Sour-Gas Wells, Oil & Gas Journal, Vol. 25, No. 11, pp , [2] J.B.Hyne, Controlling Sulfur Deposition in Sour Gas Wells, World Oil, Vol. 197, No. 2, pp , [3] Pierre Cézac, Jean-Paul Serin, Jean-Michel Reneaume, Jacques Mercadier, Gérard Mouton, Elemental Sulphur Deposition in Natural Gas Transmission and Distribution Networks, The Journal of Supercritical Fluids, Vol. 44, No. 2, pp , [4] Wu Xiaodong, Wu Han, Han Guoqing, Zhang Qingsheng, Chen Yongguang, A New Model for Calculating Wellbore Temperature and Pressure Distribution of a High-H 2 S Gas Well Considering the Influence of the Sulfur Release in Wellbores, Natural Gas Industry, Vol. 31, No. 9, pp , [5] Harvey T.Kennedy, Denton R.Wieland, Equilibrium in the Methane-carbon Dioxide-hydrogen Sulfide System, Petroleum Transactions, AIME, Vol. 219, pp , [6] Jack G.Roof, Solubility of Sulfur in Hydrogen Sulfide and in Carbon Disulfide at Elevated Temperature and Pressure, Society of Petroleum Engineers Journal, Vol. 11, No. 3, pp , [7] Minxin Gu, Qun Li, Shanyan Zhou, Weidong Chen, Tianmin Guo, Experimental and Modeling Studies on the Phase Behavior of High H 2 S-content Natural Gas Mixtures, Fluid Phase Equilibria, Vol. 82, pp , [8] E.Brunner, W.Woll, Solubility of Sulfur in Hydrogen Sulfide and Sour Gases, Society of 286

7 Petroleum Engineers journal, Vol. 20, No. 5, pp , [9] Bruce E.Roberts, The Effect of Sulfur Deposition on Gas Well Inflow Performance, SPE Reservoir Engineering, Vol. 12, No. 2, pp , [10] Ali Eslamimanesh, Amir H.Mohammadi, Dominique Richon, Thermodynamic Consistency Test for Experimental Data of Sulfur Content of Hydrogen Sulfide, Industrial and Engineering Chemistry Research, Vol. 50, No. 6, pp , [11] Kunal Karan, Robert A.Heidemann, Leo A.Behie, Sulfur Solubility in Sour Gas: Predictions with an Equation of State Model, Industrial and Engineering Chemistry Research, Vol. 37, No. 5, pp , [12] A.Chouai, S.Laugier, D.Richon, Modeling of Thermodynamic Properties Using Neural Networks Application to Refrigerants, Fluid Phase Equilibria, Vol. 199, No. 2, pp , [13] A.Chapoy, A.H.Mohammadi, D.Richon, Predicting the Hydrate Stability Zones of Natural Gases Using Artificial Neutral Networks, Oil & Gas Science and Technology, Vol. 62, No. 5, pp , [14] Junjun Cheng, Yun Liu, Hui Cheng, Yanchao Zhang, Xiameng Si, Changlun Zhang, Growth Tends Predictions of Online Forum Topics Based on Artificial Neural Networks, Journal of Convergence Information Technology, Vol. 6, No. 10, pp , [15] I-Fei, Chen, A Two-Stage Cardholder Behavioural Scoring Model Using Artificial Neural Networks and Data Envelopment Analysis, International Journal of Advancements in Computing Technology, Vol. 3, No. 2, pp , [16] Yan Hai, Lixiuli, A Web Service QoS Predicting Algorithm based on QoS Ontology and BP Neutral Networks, International Journal of Advancements in Computing Technology, Vol. 4, No. 4, pp , [17] E.R.Naganathan, R.Venkatesh, N.Uma Maheswari, Intelligent Tutoring System: Predicting Students Results Using Neural Networks, Journal of Convergence Information Technology, Vol. 3, No. 30, pp , [18] Shouju Li, Li Wu, Fuzheng Qu, Wei Sun, Parameter Estimation of Particle Flow Model for Soils Using Neural Networks, Journal of Convergence Information Technology, Vol. 5, No. 8, pp , [19] K.Levenberg, A Method for the Solution of Certain Problems in Least Squares, The Quarterly of Applied Mathematics, Vol. 2, pp , [20] Donald W.Marquardt, An Algorithm for Least-squares Estimation of Nonlinear Parameters, Journal of the Society for Industrial and Applied Mathematics, Vol. 11, No. 2, pp ,