Introduction

Industrial effluents, gaseous or liquid are hazardous to human health and general well-being. When undesirable matters are present in liquid effluents, it can be detrimental as their presence poses severe risk to the immediate recipients. The ecosystem faces serious problems as a result of the waste water from different industries, factories and laboratories. The dye-containing wastes disposed from industries are toxic and harmful to aquatic life, microorganism and human being (Borker and Salker 2006). Many industries use synthetic dyes, including the textile and leather industries (Sakthivel et al. 2003; Vandevivere et al. 1998), the food technology industries (Šlampová et al. 2001), the medical industries, paper production (Ivanov et al. 1996), agricultural research (Cook and Linden 1997), photoelectrochemical cells (Wróbel et al. 2001) and light-harvesting arrays (Wagner and Lindsey 1996), among others. Currently, there are 100,000 different types of dyes manufactured annually at a pace of 7 × 105tonnes, of which the textile industries use approximately 36,000 tons per year. The literature reports that up to 20% of the world's total dye production is lost during the dyeing process and released in the textile effluents (Esplugas et al. 2002; Houas et al. 2001; Crini 2006). The discharge of those colored wastewaters into the environment is a significant cause of eutrophication and non-aesthetic pollution. Moreover, it can produce hazardous by-products through oxidation, hydrolysis or other chemical reactions occurring in the wastewater phase. It is important to mention that dyes can have harmful effects and hinder light from penetrating through contaminated waterways (Prado et al. 2008). To lessen the environmental impact of synthetic dyes, a variety of techniques have been deployed to remove them from water and waste water. The removal of dye pollutants has conventionally been accomplished through physical methods, such as ion exchange on synthetic adsorbent resins, adsorption on activated carbon, ultrafiltration, reverse osmosis, coagulation by chemical agents and chemical treatment process (ozonation). These techniques only work to transform organic compounds from water to another phase, resulting in secondary contamination, thus increasing the cost of the procedure by necessitating additional solid waste treatment methods, adsorbent regeneration and costly disposal (Konstantinou and Albanis 2004; Tang and Huren 1995; Galindo et al. 2001). In addition to the aforementioned processes for the removal of dyes from wastewaters, advance oxidation techniques such Fenton and photo-Fenton catalytic reactions (Kuo 1992), H2O2/UV processes (Ince and Gönenç 1997), biodegradation (Sleiman et al. 2007) and microbiological or enzymatic decomposition (Hao et al. 2000) have also been utilized to have complete destruction of the dye molecules.

Reactive azo dyes with –N=N– group as a chromophore in the molecular structure are the most prevalent and largest class among all the dyes, commonly used owing to their better dyeing processing conditions and bright colors (Zhu et al. 2000). Water-soluble reactive dyes are typically for dyeing cotton fabrics. The significant characteristic of these dyes is their availability in fine powder form which ameliorate the appearance of fabrics (Aouni et al. 2012). Over the past decades, advanced oxidation processes (AOP) have been widely suggested method for water purification. AOP is classified as heterogeneous and homogenous catalysis. Heterogeneous catalysis (photocatalysis) has been successfully employed for the removal of dyes from wastewaters, particularly, because of their efficiency to completely mineralize the target pollutants (Madhavan et al. 2008). During the process, the interaction between UV radiation and photocatalysts (TiO2, ZnO, FeO, CdS, SnO2 and ZrO2) (Arslan and Balcioğlu 1999), electron hole pairs are generated on the catalyst surface (Eq. 1). The oxidative potential of the valance band hole (h+vb) in the catalyst allows the direct oxidation of the dye to reactive intermediates (Eq. 2).

