Corrosion Prediction for Naphtha and Gas System of Atmospheric Distillation Tower Based on Artificial Neural Network and Genetic Algorithm

Size: px
Start display at page:

Download "Corrosion Prediction for Naphtha and Gas System of Atmospheric Distillation Tower Based on Artificial Neural Network and Genetic Algorithm"

Transcription

1 Internatonal Journal of Ol, Gas and Coal Engneerng 208; 6(2): do: 0.648/j.ogce ISSN: (Prnt); ISSN: (Onlne) Corroson Predcton for Naphtha and Gas System of Atmospherc Dstllaton Tower Based on Artfcal Neural Network and Genetc Algorthm Hao L, Guomng Yang *, Jng Xn, Yng Wu, Guangtng Xue Petroleum Refnng Research Insttute, Chna Natonal Offshore Ol Corporaton Research, Bejng, Chna Emal address: * Correspondng author To cte ths artcle: Hao L, Guomng Yang, Jng Xn, Yng Wu, Guangtng Xue. Corroson Predcton for Naphtha and Gas System of Atmospherc Dstllaton Tower Based on Artfcal Neural Network and Genetc Algorthm. Internatonal Journal of Ol, Gas and Coal Engneerng. Vol. 6, No., 208, pp do: 0.648/j.ogce Receved: Aprl 26, 208; Accepted: May 22, 208; Publshed: June 9, 208 Abstract: The corroson of low-temperature sectons of a company's atmospherc and vacuum dstllaton unt was analyzed. Corroson rate predcton model was establshed usng BP neural network based on the corroson detecton data detected n the sewage on top of the tower over a perod of tme. In ths model, the ph value, Cl on concentraton, Fe on concentraton and sulfde concentraton of the sewage dscharged from the top of the tower are taken as the nput data, and the average corroson rate as the output data, the results show that the predcton error s large. The BP neural network was optmzed usng the genetc algorthm. The optmzed model could accurately predct the corroson of the atmospherc unt at low temperatures. The corroson rate predcton model was used to nvestgate the effect of each varable on the corroson rate through the sngle factor change and the results could reflect the relatonshp between detected corroson data and corroson rate n the sewage on top of the atmospherc tower. Keywords: Atmospherc Dstllaton Tower Corroson, BP Neural Network, Genetc Algorthm, Corroson Rate Predcton. Introducton The atmospherc and vacuum dstllaton unt has a large mpact on the overall operaton and processng capacty of the refnery as the frst processng unt. The crude naphtha s transformed to dstllates of dfferent bnaphthang ranges by dstllaton n the unt. Crude naphtha usually contans much Cl ons and sulfur ons, whch easly forms a corrosve envronment of HCl-H 2 S-H 2 O at hgh temperatures, causng corroson attack on the naphtha and gas system of atmospherc dstllaton tower. Equpment mantenance and materal replacement caused by corroson waste a lot of resources and shorten the operaton cycle of the devces []. Therefore, the corroson predcton for naphtha and gas ppelnes on top of atmospherc dstllaton tower s of great sgnfcance to the producton and mantenance of the devces. However, n the actual producton envronment, the nfluence of varous factors on corroson s complcated and t s dffcult to establsh an accurate mathematcal model. The BP neural network can determne the mathematcal model for corroson through ts own strong learnng ablty and mult-factor cooperaton ablty and predct the corroson rate. However, the predcton accuracy s low when the data samples are lmted, so t s dffcult to meet the practcal engneerng demands. In ths paper, the BP neural network was optmzed by genetc algorthm, mprovng the predcton accuracy of corroson rate and t provdes reference for corroson detecton [2]. 2. Ppelne Corroson Factor Analyss and Tranng Data Source Selecton A company's atmospherc and vacuum unt manly processes hgh-acd heavy crude naphtha, and ts ppelne on top of atmospherc tower s made of carbon steel. Crude naphtha processng volume s 50t/h, temperature on the top of atmospherc pressure tower s 94-2 C, and pressure s

