Response Methodology Optimization and Artificial Neural Network Modeling for the Removal of Sulfamethoxazole Using an Ozone–Electrocoagulation Hybrid Process

Removing antibiotics from water is critical to prevent the emergence and spread of antibiotic resistance, protect ecosystems, and maintain the effectiveness of these vital medications. The combination of ozone and electrocoagulation in wastewater treatment provides enhanced removal of contaminants, improved disinfection efficiency, and increased overall treatment effectiveness. In this work, the removal of sulfamethoxazole (SMX) from an aqueous solution using an ozone–electrocoagulation (O–EC) system was optimized and modeled. The experiments were designed according to the central composite design. The parameters, including current density, reaction time, pH, and ozone dose affecting the SMX removal efficiency of the OEC system, were optimized using a response surface methodology. The results show that the removal process was accurately predicted by the quadric model. The numerical optimization results show that the optimum conditions were a current density of 33.2 A/m2, a time of 37.8 min, pH of 8.4, and an ozone dose of 0.7 g/h. Under these conditions, the removal efficiency reached 99.65%. A three-layer artificial neural network (ANN) with logsig-purelin transfer functions was used to model the removal process. The data predicted by the ANN model matched well to the experimental data. The calculation of the relative importance showed that pH was the most influential factor, followed by current density, ozone dose, and time. The kinetics of the SMX removal process followed the first-order kinetic model with a rate constant of 0.12 (min−1). The removal mechanism involves various processes such as oxidation and reduction on the surface of electrodes, the reaction between ozone and ferrous ions, degradation of SMX molecules, formation of flocs, and adsorption of species on the flocs. The results obtained in this work indicate that the O–EC system is a potential approach for the removal of antibiotics from water.


Introduction
Antibiotics are increasingly used for the treatment of humans and animals; however, they are also persistent pollutants when discharged into the water system. The antibiotic resistance gene can develop with the prolonged presence of antibiotics in water, presenting a danger to humans and animals [1]. Sulfamethoxazole (SMX) is a sulfonamide antibiotic that is frequently used to treat livestock and humans. Consequently, SMX is one of the most popular antibiotics detected in wastewater. When SMX is present in the aqueous system for an extended period, it can cause the growth of antibiotic-resistant bacteria and Modeling and simulating a process involves gathering information on how the process is likely to occur without conducting physical experiments [36]. The use of modeling is widely recognized in science and engineering for various processes. In recent years, there have been successful applications of powerful artificial intelligence (AI) prediction methods such as the adaptive neuro fuzzy inference system (ANFIS), random forest (RF), and artificial neural network (ANN) for modeling pollutant removal processes [36][37][38][39]. The ANN is modeled according to biological nervous processing and it is a popular choice for solving and modeling complex engineering systems because it is simple, robust, reliable, and nonlinear. The ANN model is capable of learning from experimental data to solve complex, nonlinear, multi-dimensional functional relationships without any preconceived notions about their nature [36,37,40]. By using a set of experimental data, ANN models can establish the nonlinear connection between independent and dependent variables [41,42]. Furthermore, ANN models are able to access the relative importance of each parameter in processes [43,44].
This work aims to optimize the parameters of the O-EC system for the removal of SMX using RSM. The effects and inter-effects of the crucial parameters such as current density, initial pH, time, and ozone dose on the SMX removal efficiency are investigated, and the optimum conditions for the removal of SMX are established. The removal process is modeled using an ANN, and the relative importance of the parameters are calculated. The kinetics and mechanism of the removal process are also studied and discussed.

