1 Introduction

With the rapid development of natural gas industry, consumption of natural gas has increased with an average annual growth rate 16% in China from 2005 to 2015 (National Energy Administration 2016). Produced gas of sour gas field accounts for near 60% of China’s natural gas production (Guo 2004). The major acid gases are hydrogen sulfide (H2S) and carbon dioxide (CO2). In the southwest of China, there exist a great number of gas fields with acid species, especially high H2S, in produced natural gas (Guo 2004). High concentration of acid species makes the purification process more complex and moreover leads to a substantial increase of total comprehensive energy consumption (TCEC) and operating costs compared with the conventional purification process (Li et al. 2007; Long et al. 2007; Jia et al. 2009). Figure 1 shows the TCEC of seven natural gas purifications with different sulfur contents in China (Azizkhani et al. 2014). The abbreviations of QX, DJ, ZX, DZ, LJZ, TSP and PG represent Quxian, Dianjiang, Zhongxian, Dazhu, Luojiazhai, Tieshanpo and Puguang, respectively, in Fig. 1. According to statistics, the TCEC of high-sulfur natural gas purification accounts for near 30% of TCEC of the natural gas process in China and there is large space to reduce the TCEC of purification process (Li 2012).

Fig. 1
figure 1

TCEC of seven natural gas purification plants with different sulfur content

The high-sulfur natural gas purification plant is mainly composed of five units, including the gas sweetening unit (GSU), the dehydration unit (DU), the sulfur recovery unit (SRU), the tail gas treatment unit (TGTU) and the acid water stripping unit (AWSU). In the natural gas purification system, there are a great number of devices and relative couples of operating parameters. The relation of dozens of operating parameters to TCEC is nonlinear and the coupling correlations between some parameters are strong, which makes the optimization problem of TCEC complicated and difficult to be solved by using the traditional optimization method (Yu et al. 1998; Abdulrahman and Sebastine 2013).

In recent years, very few published articles research on the global optimization of operating conditions to reduce TCEC for the whole high-sulfur gas purification plant. Most optimization studies focus on the subsections, such as GSU (Jassim 2016; Peter et al. 2011; Qiu et al. 2014; Behroozsarand and Zamaniyan 2011; Al-Lagtah et al. 2015), DU (Santos et al. 2017; Rouzbahani et al. 2014), SRU (Manenti et al. 2014; Zarei et al. 2016; Adewale et al. 2016) and TGTU (Wahedi et al. 2015). A typical Iranian gas sweetening plant was simulated by HYSYS v3.1 and optimized by NSGA-II method (Behroozsarand and Zamaniyan 2011). Three objectives were minimizing of plant energy consumption, amine circulation rate and maximization of carbon dioxide recovery, respectively. Lekhwair natural gas sweetening plant was simulated by HYSYS v7.3 (Al-Lagtah et al. 2015). The main operating parameters, lean amine circulation rate, temperature and concentration, were optimized based on sensitivity analysis and keeping the device at its best operating range. Moreover, two modifications (conventional split-loop and modified split-loop) are simulated and discussed to meet the required gas purity at lower energy costs. A natural gas DU was simulated by a steady-state flow-sheet simulator, and a sensitivity analysis was performed based on the simulation results (Rouzbahani et al. 2014). For the process optimization, dry gas dew point was assumed as key factor and it was shown that a 10% increase in solvent molar flow rate is applicable in order to reduce dry gas dew point up to 6% without a significant rise in the total energy consumption and volatile organic compounds emission. An optimization of SRU was performed based on the multi-scale model and specific algorithms of BzzMath library (Manenti et al. 2014). The optimization problem has three input variables, furnace pressure, acid gas/air ratio and water temperature of waste heat boiler. The objective function is to maximize the production of sulfur and medium-pressure and low-pressure steam. The optimization result shows steam generation can be improved of more than 6% by preserving the amount of recovered sulfur. An optimization of SRU was carried out to maximize sulfur production and minimize COS emission while maintaining flow ratio H2S to SO2 at 2, in which the GA method was used. Three variables in the optimization function are the ratio of air to acid gas flow, the reaction furnace feed temperature and the steam pressure of waste heat boiler (Zarei et al. 2016). It was assessed that the economics of a TGTU rely on a temperature swing adsorption module. The optimization of minimum of net present worth costs (NPWC) of total capital investment, operating and bed replacement costs ensued during a 30-year project life was carried out (Wahedi et al. 2015).