2 26 Hao L et al.: Corroson Predcton for Naphtha and Gas System of Atmospherc Dstllaton Tower Based on Artfcal Neural Network and Genetc Algorthm.9-3.4kpa. The reasons for the low-temperature part corroson of the atmospherc equpment are manly as follows:. The effect of electrc desalnaton s poor leadng to the hgh salt content, and a large amount of chlorde flocks to the top of the atmospherc tower and the vacuum tower, formng hydrochlorc acd soluton wth condensate water on the top of the tower causes corroson of the ppelne [3]. 2. Ammonum njecton equpment at the top of the tower s ncomplete, whch makes t mpossble to accurately control the ph value at the top of the tower and t s easy to form HCL-H 2 S-H 2 O corroson s easly formed, resultng n a hgher concentraton of Fe 2+ ons n the outlet water [4]. 3. The lack of means for detectng the ph value of the condensate water leads to the nablty to tmely adjust the amount of ammona njecton, makng the ph value too low for a long perod of tme, resultng n long-term acdc corroson of the atmospherc equpment [5]. Therefore, the ph value, Cl on concentraton, Fe on concentraton, and sulfde concentraton of the sewage dscharged from the top of the atmospherc tower are selected as tranng data, and the average corroson rate s used as the output data. 3. Establshment and Predcton of BP Neural Network Model The BP neural network selected n ths paper has a three-layer structure of nput layer, hdden layer and output layer. The man characterstcs of mult-layer feedforward neural network are forward transmsson of sgnals and backward transmsson of errors [6]. The nput sgnal s processed layer by layer through the nput layer and then the hdden layer, output through the output layer. If the output value does not reach the desred output, the error between the output value and the expected value s back propagated, the weght and threshold value of the network are adjusted accordng to the error, and the error s reduced through repeated multple teratons untl the error s reduced to the permssble value, then the network tranng s completed. [7]. 3.. Establshment of BP Neural Network 3... Network Structure Determnaton The output data s ph value, Cl on concentraton, Fe on concentraton and sulfde content. Therefore, the number of nodes n the nput layer s 4. The selecton of nodes number n the hdden layer of the neural network s related to the fnal predcton accuracy, and the tranng error decreased wth the number of nodes n the hdden layer ncreasng. Due to overfttng and other reasons, the tranng error ncreases wth the number of nodes rsng n the hdden layer when exceedng a certan scope [8]. Therefore, the approxmate range of nodes number n the hdden layer was selected by emprcal formula (). The best effect s obtaned when the nodes number of hdden layer s 5 after several experments. The fnal output s the corroson rate, so the nodes number n the output layer s. The topology of the neural network s In ths paper, 90 groups of data were randomly selected as tranng data, and 0 groups were used for network tranng for predctve data from the 00 sets of data obtaned from feld tests [9]. l < ( m + n) + a () In ths formula n - the number of nodes n the nput layer; l - the number of nodes n the hdden layer; m - the number of nodes n the output layer; a - a constant between 0 and The Determnaton of Node Transfer Functon In ths paper, the tansg functon s selected as the tranng functon, n whch the output functon H of the hdden layer s determned by formula (2), where x s the nput varable, w j s the connecton weght number between the nput layer and the hdden layer, a s the threshold value of the hdden layer, ntalzaton assgnment of the weght and threshold s randomly selected wthn the nterval (0, ) [0]. n H = f ( w x a ) j =,2,..., l (2) j j j = In ths formula l - the number of nodes n the hdden layer;; f - actvaton functon of hdden layer. The output layer functon s the logsg functon, and the predcted output O k of the artfcal neural network can be calculated by formula (3). l O = h( H w b ) k =,2,..., m (3) k j jk k j= h - output of the hdden layer; W jk - connecton weght; b - threshold value Error Calculaton The network predcton error e s obtaned by equaton (4). O - predcted output; Y - Expected output. e = Y O k =,2,... m (4) k k k Weght Update The connecton weghts of the network w j and w jk are updated by equatons (5) and (6). w = w + ηh ( H ) x( ) w e (5) j j j j jk k k = =,2,..., n; j =,2,..., l w = w + ηh e j =,2,..., l; k =,2,..., m (6) jk jk j k m

