Machine learning-assisted methods for prediction and optimization of oxidative desulfurization of gas condensate via a novel oxidation system

The aim of this study is to predict the efficiency of oxidative desulfurization method (in a gas–liquid oxidation system) for gas condensate using artificial intelligence (AI) systems such as Fuzzy Inference System, Adaptive Neuro-Fuzzy Inference System (ANFIS), Genetic Algorithm (GA)-Fuzzy, and GA-ANFIS. The method utilizes mixtures of H2SO4, HNO3, and NO2 as oxidant agents in various amounts. The optimal parameters of the proposed models were determined using GA, and statistical parameters such as mean absolute error, average relative deviation, and correlation coefficient were used to compare the models. The correlation coefficients for Fuzzy, ANFIS, GA-Fuzzy, and GA-ANFIS models were found to be 0.5899, 0.7831, 0.9693, and 0.9687, respectively. The results indicated that ANFIS-GA and Fuzzy-GA models can effectively predict the desulfurization efficiency of the novel technique. Furthermore, the use of GA improved the performance of the Fuzzy and ANFIS models and enhanced their prediction accuracy. Overall, this study demonstrates the potential of AI systems in predicting the efficiency of novel chemical methods for industrial applications. GRAPHICAL ABSTRACT


Introduction
Energy is a critical global issue, since it is essential for economic growth and production of advantageous goods and services.Fossil fuels have been the primary energy source in recent decades and they are expected to remain the most significant sources of energy in the future.However, fossil fuels are exhaustible, and their utilization poses a significant challenge due to the environmental impact of their sulfur content [1].Fossil fuels naturally contain sulfur compounds such as thiols, thioethers, and cyclic and aromatic sulfur compounds like thiophene and its derivatives [1,2].The sulfur content is one of the main factors affecting the quality of fossil fuels such as oil, gas, and gas condensates.The presence of sulfur compounds in fuels leads to the emission of SO x pollutants, which react with water vapor in present in the air and produce acid rain, posing a threat to both human health and the environment.Therefore, reducing the sulfur content of fuels has been one of the most significant challenges in line with environmental regulations [3,4].
Gas condensate is a valuable by-product of natural gas resources that contains a considerable amount of hydrocarbons in the liquid phase, including pentane and other heavier hydrocarbons, as well as traces of sulfur compounds.Gas condensate is achieved through gas field exploitation, and these by-products are highly valued hydrocarbons used as the feed for refineries to produce gasoline, kerosene, and diesel [5].
The removal of sulfur from oil or gas condensate (desulfurization) is crucial for the petroleum industry and also the environment [6].Hydrodesulfurization (HDS) is the conventional industrial procedure for sulfur removal from fuel, involving a catalytic process conducted under high temperature and pressure.However, HDS is a costly process, particularly for deep desulfurization, and it is not effective in removing certain types of cyclic sulfur compounds such as dibenzothiophene (DBT) and its derivatives, especially 4,6-DMDBT [7][8][9][10].Adsorption desulfurization (ADS), bio desulfurization (BDS), oxidation-extraction desulfurization (OEDS), and oxidative desulfurization (ODS) are other types of desulfurization methods that can potentially yield clean fuel.Catalytic oxidation, such as ODS, has been observed to be an acceptable alternative to HDS process.In contrast to hydrogenation, oxidation can be carried out under normal conditions (atmospheric pressure and T < 32°C), and its operating cost is considerably lower since expensive hydrogen is not required for this process.In ODS, sulfur compounds are converted to sulfone using oxidants such as H 2 O 2 and H 2 SO 4 , which can be easily extracted from the fuel [11][12][13].
Several studies have investigated the desulfurization of hydrocarbons, such as Dehkordi et al. [14], who assessed the oxidative desulfurization of a real sample of a refinery feed (16% wt. of sulfur compounds) using hydrogen peroxide as the oxidant and acetic acid as the catalyst [14].In another work, Pouladi et al. [12] optimized the oxidative desulfurization of sour gas condensate using Design Expert software [12].They measured the total sulfur content of the sour gas samples in response to varying concentrations of H 2 SO 4 , HNO 3 , and NO 2 , and concluded that HNO 3 concentration had the greatest effect on total sulfur content, followed by H 2 SO 4 concentration, while the effect of NO 2 concentration was negligible.However, to the best of our knowledge, intelligence systems and machine learning methods have not been used for the modeling of oxidative desulfurization of gas condensate.Therefore, using such techniques, which reduce the cost of the process through their accurate predictions, is a novel contribution to the field.
There are various methods to remove sulfur from gas condensate (desulfurization), but their optimization is time-consuming and requires several experiments.Mathematical tools, including machine learning (ML), can optimize the process [6].
Artificial intelligence (AI) has emerged as a promising tool for optimizing the desulfurization process.ML algorithms can analyze large datasets and identify patterns that can be used to predict the optimal operating conditions and improve the efficiency of the desulfurization process.There have been several studies that have shown the potential of AI for desulfurization in petroleum processing.Jorjani et al. have devised a neural network-based model for forecasting the impact of operational variables on the extraction of organic and inorganic sulfur from coal with the aid of sodium butoxide.The model's inputs consist of several factors, including coal particle size, leaching temperature and duration, sodium butoxide concentration, and pre-oxidation time through peroxyacetic acid.The model accurately predicted the decrease in organic and inorganic sulfur levels, indicating its effectiveness.The suggested neural network model has the potential to be employed in the simulation of coal desulfurization facilities [15].Al-Jamimi et al. introduced a hybrid model that combines support vector regression (SVR) with Bayesian optimization to anticipate the three yields from the HDS process: outlet sulfur concentration, SO 2 emission percentage, and biphenyl percentage.The suggested models exhibited impressive performance, with a remarkable level of precision, and the outcomes obtained may aid in fine-tuning the HDS process [16].Salari et al. proposed an artificial neural network model and used it to model the oxidative desulfurization process of fuel oil.Satisfactory agreement between the output of the model and experimental data was observed.The process successfully reduced the sulfur content of fuel oil to levels as low as 20 ppm [17].Overall, the use of AI for desulfurization has the potential to significantly improve the efficiency and effectiveness of the process in the petroleum industry.
The purpose of using artificial intelligence systems for the prediction and optimization of oxidative desulfurization of gas condensate via a novel oxidation system is to reduce the cost of the process through accurate predictions and optimal operating conditions.Oxidative desulfurization is a promising alternative to the conventional hydrodesulfurization process for the removal of sulfur compounds from fossil fuels, including gas condensate.However, the process's efficiency depends on various factors such as the type of oxidant, the concentration of the oxidant, the reaction temperature, and the reaction time.Therefore, predicting the efficiency of the oxidative desulfurization process and optimizing the operating conditions can significantly reduce the process's cost by reducing the number of experimental trials required to determine the optimal conditions.Artificial intelligence systems such as Fuzzy Inference System, ANFIS, and GA can be used to model and predict the efficiency of the oxidative desulfurization process and optimize the operating conditions to achieve maximum sulfur removal percentage.The use of these systems can also help to identify the most effective oxidants and their optimal concentrations, which can further improve the efficiency of the oxidative desulfurization process.