Artificial neural networks have been widely applied to tackle complex issues. Since inception, they have been used in different engineering applications including prediction of key output parameters in the natural gas sweetening and dehydration process (Salooki et al. 2011; Ghiasi et al. 2014; Ahmadi et al. 2014; Darwish and Hilal 2008).

Biology inspired algorithms, which belong to intelligent numerical method, are generally divided into evolution-based algorithm and swarm-based algorithm (Neri and Carlos 2012). Evolution-based algorithms, i.e., evolutionary algorithms, have strong adaptability and self-organization, including genetic algorithm (GA), evolutionary programming (EP), evolutionary strategy (ES), differential evolution (DE) algorithm, etc. (Cui et al. 2017). GA not only has simple, general and strong stability characteristics, but also has the parallel and global search ability, which makes it competent to solve the large-scale and nonlinear optimization problem (Louis et al. 2009; Dai et al. 2000; Azizkhani et al. 2014). Non-dominated sorting genetic algorithm-II (NSGA-II) was first proposed by Deb et al. (2000) based on the NSGA (Srinivas and Deb 1994). In recent years, NSGA-II has been applied in many engineering application to solve the multi-objective problems (Behroozsarand and Zamaniyan 2011; Damavandi et al. 2017; Singh and Das 2016; Deng et al. 2017; Boyaghchi and Chavoshi 2017). An simulation–optimization method based on the NSGA-II for the life cycle optimization of a novel process design for a more cost-effective, greener process for making chemicals from shale gas and bio-ethanol was developed (He and You 2015). New process integration approaches, graphical pinch technique, were proposed to optimize the process of unconventional gas field (Foo et al. 2016).

As mentioned above, there are few papers focused on the global optimization of the whole high-sulfur gas purification plant. In this paper, the objective is to explore an effective method for global optimization of the high-sulfur natural gas purification plants to reduce the TCEC and improve the purified gas production rate (PGPR) of it. Key operating parameters of the natural gas purification plant have been selected on the parametric sensitivity analysis and the energy consumption analysis for each unit. A steady-state simulation model of the high-sulfur natural gas purification process has been set up by using software ProMax to carry out this research. To solve the problem that the process simulation model does not converge in some operating conditions for the existence of nested loops in it, which leads to fail to supply the data required for further optimization, BP neural network has been applied to substitute the simulation model to predict the relative parameters in the global optimization model. The optimization model has been set up based on NSGA-II, and the Pareto optimal results have been achieved. In this work, the prototype natural gas process plant is located in the southwest of China.

2 Process description and simulation

2.1 Process flow of high-sulfur natural gas purification plant

The natural gas purification plant is mainly composed of five units, and the flow sheet of gas purification process is shown in Fig. 2. In the GSU, MDEA (methyldiethanolamine) is selected as the absorbent, and the feed gas is sent into the first absorption column (Abs-101), the reactor of COS hydrolysis (R-101) and the second absorption column (Abs-102) successively. The rich MDEA solution will be regenerated in the regenerating column (Reg-104). After removal of the acid gas, the natural gas is sent to the DU, in which TEG (triethylene glycol) is selected as the absorbent. The natural gas is dehydrated in the absorption column (Abs-201), and the rich TEG solution will be regenerated in the regenerating column (Reg-202). Flowing out of the GSU, the acid gas is fed into the SRU, which is mainly composed of the combustion reaction and the two-stage catalytic conversion reaction processes. In the combustion reaction furnace (F-301), nearly one-third H2S of the acid gas is converted into SO2 and then the generated SO2 reacts with the left two-thirds H2S to produce sulfur. And the high-temperature reaction heat is recovered by the waste heat boilers (first WHB and second WHB). The generated sulfur is condensed in the sulfur condenser (E-303/305/307) and sent into the liquid sulfur pool. To improve sulfur recovery rate, flowing out of the first-stage condenser (E-303), the process gas is heated and fed into the first and second catalytic conversion reactor (R-303/304) successively to produce sulfur. The gas from SRU is sent into the TGTU, which is mainly composed of hydrogenation reduction reaction and MDEA absorption processes. In the hydrogenation reduction reactor (R-401), most SO2 and sulfur are restored into H2S, which is then sent into the absorption column (Abs-402). Flowing out of the absorption column, the tail gas is fed into incinerator (F-402), where H2S is converted into SO2. The high-temperature flue gas from incinerator is then discharged into the atmosphere through chimney. The heat of flue gas is recovered by the waste heat boiler. In the AWSU, the acid gas (main content H2S) is stripped from water through stripper column (Str-501).