3 Internatonal Journal of Ol, Gas and Coal Engneerng 208; 6(2): η - learnng rate Threshold Value Update The node thresholds of the network a, b are updated by equatons (7) and (8). a = a + ηh ( H ) w e (7) j j j jk k k= j =,2,..., l b = b + e k =,2,..., m (8) k k k e - network predcton error Process Determnaton Determne f the teraton of the algorthm s complete. If not, returnng to step 2. m 3.2. Establshment and Predcton of Corroson Rate Model In ths paper, MATLAB language s used for programmng, 90 sets of data are randomly selected as tranng data, and 0 sets of data are predcted data. It can be seen n Fgure that the BP neural network establshed n ths experment can predct the corroson of low-temperature parts of atmospherc equpment. Fgure 2 shows the absolute error of forecastng results and actual results. The average relatve error calculated by absolute error s 2.4%. In ths paper, the rato of the average of the absolute error and the average of the true value s selected as the average relatve error, whch can reflect the credblty of the measurement. The mean squared error calculated s 2.57%. Mean square error refers to the expected value of the dfference between the parameter estmate and the true value of the parameter. The smaller the mean squared error, the better the accuracy of the predcton model to descrbe the expermental data Expected output Forecast output Sample Fgure. Comparson of predcted output and expected output data of BP neural network Sample Fgure 2. Corroson rate model predcton error of BP neural network. The predcton results obtaned by BP neural network corroson are n good conformance wth the actual corroson rate. It shows that the BP neural network has strong learnng ablty and forecastng ablty, but some ndvdual predcton values dverge largely. The root cause s that the tranng data s sparse leadng the BP neural network not fully traned and

4 28 Hao L et al.: Corroson Predcton for Naphtha and Gas System of Atmospherc Dstllaton Tower Based on Artfcal Neural Network and Genetc Algorthm the network predcton value s subject to large errors. In ths paper, a genetc algorthm s used to optmze the BP neural network to mprove the predcton accuracy. 4. Genetc Algorthm to Optmze BP Neural Network Genetc algorthm s a parallel stochastc-search optmzaton method through smulatng the natural genetc mechansm and bologcal evoluton theory []. Accordng to the selected ftness functon, ndvduals are screened through selecton, crossover and mutaton n nhertance. Indvduals wth good ftness values are retaned, ndvduals wth poor ftness are elmnated, and new groups nhert the superor nformaton of the prevous generaton. Ths cycle wll be repeated untl the set condton s satsfed. [2] 4.. Algorthm Flow and the genetc algorthm fnds out the ndvduals wth optmal ftness value through selecton, crossover, and mutaton operatons. The BP neural network predcton uses the genetc algorthm to obtan the optmal ndvdual and ntal network weghts and thresholds are assgned, the network predcts the output of the functon after beng traned [4]. Fgure 3 shows the flow chart of the genetc algorthm. Snce the BP neural network structure set n ths paper s 4-5-, that s, the output layer has 4 nodes, the hdden layer has 5 nodes and the output layer has node, wth a total of 25 weghts and 6 thresholds so the genetc algorthm has an ndvdual code length of 3. Randomly take 90 sets of data as tranng data and 0 sets of data as predcton data Genetc Algorthm Implementaton The elements of genetc algorthm optmzng BP neural network nclude populaton ntalzaton, ftness functon, selecton operaton, crossover operaton and mutaton operaton [5] Populaton Intalzaton In ths paper, all the corroson data obtaned are real strngs after beng normalzed. Therefore, the encodng method selected s real codng, composed by 4 are parts, ncludng the connecton weghts of the nput layer and the hdden layer, the hdden layer threshold, the connecton weghts of the hdden layer and output layer, and output layer threshold. Combned wth the prevously establshed neural network archtecture, a complete neural network can be formed Ftness Functon The sum E of the absolute error of the output value and the expected value predcted by the neural network s taken as the ndvdual ftness value F, and ts ftness can be obtaned accordng to the calculaton formula (9) n F = k( abs( y o )) (9) = n - the number of network output nodes; Y the expected output of the I th node of the BP neural network; O - the predcted output of the I th node; K-coeffcent Fgure 3. Flow chart of genetc algorthm. Optmzaton of BP neural network based on genetc algorthm s to optmze the weghts and thresholds of BP neural network by genetc algorthm [3]. Each ndvdual n the populaton contans all the weghts and thresholds of a network. The ndvdual calculates the ndvdual ftness value through the ftness functon, Selecton Operaton Based on a real strng of samples, ftness-proportonate strategy was selected, namely the roulette method [5]. The selecton probablty p of each ndvdual s: f = k / F (0) p = f N j= f ()