$$ {\text{TiO}}_{2} + {\text{UV}} \to e_{{{\text{cb}}}}^{ - } + h_{{{\text{vb}}}}^{ + } $$
(1)
$$ {\text{dye}} + h_{{{\text{vb}}}}^{ + } \to {\text{dye}}^{ + } \to {\text{dyeoxidation}} $$
(2)
$$ {\text{water}} + h_{{{\text{vb}}}}^{ + } \to {\text{OH}}^{ \bullet } + {\text{H}}^{ + } $$
(3)
$$ {\text{OH}}^{ - } + h_{{{\text{vb}}}}^{ + } \to {\text{OH}}^{ \bullet } $$
(4)
$$ {\text{dye}} + {\text{OH}}^{ \bullet } \to {\text{dyedecomposition}} $$
(5)

The hydroxyl radical (OH) is another reactive intermediate that take part in the decomposition process. It either results from water breakdown (Eq. 3) or the reaction between the hole and hydroxyl ion (OH) (Eq. 4). The hydroxyl radical is a very potent, non-selective oxidant that causes organic dyes to partially or completely mineralize (Eq. 5) (Kansal et al. 2009). TiO2 is an n-type semiconductor, expected to receive more attention as a photocatalyst for environmental remediation, because of its cost effectiveness, insoluble, non-toxic, highly reactive and has higher chemical stability compared to other semiconductor photocatalysts (Peternel et al. 2007; Qiu et al. 2014). The photocatalytic degradation of different organic systems using illumination in the presence of TiO2 can result in complete decomposition to carbon dioxide (CO2), water (H2O) and mineral acids (Jamil et al. 2012; Kaur and Singh 2007).

The experimental studies related to investigating the effect of photocatalyst (in terms of concentration), pollutant and oxidizing reagent content, exposure time duration of the irradiating UV light source and of prevailing environment (solution pH) on the pollutant degradation process is time-consuming and costly. Moreover, optimization of these input attributes for the final outcome (degradation percentage) requires more number of experiments and data analyses. Machine learning model and response surface methodology are widely used for prediction and optimization in variety of engineering fields. In the present work, following the previous experimental works accomplishment of Arshad et al. (2020), the paper is designed to address for the first time the effectiveness of RSM modeling for optimizing the advanced oxidation process (UV/H2O2/TiO2) for the commonly used reactive red (RR-147) dye in the textile industry. The RSM modeling and optimization tool will provide profound information about the most influencing input process parameter’s and its satisfactory value ranges toward the dye degradation process, rather to perform random laborious experimental and data analysis investigation of the process input parameters. The paper is organized such that the data used for RSM models developments were briefly explained followed by the modeling process. The mathematical quadratic formulations are presented alongside the accuracy of the developed models. The interaction plots are briefly discussed in compliance with the results obtained from the experimental investigations to check the accuracy of the developed RSM model’s and its prediction capabilities. The results are promising for future applications of the RSM modeling for the optimization the advanced oxidation processes. Finally, optimized solutions are presented followed by the main conclusions of this study.

Methodology

This section presents the data used for evaluating the interaction of input variables on the removal of RR-147 alongside the modeling process adopted for developing RSM Model.

Data collection

The data were obtained from Arshad, Bokhari (2020) who investigated the effect of various operation parameters such as UV light illumination, dye concentration, pH, photocatalyst content and amount of oxidizing agent on the dye degradation efficiency. In this paper, the analyses were carried out on four distinct data sets. In the first case, the degradation model for dye removal was based on the two independent variables, i.e., the concentration of the dye and the irradiation time. In order to evaluate the effect of the variable pH of solution, the degradation model was developed on the basis of two input variable such as the concentration of dye and pH of solution. In the third case, the input variables such as concentration of the dye and H2O2 were considered as attributes. Finally, the content of TiO2 and concentration of the dye were exercised in the degradation model as input variables. The models generated in each case would be referred as Rt, RpH, \(R_{{{\text{H}}_{2} {\text{O}}_{2} }}\) and \(R_{{{\text{TiO}}_{2} }}\), respectively. The descriptive statistics for each case are listed in Tables 1, 2, 3 and 4, respectively. It is highly recommended that the developed RSM models shall be used for the descriptive statistics of the data shown in the respective tables.

