Application of Artificial Intelligence ( AI ) Modeling in Kinetics of Methane Hydrate Growth

Determining thermodynamic and kinetic conditions for natural gas hydrate formation is an interesting subject for many researches. At the present, suitable information including experimental data and the thermodynamic models of hydrate formation are available which predict the thermodynamic conditions of hydrate formation. Conversely, there is no sufficient study about the kinetics of natural gas hydrate and most of experimental data and kinetic models in the literature are incomplete. Artificial Intelligence (AI) having sub-branches such as artificial neural network (ANN), and adaptive neuro-fuzzy inference system (ANFIS) has been proved as a novel tool with acceptable accuracy for modeling of engineering systems. Therefore, this paper aims to investigate the kinetics of hydrate formation by predicting the relationship of growth rate of methane hydrate with temperature and pressure using ANN and ANFIS. This goal can also be achieved by solving complicated governing equations while artificial intelligence provides an easier way to accomplish this goal. The result has shown that ANIFS is a more potential tool in predication relationship of kinetics of hydrate formation with temperature and pressure in comparison of ANN in present work.


Introduction
Hydrates are ice-like compounds that could be formed at temperature and pressure conditions higher than ice point as a function of gas compositions.In fact, gas hydrates are crystal compounds which are formed by water and gas molecules that the ratio of water to hydrate molecules is varying from 5.67 to 17. Hydrate formation in the oil and gas industry causes difficulties such as plugging of offshore oil and gas production pipelines, pressure drop and corrosion of facilities.But, it has several applications such as storage and transportation of natural gases, desalination of sea water, storage of carbon dioxide for a long time and separation of hydrogen from other light gases.
At the present, suitable information about thermodynamic model of hydrate formation and experimental data are available that mostly are able to predict the conditions of hydrate formation.On the other hand, there is no sufficient information about the kinetics of hydrate growth rate and most of experimental data and kinetic models in the literature are incomplete.
Establishing a kinetic model for hydrate growth rate and its quality started in the 1970s with the work of Glew and Haggett [1] on the hydrate of ethylene oxide.Their experimental observation showed that the hydrate formation is an exothermic process and the growth rate was directly proportional to the temperature difference between the reactor and its cooling bath.Thus, heat transfer rate from the reactor to the cooling bath was considered as a controlling step.Based on experimental data, hydrate production rate was hence modeled by simplification of energy balance for the reactor.
Englezos et al. [2] developed a kinetic model to describe Vysniauskas and Bishnoi's experimental data [3] of methane and ethane hydrates formation combining the theories of crystallization and mass transfer at a gas-liquid interface.The driving force for hydrate formation was defined as the fugacity difference between dissolved gas and three-phase equilibrium fugacity.Herri and Bishnoi [4] performed in situ measurements of crystals size distribution with the light scattering technique at constant pressure condition in a 1000 cm 3 stirred reactor.Their experimental data showed that the kinetics of methane hydrate formation strongly depended on the stirring speed (ω) which should be considered in the modeling.
Gnanendran and Amin [5] predicted a kinetic model for hydrate formation in semi-batch regime spray reactors.In brief, the model utilized a dynamic representation of the drops in the reactor to describe hydrate nucleation and growth.The rest of this paper is structured as follows.First, the methodology that has been used in this article is presented.Next, the theory section extends the background to the article.Afterward, experimental results are brought and analyzed in the results section.Finally, the paper is discussed and concluded by a discussion and conclusion section.