Chemicals
Sulfuric acid (98% w/w), nitric acid (65% w/w), and ethanol (96.5%) were purchased from Merck Co. (Germany) and used as obtained.The current desulfurization experiments were conducted on sour natural gas condensate with a sulfur content of 2300 ppm, which was supplied by the laboratory of South Pars Gas Complex Co. (SPGC) in Assaluyeh, Iran.The properties of the samples are listed in Table 1.

Experimental set-up
The current investigation employed an experimental arrangement for the oxidation phase, which consisted of a batch glass container assisted by a shear mixer and a thermometer, as shown in Figure 1.The shear mixer was made up of a 330 W motor (HMA-22, Hertz) with a top speed of 18,000 rpm and a high-performance inverter (VFD-M, Delta).All of the equipment utilized in the setup, such as the rotor, shaft, machine mounting, mixer frame, and stator, were constructed of stainless steel, aside from the container [12].

Experimental section
The oxidative desulfurization of sour condensate was carried out through an oxidation stage, followed by an extraction step.To achieve this, oxidation and extraction operations were carried out.Figure 2 displays a schematic diagram outlining the process of oxidative desulfurization.
Several oxidative agents, including H 2 SO 4 , HNO 3 , and NO 2 , were utilized during the oxidation process.The experiments were conducted with a combination of oxidants such as HNO 3 , H 2 SO 4 and NO 2 .The concentration of each oxidizing agent was modified during the oxidation phase to investigate the individual impact of each agent on the process performance, as well as their collective effects.In each oxidation run, 1500 gram of sour condensate were poured into a glass vessel.Afterwards, H 2 SO 4 and HNO 3 were added to the reactor along with gaseous NO 2 .The aforementioned materials were blended at a speed of 5000 rpm, and the oxidation process was initiated under ambient temperature and atmospheric pressure.The process continued for 30 min, during which the temperature of the reactor increased to around 50°C and remained constant until the conclusion of the process..There are two reasons for the temperature increase: First, the collision of particles to the container's walls after their exit from the work head results in the temperature increase.Two, the reaction between sulfuric acid and nitric acid is an exothermic reaction which is accompanied by temperature increase.Following the oxidation phase, the resulting product was divided into two phases: an acidic aqueous phase and a hydrocarbon phase.The aqueous phase was separated, and the hydrocarbon phase (referred to as oxidized sulfur condensate) underwent an extraction process.In this stage, a 5% wt.caustic solution was introduced to 250 g of oxidized sulfur condensate at a weight ratio of solvent to condensate of 0.25.The mixture was then agitated for 15 min at 900 rpm using a magnetic stirrer.Lastly, the resulting mixture was separated into two distinct phases, and the extracted hydrocarbon phase was used for further examination to determine its sulfur content [12].