5 Internatonal Journal of Ol, Gas and Coal Engneerng 208; 6(2): F - the ftness value of ndvdual ; coeffcent; N - number of populaton ndvduals Crossover Operaton The K chromosome a k and L chromosome a l are crossed at J level by real number crossng method, Methods as below; b- [0-] random number a = a ( b) + a b kj kj lj a = a ( b) + a b lj lj kj (2) Varaton Operaton The j-th gene a j of the -th ndvdual s mutated as follows a j aj + ( aj amax ) f ( g) r 0.5 = aj + ( amn aj) f ( g) r 0.5 (3) amax- Upper bound of gene a j ; amn- Lower bound of gene a j ; 2 f(g)- f ( g) = r2 ( g / Gmax) ; r2- random number; g- Current teratons; G max - Maxmum number of evolutons; r- [0-] random number 4.3. Genetc Algorthm Optmzaton BP Neural Network Implementaton In ths paper, the BP neural network based on genetc algorthm s appled to predct the corroson of the overhead naphtha and gas system of atmospherc tower based on genetc algorthm optmzed by MATLAB. Through many experments, the parameter of genetc algorthm s set to:populaton sze 00, Number of evoluton 250, The crossover probablty s 0.3, The probablty of mutaton s Expected output Forecast output Sample Fgure 4. Comparson of predcton output and expected output data of BP neural network optmzed by genetc algorthm Sample Fgure 5. genetc algorthm optmzaton BP neural network corroson rate model predcton error. The forecast result s shown n Fgure 4 Corroson predcton data of BP neural network optmzed by genetc