Fuzzy Logic
By the emergence of fuzzy set theory in 1965 through the work of Lotfi A. Zadeh [6], it has been applied to many fields from control theory to artificial intelligence.In contrast to classical set, fuzzy set is not constrained by crisp boundaries.In other words the transition from "belong to a set" to "not belong to a set" is gradual and this is characterized by membership functions.Membership functions give flexibility in modeling linguistic expressions such as "the weather is cold".Fuzzy sets as Zadeh pointed out "play an important role in human thinking, particularly in the domains of pattern recognition, communication of information, and abstraction".
A fuzzy set A in which is referred to as universe of discourse is defined as a set of ordered pairs, where  is called membership function (MF) for the fuzzy set A which ranges between 0 and 1. Figure 1 illustrates MFs of linguistic values "cold", "warm" and "hot".There are some well-known parameterized MFs including Triangular MFs, Trapezoidal MFs and Gaussian MFs.
In order to make decisions in an environment of uncertainty and imprecision, we employ fuzzy if-then rules of the following form, Rj: if x 1 is A j1 and x 2 is A j2 and … and x n is A jn then , where j R is the rule label, i j A is the antecedent fuzzy set,   y f  x is a crisp function which is usually a polynomial function of input variables and N is the total number of fuzzy if-then rules.This type of if-then rules is call Sugeno fuzzy model proposed by Takagi, Sugeno [7].
When   f x is a first-order polynomial; it is called a first-order Sugeno fuzzy model and is defined as: Several types of fuzzy reasoning by Lee [8] have been proposed in literature.In the case of Sugeno's fuzzy ifthen rules the output of each rule is a linear combination of input variables plus a constant term, and the weighted average of each rule output produces the final output, where j W is the firing strength of j R , defined as In which denotes a T-norm operator of minimum or product.Figure 2 illustrates fuzzy reasoning for a rule base with two Sugeno's type fuzzy if-then rules each with two inputs and one output.

Artificial Neural Network (ANN)
Artificial neural networks have been developed for a wide variety of problems such as classification, function approximation, and prediction.A neural network is structured by a parallel full-connection computation units arranged in layers mimicking the physiologic structure of the brain.There are multiple connections within and between the layers which indicate the strengths or weights between neurons that are learned under an optimization criterion.All information learnt by the network is stored in the interconnection weights between each two successive layers.
An important class of artificial neural network (ANN) is multilayer perceptron (MLP) which schematically depicted in Figure 3.This network consists of an input layer, one or more hidden layers of computation nodes and an output layer of computation nodes.MLP neural network uses error back-propagation algorithm in order  to learn its parameters (weights).This algorithm consists of two passes through the different layers of the network: forward and backward pass.In forward pass, an input pattern is applied to the network to produce a set of outputs while the weights are all fixed.In layer the output is computed as follows: , where l j x is the input to the neuron in j th  l th  layer, l j y is the output of the neuron in layer, is the weight of the connection between neuron in layer and neuron in  layer and N is the number of layers.
During backward pass the error (the difference between the network outputs and the true values) is propagated back from the output to the connection weights and updates the weights to minimize the prediction error.The most common error function is mean squared error (MSE): where i is the target value for the i th  tput and t N n the number of neurons in the output layer.Then the following algorithm is used to update the weights: where  is the learning rate,  is momentum factor which helps to improve the performance of back-propagation algorithm.

Adaptive Neuro-Fuzzy Inference System (ANFIS)
An adaptive network is a network structure with nodes that are mainly adaptive and directional links that connect them.An adaptive node is a node whose output depends on some external parameters.The learning rule indicates how these parameters should change to minimize error.In 1993, R. Jang [9] proposed a class of adaptive networks which were functionally equivalent to fuzzy inference systems.This architecture which is referred to as ANFIS is the combination of human-like reasoning style of fuzzy logic by the use of fuzzy sets and if-then rules and learning structure of neural network.ANFIS mimics the interpretability of fuzzy logic and the accuracy and learning power of neural networks to make it a hybrid intelligent system that has the ability to solve nonlinear problems.Figure 4 illustrates the ANFIS architecture of the fuzzy model depicted in Figure 2. We used square nodes to indicate the adaptability.The functionality of each node varies and depends on overall input-output function.Note that there is no weight associated with each link.The learning procedure involves adjusting the parameters of adaptive nodes given training data.A gradient method can be used as the learning rule but this method is slow and likely to fall in local minima.We utilized a hybrid method [10] which is a combination of gradient method and least squares estimate (LSE) to adjust the parameters.Hybrid method, like MLP, has two passes: forward and backward.In the forward pass each node output goes forward and the consequent parameters are identified using least squares method.In the backward pass the errors propagate backward and the premise parameters are adjusted by gradient descent.