Determination of total sulfur content
The TANAKARX-360SH sulfur meter was utilized to measure the total sulfur content of both sour and treated gas condensate.Additionally, the Varian CP-3800 gas chromatograph  (GC) was utilized with a total sulfur detection range of 0-5% wt. for both the initial sample with 2300 ppm and the final sample.Through calibration of the GC apparatus, four sulfur-containing components were detected, including thiophene, benzothiophene, dibenzothiophene, and 4,6-dimethyldibenzothiophene.The specifications of the GC used are listed in Table 2.
Figure 3 displays GC-PFPD chromatograms of gas condensate before and after undergoing the ODS process using specific amounts of H 2 SO 4 , HNO 3 , and NO 2 .The untreated  sample (Figure 3(a)) exhibited noticeable peaks of sulfur-containing components that were absent in the treated gas condensate (Figure 3(b)), indicating the success of the process.To ensure the accuracy of the achieved results, a benzothiophene solution was added as an internal standard.The untreated sample displayed 70 peaks while the treated sample only showed the internal standard peak [12].
To optimize the conversion percentage, we utilized Design-Expert ® software.The software determined that the optimum process variables required to achieve a 99.9% conversion rate were as follows: 0.593 moles of H 2 SO 4 , 0.682 moles of HNO 3 , and 0.264 moles of N 2 .

Modeling and optimization
The purpose of using artificial intelligence systems for the prediction and optimization of oxidative desulfurization of gas condensate via a novel oxidation system is to reduce the cost of the process through accurate predictions and determination of optimal operating conditions.Oxidative desulfurization is a promising alternative to the conventional hydrodesulfurization process for the removal of sulfur compounds from fossil fuels, including gas condensate.However, the process's efficiency depends on various factors such as the type of oxidant, concentration of the oxidant, reaction temperature and reaction time.Therefore, predicting the efficiency of the oxidative desulfurization process and optimizing the operating conditions can significantly reduce the process's cost by lowering the number of experimental trials required to determine the optimal conditions.Artificial intelligence systems such as Fuzzy Inference System, ANFIS and GA can be used to model and predict the efficiency of the oxidative desulfurization process and optimize the operating conditions to achieve the maximum sulfur removal percentage.The use of these systems can also help to identify the most effective oxidants and their optimal concentrations, which can further improve the efficiency of the oxidative desulfurization process.