Model Evaluation
To select the appropriate model for predicting the SMX removal process using RSM, three models, including linear, two-factor interaction (2FI), and quadratic models, were evaluated, and the results are given in Table 1. Among the three models, the sequential p-value of the linear and quadratic models is less than 0.0001, implying that these models are significant. The lack of fit of the quadratic model is not significant while that of the two other models is significant. According to the evaluation, a quadratic model was suggested for predicting the experimental data with the equation as the following: Y = β + β 1 A + β 2 B + β 3 C + β 4 D + β 5 AB + β 6 AC + β 7 AD + β 8 BC + β 9 BD + β 10 CD + β 11 A 2 + β 12 B 2 + β 13 C 2 + β 14 D 2 , (1) where Y is the response (the removal efficiency), β is the mean value of Y, β i (i = 1-14) is the coefficient of each term in the equation.

Model Analysis
The analysis of variance (ANOVA) was used to evaluate the statistical significance of factors, and the results are given in Table 2. The model F-value of 341.84 implies that the model is significant [33]. There is only a 0.01% chance that an F-value this large could occur due to noise. The determined coefficient (R 2 ) is 0.991, confirming that 99.1% of the total variables were described by the model. The adjusted R 2 of 0.989 indicates the high significance of the model, and the predicted R 2 of 0.982 suggests that only 1.8% of the total variables are not explained by the model. These values are in good agreement with each other. The coefficient of variation (CV) is quite low (1.11), implying good precision and reliability of the experiments. Adequate precision measures the signal-to-noise ratio, which is desirable when higher than 4 [30]. In this work, the ratio of 65.725 indicates an adequate signal. This model can be used to navigate the design space. The lack of fit F-value of 1.67 implies that the lack of fit is insignificant relative to the pure error. There is a 29.72% chance that a lack of fit F-value this large could occur due to noise. Non-significant lack of fit is good, signifying that the regression model is satisfactory for predicting the SMX removal process by the O-EC system.
The p-values of the model terms, including B, C, D, AB, AD, BC, BD, CD, A 2 , B 2 , C 2 , D 2 , are less than 0.0500, indicating that these terms are significant. The relationship between response and coded factors can be presented as the following. Y = 93.51 + 8.28A + 3.51B + 2.54C + 4.12D − 0.95AB + 2.41AD + 1.

Diagnostics
The normality of a data set can be diagnosed using a plot of the normal probability versus the residuals, and if the resulting plot is approximately linear, the data are normally distributed. As presented in Figure 1a, the straight-linear pattern of the plot indicates that the experimental data follow a normal distribution. The assumption of constant variance can be tested using the plot of the residuals vs. the predicted. The plot is used to detect nonlinearity, unequal error variances, and outliers. As seen in Figure 1b, the plot is a random scatter, indicating that a transformation is not needed. According to the Box-Cox Plot, the current lambda is 1, and the best lambda is 1.62. The 95% confidence interval around this lambda confirms that a specific transformation is not recommended. The predicted vs. actual response plot shows a good agreement between these values, indicating that the RSM model can predict the removal process well. around this lambda confirms that a specific transformation is not recommended. The p dicted vs. actual response plot shows a good agreement between these values, indicat that the RSM model can predict the removal process well.

Effect and Interactive Effect of the Parameters on the Response
The individual and interactive effects of the independent variables on the respo can be determined through three-dimensional (3D) response surface and contour plo The effect of the current density, pH, time, and ozone dose and their combined effect the SMX removal efficiency are presented in Figure 2. The effects of current density on response can be clearly seen in Figure 2a-c. The removal efficiency increases with increase in the current density from 10 to 30 A/m 2 , slightly changes in the range of 30 A/m 2 , and decreases when the current density is above 40 A/m 2 . This can be explained the fact that the quantity of Fe(II) ions generated at the anode is proportional with current density, according to Farafay's law [45]. The mass of flocs increases with increases of the concentration of Fe(II) ions. Additionally, Fe(II) ions react with ozone form hydroxy radicals that play an important role in the oxidation of SMX [46]. Hen the increase in current density enhances the removal efficiency. However, if the value current density is higher than the limit value, the adverse effects as reduction of ma

