New tools predict monoethylene glycol injection rate for natural gas hydrate inhibition

New tools predict monoethylene glycol injection rate for natural gas hydrate inhibition

Journal of Loss Prevention in the Process Industries 33 (2015) 222e231 Contents lists available at ScienceDirect Journal of Loss Prevention in the P...

2MB Sizes 2 Downloads 41 Views

Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

Contents lists available at ScienceDirect

Journal of Loss Prevention in the Process Industries journal homepage: www.elsevier.com/locate/jlp

New tools predict monoethylene glycol injection rate for natural gas hydrate inhibition Arash Kamari a, Alireza Bahadori b, *, Amir H. Mohammadi a, c, **, Sohrab Zendehboudi d a

Thermodynamics Research Unit, School of Engineering, University of KwaZulu-Natal, Howard College Campus, King George V Avenue, Durban 4041, South Africa b School of Environment, Science & Engineering, Southern Cross University, Lismore, NSW, Australia c Institut de Recherche en G enie Chimique et P etrolier (IRGCP), Paris Cedex, France d Department of Chemical Engineering, Massachusetts Institute of Technology (MIT), Cambridge, MA 02139, USA

a r t i c l e i n f o

a b s t r a c t

Article history: Received 6 October 2014 Received in revised form 20 November 2014 Accepted 16 December 2014 Available online 24 December 2014

In the oil and gas production operations, hydrates deposition leads to serious problems including over pressuring, irreparable damages to production equipment, pipeline blockage, and finally resulting in production facilities shut down and even human life and the environment dangers. Hence, it is of great importance to forecast the hydrate formation conditions in order to overcome problems associated with deposition of hydrate. In this article, an effective, mathematical and predictive strategy, known as the least squares support vector machine, is employed to determine the hydrate forming conditions of sweet natural gases as well as the monoethylene glycol (MEG) flow-rate and desired depression of the gas hydrate formation temperature (DHFT). The outcome of this study reveals that the developed technique offers high predictive potential in precise estimation of this important characteristic in the gas industry. Beside the accuracy and reliability, the proposed model includes lower number of coefficients in contrast with conventional correlations/methods, implying an interesting feature to be added to the modeling simulation software packages in gas engineering. © 2014 Elsevier Ltd. All rights reserved.

Keywords: Gas hydrate Clathrate hydrate Modeling Risk and safety Monoethylene glycol

1. Introduction Hydrates formation causes serious problems in oil and gas production facilities and has also safety and environmental dangers (Bahadori, 2011; Christiansen, 2012; Ghiasi et al., 2013). Normally, high pressures, low temperatures and link between water molecules and guest gaseous molecules including nitrogen, hydrogen sulfide, carbon dioxide normal and isobutene, propane, ethane and specially methane can result in the hydrates deposition (Bahadori, 2011). Actually, hydrates are a subset clathrate compounds or inclusion compounds where a molecule of one substance is enclosed in a structure which is made from another substance molecules (Christiansen, 2012). Generally, natural gas hydrates deposit widely in a level of earth that is frozen all year round and

* Corresponding author. ** Corresponding author. Thermodynamics Research Unit, School of Engineering, University of KwaZulu-Natal, Howard College Campus, King George V Avenue, Durban 4041, South Africa. E-mail addresses: [email protected] (A. Bahadori), [email protected], [email protected] (A.H. Mohammadi). http://dx.doi.org/10.1016/j.jlp.2014.12.013 0950-4230/© 2014 Elsevier Ltd. All rights reserved.

marine sediments (Li et al., 2013). Avoidance of the deposition of natural gas hydrates eliminates the possibility of condensed water formation (Ghiasi et al., 2013). Therefore, use of methods which lead to prevention of safety hazards and economic risks and in other words hydrate deposition seems reasonable. One of the most efficient and reliable ways to avoid hydrate formation is hydrate inhibitors injection as they decrease the temperature of hydrate deposition or/and hinder their formation. Chemicals, in particular alcohols including methanol, diethylene glycol (DEG) and monoethylene glycol (MEG), are the commonly utilized thermodynamic hydrate inhibitors in the oil and gas industries (Bahadori, 2011; Bahadori and Vuthaluru, 2010; Elgibaly and Elkamel, 1998). Methanol as a thermodynamic inhibitor shifts hydrate formation conditions by decreasing water activity (Ghiasi et al., 2013). However, a greater amount of methanol is vanished in the gaseous phase in comparison with glycols (Bahadori, 2011). Moreover, MEG is recommended instead of DEG for cases where the temperature is equal to 10  C or lower because elevated viscosity is obtained at low temperatures (Bahadori, 2011). To estimate hydrate deposition conditions, there are several

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