Theory
Nearly all of reported experimental works and modeling on kinetics of hydrate growth were done in stirred semibatch reactor under isothermal and isobaric conditions with constant gas supply for maintaining the pressure.Thus, because of the geometric factors and agitation effects on hydrate growth rate, the kinetic data which are obtained for a specific reactor cannot be used for another.In a novel experimental method, Chang Feng and Chang Yu [11] measured the rate of gas hydrate growth independent of the factors aforementioned.In this method, the hydrate was allowed to form at the gas-liquid interface of gas bubble suspended in a stagnant water phase.Since the dynamic factors of mass transfer in these experiments have no effects on the rate of hydrate growth, it is possible to correlate a good relationship between growth rate and deriving force which will follow in this paper using artificial intelligence.
Nowadays some novel modeling tools such as ANN and ANFIS are used with acceptable accuracy for investtigation of engineering and physical systems.For example, for investigation of hydrate formation, Mohammadi et al. [12][13][14] presented a mathematical model based on feed-forward artificial neural network algorithm could estimate hydrate dissociation conditions for the hydrates of following systems: hydrogen + water, hydrogen + tetrahydrofuran + water and hydrogen + tetra-n-butyl ammonium bromide + water, and also for estimation of the dissociation pressures of the binary clathrate hydrates of tetrahydrofuran + methane, carbon dioxide or nitrogen as a function of temperature and concentration of tetrahydrofuran in the aqueous solution below/equal to its stoichiometric concentration.They demonstrated that the predicted and the experimental data are in acceptable agreement confirming the reliability of this algorithm as a predictive tool.
Zahedi et al. [15] estimated hydrate formation temperature (HFT) using the Engineering Equation Solver (EES) and Statistical Package for the Social Sciences (SPSS) software for statistical analysis of the 203 experimental data points collected from literature.Also, HFT was estimated by artificial neural network (ANN) approach using 70% of experimental data for training of ANN.Comparing the results of ANN model with 30% of testing data confirmed the brilliant estimation performance of ANN.It was found that ANN was more accurate compared to traditional methods.
In this paper efforts are conducted to using ANFIS and ANN for predicting the relationship of temperature and pressure with growth rate of methane hydrate using experimental data of Chang Feng and Chang Yu [11,16].The results could be useful in controlling and managing the methane hydrate formation for preventing or accelerating its formation.

Data Description
Chang Feng and Chang Yu [11,16] proposed an innova-tive method to measure the rate of hydrate growth.As it is shown in Figure 5, the hydrate was allowed to form at the gas-liquid interface of a methane gas bubble suspended in a stagnant water phase.The whole hydrate formation process was recorded by the video camera and the surface area b of a gas bubble was calculated by image software.Based on the measured a F t (recording time until the surface of suspended bubble is fully covered with hydrate), the average hydrate-growth rate (r) on the bubble surface is simply calculated as: The calculated hydrate-growth rate data (expressed in terms of mm 2 /s) at various temperatures and pressures for methane is presented in Tables 1. Figure 6 also illustrates the sample data used in the experiment.