Effect and Interactive Effect of the Parameters on the Response
The individual and interactive effects of the independent variables on the response can be determined through three-dimensional (3D) response surface and contour plots. The effect of the current density, pH, time, and ozone dose and their combined effect on the SMX removal efficiency are presented in Figure 2. The effects of current density on the response can be clearly seen in Figure 2a-c. The removal efficiency increases with an increase in the current density from 10 to 30 A/m 2 , slightly changes in the range of 30-40 A/m 2 , and decreases when the current density is above 40 A/m 2 . This can be explained by the fact that the quantity of Fe(II) ions generated at the anode is proportional with the current density, according to Farafay's law [45]. The mass of flocs increases with an increases of the concentration of Fe(II) ions. Additionally, Fe(II) ions react with ozone to form hydroxy radicals that play an important role in the oxidation of SMX [46]. Hence, the increase in current density enhances the removal efficiency. However, if the value of current density is higher than the limit value, the adverse effects as reduction of mass-transfer and heat generation can occur [12,18]. initial pH. The proper pH value for the removal process is in the range of 8-9, and if the pH is out of this range, the removal efficiency decreases. This can be ascribed to the ability to generate hydroxyl radicals, the formation of flocculants, and the existing forms of the pollutants species [22]. For the effect of time, the removal efficiency rises remarkably when the treatment time increases from 10 to 30 min, and then sightly changes after 30 min. The removal efficiency is also highly affected by the ozone dose. The percentage of SMX removed increases with the ozone dose from 0.1 to about 0.7 g/h; while the dose is above this value, the change in the removal efficiency is not profound, indicating the excess of ozone for degradation of SMX [15]. The interactive effects of the factors can be seen by examining how the surface of the graph changes as the levels of the input factors are changed. The interactive effects of the factors are also confirmed by the curvature pattern of these plots, suggesting that it is important to consider the inter-effects of the factors on the removal efficiency during treatment design.

Numerical Optimization
In RSM, the optimization process is crucial part of the experimental study to find out the optimum process condition. It is performed by adjusting the independent variables to determine the suitable values that give the most desirable response. In this study, the maximum level of SMX removal efficiency was targeted with the importance of 5, while the independent factors were kept in the ranges with the importance of 3, as presented in Table 3.  As presented in Figure 2a,d,e, the removal efficiency is remarkably dependent on the initial pH. The proper pH value for the removal process is in the range of 8-9, and if the pH is out of this range, the removal efficiency decreases. This can be ascribed to the ability to generate hydroxyl radicals, the formation of flocculants, and the existing forms of the pollutants species [22]. For the effect of time, the removal efficiency rises remarkably when the treatment time increases from 10 to 30 min, and then sightly changes after 30 min. The removal efficiency is also highly affected by the ozone dose. The percentage of SMX removed increases with the ozone dose from 0.1 to about 0.7 g/h; while the dose is above this value, the change in the removal efficiency is not profound, indicating the excess of ozone for degradation of SMX [15].
The interactive effects of the factors can be seen by examining how the surface of the graph changes as the levels of the input factors are changed. The interactive effects of the factors are also confirmed by the curvature pattern of these plots, suggesting that it is important to consider the inter-effects of the factors on the removal efficiency during treatment design.

Numerical Optimization
In RSM, the optimization process is crucial part of the experimental study to find out the optimum process condition. It is performed by adjusting the independent variables to determine the suitable values that give the most desirable response. In this study, the maximum level of SMX removal efficiency was targeted with the importance of 5, while the independent factors were kept in the ranges with the importance of 3, as presented in Table 3. According to the solution, the optimum conditions for the removal process are a current density of 33.2, pH of 8.4, time of 37.8 min, and ozone dose of 0.7 g/h and the predicted response is 99.75%. To validate the prediction of RSM, three experiments were carried out under optimum conditions. The removal efficiency obtained from experiments were 98.68, 99.27, and 99.56%. The errors between experimental and predicted values are below 2%, confirming that the developed model can accurately predict SMX removal via the O-EC system. In comparison to the conventional methods, such as adsorption on activated carbon [47] and biological degradation [48], the O-EC process provides a higher removal efficiency in a shorter time.