6 30 Hao L et al.: Corroson Predcton for Naphtha and Gas System of Atmospherc Dstllaton Tower Based on Artfcal Neural Network and Genetc Algorthm algorthm has hgher predcton accuracy, Fgure.5 shows the absolute error of the data predcton and actual results, The average relatve error calculated by the absolute error s3.87%, The error value has a certan reducton compared wth BP neural network. Calculatng the mean square error of 3.03% also has a certan reducton compared wth BP neural network. It shows that the performance of the BP neural network after the optmzaton of the genetc algorthm s hgher than that of the non-optmzed network, whch reflects the better accuracy of the predcton model to descrbe the expermental data. 5. Corroson Rate Model Operaton In the actual producton envronment, Corroson s caused by a varety of factors. It s dffcult to determne the nfluence of sngle factor on t, Ths makes some dffcultes n the study of antcorroson. Ths artcle uses the establshed corroson predcton model to nvestgate the effect of varous factors on the corroson rate. 5.. Influence of Iron Ion Concentraton on Corroson Rate The ron on n the sewage at the top of atmospherc pressure tower s the product of corroson of the ppelne n the tower top equpment. Increased ron on concentraton ndcates ncreased corroson rate at the top of the ppelne. The hgher the ron on concentraton, the more severe the corroson of the ppelne [6]. Frst, ph value was kept at 8, chlorde concentraton was 30 mg/l, sulfde concentraton was 30 mg/l, and the concentraton of ron on ncreased from mg/l to 0 mg/l. The effect of ron on concentraton on corroson rate s shown n Fgure 6. Can be seen from Fgure.6, The hgher the ferrc on concentraton, the greater the corroson rate, n lne wth the natural law of corroson. However, the corroson rate s too small as the sngle varable ncreases, It may be that most of the selected data samples are wthn the normal range. The change of corroson rate s relatvely small, whch leads to a smaller change of corroson rate when the sngle varable exceeds normal range. In practce, the test data s wthn a reasonable range, and the model stll has hgh accuracy n predctng the corroson rate Iron on concentraton mg/l Fgure 6. Effect of Iron Ion Concentraton on Corroson Rate Effect of ph Value on Corroson Rate ph value drectly affects the concentraton of HCl n water, As the ph ncreases, the concentraton of H + decreases, and the reducton of hydrogen atoms decreases, so the corroson rate decreases [7]. Smlarly, the ncrease of ph value and the ncrease of OH - concentraton make the oxdaton rate of ron decrease, so the corroson rate decreases. Mantan ferrc on concentraton of 3 mg/l, chlorde concentraton of 30 mg/l, and sulfde concentraton of 30 mg/l, gradually ncreasng the ph from to 4. The effect of ph value on the corroson rate s shown n Fgure 7. From Fgure 7, t can be seen that as the ph value ncreases, the corroson rate gradually decreases.

7 Internatonal Journal of Ol, Gas and Coal Engneerng 208; 6(2): Fgure 7. Effect of ph value on the corroson rate Effect of Chlorde Ion Concentraton on Corroson Rate Under normal crcumstances, the chlorde on concentraton s n the range of 0-00 mg/l. As the concentraton of chlorde ons ncreases, the conductvty of the soluton ncreases, and the H + concentraton n the soluton ncreases, preventng the formaton of oxde flms and acceleratng corroson rate [8]. Keep the ph at 8, ferrc on concentraton 3 mg/l, sulfde concentraton 30 mg/l, and gradually ncrease the chlorde on concentraton from 0 mg/l to 00 mg/l. Chlorde on concentraton on the corroson rate shown n Fgure 8. It can be seen from Fgure 8 that as the concentraton of chlorde ons ncreases, the corroson rate gradually ncreases Chlorde on concentraton mg/l Fgure 8. Effect of chlorde on concentraton on corroson rate Effect of Sulfde Concentraton on Corroson Rate Wth the ncrease of sulfde concentraton, t acts as a catalyst to partcpate n the oxdaton of ron, and the corroson of carbon steel s ntensfed [9]. Keep the ph at 8, ferrc on concentraton 3 mg/l, chlorde on concentraton 30 mg/l, and gradually ncrease the sulfde concentraton from 0 mg/l to 00 mg/l. The effect of sulfde concentraton on the corroson rate s shown n Fgure 9. As can be seen from Fgure. 9, as the sulfde concentraton ncreases, the corroson rate gradually ncreases.