Fuzzy logic model
The concept of a fuzzy set was first introduced by Lotfi Zadeh in a scientific article published in 1965 [18].Fuzzy systems, which are established based on knowledge and rules, utilize the core of a knowledge base that is formed based on if-then rules composed of if-then phrases, with some of their words designated by continuous membership functions.The creation of a fuzzy system begins with obtaining if-then rules from either experts or the knowledge of a specified realm, followed by their incorporation using various methods [18,19].A fuzzy model typically consists of three steps, including fuzzification, inference engine, and developed fuzzification.These steps utilize fuzzy sets and approximate inference techniques to find appropriate solutions for specific problems without relying on accurate initial knowledge about the problem.Fuzzy systems have been widely used in various fields such as control systems, decision-making, pattern recognition, and artificial intelligence.The development of fuzzy logic has led to the creation of fuzzy controllers, which can handle complex, nonlinear systems with uncertainty and imprecision.The use of fuzzy logic has also shown promising results in the optimization of industrial processes, power systems, and transportation systems.Fuzzy systems have opened up new avenues for the development of intelligent systems that can operate in dynamic and uncertain environments [20,21].A schematic of the fuzzy system which is used in this study with three inputs and one output is shown in Figure 4.
Figure 5 depicts the three membership functions (MFs) for each input independently.It should be noted that gaussmf type of MFs were utilized.The symmetric Gaussian function is the function of two parameters, σ and c, as given by:  σ and c which specify the standard deviation and mean of the dataset, respectively.

ANFIS model
ANFIS was first introduced by Jang.This model is similar to a multi-layer neural network which applies fuzzy logic combined with neural network learning algorithms [21].ANFIS is composed of five layers, namely information entry layer, fuzzy rules weight calculation layer, obtained rule weights normalization layer, rules calculation layer, summation layer and the network output [22,23].The distinguishing feature of ANFIS is that it uses the backpropagation slope method as well as least squares method for the parameter estimation [24].In this research, Gaussian membership distribution and hybrid network training algorithm are considered for the modeling of the efficiency of a novel ODS of gas condensate.A schematic of the ANFIS model which is proposed in this study is illustrated in Figure 6 [25,26].

GA-Fuzzy and GA-ANFIS model
GA is one of the most widely used methods developed by Holland [27].In the current work, GA was used to find the optimal parameters of the proposed Fuzzy and ANFIS models.The main component of GA is chromosome, which represents a solution in the search space of the optimization problem.Each chromosome consists of a specific number of genes, each one describes a parameter of the problem.The search starts with an initial population of strings, and in each iteration, unique strings are evaluated according to the search performance condition, and a corresponding value is assigned to them.Selection is an action in which the chromosomes of the next generation of the current population are determined based on the law of survival of the generation, and this action is the most important step in GA. Figure 7 shows the structure of Fuzzy and ANFIS optimization using GA [21,28,29].