ANN Modeling
The experimental data were analyzed using a three-layer, feed-forward neural network structure consisting of input, hidden, and output layers, as illustrated in Figure 3. To train this ANN structure, the back-propagation algorithm was employed. To select a suitable tranfer function for the ANN model, three differentiable transfer functions including logsigmoid (logsig), tan-sigmoid (tansig), and purelin were examined. These functions are presented as the following equations: Molecules 2023, 28, x FOR PEER REVIEW 8 of 17   The selected functions were dependent on the values of MSE and R 2 . Table 4 shows the R 2 and MSE values obtained from the ANN with different transfer functions in layer 1 and layer 2. The R 2 values of the ANN structures with logsig-purelin and logsig-tansig are close to the unity, indicating that these structures can predict well the experimental data.
The MSE values of these models are 2.646 and 7.806, implying that the data generated by the ANN models are close to the experimental values. With the lowest value of MSE, the logsig-purelin ANN structure was selected for modeling the removal process.  Figure 4 presents the correlation between the experimental data and the data predicted by the selected ANN model for training, testing, validation, and whole data sets. It can be seen that the correlation coefficients for all data sets are close to 1, confirming that the obtained ANN structure can be used for modeling the removal of SMX via the O-EC system.  An important feature of ANN is the ability to evaluate the relative importance of each variable to the output, according to the weights of the network [36]. Their relationship can be presented as the following equation: An important feature of ANN is the ability to evaluate the relative importance of each variable to the output, according to the weights of the network [36]. Their relationship can be presented as the following equation: where I j is the relative importance of the jth factor on the removal efficiency, W is the connection weight, N i and N h are the numbers of input and hidden neurons; the superscripts 'i', 'h', and 'o' mean input, hidden, and output layers; and subscripts 'k', 'm', and 'n' refer to input, hidden, and output neurons [44,49]. The calculated relative importance of the four factors is presented in Figure 5. The calculated relative importance of pH is 0.341 which is the highest, implying that pH is the most influential parameter. The second influential parameter is current density, with a relative importance of 0.236. Finally, ozone and time have a relative importance of 0.216 and 0.211, respectively. The ANN calculation shows that all four parameters significantly affect the SMX removal process

Kinetic Study
To identify the kinetics of the removal process, the experiments were carried out with an initial pH of 8.4, current density of 33.2, and ozone dose of 0.7 g/h. The TOC values of SMX solution were determined within 35 min. The experimental data were analyzed using the first-order kinetic model as the following equation: where Co and Ct are the TOC values of SMX solution at the beginning and after treatment, t is the time of treatment, and k is the reaction rate constant. The results were presented in Figure 6. The calculated relative importance of pH is 0.341 which is the highest, implying that pH is the most influential parameter. The second influential parameter is current density, with a relative importance of 0.236. Finally, ozone and time have a relative importance of 0.216 and 0.211, respectively. The ANN calculation shows that all four parameters significantly affect the SMX removal process

Kinetic Study
To identify the kinetics of the removal process, the experiments were carried out with an initial pH of 8.4, current density of 33.2, and ozone dose of 0.7 g/h. The TOC values of SMX solution were determined within 35 min. The experimental data were analyzed using the first-order kinetic model as the following equation: where C o and C t are the TOC values of SMX solution at the beginning and after treatment, t is the time of treatment, and k is the reaction rate constant. The results were presented in Figure 6. The coefficient of determination of the linear regression is 0.996, implying that the kinetics of the removal process fits well to the first-order kinetic model. The calculated rate constant was 0.12 (min −1 ), revealing that the removal of SMX via the O-EC system is a fast process.