Fig. 2
figure 2

The process flow diagram of gas purification plant

2.2 Operating conditions and specification

The pressure, temperature and flow rate of feed gas are 8.30 MPa, 35 °C and 1.25 × 105 Nm3/h, respectively. The composition of feed gas is: CH4 76.52, C2H6 0.12, C3H8 0.01, H2S 14.14, CO2 8.63, N2 0.55, H2 0.02 and He 0.01 (mol%). The fundamental operating data are listed in Table 1. And the quality of treated gas should meet the specification as follows (Wang 2005): (1) H2S: S1 ≤ 6 mg/Nm3; (2) CO2: S2 ≤ 3 V %; (3) water dew point: S3 ≤ − 15 °C; (4) sulfur recovery rate: S4 ≥ 99.8%; (5) SO2: S5 ≤ 960 mg/Nm3.

Table 1 Operating data of the natural gas purification plant

2.3 Process simulation model

The simulation model of whole high-sulfur natural gas purification process has been established by using software ProMax. The operating data in plant have been used to adjust ProMax process simulation model. Good agreements between operating data and simulation results are achieved and given in Table 2.

Table 2 Comparison between simulation and plant data

In Table 2, absolute deviation percent (AD %) is used, defined by Eq. (1),

$${\text{AD}}\% = 100 \times \left| {\frac{{y_{i} - x_{i} }}{{y_{i} }}} \right|$$
(1)

where yi and xi represent operating data and simulation data used to calculate AD %, respectively.

3 Determination of decision variables for optimization model

3.1 Analysis of energy consumption distribution

Comprehensive energy consumption distribution of each unit and the total was analyzed based on the plant data and is given in Table 3. Comprehensive energy consumption (CEC) is generally made up of fuel gas, electricity, 3.5 MPa medium-pressure steam (MPS), 0.4 MPa low-pressure steam (LPS) and water. The comprehensive energy consumption in the plant and in each unit can be calculated by Eq. (2), which is based on the Chinese industry standard ‘Calculation method for energy consumption in petrochemical engineering design’(SH/T 3110-2001).

$$E_{\text{C}} = \left( {c_{1} E_{\text{E}} + c_{2} E_{\text{FG}} + c_{3} E_{\text{LPS}} + c_{4} E_{\text{MPS}} + c_{5} E_{\text{W}} } \right)/m_{{_{\text{FNG}} }}$$
(2)
Table 3 Comprehensive energy consumption distribution

In Eq. (2), EC represents comprehensive energy consumption (MJ/104 Nm3); mFNG is the flow rate of feed natural gas under the standard condition (104 Nm3/h); EE, EFG, ELPS, EMPS and EW represent the energy of electricity (kW), fuel gas (t/h), low-pressure steam (t/h), medium-pressure steam (t/h) and water (t/h), respectively; c1c5 represent corresponding equivalent coefficient of energy transfer medium.

The results show that GSU and TGTU are high comprehensive energy consumption units, and GSU takes about 75% of the TCEC in the four energy-consuming units. In GSU and TGTU, low-pressure steam for amine regeneration and fuel gas for hydrogenation reduction and tail gas combustion are main energy consumption, respectively. SRU is an exothermic unit with a large amount of 3.5 MPa and 0.4 MPa steam as by-product. DU and AWSU are low energy consumption units by contrast. So, the steam used by the purification process mainly relies on the steam derived from heat recovery of exothermic devices. And some pumps are also driven by the by-product steam.

3.2 Decision variables

Based on the analysis of energy consumption distribution, to reduce complexity of optimization model, the operating parameters in DU and AWSU have not been considered as input variables in the optimization model. The operating parameters affecting energy consumption have been analyzed for GSU, SRU and TGTU through simulation by sensitivity analysis method (Hu 2013). Then, seven key parameters were selected as input variables of the optimization model given in Table 4.

Table 4 Selected key operating parameter

4 Optimization model based on BP and NSGA-II

4.1 The objective function and constraints