Table 1 Descriptive statistics of the data used for Rt model
Table 2 Descriptive statistics of the data used for RpH model
Table 3 Descriptive statistics of the data used for \(R_{{{\text{H}}_{2} {\text{O}}_{2} }}\) model
Table 4 Descriptive statistics of the data used for \(R_{{{\text{TiO}}_{2} }}\) model

RSM model development and evaluation

RSM combines the concepts of statistical and mathematical science in order to develop the interaction response between the target variable and a group of input parameters (independent variables) (Dodoo-Arhin et al. 2018; Ahmad et al. 2013). The method helps in identifying the response of multiple input variables affecting the output (response). An optimal custom composite design for two independent variables was adopted in each case. The variables taken were (three levels for each variable) dye concentration (50–150 ppm ± 50, three levels), UV illumination time (15–75 min ± 15, four levels), pH (3–9 ± 2, four levels) hydrogen peroxide H2O2 content (0.3–0.9 ml, three levels) and TiO2 content (0.2–0.6 g ± 0.2, three levels). The model used to calculate the responses and illustrate the relationship between the independents variables was second-order polynomial Eq. 6.

$$ Y = M_{O} + \mathop \sum \limits_{i}^{h} M_{i} Y_{i} + \mathop \sum \limits_{i}^{h} M_{ii} Y^{2} + \mathop \sum \limits_{ij}^{h} M_{ij} X_{i} X_{j} + C $$
(6)

where Y represents the responses functions (in our case it is the dye removal percentage compressive). Mo is constant coefficient. Mi, Mii and Mij are the coefficients of the linear, quadratic and interactive terms, respectively. The significance of the model was evaluated by analyzing the determination coefficient (R2), adjusted coefficient (R2adj), root mean square error (RMSE) and mean absolute error (MAE).

Results and discussion

RSM models

According to the central composite design, the examination was carried out in order to find the effect of process variables and predict the dye removal (%) for different parameters process values presented in Table 5. The second-order polynomial equation was used to state the responses by using experimental results obtained on the basis of CCD experimental design. The final equations obtained in terms of actual factors for the removal percentage for time (Rt), pH (RpH), H2O2 (\(R_{{{\text{H}}_{2} {\text{O}}_{2} }}\)) and TiO2 (\(R_{{{\text{TiO}}_{2} }}\)) basis are given in Eqs. (810), respectively.

$$ R_{t} = 14.80 - 0.04 C + 0.62t - 0.0002Ct - 0.0003C^{2} - 0.001t^{2} $$
(7)
$$ R_{{{\text{pH}}}} = 117.51 - 0.42C - 1.83{\text{pH}} - 0.003C*pH + 0.0004C^{2} - 0.02{\text{pH}}^{2} $$
(8)
$$ R_{{{\text{H}}_{2} {\text{O}}_{2} }} = 73.2 - 0.13C + 33.82C*{\text{H}}_{2} {\text{O}}_{2} + 0.0003C^{2} - 4.9{\text{H}}_{2} {\text{O}}_{2}^{2} $$
(9)
$$ R_{{{\text{TiO}}_{2} }} = 71.3 - 0.07C + 83.33{\text{TiO}}_{2} + 0.07C*{\text{TiO}}_{2} - 0.0003C^{2} - 75.64{\text{TiO}}_{2}^{2} $$
(10)
Table 5 Studied variables in the RSM modeling

The equation in terms of actual factors can be employed to make predictions about the response for given levels of each factor. Here, the levels should be specified in the actual units for each factor. This equation should not be used to calculate the relative impact of each factor because the coefficients are scaled to take into account the units of each factor and the intercept is not at the center of the design space.