Possible Mechanism
During the removal of SMX via the O-EC system, various physical and chemical processes can occur, such as oxidation and reduction on the surface of electrodes, reaction between ozone and ferrous ions, oxidation of SMX, formation of flocs, and adsorption of species on the flocs. The possible mechanism of the SMX removal process via the O-EC system can be depicted in Figure 7.
At the anode, iron is oxidized to form ferrous ions, and at the cathode, water is reduced to form hydrogen gas and hydroxyl ions as the following: When ozone is introduced into the system, it reacts with ferrous ions to generate hydroxide radicals and ferric ions [22,23] as the following reactions: The coefficient of determination of the linear regression is 0.996, implying that the kinetics of the removal process fits well to the first-order kinetic model. The calculated rate constant was 0.12 (min −1 ), revealing that the removal of SMX via the O-EC system is a fast process.

Possible Mechanism
During the removal of SMX via the O-EC system, various physical and chemical processes can occur, such as oxidation and reduction on the surface of electrodes, reaction between ozone and ferrous ions, oxidation of SMX, formation of flocs, and adsorption of species on the flocs. The possible mechanism of the SMX removal process via the O-EC system can be depicted in Figure 7.  At the anode, iron is oxidized to form ferrous ions, and at the cathode, water is reduced to form hydrogen gas and hydroxyl ions as the following: When ozone is introduced into the system, it reacts with ferrous ions to generate hydroxide radicals and ferric ions [22,23] as the following reactions: The advantage of the O-EC system is the presence of both strongly oxidizing species ozone and radicals which can degrade SMX molecules to form various transformation products. The degradation of SXM in aqueous solution by ozone and radicals has been thoroughly investigated in the literature [2,3,[6][7][8][9][10]50]. According to the results reported in the [6], the degradation of SMX by ozone is complicated with several pathways such as hydroxylation, oxidation, and S-N cleavage. In the hydroxylation pathway, hydroxyl groups can attack to the benzene ring or C=C bond in the isoxazole ring to form byproducts with a molecular weight higher than that of SMX. Additionally, the amino group on the benzene ring and methyl group on the isoxazole ring can be oxidized to form nitro and carboxyl groups, respectively. The authors also reported that the main degradation pathway is the cleavage of the sulphonamide bond, and the most abundant transformation product is 3-amino-5-methylisoxazole. Similar transformation products were also observed by Gao et al. [2].

Chemicals
All chemicals used in the present study were of analytical grade (purchased from Merck, Darmstadt, Germany) and used directly without further purification. Sulfamethoxazole (C 10 H 11 N 3 O 3 S, 99.8%) was purchased from the National Institute of Drug Quality Control, Viet Nam. All chemical solutions were prepared using double distilled water (DDW). The SMX working solution was prepared with a concentration of 100 mg/L and was used for study via dilution to the specified concentration.

