Artificial Neural Network-based detection of gas hydrate formation ACTA IMEKO ISSN: 2221-870X September 2021, Volume 10, Number 3, 117 - 124 ACTA IMEKO | www.imeko.org September 2021 | Volume 10 | Number 3 | 117 Artificial Neural Network-based detection of gas hydrate formation Ildikó Bölkény1 1 Research Institute of Electronics and Information Technology, University of Miskolc, H3515 Miskolc-Egyetemváros, Hungary Section: RESEARCH PAPER Keywords: Gas hydrate; neural network; hydrate detection; injection system; modelling equipment Citation: Ildikó Bölkény, Artificial Neural Network-based detection of gas hydrate formation, Acta IMEKO, vol. 10, no. 3, article 17, September 2021, identifier: IMEKO-ACTA-10 (2021)-03-17 Section Editor: Lorenzo Ciani, University of Florence, Italy Received January 29, 2021; In final form September 17, 2021; Published September 2021 Copyright: This is an open-access article distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Funding: This work was supported by University of Miskolc, Hungary. Corresponding author: Ildikó Bölkény, e-mail: bolkeny@eiki.hu 1. INTRODUCTION Natural gas hydrates are crystalline solids composed of water (host) and gas (guest). The guest molecules are trapped inside ice cavities, which are composed of hydrogen-bonded water molecules. Typical natural gas molecules include methane, ethane, propane and carbon dioxide. Hydrate particles can form ice-like hydrate-plugs that completely block the pipeline and can be up to several meters long. The number of hydrate molecules can increase to a level where the molecular agglomeration process begins, which can cause of plug formation in a given section of the pipeline. In worst cases the hydrate plugs result production outages [1], [2]. In the mid-1930s Hammerschmidt found out that natural gas hydrates can block gas transmission, especially at low temperatures. This discovery was pivotal and shortly thereafter led to the regulation of the water content in natural gas pipelines. The detection of hydrates in pipelines is a milestone marking the importance of hydrates to industry [3]. Gas wells are the cores of developing serious hydrate problems, because of the water content of the production. The cold zones of the ground can shift the temperature of the pipe and its contents into the hydrate-formation region. Hydrates start forming layers of water on the pipe walls. Crystallisation can result in the formation of tens or hundreds of meters long plugs of hydrate [1], [4]. Multiple techniques exist to prevent the formation of hydrates. In the gas industry one of the most popular solutions is the use of thermodynamic inhibitors (THI) for a prolonged time. The injection of THI shifts the hydrate curve to a region where the conditions are not adequate for stable hydrate formation [2]. These compounds (methanol, ethylene glycol) have to be injected in high volume to the gas to be effective against hydrate formation. This is not a modern solution, because it has several disadvantages like cost of additional pipelines necessary to lead to the gas wells [5], the cost of methanol regeneration, which also contaminates the environment. One of the newer alternatives is the injection of low- dosage hydrate inhibitors such as kinetic hydrate inhibitors which can ABSTRACT In the production process of natural gas one of the major problems is the formation of hydrate crystals creating hydrate plugs in the pipeline. The hydrate plugs increase production losses, because the removal of the plugs is a high cost, time consuming procedure. One of the solutions used to prevent hydrate formation is the injection of modern compositions to the gas flow, helping to dehydrate the gas. Dehydratation obviously means that the size of hydrate crystals does not increase. The substances used in low concentrations, have to be locally injected at the gas well sites. Inhibitor dosing depends on the amount of gas hydrate present. In the article two Artificial Neural Network (ANN)-based predictive detection solutions are presented. In both cases the goal is to predict hydrate formation. Data used come from two solutions. In the first one measurements were performed by a self-developed and -produced equipment in this case, differential pressure was used as input. In the second solution data are used from the measurement system of a motorised chemical-injector device, in this case pressure, temperature, quantity and type of inhibitor were used as inputs. Both systems are presented in the article. mailto:bolkeny@eiki.hu ACTA IMEKO | www.imeko.org September 2021 | Volume 10 | Number 3 | 118 prevent the growth of hydrate molecules [6]. Antiagglomerants also belong to this group, they allow for the formation of gas hydrates but keep the hydrate crystals small and dispersed [7]. These modern, low-dosage inhibitors enable the usage of locally installed injection systems in the field, at the site of gas wells [8]. As can be seen, hydrate detection is key to administering the appropriate amount of inhibitor. 1.1. Objective and Methodology The paper compares two approaches. In the first one, the formation of gas hydrate was studied in laboratory conditions. The gas hydrate formation can be determined from the pressure curve. Using the measurement results, a single solution based on an Artificial Neural Network (ANN) was created where the input is the differential pressure. In the second project, test measurements were performed with a field hydrate dosing and monitoring system. Using the measurement results, a multi-input ANN-based solution was developed, where the inputs are pressure, temperature, quantity and quality of inhibitor as these also influence hydrate formation. In the first method measurements were performed by a self- developed and produced equipment. Modelling the equipment is suitable for the simulation of the gas flow in the pipeline. Its conditions are as follows: temperature is in the range of -20 … +30 °C, and typical gas pipeline pressure is in 1-10 nl/min flow rate range. During the measurements, different inhibitor materials and gases from all over Hungary were used, and the values of differential pressure, inlet pressure, the gas temperature and the flowrate of the pipeline were recorded, but only differential pressure was used to teach neural networks. In the second approach data are used from the measurement system of a motorised chemicals-injector device, placed in the area of a well. This model was installed to test the equipment at the site of the SCADA Ltd, near Hajdúszoboszló in Hungary. The following parameters were monitored there: well siphon pressure, drill pipe pressure, injection pipe pressure, well pipe pressure, well pipe temperature, soil temperature, temperature of chemicals, controller temperature, inverter temperature, chemical tank liquid level, inverter current, voltage and frequency. Only well pipe pressure (pressure), well pipe temperature (temperature) and inverter frequency (quantity of inhibitor) were used to teach neural networks. After the successful test of the technology model, the equipment was transported to a real gas well in Szeghalom (Hungary). In the research data generated through 29 test weeks were used. The gas well was monitored online (one sample per minute) in the 29-week testing period, during which several hydrate plugs formed due to the weather conditions. The most important parameters of both approaches (equipment, inputs, outputs, ANN) are in Figure 1 and Figure 2. The goal was to develop an accurate, stable and reliable ANN- based structure. Several architectures have been studied. Finally, the Neural Network Auto-Regressive X (NNARX) model with exogenous input [9] and Neural Network Output Error (NNOE) model are presented [10]. Several independent data sets were needed for training networks. Previously selected raw data were scaled and normalised. The resulting data were used to generate three training, validation and test datasets for the networks. 1.2. Results Final versions of ANN-based predictive detection solutions were selected after the extended comparison processes. In the first approach NNARX and NNOE were used. In the second approach only NNARX was used. In both cases several networks were trained using different datasets. For the first neural network based predictive detection solution twelve, while for the second six networks were compared and the best one is selected. In both cases a relatively small and simple networks resulted the best performance. Finally, the predictive solutions were compared. 2. RELATED RESULTS IN THE LITERATURE Even though the injection of methanol into natural gas is not advised due to environmental concerns, such experiments can be found in the scientific literature. For example, in [11] French and English researchers reported that methanol was injected into the pipeline, in an environmentally not-so-friendly manner to prevent the formation of hydrates for gas extraction in the North Sea. The Karl Fischer method was used for injection. It is not the most appropriate approach, because it doesn't take salt content into account. As a result, new method was developed, by which the electrical conductivity and the sound propagation velocity can be measured in addition to the temperature and the pressure. Using these four parameters and the devised method, the methanol injection can be kept at an optimum. The paper published in 2013 in [12] also deals with optimising the methanol injection for the inhibition of hydrate formation in industrial processes. Authors stress the importance of the vapour state methanol, because it doesn't participate in the hydrate formation inhibition. To determine the quantity of inhibitor, two methods were introduced. The first one is a mathematical correlation from real data sets, the second one is based on ANN. Figure 1. The two compared project – first approach. Figure 2. The two compared project – second approach. ACTA IMEKO | www.imeko.org September 2021 | Volume 10 | Number 3 | 119 Naturally, scientific literature does not only deal with methanol injection but also ones that utilise mono-ethylene glycol or some other inhibitor related to remedial methods. One example is by Kamaria et al. [13] who realised machine learning by using a least-squares support-vector machine. The hydrate formation in the pipeline can be predicted and the mono-ethylene glycol amount necessary for the hydrate inhibition can also be estimated [14] based on the method developed by Suykens et al. The other non-methanol based hydrate formation inhibitive method was used by Elgibaly et al. This work deals with the use and development of neural networks, related to the optimisation of hydrate formation inhibition. To validate their model, experimental data was used which contains hydrate formation environmental information, gas composition, hydrate inhibitor composition, system pressure and density. The model takes the evaporation of the inhibitor into consideration. The devised method suggests inhibitor injection ratios for gases of various composition [15]. Numerous scientific literature deals with hydrate formation temperature. The method devised by Mesbah et al. [16] uses a least squares support vector machine algorithm to predict the hydrate formation temperature. The authors used data available in scientific literature for multiple gas compositions and created a data set for machine learning. The model is more accurate for gases with H2S content. An empirical correlation between temperature, gas pressure and density, by which the hydrate formation temperature can be determined was shown by Khamehchi et al. [17]. This method was further refined using measurement data and ANN. The method gives accurate results. Zahedi et al. [18] published two methods for the assessment of hydrate formation temperature. The first method using two correlations, with eleven and eighteen parameters. The parameters were obtained from measurement data and scientific literature. The second method using ANN and the data from the previous method. The problem of the accurate assessment of hydrate formation is discussed in [19]. Authors use the Katz gas-gravity method with the Ghiasi correlation [20]. The same model was used with the imperialist competitive algorithm [21]. The ANN was used to determine a kinetic model for the prediction of methane gas hydrate formation. The authors tried to determine the correct number of hidden neurons and layers. The ANN-based model takes the temperature and pressure as the inputs and the output is the hydrate growth speed. In [22] comparison was made between two methods for the inhibition of gas hydrate development. Both use ANN, in the second it is optimised with the imperialist competitive algorithm [23]. The outcome met expectations and proved that the normal neural network provides better results than the optimised one [23], [24]. 3. DESCRIPTION OF THE PROPOSED METHO In this section, two systems providing the measurement data are presented. Also, predictive hydrate detection methods are introduced. 3.1. Hydrate Forming Test Equipment In the first analysis measurements have been performed by a hydrate forming test machine developed for MOL Plc. by the Department of Research Instrumentation and Informatics at the Research Institute of Applied Earth Sciences. Development of the control system was carried out by the author, Figure 3. The modelling equipment is suitable for simulation of gas pipeline flow. The equipment creates field conditions within -20 … 30 °C temperature range, and original gas pipeline pressure range, which is typically 60 bars. The flow rate value can be set in accordance to modelling principles, between 1-10 nl/min. The hydrate forms inside of a capillary cell which is placed in a thermostat. Figure 4 shows the piping and instrumentation (P&I) diagram of the equipment. Where PT is the Pressure Transmitter, TT is Temperature Transmitter, FT is Flow Transmitter, GT is Gas Tank, PG is Pressure Gauge, TC is Temperature Control, TE is Temperature Element, VA is Valve, SP is Pressure Generator unit, PC is personal computer, HC is buffer cell, c is glass cell, DC and DR are separator cells. The operation of the equipment is as follows: The dehydrated natural gas is discharged from the Gas Tank into the pipeline. The Pressure Gauges are used to set the system pressure and the Flow Transmitter is used to adjust the flow rate. Pressure Generators mix the formation water and inhibitor with the natural gas. The pipeline goes through the low temperature thermostat (TE) and it cools the natural gas therefore hydrate formation can begin. The formation of the hydrate plug can be detected from the measured differential pressures (PT2, PT3). Natural gas and interfacial water from a Szeghalom gas well (Hungary, near to Füzesgyarmat) were used in tests. Different inhibitor mixtures were also added. Gas hydrate formation time was examined under gas well conditions (60 bar pressure, low temperature), with or without the addition of different inhibitors. The following parameters were recorded: pressure, differential pressure, temperature and flow rate [25]. Figure 3. Hydrate Forming Test Equipment. Figure 4. P&I diagram of the hydrate forming test equipment. ACTA IMEKO | www.imeko.org September 2021 | Volume 10 | Number 3 | 120 3.2. Control and Chemical Dosing Equipment The well area control and the chemical injector equipment was installed on Szeghalom-29 well in Füzesgyarmat (Figure 5). The injection system is optimised mainly for Hungarian gas wells. Thus, the temperature requirement of the system was in the -40°C … 60°C range. The system must be capable of working in EX (EXplosive atmosphere) environment with high efficiency. The power source of the actuator is solar energy to reach the almost zero emission of the system [25]. Figure 6 shows the P&I diagram of the equipment, where PT is Pressure Transmitter, TT is Temperature Transmitter, LT is Level Transmitter and PI is Pressure Indicator. The operation of the equipment is as follows: The natural gas - which contains natural interfacial water - entering the pipeline from the gas well. The inhibitor is located in a Chemical Tank and is delivered to the pipeline by the Dosing Pump. The dosing rate is provided by a PLC control, which is not shown in the figure. The formation of the hydrate plug can be detected from the value measured by the pressure transmitters (PT12). The following parameters were recorded on a minute basis: well siphon pressure, drill pipe pressure, injection pipe pressure, well pipe pressure, well pipe temperature, soil temperature, temperature of chemicals, controller temperature, inverter temperature, chemical tank liquid level, inverter current, voltage and frequency [25]. The output of the system is the inverter frequency. The frequency is proportional to the amount of administered inhibitor. 3.3. Neural Networks In black-box identification of nonlinear dynamic systems, selection of model structures become more difficult task. The multilayer perceptron network is most popular for learning nonlinear relationships from a set of data. For the identification the NNARX and NNOE were used [26]. These models are mostly widespread. The NNARX network creates a nonlinear model using its inputs. The applied regression machine complies with the following relation: 𝑦est(𝑡) = 𝑓[𝑥(𝑡 − 1), 𝑥(𝑡 − 2), . . . , 𝑥(𝑡 − 𝑛𝑖), 𝑦req(𝑡 − 1), . . . , 𝑦req(𝑡 − 𝑛ro)] (1) where yest(t) is the network output at the t th time instant; x(t-1) is the used input of the network at t-1st time instant; yreq(t-1) is the required output from the network at t-1st time instant; ni is the size of used tapped delay line of the inputs; and nro is the size of used tapped delay line of the required outputs. Figure 7 shows the typical structure of the NNARX neural network. The NNOE network creates a nonlinear model using its earlier outputs as inputs. The applied regression machine complies with the following relation: 𝑦est(𝑡) = 𝑓[𝑥(𝑡 − 1), 𝑥(𝑡 − 2), . . . , 𝑥(𝑡 − 𝑛𝑖), 𝑦est(𝑡 − 1), . . . , 𝑦est(𝑡 − 𝑛o)] (2) where yest(t) is the network output at the t th time instant; x(t-1) is the used input of the network at t-1st time instant; yest(t-1) is the network output at the t-1th time instant; ni is the size of used tapped delay line of the inputs; and no is the size of used tapped delay line of the outputs. Figure 8 shows the typical structure of the NNOE neural network. During the model selection, size of the regressor and the number of hidden neurons in hidden layers were changed. Based on the previous practical experience, the number of regressors was 1 or 2, while the number of hidden neurons was between 10 Figure 5. Control and Chemical Dosing Equipment. Figure 6. P&I diagram of the control and chemical dosing equipment. Figure 7. Typical structure of the NNARX [27]. Figure 8. Typical structure of the NNOE. ACTA IMEKO | www.imeko.org September 2021 | Volume 10 | Number 3 | 121 and 12. The selected raw data has been pre-processed using the SciLab software. According to [28], pre-processing can consist in a simple transformation or a complex operation. The raw data were first filtered by a low-pass filter, then normalised. When normalising the input data, the minimum and maximum values of each component are selected to cover the set of values and the interpretation range of the neural networks. This interval is typically [0; 1] and [-1; 1]. In the presented case, the [0; 1] interval was selected for normalisation. Three datasets were generated for the detection systems. The training set was needed to configure weights of the network. One of the most important parameters during the training process is the stopping criterion. If the training process stops too early, the network is not able to learn the data and gives poor estimation when an unknown dataset is used. To optimise the network the validation set is used. When Mean Squared Error (MSE) is the lowest, it is best to stop the training process of the network. The Mean Squared Error complies with the following relation: 𝑀𝑆𝐸 = 1 𝑛 ∑[𝑦req(𝑖) − 𝑦est(𝑖)] 2 𝑖 (3) The third, test dataset is independent from the training and validation sets. It is used to compare results for different networks. Neural networks were trained using the generated datasets. To avoid overfitting, the training process was stopped at the minimum MSE value. The Levenberg-Marquard algorithm was used to optimise the ANN in Matlab. Figure 9 shows the workflow of model. 3.4. Single Inputs Neural Network Based Detection Large number of measurements was performed with the previously detailed hydrate forming test equipment using different inhibitor materials and gases from Szeghalom gas well. From this huge database 50 pieces were selected and used for the investigation. During measurements mainly values of differential pressure, inlet pressure and temperature of gas were saved for later investigation. Differential pressure measurement value from PT2 or PT3 sensor was used as an input in the first method, depending on which section of the pipe the hydrate was formed in. After the appearance of gas hydrate molecules in gas flow the pressure in pipe section was increasing because the agglomerated hydrate reduces the cross-section area of the pipeline. Therefore, fast gas hydrates detection is very important. From practical perspective, the differential pressure gives the most valuable information about the processes in the tube. Thus, this parameter was used as the input value of the alarm system. As previously stated, three independent datasets have been created. In Table 1. the number of performed measurements and the number of datapoints included in the different datasets are shown. The scaled, normalised differential pressure value was used in datasets as input. The required output was an artificially generated alarm signal, which was created from the differential pressure values. The signal corresponds to the 75 percent of the maximum value, see Figure 10. Until the actual differential pressure value is under the limit, the alarm signal is also zero. When it reaches the limit, the signal changes to one. The single input NNARX network is seen in Figure 11 with the used regressor and the mapping function. Here, y(t) is the network output at the tth time instant; yreq(t-1) is the required output from the network at t-1st time instant; x(t) is the network inputs at the tth time instant; x(t-1) is the network input at t-1st time instant; TDL is the tapped delay line, b is neuron bias, W is the weight matrix. The single input NNOE network is seen in Figure 12, with the used regressor and the mapping function. In Figure 12, y(t) is the network output at the tth time instant; yreq(t-1) is the output from the network at t-1st time instant; x(t) Table 1. Main Parameters of the datasets. Dataset Number of performed measurements Number of data points Training dataset 26 2576 Validation dataset 10 1077 Test dataset 10 1698 Figure 9. The workflow of model development [29]. Figure 10. Alarm signal (75%). Figure 11. Single Neural Network ARX. ACTA IMEKO | www.imeko.org September 2021 | Volume 10 | Number 3 | 122 is the network inputs at the tth time instant; x(t-1) is the network input at t-1st time instant; TDL is the tapped delay line, b is neuron bias, W is the weight matrix. 3.5. Multi Input Neural Network Based Detection The previously detailed control and chemical injection system has been operated in test mode for 29 weeks under continuous monitoring. Several parameters were monitored, but only three of them (well pipe pressure, well pipe temperature, quantity of inhibitor – inverter frequency) influenced the formation of hydration. Pressure measurement value from PT12 sensor, Temperature measurement value from TT12 sensor, and Quantity measurement value of inhibitor from inverter frequency of the dosing pump were used as inputs in the second method. The fourth parameter is the type of the applied inhibitor, which was recorded when the inhibitor was placed in the container. Demonstration of the effectiveness of each chemical in inhibiting hydration was performed with the previously described equipment. Depending on the inhibition ability of the inhibitors, they were graded on a scale, see Table 2. As previously mentioned, three independent datasets have been created: training, validation and test datasets. The main parameters of datasets are shown in the Table 3. The neural network has four inputs and one output, the four inputs are the four parameters listed above, and the output is an alarm signal. The multi-input NNARX network is seen in Figure 13, with the used regressor and the mapping function. In Figure 13, y(t) is the network output at the tth time instant; yreq(t-1) is the required output from the network at t-1st time instant; x1..4(t) is the network inputs at the t th time instant; x1..4(t- 1) is the network input at t-1st time instant; TDL is the tapped delay line, b is neuron bias, W is the weight matrix. 4. RESULTS AND DISCUSSIONS Performance of the network is adequate if the required output (blue graph in Figure 14) and the regular output (red graph in Figure 14) match each other. MSE gives no satisfactory information about the performance, therefore, the number of edges in the sample sets were determined by rising edge (RE) method and then they were compared. If the edges matched each other it can be said that the alarm was at the proper time moment. A percentage value can be calculated (RE%) from the ratio of number of alarms occurred at proper time and number of total alarms [30]. There are several methods, which can be used to find edges in one dimension. In this research the Canny edge detection method resulted the best calculation, in which the first Gaussian derivative is used to approximate the optimal finite length filter [31]. Results of both networks were compared, using the relative error of detected rising edges in the simulated output of the network and the required alarm signal. The comparison of the Single Input Single Output (SISO) networks is summarised in Table 4. The table shows that the network detected possible hydrate formation with more than 90% efficiency in both cases. The best performance in case of NNARX was provided by the smallest Figure 12. Single Neural Network OE. Table 2. Inhibitor efficiency. Hydrate formation time in s Grade Numerical grade 0-2500 won’t inhibit 1 2501-4000 weakly inhibits 2 4001-5500 inhibits 3 5501-6500 strongly inhibits 4 Table 3. Main Parameters of the datasets. Dataset Number of performed measurements Number of data points Training dataset 22 2178 Validation dataset 12 1068 Test dataset 10 1080 Figure 13. Multi Neural Network. Figure 14. Output match using test set. ACTA IMEKO | www.imeko.org September 2021 | Volume 10 | Number 3 | 123 network and in case of NNOE the result was the same. It should be noted that NNARX performed better result than NNOE. The comparison of the Multi Input Single Output (MISO) networks can be found in Table 5. It shows that the network recognised the possible hydrate formation with more than 92% efficiency. Table 6 shows the most important parameters of the highlighted and best performing networks. 5. CONCLUSIONS There is no publication so far in scientific literature, which gives solution for hydrate formation prediction for industry exclusively from either the differential pressure or the inhibitor's quality and injected quantity. The most effective results of the two presented projects are shown in Tables 4 and 5 in bold. For Single Input Single Output neural network, the smallest network provided the highest reliability in edge detection in case of NNARX and in case of NNOE. It should be noted that NNOE network performed better than NNARX. In case of Multi Input Single Output neural network a larger regressor was the best. The NNARX model has a predictor without real feedback. The NNOE model has feedback through the choice of regressors, which in the neural network terminology means that the networks become recurrent: future network inputs will depend on present and past network outputs. This might lead to instability in certain areas of the network's operating range and it can be very difficult to determine whether or not the predictor is stable [32]. Both NNARX networks performed well, the difference between the two results is not significant. However, in the first solution, NNOE became more effective than NNARX. In light of the above, the way forward is to first use the NNOE network for Multi Input Single Output system as well. Although the NNOE clearly performed better in the first case, but further studies are needed to assess which of the two methods is better. ACKNOWLEDGEMENT The described article/presentation/study was carried out as part of the EFOP-3.6.1-16-2016-00011 “Younger and Renewing University – Innovative Knowledge City – institutional development of the University of Miskolc aiming at intelligent specialisation” project implemented in the framework of the Szechenyi 2020 program. The realisation of t this project is supported by the European Union, co-financed by the European Social Fund. REFERENCES [1] E. D. Sloan, C. A. Koh, Clathrate Hydrates of Natural Gases, 3ED ISBN: 978-084-939-078-4 (2007), pp. 5-20. [2] G. Ersland, A. Graue, Natural gas Hydrates, in: Natural Gas, ISBN: 978-953-307-112-1 (2010), pp. 147-162. Table 4. The results of SISO NNARX and NNOE networks. Type of network structure Regressor of network Num. of hidden neurons Training dataset Validation dataset Test dataset MSE Rel. error of found RE in % MSE Rel. error of found RE in % MSE Rel. error of found RE in % NNARX ni = 1; nro = 1 10 0.0083 96.2 0.0065 100.0 0.0146 90.0 12 0.0081 96.0 0.0064 100.0 0.0146 90.0 ni = 1; nro = 2 10 0.0209 73.1 0.0184 70.0 0.0227 70.0 12 0.0202 73.1 0.0177 80.0 0.0203 90.0 ni = 2; nro = 2 10 0.0223 73.1 0.0186 90.0 0.0259 70.0 12 0.0388 69.2 0.0350 50.0 0.0316 60.0 NNOE ni = 1; no = 1 10 0.0086 100.0 0.0062 100.0 0.0157 90.0 12 0.0058 96.2 0.0048 100.0 0.0127 90.0 ni = 1; no = 2 10 0.0284 76.9 0.0253 60.0 0.0326 60.0 12 0.0265 65.4 0.0236 70.0 0.0278 50.0 ni = 2; no = 2 10 0.0269 69.2 0.0252 70.0 0.0183 60.0 12 0.0347 53.8 0.0325 50.0 0.0321 30.0 Table 5. The results of MISO NNARX networks. Type of network structure Regressor of network Num. of hidden neurons Training dataset Validation dataset Test dataset MSE Rel. error of found RE in % MSE Rel. error of found RE in % MSE Rel. error of found RE in % NNARX ni = 1; nro = 1 10 0.0204 72.2 0.0179 80.0 0.0201 90.0 12 0.0088 95.2 0.0131 90.0 0.0148 90.0 ni = 1; nro = 2 10 0.0084 99.8 0.0072 100.0 0.0158 92.2 12 0.0087 95.2 0.0074 100.0 0.0167 91.2 ni = 2; nro = 2 10 0.0091 82.4 0.0141 91.4 0.0211 81.2 12 0.0107 81.2 0.0202 90.7 0.0214 80.2 Table 6. The algorithm’s main parameters. SISO NNARX SISO NNOE MISO NNARX Structure 1-10-1 1-10-1 4-10-1 Hidden layers 1 1 1 Neurons 10 10 10 Input regressors 1 1 1 Output regressors 1 1 2 Datasets 46 46 44 Data point of datasets ~115 ~115 ~100 Iterations 1000 1000 1000 ACTA IMEKO | www.imeko.org September 2021 | Volume 10 | Number 3 | 124 [3] E. G. Hammerschmidt, Formation of gas hydrates innnatural gas transmission lines, Ind. Eng. Chem, Vol 26 Is 8 (1934), pp. 851- 855. DOI: 10.1021/ie50296a010 [4] J. F. Gabittol, C. Tsouri, Physical Properties of Gas Hydrates: A Review, Advances in Gas Hydrate Thermodynamics and Transport Properties, Vol. 2010. Art. ID 271291 (2010), pp. 1-12. DOI: 10.1155/2010/271291 [5] M. Wu, S. Wang, H. Liu, A Study on Inhibitors for the Prevention of Hydrate Formation in Gas Transmission Pipeline, Journal of Natural Gas Chemistry, Vol. 16. No. 1. (2007), pp. 81-85. DOI: 10.1016/S1003-9953(07)60031-0 [6] N. Daraboina, C. Malmos, Synergistic kinetic inhibition of natural gas hydrate formation, Fuel, Vol. 108 (2013), pp. 749-757. DOI: 10.1016/j.fuel.2013.02.018 [7] S. Q. Gao, Hydrate Risk Management at High Watercuts with Anti-Agglomerant Hydrate Inhibitors, Energy Fuel, Vol. 23 (2009), pp. 2118-2121. DOI: 10.1021/ef8009876 [8] M. A. Kelland, History of the Development of Low Dosage Hydrate Inhibitors, Energy Fuels, Vol 20 (2006), pp. 825–847. DOI: 10.1021/ef050427x [9] M. Norgaard, O. Ravn, L. K. Hansen, N. K. Poulsen, The NNSYSID toolbox - A MATLAB toolbox for system identification with neural network, Proceedings of the 1996 IEEE International Symposium on Computer-Aided Control System Design, Dearborn, MI, 15-18 September (1996), pp. 374‒379. DOI: 10.1109/CACSD.1996.555321 [10] V. Rankovic, J. Radulović, N. Grujović, D. Divac, Neural Network Model Predictive Control of Nonlinear Systems Using Genetic Algorithms, Int. J. Comput. Commun., Vol.7 (2012), No. 3 (September), pp. 540-549. [11] C. Macpherson, P. Glenat, S. Mazloum, I. Young, Successful Deployment of a Novel Hydrate Inhibition Monitoring System in a North Sea Gas Field, 23rd International Oil Field Chemistry Symposium, 18 – 21 March 2012, Geilo, Norway, pp. 18-21. [12] M. M. Ghiasia, A. Bahadorib, S. Zendehboudic, A. Jamilid, S. Rezaei-Gomari, Novel Methods Predict Equilibrium Vapor Methanol Content During Gas Hydrate Inhibition, Journal of Natural Gas Science and Engineering, Vol 15, November 2013, pp. 69-75. DOI: 10.1016%2Fj.jngse.2013.09.006 [13] A. Kamaria, A. Bahadorib, A. H. Mohammadiac, S. Zendehboudi, New Tools Predict Monoethylene Glycol Injection Rate for Natural Gas Hydrate Inhibition, Journal of Loss Prevention in the Process Industries, Vol 33, January 2015, pp. 222-231. DOI: 10.1016/j.jlp.2014.12.013 [14] J. A. K. Suykens, J. Vandewalle, Least Squares Support Vector Machine Classifiers, Neural Processing Letters, Vol 9, Is 3, June 1999, pp. 293–300. DOI: 10.1023/A:1018628609742 [15] A. Elgibaly, A. Elkamel, Optimal Hydrate Inhibition Policies with the Aid of Neural Networks, Energy Fuels, Vol. 13, No. 1, 1999, pp. 105-113. DOI: 10.1021/ef980129i [16] M. Mesbah, E. Soroush, M. Rezakazemi, Development of a Least Squares Support Sector Machine Model for Prediction of Natural Gas Hydrate Formation Temperature, Chinese Journal of Chemical Engineering, Vol 25, Is 9, September 2017. pp. 1238- 1248. DOI: 10.1016/j.cjche.2016.09.007 [17] S. H. Yousefi, E. Shamohammadi, E. Khamehchi, Predicting the Hydrate Formation Temperature by a New Correlation and Neural Network, Gas Processing Journal, Vol. 1 No. 1, January 2013. pp. 41-50. DOI: 10.22108/GPJ.2013.20158 [18] G. Zahedi, Z. Karami, H. Yaghoobi, Prediction of Hydrate Fomation Temperature by Both Statistical Models and Artificial Neural Network Approaches, Energy Conversion and Management, Vol 50, Is 8, August 2009. pp. 2052-2059. DOI: 10.1016/j.enconman.2009.04.005 [19] J. S. Amin, S. K. B. Nejad, M. Veiskarami, A. Bahadori, Prediction of Hydrate Formation Temperature Based on an Improved Empirical Correlation by Imperialist Competitive Algorithm, Journal Petroleum Science and Technology, Vol 34, Is 2 (2016), pp. 162-169. DOI: 10.1080/10916466.2015.1118501 [20] H. Saghafi, H. Yarveicy, Gas hydrate stability conditions: modeling on the basis of gas gravity approach, Journal Petroleum Science and Technology, Vol 37, Is 17, (2019), pp. 1938-1945. DOI: 10.1080/10916466.2018.1463261 [21] M. N. B. M. Rodzep, Application of Artificial Neural Network in Prediction of Methane Gas Hydrate Formation Rate, Universiti Teknologi PETRONAS, Doctoral Theses (2015), pp. 7-24. [22] S. M. Hesami, M. Dehghani, Z. Kamali, A. E. Bakyani, Developing a simple-to-use predictive model for prediction of hydrate formation temperature, Journal International Journal of Ambient Energy, Vol 38, Is 4 (2017), pp. 380-388. DOI: 10.1080/01430750.2015.1100678 [23] A. Kolchin, Analyze of Hydrate Formation with the use of Neural Network Technology, SPE Annual Technical Conference and Exhibition, 30 September-2 October 2013, New Orleans, Louisiana, USA, pp. 5342-5353. DOI: 10.2118/167618-STU [24] S. M. Vajari, Development of Hydrate Inhibition Monitoring and Initial Formation Detection Techniques, Heriot-Watt University Institute of Petroleum Engineering, Doctoral Theses (2012), pp. 159-239. Online [Accessed 2 September 2021] http://www.ros.hw.ac.uk/bitstream/handle/10399/2539/Vajari SM_0312_pe.pdf?sequence=1&isAllowed=y [25] I. Bölkény, K. Jónap, Cs. Vörös, Hydrate inhibition technologies, results and future possibilities based on measurements and projects of the last 15 years, Technical Publications of Earth Sciences, Vol 85. (2015), pp. 30-40. [26] G. Mustafaraj, J. Chen, G. Lowry, Thermal behaviour prediction utilizing artificial neural networks for an open office, Applied Mathematical Modelling 34 (2010), pp. 3216–3230. DOI: 10.1016/j.apm.2010.02.014 [27] W. Xian, Z. Qiancheng, Y. Xuebing, Z. Bing Zeng, Condition monitoring of wind turbines based on analysis of temperature- related parameters in supervisory control and data acquisition data, Measurement and Control, London, SAGE Publications, December 2019, pp. 1–17. DOI: 10.1177%2F0020294019888239 [28] M. Altrichter, G. Horváth, B. Pataki, Gy. Strausz, G. Takács, J. Valyon, Neural Networks, Hungarian Edition Panem Könyvkiadó Kft., Budapest, ISBN: 9-635454-64-3 (2006), pp. 355-375. [29] K. A. Galih, H. Kenji, M. Tetsuo, Modeling the Dynamic Response of Plant Growth to Root Zone Temperature in Hydroponic Chili Pepper Plant Using Neural Networks Agriculture 2020, 10, 234,17 June 2020. pp. 1-14. Online [Accessed 2 September 2021] https://www.mdpi.com/2077-0472/10/6/234/pdf [30] V. Füvesi, E. Kovács, Separation of Faults of Eletromechanical Drive Chain using Artificial Intelligence Methods, 18th Building Services, Mechanical and Building Industry Days International Conference, Debrecen, Hungary, (2012), pp. 19-27. [31] J. Canny, A computational approach to edge detection, IEEE Transactions on Pattern Analysis and Machine Intelligence Vol 8. Is 6, Nov. 1986, pp. 679-69. [32] M. Rajalakshmi, S. Jeyadevi, C. Karthik, Recurrent Neural Network Identification: Comparative Study on Nonlinear Process International Journal of Innovative Research in Science, Engineering and Technology, Volume 3, Special Issue 3, March 2014, pp. 156-161. https://doi.org/10.1021/ie50296a010 https://doi.org/10.1155/2010/271291 http://dx.doi.org/10.1016/S1003-9953(07)60031-0 http://dx.doi.org/10.1016/j.fuel.2013.02.018 https://doi.org/10.1021/ef8009876 https://doi.org/10.1021/ef050427x http://dx.doi.org/10.1109/CACSD.1996.555321 http://dx.doi.org/10.1016%2Fj.jngse.2013.09.006 https://doi.org/10.1016/j.jlp.2014.12.013 https://doi.org/10.1023/A:1018628609742 https://doi.org/10.1021/ef980129i https://doi.org/10.1016/j.cjche.2016.09.007 https://doi.org/10.22108/GPJ.2013.20158 http://dx.doi.org/10.1016/j.enconman.2009.04.005 https://doi.org/10.1080/10916466.2015.1118501 https://doi.org/10.1080/10916466.2018.1463261 https://doi.org/10.1080/01430750.2015.1100678 https://doi.org/10.2118/167618-STU http://www.ros.hw.ac.uk/bitstream/handle/10399/2539/VajariSM_0312_pe.pdf?sequence=1&isAllowed=y http://www.ros.hw.ac.uk/bitstream/handle/10399/2539/VajariSM_0312_pe.pdf?sequence=1&isAllowed=y https://doi.org/10.1016/j.apm.2010.02.014 https://doi.org/10.1177%2F0020294019888239 https://www.mdpi.com/2077-0472/10/6/234/pdf