Restricted maximum likelihood (REML) was used to evaluate the Kenward–Roger p values (Table 6) related to the significance of models. Table 7 depicts the analysis results of variance ANOVA for the fitting model. The ANOVA result shows that the equations represent adequately the actual relationship between the independent variables and the responses. It is important to mention that model terms are considered significant when the P value is less than 0.0500. In this instance, the model terms a, B and a2 are important in Rt model. Similarly, a, B in RpH; \(R_{{{\text{H}}_{2} {\text{O}}_{2} }}\) and in \(R_{{{\text{TiO}}_{2} }}\) models are relatively more significant term. The values of R2 and adjusted R2 (Table 6) are significantly higher that is 0.98 except the \(R_{{{\text{TiO}}_{2} }}\) model where adjusted R2 value is 0.892. The results suggest that the models can accurately be used for the interpretation between dye removal (%) and the input attributes.

Table 6 Restricted maximum likelihood (REML) analysis for the developed RSM models
Table 7 Fit statistics for the developed RSM models

Performance of RSM models

The performance of RSM models is widely evaluated using statistical indices such as R2, MAE and RMSE, alongside the slope trending between the experimental and predicted results (Jalal et al. 2021; Iqbal et al. 2021). Herein, similar evaluation was carried out. Figure 1 shows the statistical performance evaluation for Rt model. Figure 1a depicts the slope trending between the experimental and predicted results. For any ideal model, this slope shall be equal to 1. The models interpreting nearer slope to 1 show reliable predictions. It can be observed that the value of slope is equal to 0.983. Besides, the values of R2 are 0.994, reflecting close agreement between the experimental and predicted results. The values of MAE and RMSE are proximal to zero equaling 0.494% and 0.864%. Moreover, Fig. 1b shows the tracing of experimental values by the perditions and it can be seen that there is an ideal tracing, thus validating other statistical evaluation. Figure 1c manifests the absolute difference between the experimental and predictions for each observation. It is evident that the data points deviate from the observed experimental results by less than 0.5% except one point where the maximum deviation is proximal to 3%. Similarly, Fig. 2 shows the evaluation for RpH model. Similar trend in the accuracy of the model can be seen. The value of experimental to predicted slope is 0.997. The values of MAE and RMSE are 0.60 and 0.738, respectively, which are closer to zero thus showing the higher accuracy of the developed model. The tracing of experimental value is much closer to the ideal and the error analysis showed maximum deviation of 1.6%. The statistical evaluation for other two models (\(R_{{{\text{H}}_{2} {\text{O}}_{2} }}\) and \(R_{{{\text{TiO}}_{2} }}\)) can be observed for Figs. 3 and 4.

Fig. 1
figure 1

Performance of the Rt model a experimental versus predicted slope, b tracing of experimental values by the predictions and c error analysis

Fig. 2
figure 2

Performance of the RpH model a experimental versus predicted slope, b tracing of experimental values by the predictions and c error analysis

Fig. 3
figure 3

Performance of the \(R_{{{\text{H}}_{2} {\text{O}}_{2} }}\) model a experimental versus predicted slope, b tracing of experimental values by the predictions and c error analysis

Fig. 4
figure 4

Performance of the \(R_{{{\text{TiO}}_{2} }}\) model a experimental versus predicted slope, b tracing of experimental values by the predictions and c error analysis

Effect of variables as response surface and contour plots

In order to gain insight about the influence of each variable, the two-dimensional, contour and response surface plots (3D) for the predicted response (removal %) are illustrated in Fig. 5, 6 and 7, respectively. In Fig. 5a, it is clearly demonstrated that increasing the dye concentration ranging between 50 and 150 ppm, the removal efficiency decreases. In contrast, increase in the irradiation exposure time results in enhanced dye removal (Fig. 5b). The contour and response surface plots (Fig. 5c, d) were developed as a function of irradiation time and initial dye concentration, keeping the other parameters (pH, H2O2, TiO2) constant. The results showed that the dye removal efficiency increases linearly with exposure time. Furthermore, the removal percentage can be increased even on high dye concentration. This phenomenon is attributed to enhancement in the absorption of photons which results in greater amount of scavenging (OH radicals. O2•−species) agents during the photocatalytic process. It is evident from the surface plots that the irradiation time as high equaling to 70 min and low dye concentration (50 ppm) results in maximum dye removal (~ 50%). In addition, the removal efficiency is 40% with irradiation time of 70 min and dye concentration of 150 ppm owing to fast catalyst charge carrier’s consumption. Salama et al. (2018) observed similar results, which are in accordance with the results obtained from our RSM observations. Thus, the obtained model results are highly reliable and validated from the experimental studies.