8 32 Hao L et al.: Corroson Predcton for Naphtha and Gas System of Atmospherc Dstllaton Tower Based on Artfcal Neural Network and Genetc Algorthm Sulfde concentraton mg/l Fgure 9. Effect of Sulfde Concentraton on Corroson Rate. 6. Concluson In ths paper, the corroson predcton model of naphtha and gas system at the top of the atmospherc tower s establshed by usng the strong self-learnng ablty of BP neural network and the ablty of mult factor synergy combned wth the actual producton stuaton. Genetc algorthm s used to optmze the predcton model and get a hgh predcton accuracy. Through the sngle factor nvestgaton of the establshed model, t s confrmed that chlorde on concentraton and sulfde concentraton can accelerate the corroson rate,increase the ph of wastewater to nhbt the corroson rate,an ncrease n ron on concentraton ndcates an ncrease n the corroson rate. It s proved that the establshed model has certan reference value for the corroson research of low temperature part of atmospherc vacuum dstllaton unt, It has a certan gudng sgnfcance for the corroson detecton n actual projects. Acknowledgements Thanks to my leader Guangtng Xue for hs work on Corroson research. Thanks to my colleague Guomng Yang for hs work on Englsh translaton. Thanks to the other team members for ther expermental work. References [] Feng W, Yang S. Thermomechancal processng optmzaton for 304 austentc stanless steel usng artfcal neural network and genetc algorthm [J]. Appled Physcs A, 206, 22(2):08. [2] Coban R (203) A context layered locally recurrent neural network for dynamc system dentfcaton. Eng Appl Artf Intell 60(9): [3] Wranglen G. AN INTRODUCTION TO CORROSION AND PROTECTION OF METALS [J]. Journal of Nuclear Medcne Offcal Publcaton Socety of Nuclear Medcne, 206, 9(2):7-7. [4] Okonkwo P C, Slem M H, Shakoor R A, et al. Effect of Temperature on the Corroson Behavor of API X20 Ppelne Steel n H 2 S Envronment [J]. Journal of Materals Engneerng & Performance, 207(4):-9. [5] R. Rahgozar, Remanng capacty assessment of corroson damaged beams usng mnmum curves. J. Constr. Steel Res. 65, (2009). [6] Sh X L. Development and Applcaton of Artfcal Neural Network [J]. Journal of Chongqng Unversty of Scence & Technology, [7] JOHN H K. Two Data Sets of near Infrared Spectra [J]. Chemometrcs and Intellgent Laboratory System, 997, 37: [8] Banu P S N, Ran S D. Knowledge-based artfcal neural network model to predct the propertes of alpha+ beta ttanum alloys [J]. Journal of Mechancal Scence & Technology, 206, 30(8): [9] HOEIL C, HYESEON L, CHI-HYUCK J. Determnaton of Research Octane Number Usng NIR Spectral Data and Rdge Regresson [J]. Bull Korean Chem Soc, 200, 22 (): [0] Hanmaahgar P R, Elkholy M, Rah-Nezhad C K. Identfcaton of partal blockages n ppelnes usng genetc algorthms [J]. Sādhanā, 207, 42(9): [] Rahmanfard H, Plaksna T. Applcaton of artfcal ntellgence technques n the petroleum ndustry: a revew [J]. Artfcal Intellgence Revew, 208(5):-24. [2] Pol HH, Bullmore E (203) Neural networks n psychatry. Eur Neuropsychopharmacol 23(): 6 [3] Paul S, Mondal R. Predcton and Computaton of Corroson Rates of A36 Mld Steel n Olfeld Seawater [J]. Journal of Materals Engneerng & Performance, 208:-0. [4] La B-Q, Wang J-M, Duan J-J et al (203), the ntegraton of NSC-derved and host neural networks after rat spnal cord transecton. Bomaterals 34(2): [5] Iran R, Nasm R (20) Applcaton of artfcal bee colony-based neural network n bottom hole pressure predcton n underbalanced drllng. J Pet Sc Eng 78():6 2.

9 Internatonal Journal of Ol, Gas and Coal Engneerng 208; 6(2): [6] Zhang L, L H X, Sh F X, et al. Envronmental boundary and formaton mechansm of dfferent types of H 2 S corroson products on ppelne steel [J]. 207, 24(4): [7] Kerman M, Morshed A (2003) Carbon doxde corroson n ol and gas producton a compendum. Corroson 59(8): [8] Akbar A. et al (202) Corroson 202. NACE Internatonal. [9] Tanupabrungsun T, Brown B, Nesc S (203) Effect of ph on CO2 corroson of mld steel at elevated temperatures. In: Corroson 203. NACE Internatonal.