The objective functions of optimization are to minimize the TCEC and maximize the PGPR, which can be expressed mathematically as follows:

Minimize

$${\text{Object}}\left( 1 \right) = E_{\text{TCEC}}$$
(3)
$${\text{Object}}\left( 2 \right) = - {{m_{\text{PNG}} } \mathord{\left/ {\vphantom {{m_{\text{PNG}} } {m_{\text{FNG}} }}} \right. \kern-0pt} {m_{\text{FNG}} }}$$
(4)

In Eq. (4), mPNG and mFNG represent the volume flow rate of purified natural gas and feed natural gas under the standard condition (104 Nm3/h), respectively.

The quality specification (S1S5) that the treated gas should meet is regarded as the inequality constraint. The input variables are the seven key operating parameters V1V7 in Table 4.

4.2 Frame diagram of optimization process

Figure 3 shows the frame diagram of the optimization process. Uniform design method (UD), which is a statistics experimental design method, similar to orthogonal design method, has been applied to design the data set for training and testing the BP neural network model. Then, NSGA-II method has been used to optimize the seven input variables to obtain Pareto optimal set for minimum of TCEC and maximum of PGPR. The details about mentioned method and model will be presented in the following sections.

Fig. 3
figure 3

Frame diagram of NSGA-II optimization model

5 Results and discussion

5.1 Design of training and testing data

The UD method is based on the quasi-Monte Carlo method and proposed by Fang (1994). UD designs the experimental points to be scattered uniformly within the experimental domain. Compared with other conventional statistical experiment methods, UD is an effective approach and can further reduce the number of experimental trials which is proportional to the number of factor level (Fang and Ma 2001). For example, if a case with m factors (e.g., x1, x2, xm) and s levels for each factor, the comprehensive needs ms experiments and orthogonal design method needs s2 experiments, while UD only needs number of s experiments. The UD tables for designing different experiment trials have been introduced in the literature (Fang, 1994).

The table U21 (107) of UD experiments has been applied to arrange the investigated seven operating parameters as listed in Table 5. The process parameters have been graded into 20 even levels, and 21 experimental trials have been determined. For each input parameter, in the range of the minimum and the maximum, there exists an arithmetic progression with 21 data which are numbered from No. 1 to No. 21 in order. For each experimental trial, according to the uniform experiment table, it is a combination of seven input parameters.

Table 5 Training and testing data for BP model

To further evaluate reliability of the BP model, different sample sizes such as 50, 100, 300 and 600 have been used. For all the sample sizes, 90% data have been used to train the model, while the left, i.e., 10%, to test the accuracy of the model.

To quantify the difference between predictions of BP model and ProMax results, average relative deviation percent (AAD %) is defined by the following equation

$${\text{AAD}}\% = \frac{100}{n}\sum\limits_{i = 1}^{n} {\left| {\frac{{y_{i} - x_{i} }}{{y_{i} }}} \right|}$$
(5)

where yi, xi and n represent ProMax results, BP model predictions and number of data point used to calculate AAD %, respectively. AAD % for sample sizes, i.e., 21, 100, 400 and 600, was 1.11%, 0.69%, 0.62% and 0.61%, respectively. Although the accuracy of the sample size with 21 was lower than the other, it is still acceptable for engineering application. To present this method much clearly, we decide to keep the sample size with 21 in paper to show the whole process that how to set up the UD experiment table and show the input and output parameters of BP model in details.

In Table 5, a base experiment point, composed with the actual operating parameters, was added. Among the 22 experiment points, the 7th, 14th, 21st and the Base were chosen as testing series to evaluate the accuracy of BP model, and the others were selected as training series. All 22 operating conditions have been calculated by the gas purification process simulation model. Then, the simulation results of the quality specification (S1S5), TCEC and PGPR are given in Table 6. Among these experiment points, No. 9 attracts much attention for its lowest TCEC, which reduced by 13.5% compared with the Base. This also reflects that the UD method can efficiently design and get the representative experiment trails.

Table 6 Training and testing data for BP model

5.2 Prediction of BP neural network model

There are multitudes of different types of artificial neural networks. The multilayer perceptron with the back-propagation of error algorithm is more popular and is used in this paper.

The MATLAB neural network toolbox was used to establish the BP neural network. The main function was set as ‘net = newff (minmax(P), [15,7], {‘tansig’, ‘logsig’}, ‘traingdx’)’. The input data were normalized to [− 1, + 1] by the ‘minmax’ function before training.