Fig. 5
figure 5

Influence of a dye concentration, b light illumination time on the dye removal rate (%), c contour plot and d response surface plot according to RSM model

Fig. 6
figure 6

Influence of various dye concentration a with different solution pH value b on the dye removal rate (%), c contour plot and d response surface plot according to RSM model

Fig. 7
figure 7

Influence of various dye concentration a with different H2O2 content b on the dye removal rate (%), c contour plot and d response surface plot according to RSM model

The effect of the variables, solution pH [ranges from 3 to 9, adjusted with HCl (0.5 M) and NaOH (0.5 M)] and dye concentration (50–150 ppm) on the dye removal (%) are illustrated in Fig. 6. As stated earlier that increasing dye concentration results in lower photocatalytic activity (Fig. 6a, such similar behavior is also predicted in Figs. 7a and 8a, respectively), whereas lower pH value results in high degradation rate (Fig. 6b). The contour plot (Fig. 6c) obviously predicts that if the dye concentration is minimum (50 ppm) and the solution pH value maintained at 3 results in the highest dye removal of ~ 90%, in contrast increase in pH value results in lower degradation rate (< 50% at pH value of 9). This observation portrays that pH of solution plays a paramount role in the dye degradation of the UV/TiO2/H2O2 photocatalytic process illustrating that acidic medium is more effective. Protonation of the azo and amino groups favored at acidic condition (lower pH value) results in the formation of the cationic form of the selected pollutant (RR-147) that is less stable and more easily oxidizable (Motoc et al. 2012). This further implies that due to electrostatic interaction between the negative photocatalyst surface and the positive dye molecules in the solution leading to the strong adsorption of the dye cations on the metal oxide surface. In addition, acidic condition results in more reactive intermediate formation (OH/O2−•) that are beneficial for the dye decomposition process. On the other hand, in highly basic medium conditions (pH of 9 and dye concentration of 50 ppm) the removal percentage decreases up to 77%, because the generation of reactive intermediates is relatively less favorable and hence less spontaneous. Moreover, Kaur and Singh (Kaur and Singh 2007) stated that the oxidation of alkalis generates di-oxygen and water rather than producing OH• radicals under UV light at basic pH conditions that result in reduction of dye decomposition. Furthermore, in surface response (Fig. 6d) analysis it is illustrated that high dye concentration (150 ppm) and basic condition result in decreased dye removal of < 50%, this happens because dye molecules are more compared to the presented active sites of the photocatalyst and lower formation of active species at higher pH value. In summary, it foresees that the RSM observation best fit the experimental data which further suggests the accuracy of the predicted RSM model.

Fig. 8
figure 8

Influence of various dye concentration a with different TiO2 content b on the dye removal rate (%), c contour plot and d response surface plot according to RSM model

Figure 7 demonstrates the influence of the H2O2 content addition (ranges from 0.3 to 0.9 ml) to the solution and the dye concentration (50–150 ppm) on the dye removal efficiency. The observation portrays that H2O2 addition and increase in its amount are regarded as a good parameter for the increase in dye removal. (Fig. 7b). The contour plot (Fig. 7c) demonstrates that low dye concentration (50 ppm) and high H2O2 content (0.9 ml) significantly improve the removal efficiency (~ 90%). This phenomenon is ascribed to the greater production of OH radicals by photolysis of H2O2 which is acting as strong electron scavenger and as an oxidant \(({\text{H}}_{2} {\text{O}}_{2} + e_{{{\text{CB}}}}^{ - } \to {\text{OH}}^{ - } + {\text{OH}}^{ \bullet } )\). The produced OH radicals are highly advantageous for the degradation process (Alahiane et al. 2014). Furthermore, in the surface response plots (Fig. 7d) at high H2O2 content (0.9 ml) and dye concentration (150 ppm) the dye removal percentage decreases up to > 75%, further at low H2O2 content (0.3 ml) and high dye concentration (150 ppm) the removal percentage is < 70% that happens due to low production of OH radicals from oxidation of H2O2, in addition, high dye content hinders its adsorption on lesser active site of the TiO2 nanoparticles.