techniques including laboratory measurements, empirical correlations, and using the Katz gravity chart (Holder et al., 1984; Sloan Jr and Koh, 2007). Among these methods, laboratory measurements are relatively expensive and time consuming to industrial necessities while dealing with hydrate deposition conditions (Bahadori, 2011). Consequently, empirical equations which are employed to forecast hydrate deposition conditions exhibit normally considerable error and also are occasionally very complicated that involve more computations. Bahadori (2011) proposed a simple-to-utilize empirical relationship to estimate hydrate deposition states for sweet natural gases. Furthermore, he developed correlations for estimating the MEG flow-rate and the required MEG (wt %) in the rich mixture for preferred depression of the temperature in which the gas hydrate formation occurs. However, these mathematical relationships require high adjustable parameters to calculate hydrate formation condition. Additionally, Katz gravity chart gives errors for compositions other than those applied to derive these charts. Introducing a reliable predictive model which does not need many adjustable parameters can be useful for prediction of hydrate formation condition. Hence, this study introduces a two-adjustable parameters model on the basis of least squares supported vector machine (LSSVM) to determine the conditions which result in formation of gas hydrate formation. It also offers acceptable estimation of the desired depression of the gas hydrate formation temperature (DHFT) and the MEG flow-rate. In addition, the coupled simulated annealing (CSA) technique is employed to attain the optimal values of the predictive system parameters. A systematic statistical analysis including error and residual error calculation, and leverage approach is conducted to examine the performance and accuracy of the developed model (e.g., LSSVM).

223

model input holds a dimension of N (number of data points)  n (number of input parameters). Furthermore, x is a vector of dimension n. To calculate w and b, the cost function should be minimized as expressed by Vapnik (Suykens et al., 2002): N  X  1 Cost function ¼ wT þ c xk  x*k 2

(2)

k¼1

To satisfy constraints:

8 T < yk  w 4ðxk Þ  b  ε þ xk ; T w 4ðxk Þ þ b  yk  ε þ x*k ; : xk ; x*k  0;

k ¼ 1; 2; …; N k ¼ 1; 2; …; N k ¼ 1; 2; …; N

(3)

Here, xk and x*k refer to the slack variables, the fixed accuracy of the function approximation is expressed by ε, N represents the number of data points, and kth data point input, and kth data point output are symbolized by xk and yk respectively. It is worth noting if a very low value is chosen for ε for the sake of accuracy, it may cause that a part of data are outside of the precision defined for ε. It implies that slack parameters are required to be employed in order to recognize the error margin. c in Equation (2) which holds a positive magnitude, is taken into account as a tuning parameter in the SVM approach to determine the deviation value, with respect to the desired ε. Considering the constraints, the following equations in the form of the Lagrangian are applied for minimizing the cost function (Suykens et al., 2002): N  N  X      1 X L a; a* ¼  ak  a*k al  a*l Kðxk ; xl Þ  ε ak  a*k 2 k;l¼1

þ

2. Data collection

N X

k¼1

  yk ak  a*k

k¼1

The current study is targeted to obtain the hydrate formation conditions, desired DHFT, and flow rate of monoethylene glycol (MEG) with high precision. Therefore, wide ranges of data are collected from various sources. The required data are extracted from Katz gravity chart (Katz, 1945) to calculate pressure of the hydrate formation in this study. Consequently, hydrate-forming pressure data (Katz, 1945) is a function of molecular weight and temperature. Ranges and averages of the hydrate-forming pressure, molecular weight, and temperature are shown in Table 1. The desired temperature depression data (Moshfeghian and Taraf, 2008) is a function of pressure, MEG weight percent, molecular weight and feed gas temperature. Ranges and averages of these affecting parameters as well as depression temperature are provided in Table 2. As a result, the MEG flow-rate is strongly dependent on temperature, pressure, MEG (wt%), and molecular weight (Moshfeghian and Taraf, 2008). Ranges and averages of the flowrate of MEG, pressure, temperature, molecular weight and MEG concentration are tabulated in Table 3. The compositions related to twelve feed gas streams used in this study are shown in Table 4. 3. Model development

(4) N  X  ak  a*k ¼ 0; ak ; a*k 2½0; c

(4a)

k¼1

Kðxk ; xl Þ ¼ 4ðxk ÞT 4ðxl Þ; k ¼ 1; 2; …; N

(4b)

where multipliers of Lagrangian are represented by ak and ak*. After required rearrangement and simplification, the final form of the SVM model is obtained as follows: N    X    f x ¼ ak  a*k K x; xk þ b

(5)

k¼1

The quadratic programming problem should be solved to attain ak, ak* and b in Eq. (5). Hence, a least square form (LSSVM) of the SVM mathematical technique was presented by Suykens and Vandewalle (1999) to improve original version of the SVM approach. The advanced form of SVM, known as LSSVM, includes the equality constraints in points where the equality function does not exist for the SVM technique (Suykens and Vandewalle, 1999).

3.1. Equations According to the SVM model, the fundamental equation moving backward is given below (Suykens et al., 2002):

f ðxÞ ¼ wT 4ðxÞ þ b

(1)

in which wT introduces the vector of transposed output layer, b represents the bias, and the feature map is defined by 4ðxÞ. The

Table 1 Ranges and averages of the input/output data used for developing the hydrate pressure model. Parameter

Min.

Avg.

Max.

Type