Building the Model
We designed an ANFIS model with two inputs (temperature and pressure) and one output (hydrate-growth rate) to predict the growth rate.We used fuzzy c-means clustering algorithm to extract a set of fuzzy rules and membership functions that best model the data behavior.Gaussian membership function defined as: ; , exp 2   where  is the mean and  is the standard deviation, is used in the model.An optimal number of 5 rules found by fuzzy c-means clustering were trained using hybrid learning algorithm.The performance index used for evaluating the model is based on the present of average relative deviation (ARD), where i is the target value, i is the ANFIS output and is the total number of test samples.A 10-fold crossvalidation method is used to evaluate the performance of the model.We first divided the dataset into 10 distinct sets; putting aside one set for testing, we trained the AN-FIS model with other sets.Let i be the error of the t y E i th  set used as test set.By repeating this process 10 times and each time with a different set, the performance of the model is calculated as: where is the number of folds.Figures 7 and 8 represent the performance of the ANFIS for training and testing data, respectively.n One of the major advantageous of 10-fold cross-validation evaluation method over holdout method in which some random experimental data are used for evaluation is that the entire experimental data will be tested by the model and as a result, the bias of the true error rate will be small.
We also analyzed the results obtained by MLP neural network with 2 layers, 7 neurons in the first layer and 5 in the second layer which performs best using try and error.

Discussion and Conclusions
Due to the fact that artificial intelligence (AI) provides an    effective tool for many complicated engineering problems in various fields, here ANFIS and ANN are employed as its sub-branches for understanding of methane hydrate formation rate in various pressures and temperatures.In this paper, we made a model which illustrates the relationship of the temperature and pressure with CH 4 hydrate growth rate for a set of real data using ANFIS as well as ANN.Understanding the kinetics of hydrate formation can be achieved by solving complicated equation while artificial intelligence provides an easier way to accomplish this goal.
Although ANN is one of the remarkable tools in engineering processes, some problems are associated with ANN that ANFIS removes two problems of this.
1-since that initial weight of ANN set randomly, obviously we have different modeling performances in each run (in constant topology and configuration of network) and consequently we should run remarkable number of time, for example 100 run, for each designed net and report average of this 100 time or we can run our designed network so much so that we obtain the best performance (Root Mean square error (RMSE), Average relative error (ARE), Average relative deviation (ARD)… and set this bunch of weight as the best initial weight of network, which both of mentioned processes are highly time-consuming and ANFIS removes this problem with getting amount of input in aggregation of membership function as fuzzification process.With this work, we don't have a problem of ANN (different performance in each run).
2-Although black box of ANN sometimes is a great advantage, it may be possible that we want to know inner structure of subjected system by utilizing fuzzy system, instead of this black box.This problem can be removed.Furthermore, by doing so, the problem of existing an expert in the FIS successfully will be removed by back propagation learning algorithm of NN.
In this paper, we applied fuzzy c-means clustering algorithm to extract a set of fuzzy rules and updated their parameters using training data so as to predict the data behavior properly.We utilized a 10-fold cross-validation method to evaluate the performance of the model which produces more reliable results especially for a few numbers of experimental data.The data were also compared with MLP neural network having 2 layers, 7 neurons in the first layer and 5 in the second layer.The obtained results indicate the effectiveness of ANFIS as a more powerful modeling tool for the kinetics of methane hydrate.Therefore, ANFIS model can be of great help for engineers to prevent methane hydrae formation during natural gas transportation through pipelines or accelerating its formation for gas storage purposes.Also optimization of ANFIS parameter for achieving more accuracy model with different approaches (such as try and error method or genetic algorithm method) in future is promising.

Figure 2 .
Figure 2. Reasoning from a two-input first-order sugeno fuzzy model with two rule [7].

Figure 3 .
Figure 3. Architecture of a multi-layer perceptron (MLP) neural network with two hidden layers.

Figure 6 .
Figure 6.Illustration of the sample data used in this experiment.
Finally, a plot of the output surface of the ANFIS model trained using the entire dataset is depicted in Fig- ure 9.

Figure 7 .
Figure 7. performance of ANFIS for training data.

Figure 8 .
Figure 8. Performance of ANFIS for testing data.

Figure 9 .
Figure 9.The output surface of the ANFIS model.

Table 2
illustrates the average relative deviation (ARD) for MLP neural network and ANFIS model.