Results and discussion
In this study, the datasets which are used to design a Fuzzy, GA-Fuzzy, ANFIS and GA-ANFIS are divided into training and validation groups.It should be noted that 80% of the data were selected randomly for training and 20% were applied as validation data.The input parameters were the concentrations of H 2 SO 4 , HNO 3 , and NO 2 and the sulfur removal efficiency was the output variable of the models.Table 3 shows the information of the current Fuzzy and GA-Fuzzy models.In addition, the statistics of the data is presented in Table 4.
The average relative deviation (ARD%), mean absolute error (MAE) and coefficient of determination (R 2 ) were calculated to assess the efficiency of the proposed models using the following equations: where n is the number of data, C exp,i is the experimental conversion,C pred,i is the predicted conversion, Cexp is the measured mean value of experimental conversion and Cpred is the predicted mean value of experimental conversion.The values of ARD%, MAE and R 2 for Fuzzy, GA-Fuzzy, ANFIS and GA-ANFIS models are presented in Table 5. Considering these data, the R 2 values of GA-Fuzzy and GA-ANFIS model were better than their corresponded values for Fuzzy and ANFIS models, which denotes that there is an acceptable agreement between GA-Fuzzy and GA-ANFIS model outputs and the experimental data.
Fuzzy model rule surfaces which show the relationship between the H 2 SO 4 , HNO 3 , and NO 2 concentrations and the sulfur removal (Conversion %) are illustrated in Figure 8.
Figure 8 shows that the conversion percentage increases with HNO 3 moles, and the effect HNO 3 content is more significant in higher H 2 SO 4 concentrations in comparison with its lower values.In addition, the conversion percentage decreased with NO 2 concentrations, and its effect is more pronounced in lower H 2 SO 4 concentrations.It can be seen that the number of HNO 3 moles has a positive effect on the conversion percentage.It is worthy to note that these diagrams are the result of fuzzy model.The calculated statistical parameters denote the inaccuracy of these data: therefore, the current fuzzy model parameters are optimized using GA.
Figure 9 shows the optimized Gaussian membership functions of input variables which were used to obtain the set of Fuzzy rules.It should be noted that these membership functions were optimized using GA and presented in this figure.GA-Fuzzy model rule surfaces which show the relationship between the H 2 SO 4 , HNO 3 , and NO 2 concentrations and the sulfur removal (conversion %) are given in Figure 10.The relationship between the input and output data and the effect of each parameter on the optimal output values can be seen in this figure.Through the utilization of the predicted  surface, the percentage of conversion can be acquired for any point that has a specific x and y direction.
In this study, two Sugeno models with an automatic extraction of data from FIS [GEN-FIS3] were used.Additionally, the coverage threshold was set at 0.1.Table 6 depicts the proposed ANFIS and GA-ANFIS models information which are used in this study.
The ANFIS model rule surfaces which show the relationship between the H 2 SO 4 , HNO 3 , and NO 2 concentrations and the sulfur removal are illustrated in Figure 11.In addition, Figure 12 depicts the optimized membership functions of ANFIS using GA.
Figure 13 presents the GA-ANFIS model rule surfaces.The relationship between the H 2 SO 4 , HNO 3 , and NO 2 concentrations and the sulfur removal are illustrated in this figure.
The regression plots of the experimental data versus the predicted outputs are displayed in Figure 14 for the fuzzy, ANFIS, GA_Fuzzy, and GA_ANFIS models.
The correlation coefficients obtained for fuzzy, ANFIS, GA_Fuzzy, and GA_ANFIS models were 0.57, 0.77, 0.97 and 0.97, respectively.Based on these correlation coefficients, GA_fuzzy and GA_ANFIS models were found to predict the experimental results well.Therefore, these models have the potential of describing the sulfur removal efficiency with high precision.Overall, the results suggest that these regression models are effective in predicting the system's behavior and could be used in future research or decision-making processes.

Figure 1 .
Figure 1.The experimental setup used for ODS.

Figure 2 .
Figure 2. A diagram of the oxidative desulfurization process.

Figure 4 .
Figure 4. Fuzzy inference system with three inputs and one output.

Figure 5 .
Figure 5.The initial fuzzy sets of the input variables of the model (x: m(H2 S O 4 , m(HNO 3 ) and m(NO 2 )).

Figure 6 .
Figure 6.Schematic of the proposed ANFIS model.

Figure 7 .
Figure 7.The structure of fuzzy and ANFIS optimization using GA

Figure 8 .Figure 9 .
Figure 8. Fuzzy rules surface for the prediction of sulfur removal (conversion %)

Figure 10 .
Figure 10.GA-Fuzzy rules surface for the prediction of sulfur removal.

Figure 11 .
Figure 11.ANFIS rules surface for the prediction of sulfur removal.

Figure 12 .
Figure 12.The Gaussian membership functions of the input variables which are optimized by GA-ANFIS model.

Figure 13 .
Figure 13.GA-ANFIS rules surface for the prediction of sulfur removal.

Table 3 .
The information of Fuzzy and GA-Fuzzy models.

Table 4 .
Statistical information of the data in the present work.

Table 5 .
The statistical parameters achieved from Fuzzy, GA-Fuzzy, ANFIS and GA-ANFIS models.

Table 6 .
Parameters of the proposed ANFIS and GA-ANFIS models.