MW 16.06 21.78 29 Input Temperature, K 278.93 294.32 298.91 Input þ3 Hydrate formation pressure, kPa  10 5.02584 17.08 49.64416 Output

224

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

Table 2 Ranges and averages of the input/output data used for developing the desired depression of the gas hydrate formation temperature model. Parameter

Min.

Avg.

Max.

Type

Feed gas temperature,  C MW Pressure, MPa MEG weight percent, % Depression temperature,  C

20 18.85 3 5 1

34.93 21.02 6.01 39.85 16.52

50 23.2 9 75 45

Input Input Input Input Output

.   Kðx; xk Þ ¼ exp  k xk  xk2 s2

As a consequence, the model developed by LSSVM algorithm has two Kernel-based parameters as shown above (s2and g). In the current study, the LSSVM model developed by Suykens and Vandewalle (1999) is applied for the prediction purpose. The outputs of the LSSVM strategy are generally accessed through utilizing the mean square error (MSE) as follows:

Pn Moreover, rather than using nonnegative errors, this new technique utilizes squared errors for the evaluation of the cost function. This is one of the main differences between LSSVM and SVM tools (Li et al., 2012). It is believed there is no need to find the optimal network for the LSSVM technique in spite of the classical smart tools such as the artificial neural network (ANN) as there is low chance for the problems such as local optimum, and over and under-fitting in the LSSVM approach (Cristianini and Shawe-Taylor, 2000; Gharagheizi, 2007; Suykens and Vandewalle, 1999). LSSVM technique has been utilized for a number of prediction/ representation applications in chemical, environmental and petroleum engineering such as asphaltene, wax, calcite and barite deposition, etc (Hemmati-Sarapardeh et al., 2013; Kamari et al., 2014a, 2014b, 2013a, 2013b, 2014c; Chamkalani et al., 2013). Suykens and Vandewalle presented the fundamental equation for the LSSVM model as the following (Suykens et al., 2002): N 1 1 X Cost function ¼ wT w þ g e2k 2 2

(6)

k¼1

The equality constraint for Equation (6) is given as follows:

yk ¼ wT 4ðxk Þ þ b þ ek

ðfor k ¼ 1; …; NÞ

(7)

where g expresses the adjustable factor in the LSSVM model and the error variable is defined by ek. The Lagrangian for this case is presented as below: N N  X 1 1 X Lðw; b; e; aÞ ¼ wT w þ g e2k  ak wT 4ðxk Þ þ b þ ek 2 2 k¼1 k¼1   yk

(8) If the derivatives of Eq. (8) are equal to zero, the equations are solved to obtain the following relationships:

8 N X > vL > > ¼ 09w ¼ ak 4ðxk Þ > > > vw > > k¼1 > > > > > N X > vL > > ¼ 09 ak ¼ 0 < vb k¼1 > > > > vL > > ¼ 09ak ¼ gek ; k ¼ 1; 2; …; N > > vek > > > > > > vL > > ¼ 09wT 4ðxk Þ þ b þ ek  yk ¼ 0; k ¼ 1; 2; …; N : vak

(10)

MSE ¼

i¼1



Xrep:=predi  Xexpi

2

N

(11)

where X is the hydrate-forming conditions of sweet natural gases or the MEG flow-rate and or the desired DHFT, subscript rep./pred. stands for the represented/predicted values, N introduces the number of samples within the original population, and subscript exp. denotes reported experimental/literature values. Here, it should be mentioned that changing the inequality constraints of Eq. (3) to the equality constraints (e.g., Eq. (7)) is the main advantage of the LSSVM approach over the classical SVM. The LSSVM technique proposed by Suykens and Vandewalle (1999) and Pelckmans et al. (2002) as well as the LSSVM toolbox (Suykens et al., 2002) have been used in this work to calculate the hydrate formation thermodynamic states of sweet natural gases, the MEG flow-rate and the desired DHFT. 3.2. Data analysis To propose a reliable predictive model for prediction of the hydrate-forming conditions of sweet natural gases, the MEG flowrate and the desired DHFT, our data bank is divided into two main categories; namely training stage (e.g., 80%), and testing stage (e.g., 20%). To avoid the common issues in this type of prediction approach (e.g., local minima and data accumulation), several distributions are implemented in the feasible area of the problem stated in the present study through using various data sets. As a result, the inputs with greater values might repress the influence of the smaller ones during training stage of developing the LSSVM model. To solve the problem stated previously and also make LSSVM execute satisfactorily, all data points should be properly analyzed and suitably scaled before introducing to the LSSVM model. The normalization of the input and output data is conducted using the following relationship:

 xn ¼

x 1:5  xmax

  0:8 þ 0:1

(12)

where xn is the data normalized, x stands for real data points and xmax denotes the maximum value of the data.

(9)

The number of unknown parameters (ak, ek, w, and b) and equations are the same equal to 2N þ 2, based on Equation (9). Beside g adjustable parameter, the parameters of the Kernel functions are also taken into account as tuning variables. As a result, the Kernel Function employed in this research work was the “RBF” as formulated below:

3.3. Leverage approach In this part of our work, the Leverage methodology, which is a recognized approach for outlier detection, is utilized to obtain the proper range (or domain) that the developed model works efficiently to determine the hydrate-forming conditions of sweet natural gases, the MEG flow-rate and the desired DHFT. The Leverage technique is composed of statistical analysis including residual errors and the Hat matrix that consider the real data and estimated values of the target function (Eslamimanesh et al., 2012b; Mohammadi et al., 2012a, 2012b). Consequently, implementation of an appropriate mathematical model is the main application criterion of Leverage algorithm. The Hat matrix

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231 Table 3 Ranges and averages of the input/output data used for developing the MEG flow-rate model. Parameter

Min.

Avg.

Max.

Type

Temperature,  C MW Pressure, MPa MEG weight percent, % MEG flow-rate, kg/10þ6 std m3

20 17.38 3 0.92 178.5714

35.34 20.91 5.80 57.32 6265.43

50 23.2 9 77.47 42267.66

Input Input Input Input Output

225

between the experimental/actual data and magnitudes of estimated objective parameter). Additionally, the statistical methods including R-squared (R2), standard deviation of error (SD), average absolute percentage relative error (AAPRE, or Ea), root mean square error (RMSE), and average percentage relative error (APRE, or Er) are employed. The statistical error parameters are presented as given below: 1. Average Percentage Relative Error (APRE).

Table 4 The compositions related to twelve feed gas streams used in this study; compositions are in mole fraction. Gas

1 2 3 4 5 6 7 8 9 10 11 12

Component CH4

C2H6

C3H8

iC4H10

nC4H10

iC5H12

nC5H12

MW

SG

0.944 0.89 0.832 0.78 0.749 0.9 0.82 0.76 0.695 0.85 0.8 0.73

0.026 0.0515 0.088 0.105 0.101 0.037 0.113 0.145 0.19 0.08 0.11 0.17

0.02 0.0365 0.042 0.065 0.072 0.025 0.029 0.045 0.046 0.04 0.04 0.04

0.005 0.007 0.011 0.015 0.024 0.019 0.01 0.015 0.0245 0.01 0.015 0.02

0.005 0.007 0.011 0.015 0.024 0.019 0.01 0.015 0.0245 0.01 0.015 0.02

0 0.004 0.008 0.01 0.015 0 0.009 0.01 0.01 0.005 0.01 0.01

0 0.004 0.008 0.01 0.015 0 0.009 0.01 0.01 0.005 0.01 0.01

17.38 18.82 20.27 21.72 23.18 18.86 20.29 21.72 23.18 19.69 21.09 22.35

0.6 0.65 0.7 0.75 0.8 0.65 0.7 0.75 0.8 0.68 0.728 0.772

embedded in the Leverage technique is presented as follows (Eslamimanesh et al., 2012b; Gharagheizi et al., 2012; Goodall, 1993; Gramatica, 2007; Mohammadi et al., 2012a; Rousseeuw and Leroy, 2005):

 1 t H ¼ X Xt X X

Er % ¼

n 1X E% n i¼1 i

(14)

(13) where Ei% is as follows:

where t represents the transpose matrix and X refers to a matrix containing k columns and N rows. The Hat values, which represent the viable region of the case under study, are characterized by the diagonal elements of the H matrix. In addition, the outliers are usually detected on the basis of H value obtained from Eq. (13). The H indices and standard residual values are well described in the Williams plot. In general, a warning leverage (H*) is set to be 3p/n, where p is equal to the number of model coefficients plus one and the number of training data points is symbolized with n. If the leverage is 3, it means the data points are accepted with standard deviation of ±3 with respect to the average (mean) value. If H [0, H*] and R[3, 3] are the intervals in which the main part of the data are placed, exhibiting that the proposed technique statistically works well in the defined domain in terms of predictive performance. It is important to note that acceptable high leverage is attributed to the condition where H is equal to or greater than H* and R is between 3 and 3. The data points in the intervals of R < 3 or 3 < R are recognized as the suspected data, known as poor high leverage. Presence of the outliers in computation and analysis may cause considerable error in the model output, leading to false decisions (Gharagheizi et al., 2012). 4. Methods for model evaluation

Ei % ¼

 Zexp  Zrep:=pred  1000i ¼ 1; 2; 3; :::; n Zexp

2. Average Absolute Percentage Relative Error (AAPRE).

Ea % ¼

n 1X jEi %j n

(16)

i¼1

3. Root Mean Square Error (RMSE).

vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi u n  2 u1 X Ziexp  Zirep:=pred RMSE ¼ t n i¼1