Ozone-Electrocoagulation System
The ozone-electrocoagulation (O-EC) system applied for the removal of SMX is illustrated in Figure 8. Steel plates (99.5% Fe) with a length of 10 cm and a width of 5 cm were used as the electrodes, and the working surface area of each electrode was 60 cm 2 . A DC power with a current output range of 0-10 A and voltage output range of 0-40 V was employed as a power supply for the reaction system. Ozone produced from a commercial ozone generator (D1, Dr. Ozone) was continuously purged into the reactor via ozone diffusers. Each experiment was carried out with 500 mL of a solution containing SMX (50 mg/L) and NaCl (0.8%). After a specific time interval, 2 mL of the solution was withdrawn, immediatel mixed with 1 mL of 2% KI solution to quench ozone in the solution, and filtered for ana ysis. The SMX removal efficiency was calculated according to the following equation: Removal efficiency (%) = * 100 (8 where TOCo and TOC are the total organic carbon values at the beginning and after trea ment. These values were determined using a multi N/C 3100 analyzer (Analytik Jen GmbH, Jena, Germany). The ozone doses were measured using the potassium iodide we chemistry method [51]. To ensure reproducibility, each experiment in this work was per formed three times. The reported values were average values with accepted errors ≤ 3%

Experimental Design
Before designing experiments, the screening experiments (they are not shown in thi article) were carried out to evaluate the effects of the factors affecting the removal proces and the range of each factor. After that, central composite design (CDC) was utilized t design the experimental parameters for SMX removal via the O-EC system. In this work four factors, including current density, initial pH, time, and ozone dose, were the inde pendent variables. Table 5 illustrates five levels for each variable: low (−1), central (0), hig (+1), alpha (−α), and alpha (+α).

Structure of ANN Model
The ANN modeling for the removal process was carried out by analyzing the exper imental data with an ANN model consisting of input, hidden, and output layers. Th numbers of neurons were 4 (the independent variables) for the input layer and 1 (the re moval efficiency) for the output layer. The data were categorized into three groups: train ing (70%), validation (15%), and testing (15%). The neural network tool of MATLAB sof ware (R2018a) was used for modeling. After a specific time interval, 2 mL of the solution was withdrawn, immediately mixed with 1 mL of 2% KI solution to quench ozone in the solution, and filtered for analysis. The SMX removal efficiency was calculated according to the following equation: where TOC o and TOC are the total organic carbon values at the beginning and after treatment. These values were determined using a multi N/C 3100 analyzer (Analytik Jena GmbH, Jena, Germany). The ozone doses were measured using the potassium iodide wet-chemistry method [51]. To ensure reproducibility, each experiment in this work was performed three times. The reported values were average values with accepted errors ≤ 3%.

Experimental Design
Before designing experiments, the screening experiments (they are not shown in this article) were carried out to evaluate the effects of the factors affecting the removal process and the range of each factor. After that, central composite design (CDC) was utilized to design the experimental parameters for SMX removal via the O-EC system. In this work, four factors, including current density, initial pH, time, and ozone dose, were the independent variables. Table 5 illustrates five levels for each variable: low (−1), central (0), high (+1), alpha (−α), and alpha (+α).

Structure of ANN Model
The ANN modeling for the removal process was carried out by analyzing the experimental data with an ANN model consisting of input, hidden, and output layers. The numbers of neurons were 4 (the independent variables) for the input layer and 1 (the removal efficiency) for the output layer. The data were categorized into three groups: training (70%), validation (15%), and testing (15%). The neural network tool of MATLAB software (R2018a) was used for modeling.

Statistics
The fitness between the experimental and the predicted data obtained from the models was evaluated based on the mean square error (MSE) and the coefficient of determination (R 2 ): where n is the number of data points; y i,exp. and y i,pre. are the ith values (removal efficiency) obtained from experiments and ANN model, respectively; y m is the mean value of y i,exp.

Conclusions
The removal of SMX via the O-EC system was optimized by RSM, using central composite design. Four parameters affecting the SMX removal efficiency of the O-EC system, including current density, pH, reaction time, and ozone dose, were numerically optimized. The removal process could be presented by a quadric model equation. The optimum conditions were the current density of 33.2 A/m 2 , time of 37.8 min, pH of 8.4, and ozone dose of 0.7 g/h, and the removal efficiency reached 99.65%. A three-layer ANN with logsig-purelin transfer functions can accurately predict the removal process with an MSE of 2.646 and an R 2 of 0.980. The relative importance of pH was the highest, followed by current density, time, and ozone dose. The kinetics of the SMX removal process followed the pseudo-first-order kinetic model with the rate constant of 0.12 (min −1 ). The removal mechanism involved various processes: (1) oxidation and reduction on the surface of electrodes; (2) reaction between ozone and ferrous ions; (3) degradation of SMX molecules; (4) formation of flocs and adsorption of species on the flocs. The results obtained in this work show that the O-EC system is an efficient approach for removing antibiotics from water.