There are three layers (input, hidden and output layers) in the training algorithms. After a large amount of practice and comparison for different numbers of neurons, 15 neurons for the hidden layer were recommended. The transfer functions ‘tansig’ for input-hidden layer and ‘logsig’ for hidden-output layer were applied. The ‘traingdx’ was applied as training function. The ‘sim(net, P_test)’ was constructed as the prediction function. The input variables of the BP neural network were the seven operating parameters in Table 5, while the seven output variables were the quality specification (S1S5), TCEC and PGPR in Table 6.

Table 7 shows the agreement between predictive values by BP neural network model and the simulation values by ProMax model. It can be seen that the accuracy of BP prediction is high, which will provide a reliable basis for the further optimization.

Table 7 Comparison between BP prediction and ProMax simulation

5.3 Pareto optimal solutions

The optimization goal is to minimize TCEC and maximize the PGPR. Since two objective functions cannot be optimized simultaneously, the non-dominated sorting genetic algorithm (NSGA-II) has been applied to achieve the Pareto optimal solutions. The real-coded NSGA-II has been implemented in MATLAB. In the NSGA-II model, the values of population size, maximum generations and tournament pool size are 100, 300 and 2, respectively; replace proportion, crossover probability and mutation probability are 0.9, 0.9 and 0.14, respectively; the crossover method and mutation method are two points and selective.

The Pareto optimal solutions have good convergence and uniformity indicated in Fig. 4. It can be concluded that no objective function for a Pareto solution can be improved without worsening the other objective function. All these points are optimal and no superior to others. In Fig. 4, among the Pareto front curve, three points A, B and C have been chosen to be further discussed. Point A has the lowest TCEC with the lowest PGPR; point B has the medium PGPR with medium TCEC; point C has the highest PGPR with medium TCEC. The process optimization should consider the control mode and accuracy of the operating parameters in the gas processing field. So the diversity of Pareto optimal solutions can supply more possibility for the gas processing field to select based on its actual condition.

Fig. 4
figure 4

Pareto front of two objectives TCEC and PGPR

The values of input variables, TCEC and PGPR for the three points are listed in Table 8. TCEC of all the points is lower than the Base about 13.4%, and PGPR is higher than the Base about 0.2%. As it is known that the decrease in the values of V1, V2, V5, V6 and V7 can decrease TCEC, while the increase in the values of V3, V4, V5 and V7 can increase PGPR. Compared with the Base, all the points A, B, C have lower the amine solution temperature into the second absorption tower V1, the amine solution circulation rate V2, the tail gas H2S/SO2 ratio V5, and the quenched water circulation V7, while they have higher the amine solution concentration V3, the regeneration tower reflux ratio V4 and the combustion air flow V6. The adjustment results of these operating parameter V1V7, can offer reference for the optimal operation in gas processing field. Furthermore, the objective functions have been recalculated by using the ProMax process simulation model in the same operating conditions and are given in Table 8.

Table 8 Selected Pareto optimization results for TCEC and PGPR

6 Conclusions

The optimization of a whole high-sulfur natural gas purification plant was investigated to reduce the TCEC and further improve the PGPR. To provide sufficient data and determine key operating parameters, a steady-state simulation model of high-sulfur natural gas purification process including GSU, DU, SRU, TGTU and AWSU was set up by using software ProMax. And the model has good agreement compared with the actual operating data. Seven key operating parameters, as input variables in optimization model, were determined based on the analysis of comprehensive energy consumption distribution. To solve the problem that the process model did not converge in some conditions for the existence of nested loops in it, BP neural network was applied to substitute the simulation model to predict the relative parameters needed in the optimization model. The UD method and the table U21 (107) were applied to design the experiment points for training and testing BP model. The BP model can offer high prediction accuracy compared with the simulation model. NSGA-II was established to optimize the two objectives, and 100 Pareto optimal solutions were achieved. Three optimal points A, B and C were selected and evaluated further. The TCEC was reduced by 13.4% and the PGPR was improved by 0.2% compared with the Base operation condition.

Further investigation will be carried out to verify the stability and reliability by using much more plant operating data. It demonstrates the applicability and feasibility of BP neural network and NSGA-II to resolve global optimization problem in the field of the high-sulfur gas purification plant.