In this study, several statistical and graphical techniques are used to evaluate the performance of the developed LSSVM model for prediction of the hydrate-forming conditions of sweet natural gases, the MEG flow-rate and the desired DHFT. Graphical methods are error distribution (distribution of error measured around the zero error line) and crossplot (unit slope line or a 45 straight line

(15)

4. Standard Deviation (SD).

(17)

226

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

Table 5 Optimized parameters of developed LSSVM models.

Table 6 Statistical analysis of the introduced tool for estimation of hydrate formation pressure.

Model name

s2

g

Hydrate pressure model Depression temperature model MEG flow-rate model

0.090323828 0.063074000 0.101019938

14329369802.3 4460.5 425.2

vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi !2 u n u 1 X Zi exp  Zi rep:=pred t SD ¼ n  1 i¼1 Zi exp

(18)

5. Coefficient of Determination (R2).

2 Zi exp  Zi rep:=pred 2 Pn  i¼1 Zi rep:=pred  Z

Pn R2 ¼ 1 



i¼1

(19)

where X is the mean of the experimental/literature-reported data points. 5. Results and discussion 5.1. Accuracy evaluation Present study has been performed through a technique called LSSVM modeling and uses three main stages such that it creates a reliable predictive model from a data samples, trains the model against these data samples with known results and implements the model developed to a new dataset with an unknown outcome. Therefore, the mathematical approach was implemented to develop three efficient and accurate predictive tools for the

Performance No. of data used Ea % Total Training Testing

874 699 175

Er %

SD

RMSE

R2

0.150348 0.016684 0.005212 0.086292 0.999 0.129526 0.000540 0.002159 0.035346 0.999 0.233517 0.085485 0.004744 0.179441 0.999

hydrate-forming conditions of sweet natural gases, the MEG flowrate, and the hydrate formation temperature depression (e.g., DHFT). As summarized in Tables 1e3, hydrate pressure, hydrate formation temperature depression and MEG solution mass flowrate range between 5025.84 and 49644.16 kPa, 1 and 45  C and 178.5714 and 42267.66 kg/10þ6 std m3, respectively. The optimum magnitudes of the LSSVM parameters developed in this study, s2 and g, were determined through utilizing the simulated annealing (SA) (Atiqullah and Rao, 1993; Fabian, 1997; Vasan and Raju, 2009) optimization method. It has been proved that the SA approach improves the solution accuracy, while it has also capability to prevent being stuck in local optima. On the other hand, it does not cause reduction in the convergence speed, considerably. As the determination of the LSSVM model is not a simple task at all, it is very important to obtain the parameters with acceptable precision through a reliable and strong optimization tool (Eslamimanesh et al., 2012a; Gharagheizi et al., 2011). Therefore, this study employed a proper optimization technique which is called the coupled simulated annealing (CSA). The optimization procedure was implemented several times to ensure the proper values for the target function, which finally provide the optimum values of s2 and g for the three developed models for prediction of the hydrate-forming conditions of sweet natural gases, the MEG flow-rate for desired DHFT, and the hydrate formation temperature depression. They are all summarized in Table 5. Fig. 1 indicates the structure of the newly developed LSSVM model with its corresponding inputs and outputs before and after hydrate inhibitor injection.

Fig. 1. Structure of the developed LSSVM models for the prediction of hydrate formation pressure, hydrate formation temperature depression, and MEG solution mass flow-rate.

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

227

Table 7 Statistics error parameters of the developed model for prediction of the desired depression of the gas hydrate formation temperature. Performance No. of data used Ea% Total Training Testing

239 191 48

Er %

SD

RMSE

R2

0.584791 0.040975 0.007682 0.149951 0.999 0.181063 0.006380 0.002037 0.017699 0.999 2.191295 0.229409 0.007407 0.332734 0.998

Table 8 Statistics error parameters of the developed model for prediction of MEG solution mass flow-rate. Performance No. of data used Ea% Total Training Testing

172 138 34

Er %

SD

RMSE

R2

7.173248 2.30091 0.077847 432.6622 0.996 3.742309 0.52108 0.025012 323.4299 0.998 21.098820 9.52494 0.073719 722.7818 0.993

Fig. 4. Comparison between results of the developed model and the reported values of MEG solution mass flow-rate.

Fig. 2. Comparison between results of the developed model and the reported values of hydrate formation pressure.

Table 6 indicates that R2 ¼ 0.999 and AAPRE ¼ 0.23 have been obtained for testing phase using the newly developed LSSVM model for prediction of hydrate-forming pressure. As can be seen in Table 7, AAPRE ¼ 2.19 and R2 ¼ 0.998 have been reported by using the newly developed gas hydrate formation temperature in testing

Fig. 3. Comparison between results of the developed model and the reported values of the desired depression of the gas hydrate formation temperature.

Fig. 5. Relative deviations of the hydrate formation pressure values obtained by the proposed model from the database values.

Fig. 6. Error distribution throughout forecast of temperature depression of hydrate formation in both training and testing phases.

228

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

Fig. 7. Relative deviations of the MEG solution mass flow-rate values obtained by the proposed model from the database values.

phase. Moreover, R2 and AAPRE for MEG flow-rate model in testing phase are respectively 21.09 and 0.993, as shown in Table 8. Consequently, Tables 6e8 summarize the obtained values for all studied statistical error parameters of the proposed LSSVM model for determination of the hydrate-forming pressure of sweet natural gases, the desired DHFT, and the MEG flow-rate, respectively. From the tables it can be concluded that mathematical approach pursued in this study has better performance for prediction of hydrateforming pressure in comparison with gas hydrate formation temperature and MEG flow-rate according to available database. Figs. 2 through 4 demonstrate a proper comparison between predicted and real hydrate formation conditions in terms of pressure, MEG flow rate and temperature, respectively. As clear from the figures, all data corresponding to the training and testing stages are almost placed on the line of Y ¼ X, showing there is great agreement between the LSSVM model predictions and the real data taken from the literature. Providing more statistical information for the model performance evaluation, the magnitudes of absolute relative error percentage versus the real data employed in both

Fig. 8. Trend plot of hydrate formation pressure versus temperature.

Fig. 9. Trend plot of hydrate formation depression temperature versus MEG weight percent.

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

Fig. 10. Trend plot of MEG solution mass flow-rate versus MEG weight percent with molecular weight of 20.3.

training and testing phases are depicted in Figs. 5e7. Based on this investigation, very small error is noticed. Thus, it is concluded that the LSSVM tool has high capability to estimate hydrate formation conditions (e.g., temperature, pressure, and MEG mass flow rate) with appropriate accuracy that can be safely utilized in the design of process equipment in natural gas processing plants.

229

In order to show smoothness and also confirm the validity of the LSSVM model applied for estimation of the hydrate formation conditions of sweet natural gases, the MEG flow-rate and the desired DHFT, a trend analysis was conducted as shown in Figs. 8e10. Fig. 8 compares the reported and predicted hydrate pressure versus temperature; Fig. 9 illustrates a comparison between the reported and predicted hydrate formation temperature depression versus required MEG weight percent in the rich solution and finally Fig. 10 conducts a trend analysis for the reported and predicted MEG flow-rate values versus MEG weight percent. Finally, we used artificial neural network (ANN) modeling to compare the results obtained by LSSVM, and also to show superiority of the utilized approach for calculation of the hydrate formation pressure, hydrate depression temperature, and MEG solution mass flow-rate. To this end, three various ANN models have been developed using those datasets applied for the development of LSSVM models to obtain the hydrate formation pressure, hydrate depression temperature, and MEG solution mass flow-rate. To develop such models, tanh-axon is used as transfer function, and LevenbergeMarquardt back propagation is utilized in all training steps. Moreover, the number of neurons in hidden layer is determined by optimization process to get best results. Fig. 11 shows the structure of the developed ANN models with its optimized hidden layer neurons. Table 9 summarizes the results obtained by implementing the ANN approach on the datasets for the determination of hydrate formation pressure, hydrate depression temperature, and

Fig. 11. Structure of the developed ANN models for the prediction of hydrate formation pressure, hydrate formation temperature depression, and MEG solution mass flow-rate.

230

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

Table 9 Statistics error parameters of the developed ANN models for the prediction of hydrate formation pressure, hydrate formation temperature depression, and MEG solution mass flow-rate. Performance

No. of data used

Ea%

Er %

SD

RMSE

R2

ANN model for hydrate pressure ANN model for hydrate depression temperature ANN model for MEG flow rate

874 239 172

1.028557669 3.530331817 22.3796837

0.026238385 0.593028146 1.148028814

0.018357105 0.047814432 0.23510214

0.173361084 0.856860718 802.860017

0.999 0.998 0.989

Fig. 12. Identification of the probable doubtful data of hydrate formation pressure and the applicability domain of the developed LSSVM model.

Fig. 14. Identification of the probable doubtful data of MEG solution mass flow-rate and the applicability domain of the developed LSSVM model.

MEG solution mass flow-rate. As a comparison between Tables 6e9, the results obtained by LSSVM methodology are in more agreement with the reported data than ANN modeling. Furthermore, the LSSVM tool consisting of two adjustable factors (or parameters) was developed while other intelligent methods like neural networks require greater numbers of adjustable variables.

forming conditions of sweet natural gases, the MEG flow-rate and the desired DHFT because uncertainties influence the estimation capability of the model proposed in this study. Hence, the leverage value statistics technique (Goodall, 1993; Gramatica, 2007) has been used in this study. Using the Williams plot on the basis of the calculated H value, the graphical detection of the outliers or suspected data is sketched (Mohammadi et al., 2012a, 2012b). Equations, concepts, and computational procedure of this efficient approach can be found elsewhere (Mohammadi et al., 2012a, 2012b). The Williams plot for the hydrate-forming conditions of sweet natural gases model, the desired DHFT model and MEG flowrate model have been shown in Figs. 12e14, respectively. Existence of the main part of data in the domains of 0  H  0.01029 and 3  R  3 for the hydrate pressure model, 0  H  0.0627615 and 3  R  3 for the desired depression of the gas hydrate formation temperature (DHFT) model and finally 0  H  0.0872093 and 3  R  3 for the MEG flow-rate model indicate that the mathematical strategy followed in this study is statistically satisfactory and convincing. Proper high leverage points are placed in the range of 0.01029 < H for the hydrate pressure model, 0.0627615 < H for the desired DHFT model and eventually 0.0872093 < H for the MEG flow-rate model. The results of the developed predictive models show that only ten data points for the hydrate pressure model, seven data points for the desired DHFT model and eventually five data points for the MEG flow-rate model are located in the bad Leverage domain/region which are recognized as outside data points (Figs. 12e14).

5.2. Outlier diagnosis Detection of outlier plays a key role in order to assess the potential of a newly implemented predictive approach (Mohammadi et al., 2012a, 2012b) as it is applied to recognize individual datum (or groups of data) that may differ from the bulk of the data present in a data set (Gramatica, 2007; Mohammadi et al., 2012a, 2012b; Rousseeuw and Leroy, 2005). Hence, it seems necessary to examine the available data in the open sources for the hydrate-

6. Conclusions

Fig. 13. Identification of the probable doubtful data of the desired depression of the gas hydrate formation temperature and the applicability domain of the developed LSSVM model.

In this study, an expert system called LSSVM that was linked with a optimization scheme (e.g., CSA) was applied to accurately forecast the hydrate formation conditions of sweet natural gases, the MEG flow-rate and the desired depression of the gas hydrate formation temperature (DHFT) within wide ranges of pressure, temperature, molecular weight, MEG weight percent and feed gas temperature. The conclusions obtained from this work

A. Kamari et al. / Journal of Loss Prevention in the Process Industries 33 (2015) 222e231

demonstrate that LSSVM strategy is very effective and feasible for estimation of the conditions that lead to hydrate formation in the natural gases. The predictive tool is also able to determine the MEG flow-rate and the desired DHFT over broad ranges of process and thermodynamic conditions. The determination coefficient (R2) for the conditions of hydrate formation, the desired temperature depression and the MEG flow-rate models are reported 0.999, 0.999 and 0.996, respectively. Furthermore, using the LSSVM strategy, excellent results are obtained and quantified by the reported average absolute relative deviation error. Total average absolute relative deviation error are determined to be 0.15, 0.58 and 7.17, respectively for the hydrate formation conditions, the desired DHFT and the flow rate of MEG. Nomenclature DEG DHFT MEG MW SG SVM LSSVM SA ANN MSE R2 AARD RMSE SDE

g s2

diethylene glycol depression of the gas hydrate formation temperature monoethylene glycol molecular weight specific gravity support vector machine least square support vector machine simulated annealing artificial neural network mean square error correlation coefficient average absolute relative deviations, % root mean square errors standard deviation errors relative weight of the summation of the regression errors squared bandwidth

Appendix A. LSSVM model utilization In this study, the LSSVM model (or toolbox) was employed to forecast the target variables related to gas hydrate formation. In addition, our developed model (MATLAB code) and further information on the developed model and its parameters are available upon request to the authors. To utilize this model, firstly, the LSSVM toolbox existing in the MATLAB software is installed. In the next stage, the toolbox directory as the main one is placed in the MATLAB environment. As the last stage, the model.mat file is introduced in the workspace of MATLAB. Example: Determine the Hydrate formation pressure when the MW and temperature are set to be 16.06 and 279.63, respectively. The hydrate formation pressure is computed through a simply manner through using the following command line in the MATLAB as follows (Kamari et al., 2013a): Press_calc ¼ simlssvm({trainX0 ,trainY0,type,gam,sig2,'RBF_Kernel','preprocess'},{alpha,b},[16.06, 279.63]). Based on the newly proposed model, the attained output (e.g., pressure) will be 5.57702 kPa  10þ3 while the corresponding the actual magnitude of the target variable based on given input data is 5.56256 kPa  10þ3. References Atiqullah, M.M., Rao, S., 1993. Reliability optimization of communication networks using simulated annealing. Microelectron. Reliab. 33, 1303e1319. Bahadori, A., 2011. A simple mathematical predictive tool for estimation of a hydrate inhibitor injection rate. Nafta 62, 213e223.

231

Bahadori, A., Vuthaluru, H.B., 2010. Prediction of methanol loss in vapor phase during gas hydrate inhibition using Arrhenius-type functions. J. Loss Prev. Process Ind. 23, 379e384. Chamkalani, A., Zendehboudi, S., Chamkalani, R., Lohi, A., Elkamel, A., Chatzis, I., 2013. Utilization of support vector machine to calculate gas compressibility factor. Fluid Phase Equilib. 358, 189e202. Christiansen, H.E., 2012. Rate of Hydrate Inhibitor in Long Subsea Pipelines. Cristianini, N., Shawe-Taylor, J., 2000. An Introduction to Support Vector Machines and Other Kernel-based Learning Methods. Cambridge University Press. Elgibaly, A.A., Elkamel, A.M., 1998. A new correlation for predicting hydrate formation conditions for various gas mixtures and inhibitors. Fluid Phase Equilibria 152, 23e42. Eslamimanesh, A., et al., 2012a. Phase equilibrium modeling of clathrate hydrates of methane, carbon dioxide, nitrogen, and hydrogenþ water soluble organic promoters using support vector machine algorithm. Fluid Phase Equilibria 316, 34e45. Eslamimanesh, A., Gharagheizi, F., Mohammadi, A.H., Richon, D., 2012b. A statistical method for evaluation of the experimental phase equilibrium data of simple clathrate hydrates. Chem. Eng. Sci. 80, 402e408. Fabian, V., 1997. Simulated annealing simulated. Comput. Math. Appl. 33, 81e94. Gharagheizi, F., 2007. QSPR analysis for intrinsic viscosity of polymer solutions by means of GA-MLR and RBFNN. Comput. Mater. Sci. 40, 159e167. Gharagheizi, F., Eslamimanesh, A., Farjood, F., Mohammadi, A.H., Richon, D., 2011. Solubility parameters of nonelectrolyte organic compounds: determination using quantitative structureeproperty relationship strategy. Ind. Eng. Chem. Res. 50, 11382e11395. Gharagheizi, F., et al., 2012. Evaluation of thermal conductivity of gases at atmospheric pressure through a corresponding states method. Ind. Eng. Chem. Res. 51, 3844e3849. Ghiasi, M.M., Bahadori, A., Zendehboudi, S., Jamili, A., Rezaei-Gomari, S., 2013. Novel methods predict equilibrium vapor methanol content during gas hydrate inhibition. J. Nat. Gas Sci. Eng. 15, 69e75. Goodall, C.R., 1993. 13 Computation using the QR decomposition. Handb. Stat. 9, 467e508. Gramatica, P., 2007. Principles of QSAR models validation: internal and external. QSAR Comb. Sci. 26 (5), 694e701. Hemmati-Sarapardeh, A., et al., 2013. Asphaltene precipitation due to natural depletion of reservoir: determination using a SARA fraction based intelligent model. Fluid Phase Equilibria 354, 177e184. Holder, G.D., Malekar, S.T., Sloan, E.D., 1984. Determination of hydrate thermodynamic reference properties from experimental hydrate composition data. Ind. Eng. Chem. Fundam. 23, 123e126. Kamari, A., Gharagheizi, F., Bahadori, A., Mohammadi, A.H., 2014a. Determination of the equilibrated calcium carbonate (calcite) scaling in aqueous phase using a reliable approach. J. Taiwan Inst. Chem. Eng. 45, 1307e1313. Kamari, A., Gharagheizi, F., Bahadori, A., Mohammadi, A.H., 2014b. Rigorous modeling for prediction of barium sulfate (barite) deposition in oilfield brines. Fluid Phase Equilibria 366, 117e126. Kamari, A., Hemmati-Sarapardeh, A., Mirabbasi, S.-M., Nikookar, M., Mohammadi, A.H., 2013a. Prediction of sour gas compressibility factor using an intelligent approach. Fuel Process. Technol. 116, 209e216. Kamari, A., Khaksar-Manshad, A., Gharagheizi, F., Mohammadi, A.H., Ashoori, S., 2013b. Robust model for the determination of wax deposition in oil systems. Ind. Eng. Chem. Res. 52, 15664e15672. Kamari, A., Safiri, A., Mohammadi, A.H., 2014c. A compositional model for estimating asphaltene precipitation conditions in live reservoir oil systems. J. Dispers. Sci. Technol. 36, 301e309. Katz, D.L., 1945. Prediction of conditions for hydrate formation in natural gases. Trans. AIME 160, 140e149. Li, B., Song, S., Li, K., 2012. Improved conjugate gradient implementation for least squares support vector machines. Pattern Recognit. Lett. 33, 121e125. Li, X.-S., et al., 2013. Experimental study on gas production from methane hydrate in porous media by SAGD method. Appl. Energy 112, 1233e1240. Mohammadi, A.H., Eslamimanesh, A., Gharagheizi, F., Richon, D., 2012a. A novel method for evaluation of asphaltene precipitation titration data. Chem. Eng. Sci. 78, 181e185. Mohammadi, A.H., Gharagheizi, F., Eslamimanesh, A., Richon, D., 2012b. Evaluation of experimental data for wax and diamondoids solubility in gaseous systems. Chem. Eng. Sci. 81, 1e7. Moshfeghian, M., Taraf, R., 2008. New method yields MEG injection rate. Oil Gas J. 106, 44e48. Pelckmans, K., et al., 2002. LS-SVMlab: a Maltab/c Toolbox for Least Squares Support Vector Machines. Tutorial. KULeuven-ESAT, Leuven. Rousseeuw, P.J., Leroy, A.M., 2005. Robust Regression and Outlier Detection, 589. Wiley. com. Sloan Jr., E.D., Koh, C., 2007. Clathrate Hydrates of Natural Gases. CRC Press. Suykens, J.A., Vandewalle, J., 1999. Least squares support vector machine classifiers. Neural Process. Lett. 9, 293e300. Suykens, J.A.K., Van Gestel, T., De Brabanter, J., De Moor, B., Vandewalle, J., 2002. Least Squares Support Vector Machines. World Scientific Publishing Company. Vasan, A., Raju, K.S., 2009. Comparative analysis of simulated annealing, simulated quenching and genetic algorithms for optimal reservoir operation. Appl. Soft Comput. 9, 274e281.