The effect of the TiO2 content (ranges from 0.2 to 0.6 g) and dye concentration on the dye removal (%) is demonstrated in Fig. 8, keeping all other parameter as constant. Increase in TiO2 content has strong effect in enhancing the dye removal rate (Fig. 8b), this is obvious from the contour plot that > 90% removal rate is obtained at TiO2 content of 0.6 g and dye concentration of 50 ppm (Fig. 8c), this happens due to the increase in the availability of the active site offered by the TiO2 nanoparticles and easy adsorption of the lesser amount of dye molecules. In contrast in the surface response plot (Fig. 8d), decrease in TiO2 content (0.2 g) and increase dye concentration (150 ppm) result in lower decomposition rate of ~ 70%. This is obvious that large dye content in the solution obscured the photocatalyst nanoparticles, consequently, the penetration of irradiation light is hindered to reach to the nanoparticle surface to generate the charge carriers responsible for the production of the redox species (Dodoo-Arhin et al. 2018; Bharati, et al. 2017). Moreover, it can be anticipated from the predicted results that the RSM models are supported by the experimental results, implying that these RSM models can be used for the actual representation of the model pollutant dye (Active Red-147) degradation and for optimization of the process.

Optimization of dye removal

Figure 9 displays the optimized values of dye removal percentage on the basis of the extreme ranges of input variables. The optimization was exercised on the basis of trained RSM model such that input parameters were defined in between their extreme ranges and the output removal efficiency for each case was allowed to yield the maximum value. The variety of solutions was obtained, and the solution with desirability of 1 was presented as shown in Fig. 9. It can be seen that maximum efficiency of removal is obtained at high irradiation time, low pH, high H2O2 concentration and high TiO2 concentration thus validating the experimental results. The models may be considered reliable in predicting the new data for future use.

Fig. 9
figure 9

Optimization removal efficiencies obtained for a Rt; b RpH; c \(R_{{{\text{H}}_{2} {\text{O}}_{2} }}\) and d \(R_{{{\text{TiO}}_{2} }}\)

Conclusion

This study intends to investigate the reactive red (RR-147) dye removal efficiency of TiO2 and H2O2 (oxidizing agent) from industrial waste water under variable pH and exposure time of UV radiation using advanced optimization technique, i.e., response surface methodology (RSM). Herein, the RSM models were deployed to study the agreement of predicted results in comparison with the stated experimental data in the literature. The solid findings from this study were:

  • The developed empirical relationship between the final response (degradation percentage) and the independent process variables based on the experimental findings follows a second-order polynomial equation.

  • The results demonstrated that the degree of the severity of the textile dye removal from industrial waste was influenced largely by the solution pH, followed byH2O2 content, photocatalyst loading and UV exposure time and their synergic effects, respectively.

  • The statistical evaluation of the predicted results from the RSM models showed close agreement with the experimental values manifesting the minimum values of R2 significant than 0.98 and proximal values of MAE and RMSE to zero.

  • The interaction effect of the studied parameters on the removal of RR-147 dye was established by the contour diagram and response surface plots of the model-predicted responses for better understandings of the effect of the input parameter.

  • The quadratic predicted polynomials from the RSM models ensured compliance with the experimental data, this supports the effectiveness, reliability and future applications of the derived models for designing the advanced oxidation process for modeling Active Red-147 textile dye pollutant removal using the minimum numbers of experiments.

  • It is highly encouraged to use the current models for the given descriptive statistics of input variables for each case of the developed models. More studies are needed on the basis of wide range of experimental studies to obtain broad extremes of the input variables for the generalization of the problem.