Introduction

The textile industry in India is economically vital within the country and globally. This industry consists of various wet processes such as dyeing, bleaching, mercerizing, scouring, sizing, de-sizing, etc. (Aljerf 2018). Each process uses water and a variety of chemicals, such as caustic soda, natural and artificial dyes, hydrogen peroxide, sodium silicate, starch, and waxes, resulting in the generation of hazardous textile effluent (Yaseen and Scholz 2019). The quantity of effluent generated is enormous and requires complex treatment before its safe disposal in the environment (Behera et al. 2021). The wastewater is also rich in colored dyes (both natural and synthetic forms), total dissolved solids (TDS), COD, BOD, and heavy metals (Keskin et al. 2021). These pollutants are carcinogenic and pose a severe risk of biomagnification on their improper disposal (Yaseen and Scholz 2019). Besides, improper disposal of untreated effluent into a water body disrupts its ecosystem by blocking the sunlight (Saravanan et al. 2021; Varsha et al. 2022). The decontamination of effluent before its disposal into water bodies is essential to avoid adverse health impacts caused by the indirect consumption of dye water (Aljerf 2018). However, the large quantity of effluent generated from the textile industry urges the need to be reused rather than disposed of in the surface water bodies and environment (Agarwal et al. 2022; Agarwal and Singh 2022).

The researchers have proposed various treatment processes that are already in practice. These processes entail physical, chemical, and biological methods. The physical treatment processes useful for reducing the contaminants from the textile effluents are gravity settling, stabilization, ion exchange, membrane filtration, and adsorption (Behera et al. 2021; Saravanan et al. 2021). Coagulation using chemicals, electrocoagulation, and oxidation are some chemical treatment processes. The biological methods include aerobic and anerobic decomposition using an activated sludge process (ASP) and rotating biological contractors (RBC). A combination of biological and physical processes such as fixed bed bioreactor (FBBR), moving bed biofilm reactor (MBBR), membrane bioreactor (MBR), etc. are also widely used (Agarwal and Singh 2022). Although the chemical methods are efficient and capable of treating wastewater, they are cost-ineffective, and the byproduct (chemical sludge) is enormous and challenging to store. The biological treatment processes are complex to manage, cannot immediately adapt to pollutant concentration, occupy considerable space, and are costly. The physical treatment process is relatively simple and less costly (Holkar et al. 2016). Adsorption is an efficient, economic, and accessible practice for treating textile wastewater to reduce contaminants and color (Beyan et al. 2021).

Numerous bio-sorbents such as sugarcane bagasse, date palm waste, maize straw, pepper straw, cotton straw, wheat straw, rice husk, corn cobs, and banana peel have been investigated for the removal of dyes, organic matter, ions, and heavy metals (Homagai et al. 2010; Zhang et al. 2019). Cueva-Orjuela et al. (2017) mentioned that the 95% removal of basic red dye is possible using sugarcane bagasse-based activated carbon. Yadav et al. (2021) have used sugarcane bagasse for biosorption of methylene blue dye (98.39% removal) and have carried out kinetic, isotherm, and thermodynamic modeling. Nayl et al. (2017) have used the date palm seed adsorbent to remove BOD and COD from treated sewage and have achieved 92.8 and 95.4% removal efficiency, respectively. Beyan et al. (2021) have studied the adsorption of BOD (95%) and COD (92%) from the textile effluent using the activated carbon of sugarcane bagasse. Adewoye et al. (2021) studied the adsorption of total organic carbon (TOC) using functionalized multi-walled carbon nanotubes and observed a 93.6% removal efficiency. Assila et al. (2020) have used the naturally available minerals for adsorption studies for the removal of COD (88–79%) and heavy metals (Cr–39% and Cu–28%) from textile effluents. Ghosh et al. (2021) have achieved 99% removal efficiency of methylene blue using the Lathyrus sativus husk as an adsorbent. Mohammadi et al. (2021) have studied the removal of 2-naphthol and acid orange (AO7) dye from the aqueous solutions using wheat bran as an adsorbent and have achieved maximum removal efficiency of 99%. Ata et al. (2012) used wheat bran for Coomassie brilliant blue dye adsorption and observed 95.70% removal efficiency. Zhang et al. (2019) have prepared activated carbon using wheat bran for the adsorption of methylene blue, and 89% removal efficiency is observed. Many studies have been found on using bio-adsorbents for treating artificial dye water. Limited studies have focused on using WSAC for textile effluent treatment and determining the detailed effect of adsorbent on the treated textile effluent quality (Sun et al. 2021; Tee et al. 2022). Wheat straw remains after wheat cultivation and is readily available, cheap, and nonhazardous. The polymeric structure of the wheat straw has cellulose content (45%), hemicellulose (28%), and lignin (20%) (Kapoor et al. 2016). Wheat straw contains hydroxyl, carbonyl, and carboxylic groups with the potential of adsorbing dyes through ion exchange, making it an attractive, inexpensive, and effective adsorbent (Dai et al. 2018; Rangabhashiyam et al. 2013).

The research gaps ascertained based on the summary of relevant literature: (1) The studies on using wheat straw as an adsorbent are minimal; (2) Most studies have focused mainly on dye removal using artificial dye solutions. The studies using real textile effluent for experimental work are limited; (3) The impact of the addition of WSAC on the COD and color of the effluent has not been studied. No study has comprehensively examined the effect of adsorbents on industrial textile effluents.

This work emphasizes using widely available agricultural waste, i.e., wheat straw, as an adsorbent for removing hazardous contaminants from the textile industry wastewater. The experiments are performed following the scheme generated by the CCM. The process parameters are optimized to find the ideal condition for contaminants removal by varying the adsorbent dose (g/l), time of contact (min), initial pH, and temperature (\(^\circ{\rm C}\)) using the CCM. The study also compares the two prediction models, ANN and quadratic polynomial regression. However, finding the overall treated effluent quality is paramount for establishing this method as a solution for treating textile effluents. This study would help the industries reuse the treated wastewater rather than dispose of it to common effluent treatment plant (CETP).

The study consists of an introduction in the “Introduction” section, in which the literature is reviewed and the gaps are identified. This section also consists of the formulation of study objectives, followed by a research methodology in the “Methodology” section. The “Results and discussion” section has results and discussion explaining the characterization of the adsorbent, the design of the experiment for batch reactor study, mathematical modeling using the polynomial regression model and ANN, kinetic study, desorption study, and the economic feasibility of the adsorbent. Finally, the study outcomes are concluded in the “Conclusion” section.

Methodology

An extensive literature review of the existing studies helped identify the gaps and design the different parts of the current study. The textile effluent has been collected and preserved for the research, and alongside, the adsorbent is prepared. The independent and response variables are selected based on the literature review. Furthermore, the batch reactor experiments are conducted per the CCM experimental scheme. COD and color are measured for the treated effluent. The contaminant removal efficiency by the WSAC for these response variables is calculated. A statistical model is formed, and the optimum condition of the independent variable for the maximum output is determined. Another prediction model using ANN is developed for comparison with quadratic regression. In addition, other studies such as kinetic, desorption, and economic feasibility are also performed. Figure 1 represents the overall outline of the research study.

Fig. 1
figure 1

Outline of the research

Material and methods

Water source

The textile effluent sample is collected from the cotton dyeing industry in Balotra, Rajasthan, India, and is stored at 4 °C in a cleaned polypropylene bottle. The physicochemical characteristics and the key constituents of the textile effluent are shown in Table 1. The permissible limit for the inland disposal of treated effluent given by the Central Pollution Control Board (CPCB 1986) is listed in Table 1.

Table 1 Textile effluent analysis used in this study

Wheat straw activated carbon preparation

The locally available wheat straw prepares adsorbent using the physical–chemical treatment process. The wheat straw was washed from the deionized water, dried in the sun for 2 days, and then soaked in 0.5 M H2SO4 in the ratio of 1:3 (w/w) wheat straw for 24 h. The impregnated wheat straw is soaked and cleaned with distilled water to remove the leftover acid placed on the sieve for air drying. The acid treatment creates a suitable environment for ring-opening in the lignocellulosic matrix (Gao et al. 2020). The chemically treated wheat straw was soaked in 1 M NaOH for 24 h to remove the residual acid and was cleaned with deionized water, followed by air drying. The chemically active wheat straw was air-dried for 24 to 48 h and was carbonized in a muffle furnace at 450 \(^\circ{\rm C}\) for an optimal 2 h. The dried particles of the activated carbon are pulverized and sieved through a 250-µm sieve. The activated carbon of wheat straw is used for experimental purposes.

Characterization of wheat straw activated carbon

FTIR is performed to determine the functional groups on the bio-adsorbent's surface. A PerkinElmer FTIR system ranging from 400 to 4000 cm−1 in the transmittance mode is used to collect the spectra. The morphology of the bio-adsorbent is characterized by FESEM-EDX (FEI, Apreo S LoVac FESEM, Thermo Fisher Ins). The pore volume, specific surface area, and mean pore diameter are also measured using the Bruneuer–Emmett–Teller (BET) surface area analyzer (Microtrac Bel, BEL SORP mini II).

The pH for the WSAC at the point of zero charges (pHPZC) was measured by the pH drift method. A total of 50 ml of 0.01 M NaCl was added to the flasks, and the initial pH values were adjusted to 2, 3, 4, 5 …12 using 0.1 M HCl and 0.1 M NaOH solutions. The 0.2 g of WSAC is added to each flask and shaken in an orbital shaker for 24 h. The final pH of the filtered solution is measured (Tran et al. 2016).

Biosorption studies on wheat straw activated carbon

Batch experiments are performed to study the interactive effect of the factors, namely contact time, initial pH, the dose of adsorbent (WSAC), and temperature, on the COD and color removal efficiency (%) of the WSAC. The pH of the textile wastewater is adjusted using 0.1 M HCl and 0.1 M NaOH solutions. After adjusting the pH, 100 ml of textile industry wastewater was taken in a conical flask and placed in a temperature-controlled orbital shaker at 100 rpm. The samples from each experimental run are filtered and tested for COD using the closed reflux colorimetric method (Rice et al. 2012). The color was measured spectrophotometric single wavelength method given by Rice et al. (2012).

The WSAC’s adsorption capacity for different response parameters is estimated using Eq. (1):

$${q}_{t}=\frac{\left({C}_{o}-{C}_{t}\right)V}{W}$$
(1)

here, V (l) is the effluent volume, W (g) represents the adsorbent weight, and \({q}_{t}\) is the adsorption capacity for COD in mg/g and for color in PCU/g at time t. The percentage removal of the contaminants in the different experimental runs is computed using Eq. (2):

$$\%\;\mathrm r\mathrm e\mathrm m\mathrm o\mathrm v\mathrm a\mathrm l\;\mathrm e\mathrm f\mathrm f\mathrm i\mathrm c\mathrm i\mathrm e\mathrm n\mathrm c\mathrm y=\frac{C_o-C_t}{C_o}\times100$$
(2)

where \({C}_{o}\) and \({C}_{t}\) represent the concentration of the COD in mg/l and color in PCU before and after adsorption in the effluent, respectively.

Adsorption reversibility study

The adsorption reversibility study was performed using desorbing agents such as methanol, deionized water (pH = 2), 0.1 M NaCl, and 0.1 M HCl. The mass 0.05 g (m2) of contaminant-loaded adsorbent is added to 0.025 l (V2) of the desorbing agent. The experiments are performed at the equilibrium condition. A mass equilibrium equation (Eq. (3)) is used to find the mass of contaminants remaining on the adsorbent surface after desorption \({q}_{o}\) (mg/g) mass, while Eq. (4) is used to find the percentage of desorption (Leyva-Ramos et al. 2011; Tran et al. 2017a).

$${q}_{o}= {q}_{e}-{q}_{d}={q}_{e}-\frac{{C}_{2}}{{m}_{2}}{V}_{2}$$
(3)
$$\%\;\mathrm{Desorption}=\frac{q_e-q_o}{q_o}$$
(4)

where \({C}_{2}\) are the concentration of COD in mg/l and color in PCU in the desorbing agent; \({q}_{e}\) is the COD in mg/g and color in PCU/g adsorbed at the equilibrium condition; and in case of the adsorption is reversible, the \({q}_{d}\) represents the desorbed mass of COD in mg/g and color PCU/g.

Experimental design

RSA is a statistical method for analyzing the combined effect of input variables (process parameters) on responses. The trial version of Design expert 13 is used to design the batch experiments following the CCM of RSA. The CCM helps reduce the number of experimental runs required and optimize the process parameters based on the target set (K et al. 2021). The full factorial CCM generates the experiment scheme required to form the quadratic model. The CCM identifies the combined effect of the 5-level, 4 factors on the performance of the biochar in removing the color and COD from textile effluent.

The independent variables considered the performance indicators of WSAC in treating textile effluent are the time of contact (A), adsorbent dose (B), initial pH (C), and temperature (D). Each independent variable is coded with the five levels: − α, − 0.5, 0, + 0.5, + α, where α = 1. The coded level for independent factors in the design of the experiment is presented in Table 2. The number of experimental runs for the CCM of RSA is calculated using Eq. (5):

$$S= 2s+{2}^{s}+{s}_{c}$$
(5)

where S is the number of experiments, s represents the number of numeric factors, and sc is the replicates of the center point. A total of thirty experiments are considered under Eq. (5). These consist of sixteen cubical points and eight axial points, followed by the six replicas of center points to estimate the pure error. The experimental design by the CCM is given in Supplementary Table A1. All the experiments are duplicates, and the mean value of the responses (percent removal of COD and color) is reported.

Table 2 Coded levels for the four independent variables

A mathematical model is created to develop the relationship between the response and process parameters using the observation from each experimental run (Beyan et al. 2021). This empirical model follows the second-order polynomial equation as given in Eq. (6). It also optimizes the process parameters (Singh Solanki et al. 2019). The quadratic polynomial equation is:

$${Y}_{i} = \sum_{j=1}^{k-1}\sum_{l=j+1}^{k}{\alpha }_{jl}{X}_{j}{X}_{l} +\sum_{j=1}^{k}{\alpha }_{jj}{X}_{j}^{2} + \sum_{j=1}^{k}{\alpha }_{j}{X}_{j}+ {\alpha }_{0}$$
(6)

Yi is the response variable (COD and color (%) removal efficiency) and i ranges from 1 to 9; Xj and Xl are the values of the chosen independent variables (j and l ranging from 1 to k), where k is the number of process parameters considered in the study (k = 4); \({\alpha }_{0}\) is the intercept while \({\alpha }_{j}\), \({\alpha }_{jj}\), and \({\alpha }_{jl}\) are the linear, quadratic, and interaction coefficients of the respective terms.

ANOVA and determination coefficient (R2) are used to evaluate the mathematical model created using the quadratic regression statistically. Better the value of the coefficient of determination \({R}^{2},\) better is the fit of the polynomial equation to experimental data (Biswas et al. 2017). The quadratic model is validated using the ANOVA at a 95% confidence level. The performance of the adsorbent is optimized by setting the goal of each response variable to maximize, and process parameters are set to be in the range considered in this study. In the case of multiple optimum conditions, the desirability value forms the basis of its selection, while in the case of a single optimum condition, the desirability value does not play a significant role in its selection. The validation experiment for the optimized condition is also performed.

Artificial neural network (ANN) prediction modeling

ANN are computerized models based on the functioning of the human brain and nervous system. The neural network consists of inputs, targets (experimental data), and outputs (the predicted values after training the network). In the present study, the neural network is developed using the nnstart tool of MATLAB 2019a software. Three-layered feed-forward network types with backpropagation error consisting of the input, hidden, and output layers are trained using the Levenberg–Marquardt training function (Wali and Tyagi 2020). The nonlinear activation function tansig maps the input layer to the hidden layer and the output layer. In the network, the number of neurons in the input layer depends on the number of process parameters, and the number of neurons in the output layers depends on the number of response parameters. The input datasets consist of four process parameters (adsorbent dose, contact time, pH, and temperature) that are normalized on a scale of 0 to 1. The output data consists of the experimental results for the COD and color removal efficiency by the WSAC. The neural network randomly divides the dataset of 30 samples into 70% for training, 15% for validation, and 15% for testing. The number of neurons is changed to find the optimal number of hidden layer neurons, and the network is trained again and again until the best R-value and the minimum mean square error (MSE) are obtained. The output values, weights of the trained network, and the regression plot data are stored in the excel file for the best-trained network for different hidden layer neurons.

Kinetic modeling

The kinetic study is essential for determining the pollutant uptake rate by the adsorbent and understanding the controlling mechanism (Aljerf 2018). The adsorption rate is essential for scaling up the adsorption process from the lab scale to the pilot and industrial levels (Lima et al. 2021). The batch adsorption experiments are performed for the kinetic study by varying the adsorbent dose, contact time, and pH (Aljerf 2018). The temperature is kept at the optimum condition obtained from the RSA analysis. The experimental data is used to study the nonlinear pseudo-first-order (PFO) by Lagergren (1898), PSO kinetic by Blanchard et al. (1984), and intraparticle diffusion models by Weber Jr. and Morris (1963). The equations for the nonlinear PFO, PSO, and intraparticle diffusion models are represented in Eqs. (7)–(9).

$${q}_{t}={q}_{e}\left(1-{e}^{-t{k}_{1}}\right)$$
(7)
$${q}_{t}= \frac{{q}_{e}^{2}{k}_{2}t}{1+{k}_{2}{q}_{e}t}$$
(8)
$${q}_{t}= {k}_{i}({t)}^{0.5}+C$$
(9)

where \({q}_{e}\) and \({q}_{t}\) are the COD (mg/g) and color (PCU/g) adsorbed at equilibrium and at any time t (min); \({k}_{1}\) (min−1) is the rate constant for the PFO model; \({k}_{2}\) (g/mg \(\times\) min for COD, g/PCU \(\times\) min for color) is the equilibrium rate constant for the PSO model; C (mg/g for COD and PCU/g for color) is the intercept describing the boundary layer thickness, \({k}_{i}\) (mg/g \(\times {\mathrm{min}}^{1/2}\) for COD, PCU/g \(\times {\mathrm{min}}^{1/2}\) for color) is the rate constant for the intra-particle diffusion model.

Results and discussion

Wheat straw activated carbon characteristics

FTIR, XRD, and specific surface area analysis

The FTIR fingerprint of the WSAC before and after the contaminant adsorption is shown in Fig. 2(a). The spectra of WSAC show the presence of hydroxyl (–OH) carbonyl (–C = O) functional groups on its surface. The band at 3453 cm−1 is observed due to hydroxyl group stretching, and the weak peak between 2000 and 1650 cm−1 is associated with the C–H bending of aromatic compounds (Yadav et al. 2021). The peak between 3000 and 2840 cm−1 represents the symmetric C–H stretching vibrations representing the methyl (–CH3) and methylene (–CH2–) groups (Tran et al. 2017a). The prominent peaks at 1443 cm−1 show the presence of the carboxylic group (–COOH) on the adsorbent surface (Ghosh et al. 2021). The strong and sharp peaks between 1124 and 1087 cm−1 are the infrared adsorption band for C–O stretching vibrations for the secondary alcohol, and the peaks at 876, 879, 619, and 631 cm−1 are attributed to the bending modes of aromatic compounds (Bansal et al. 2009).

Fig. 2
figure 2

a FTIR spectrum of WSAC before adsorption and after adsorption; b adsorption–desorption isotherm of N2; c pore size distribution of WSAC

The adsorption isotherm of N2 for the WSAC, represented in Fig. 2(b), is a type 1 of the IUPAC classification system. Type 1 isotherms are the typical characteristic of microporous solids with relatively small external surfaces, mainly activated carbons (Sing 1985; Thommes et al. 2015). Furthermore, the formation of wide knee hysteria occurs in the adsorption/ desorption isotherms, as given in Fig. 2(b), which is the H-4 type of hysteria loop according to the IUPAC nomenclature. This type of loop is associated with capillary condensation in the mesopores indicating the presence of micropores and mesopores in the adsorbent structure (Zazycki et al. 2018). The pore size distribution data shown in Fig. 2(c) shows the presence of mesopores and micropores with a diameter greater than 2 nm. The specific surface area (SBET) of the WSAC is 79.285 m2/g. The mean pore diameter is 2.6025 nm, and the total pore volume is 0.051584 cm3/g.

Surface morphology

A FESEM-EDX analyzer is used to study the surface morphology and the elemental composition of the adsorbent. The SEM images of the unused and the used WSAC reveal significant changes in the surface of the WSAC. The micrograph of unused WSAC indicates the highly porous materials’ mesopores on its surface, as shown in Fig. 3(a). The alkali treatment has aided in developing mesopore (Keey et al. 2018). These pores are the numerous sites for adsorption and assist in removing the impurities from the effluent. The micrograph of textile effluent adsorbed WSAC indicates that the dye molecules and the metal ions are adsorbed on the pores developed on the surface. The morphology images, EDX spectra, and the elemental composition of the WSAC and the contaminants loaded WSAC are presented in Fig. 3(a, b) and (c, d), respectively.

Fig. 3
figure 3

FESEM images and EDX spectra of the a, b unused WSAC and c, d textile effluent contaminants loaded WSAC

Effect of dilution factor, pH, and pHPZC

pHPZC is the pH at which the surface charge at the adsorbent is zero (Aljerf 2018). The initial and final pH is plotted in Fig. 4(a), and the point at which initial pH equals final pH is noted as pHPZC. The determination of pHPZC is essential as the adsorbent surface becomes negatively charged when pHsolution > pHZPC and the deprotonation of surface groups containing the oxygen such as –COOH and –OH occurs, increasing the possibility of adsorption of cationic ions from the solutions (Aljerf 2018). The pHZPC value of the wheat straw bio adsorbent is 5.8.

Fig. 4
figure 4

a The point of zero charge value of the biosorbents, b effect of dilution factor on COD and color adsorption, c effect of pH on the COD and color adsorption, and d change in pH values after adsorption (Cf = final concentration after adsorption)

The effect of dilution on the adsorption of COD and color is presented in Fig. 4(b). The effluent is diluted to 1%, 2%, 5%, 10%, 15%, and 20%. Maximum adsorption is observed at the dilution factor of 10%. The effect of pH on the adsorption of COD and color is illustrated in Fig. 4(c). The adsorption of COD and color takes place even at pHsolution < pHZPC. The adsorption of COD and color is observed even at a lower pH of 2 to 5. Although at this pH range, the intense competition between the COD, color molecules, and the H+ ions occurs for adsorption at the active sites. However, the adsorption of COD and color at the lower pH indicates the presence of hydrogen bonding and n-π interaction rather than electrostatic attraction (Tran et al. 2017a, b, c, d). The maximum adsorption is observed in pH 6 to 8 when pHsolution > pHZPC. Similar results are also found in the past literature (Tran et al. 2017a, b, c, d).

Experimental program

The batch experiments are performed for studying the effect of contact time and the adsorbent dose on the adsorption of COD and color by WSAC. The experiment conditions are a pH of 7, considering the effect of pH on adsorption in Fig. 4. (c) and temperature = 40 °C, while the adsorbent doses and contact time are varied and are illustrated in Fig. 5. From Fig. 5(a), the minimum COD concentration in the effluent after adsorption is observed at the adsorbent dose of 2 g/l and in the contact time of 60–80 min. Similarly, the maximum decolorization is observed for the adsorbent dose of between 2 and 2.5 g/l for the contact time of 60–100 min, as shown in Fig. 5(b). The initial removal rate is much high for all the adsorbent dose for the COD and color for the first 20 min, and more than 70% of adsorption takes place during this duration. Because of the rapid rate of adsorption during the initial 10 min, as seen in Fig. 5, it is evident that the biosorbents have a high affinity for COD and positively charged dye molecules. This assures efficiency and economy, and the kinetics plays a vital role in enabling scaling up to small reactor capacities.

Fig. 5
figure 5

Batch experiments results of the final concentration of COD and color using different doses of WSAC adsorbent

Experimental program and modeling of response variables by RSA

The experiments were conducted following the design matrix obtained from the CCM of the RSA. A total of 30 experimental runs are performed in doublets, confirming the design matrix for a different range of input factors, i.e., A: contact time, B: adsorbent dose, C: initial pH, and D: temperature. The design matrix for the input factors is given in Supplementary Table A1. The COD and color are measured for each experimental run in doublets. The percentage removal of COD and color by the WSAC for the considered experimental runs is calculated using Eq. (4). The results from the 30 experimental runs, along with the predicted values using the RSM and ANN are presented in Table 3. The experimentally observed maximum COD and color removal efficiency of WSAC is 91.59 and 95.4% at pH of 7, contact time of 80 min, adsorbent dose of 2 g/l, and temperature of 40 °C. The minimum COD and color values after adsorption at the pH of 7 can also be observed in Fig. 4(c). However, a statistical analysis of the experimental data is required to determine the optimum conditions for COD and color adsorption.

Table 3 Experimental results and the predicted values using the RSA and ANN

The quadratic polynomial regression model helps develops the mathematical correlation between the response parameters and the process parameters by using Eq. (6). The quadratic polynomial regression models for the two response parameters (\({Y}_{i}\) which represent the response, COD, and color) with input parameters in coded units (A, B, C, and D represent the contact time, WSAC dose, initial pH, and temperature) are presented in Eqs. (8) and (9).

$$\mathrm{COD }({Y}_{1}){ Y}_{1}= 90.24+0.3233A-0.4867B+1.96C-1.35D+0.145\mathrm{AB}-8.63\mathrm{AC}+9.67\mathrm{AD}+2.77\mathrm{BC}-3.29\mathrm{BD}+8.92\mathrm{CD}- 4.09{A}^{2}-1.46{B}^{2}-2.03{C}^{2}-11.83{D}^{2}$$
(10)
$$\mathrm{Color }\left({Y}_{2}\right) {Y}_{2}= 93.9+1.37A+0.9258B+0.5175C-0.3792D- 0.3875\mathrm{AB}-3.78\mathrm{AC}+6.78\mathrm{ AD}+2.06\mathrm{ BC}+0.0725\mathrm{BD}+9.59\mathrm{ CD}-4.1{A}^{2}-6.17{B}^{2}-11.47{C}^{2}-0.8054{D}^{2}$$
(11)

The statistical significance of the regression model is established using the ANOVA test, and the results are given in Table 4. The p-value < 0.05 for the two regression model indicates that the models is significant. The R2 is closer to unity, indicating that the developed regression model can effectively define the experimental data of the adsorption process (Aljerf 2018). The scatter plots of actual and predicted values by the regression models for the two response parameters are presented in Fig. 6. The R2 value for the COD and color removal efficiencies are 0.9387 and 0.945, respectively. The Fisher’s test value (F-value) is the ratio of the mean square of the regression model to the mean square of error. The higher F-value of the model signifies a lower mean square error proving the significance of the model. Insignificant lack of fit and the occurrence of a large F-value of 1.36 and 0.64 for the COD and color regression models indicates that there is a 38.71 and 74.11% possibility of the presence of noise.

Table 4 ANOVA results for the different physicochemical parameters
Fig. 6
figure 6

Scatter plots of the predicted and experimental data for the a COD removal and b color removal percentage using WSAC

Development of ANN model

The ANN model is developed consisting of four input layer neurons (contact time, adsorbent dose, initial pH, and temperature) and the two output layer neurons (COD and color removal efficiencies), as presented in Fig. 7. The experimental data is used to train the network and to find the predicted values of the response parameters. The predicted values of the COD and color removal efficiencies from this ANN network are presented in Table 3. The coefficient of correlation (R) and root mean square error (RMSE) for the different numbers of hidden layer neurons is given in Table 5. It can be observed from Table 5 that the ten number of neurons in the hidden layer has an R of 0.985 and RMSE for COD is 1.89 while for color is 1.873 and is selected as the most optimal number of neurons. The number of epochs demonstrates how the training, validation, and error have changed in the ANN model over the period (Nayak et al. 2004). The network training terminates when the test error is minimum, and the MSE remains constant for at least nine iterations. The ANN training and performance validation plots at each epoch are shown in Fig. 8. and the regression plot for the training, validation, test, and overall data sets with the R-values 0.985, 0.904, 0.766, and 0.912, respectively, are demonstrated in Fig. 9. The R ≈ 1 values show better correlation between the experimental data and predicted values.

Fig. 7
figure 7

Architecture of the ANN model

Table 5 The R and RMSE values for the different hidden layer neurons
Fig. 8
figure 8

ANN plots a training and b performance

Fig. 9
figure 9

Training, validation, test, and overall regression plots for the ANN model

Comparison of developed RSA, ANN, model

The performance of the developed RSA and ANN models is evaluated using the R, R2, MSE, and RMSE statistical measures. The predicted values from both the models are compared, and the scatter plots are plotted as shown in Fig. 6. The R, R2, MSE, and RMSE values for the RSA and ANN model for COD and color removal efficiency of WSAC are represented in Table 6. From Table 6, the R and R2 values for both RSA models are close to the unit, indicating a better correlation between the experimental results and the predicted values than in the ANN model. The MSE and RMSE values of color and COD removal efficiency of the RSA model are smaller than the ANN model values, indicating that the RSA model is a better fit in comparison to the ANN model.

Table 6 Performance evaluation of RSA and ANN model

RSA optimization and validation

The aim of optimizing the input variables is to statistically maximize the contaminant removal efficiency of WSAC. The optimum values for the process parameters and the response variables determined by the RSA optimization are given in Tables 7 and 8. The batch experiments are performed at the optimum condition to validate the predicted and observed values of COD and color. The results show low percentage variation of 0.78 and 0.44 from the RSA and 0.92 and 0.62 from the ANN model resulting in RSA as the reliable prediction and model validation.

Table 7 Optimum values of input variables
Table 8 Validation of RSA and ANN predicted and observed values

Effect of process parameters on the percentage removal of COD and color

The response surface (RS-3D) plots for the developed regression models help study the interactive effect of the variables (pH, adsorbent dose, contact time, and temperature) on the response parameters, i.e., the COD and color adsorption by WSAC. In the RS plots, the two parameters are kept constant as the null point, while the other two parameters are varied within the experimental range defined in the study. Each 3D interaction plot represents an endless number of suitable combinations of the variables (Oberholzer et al. 1997). The 2D circular contour plots of the response surface represent negligible interaction within the concerned variable (Zhao et al. 2011). At the same time, the elliptical and saddle points show that the interaction between the variables is significant. Figures 10(af) and 11(af) show the response surface plots for the COD and color adsorption, respectively.

Fig. 10
figure 10

The RS interactive plots for COD removal % by WSAC

Effect of adsorbent dose and contact time

Figures 10(a) and 11(a) show the interaction plot and contour plot for the simultaneous impact of contact time and adsorbent dose on the percentage of COD and color removal, and the initial pH and temperature are kept as the null point. As can be seen from Fig. 10 (a), the maximum COD % removal efficiency (91.59%) occurred at the contact time of 80 min for the adsorbent dose of between 1.5 and 2.5 g/l. Similarly, from Fig. 11(a), the highest decolorization (95.4%) occurs for the contact time of 60–100 min and adsorbent dose of between 1.5 and 2.5 g/l. The circular contour plots show the low interaction between these adsorbent variables. However, there are insufficient sites for adsorption at a lower dose than 1.5 g/l. At a higher dose, the agglomeration of adsorbent occurs and is, therefore, unsuitable for decolorization using WSAC (Fito et al. 2020).

Fig. 11
figure 11

The RS interactive plots for the color removal efficiency of WSAC

Effect of initial pH and contact time

Figures 10(b) and 11(b) show the removal efficiency of COD and decolorization as the function of initial pH and contact time for the fixed adsorbent dose of 2 g/l and temperature of 40 °C, respectively. The maximum COD removal occurs when the pH is about 7 and the contact time is 80 min, as depicted in Fig. 10(b). The maximum decolorization efficiency is observed at a pH of 7, irrespective of the contact time, as shown in Fig. 11(b). This behavior of reduction in adsorption of COD and color with a change in pH is attributed to the two properties, the pH of the solution and the pHZPC of the adsorbent. The pHPZC of the WSAC is 5.8, as shown in Fig. 4(a). The low adsorption of color and COD in the acidic range is due to the competition of pollutant ions and H+ for the adsorption sites. The adsorption of cations is preferred at pH > pHPZC. At the pH > pHPZC, the adsorbent sites are negatively charged and favors the adsorption of positively charged cationic impurities due to electrostatic attraction. However, with a further increase in the pH, precipitation in the form of metal hydroxide may occur, reducing the COD removal and decolorization efficiency of the adsorbent (Assila et al. 2020; Nayl et al. 2017).

Effect of contact time and temperature

Figures 10(c) and 11(c) display the response surface and contour plots for COD removal and decolorization efficiencies as the function of contact time and temperature at the pH of 7 and adsorbent dose of 2 g/l. The maximum adsorption efficiency for COD (91.59%) can be observed at the temperature of 40 °C and at a contact time of about 60–100 min, as illustrated in Fig. 10(c). The adsorption of COD decreases at a higher temperature, adsorbent’s pore size increase, leading to weak bond breaking on the adsorbent surface. Figure 11(c) shows that a temperature higher than 40 °C and contact time of less than 80 min, as well as a temperature of 30 °C and contact time of 100–120 min, is not suitable for the decolorization. The possible reason could be the breaking of weak bonds at low temperatures and higher contact time. At high temperatures and low contact time, the increased pore size of the adsorbent reduces the adsorption.

Effect of initial pH and adsorbent dose

Figures 10(d) and 11(d) represent the 2D and 3D plots for the COD removal and decolorization efficiency, respectively, for the varying adsorbent dose and initial pH, while temperature and contact are maintained at zero level. Figure 10(d) illustrates that the higher adsorption is achieved in the range of initial pH (7–9) and adsorbent dose of (1.5–3 g/l). The adsorbent dose of 1 g/l is not suitable as fewer vacant sites are available for the adsorption, leading to incomplete adsorption. Figure 11(d) represents a pH of 6 to 8, and an adsorbent dose of about 1.5–2.5 g/l is suitable for decolorizing effluent.

Effect of adsorbent dose and temperature

The effect of varying adsorbent dose and temperature at the constant contact time of 80 min and initial pH of 7 is shown in Figs. 10(e) and 11(e) at the COD removal and decolorization efficiency, respectively. It can be observed from Fig. 10(e) that the maximum adsorption is observed at the temperature of 40 °C and for the adsorbent dose of about 1.5–2.5 g/l. The higher temperature than 45 °C and the lower temperature than 35 °C irrespective of the absorbent dose are not suitable for adsorption of COD. While from Fig. 11(e) the adsorbent dose of 2 g/l is suitable for adsorption of color irrespective of temperature. However, the maximum decolorization efficiency can be observed at the temperature of about 40 °C and the adsorbent dose of 2 g/l.

Effect of initial pH and temperature

Figures 10(f) and 11(f) illustrate the effect of varying temperature and initial pH for the constant adsorbent dose of 2 g/l and contact time of 80 min on the COD and color removal efficiency of WSAC, respectively. From Fig. 10(f), the maximum COD removal can be observed for a pH of about 7–9 for a temperature of about 40–45 °C. The adsorption is effective in the basic range of effluent pH. From Fig. 11(f), the maximum decolorization can be observed at the pH of 5–7.5, irrespective of the temperature.

Adsorption reversibility

The desorption of contaminants is studied to gain insight into the possible adsorption mechanism for this study. The reversibility of adsorption was examined with desorbing agents such as 0.1 M HCl, 0.1 M NaCl, deionized water (pH = 2), and methanol. The desorption of contaminants occurs while using the deionized water (pH = 2), indicating the electrostatic attraction between the negatively charged groups present on the adsorbent surface and the cationic contaminants has contributed to the adsorption mechanism. However, the desorption by the 0.1 M NaCl and 0.1 M HCl indicates that the ion and cation exchange could be the possible adsorption mechanism. In addition, the desorption by the methanol corresponds to the n-π interaction or hydrogen bonding responsible for adsorption (Tran et al. 2017a). The desorption experiments are carried out for both the COD and color. Figure 12 (a) shows a mass of COD and color desorbed, and Fig. 12 (b) represents the percentage of desorption. The desorption experiments indicate weak electrostatic attraction and contribute about 71.25 mg/g and 26.33 PCU/g of desorption of COD and color, which represent 19.65 and 8.629% of desorption of COD and color, respectively, from the WSAC, as shown in Fig. 12 (a, b). The 40 mg/g and 16.33 PCU/g desorption of COD and color by NaCl, respectively, represent that the cation exchange has a minimal contribution of 10.186 and 5.182% in desorption of COD and color, respectively. The higher desorption of 146.25 mg/g and 122.168 PCU/g by the methanol, which corresponds to 50.759 and 58.386% for COD and color, respectively, shows the presence of hydrogen bonding or n-π bond and are significantly responsible for adsorption.

Fig. 12
figure 12

a mass of color and COD desorbed b percentage of COD and color desorbed

Probable adsorption mechanisms

In general, electrostatic attraction, hydrogen bond formation, n-π interaction, pore filling, and π-π interaction are the potential probable processes of positively charged dye adsorption onto carbonaceous materials (Tran et al. 2017a, 2017b). The electrostatic attraction and the cation exchange have contributed less than 30% to the adsorption of COD and color on WSAC, as seen in Fig. 12.

The negatively charged locations on the surface of WSAC and the cationic contaminants in the solution may exhibit weak electrostatic interactions with one another. After adsorption, the pH of the solution reduces because the oxygen-containing functional groups on the surface of the adsorbent (such as carboxylic and phenolic groups) get ionized when solution pH > pHPZC and the same can be observed from the Fig. 4 (d). The surface charge of the adsorbents can also be explained by the pKa values of the carboxylic group (–COOH = 2.0–4.0) and the hydroxyl group (–OH = 8–9). When the pH of the solution is higher than the pKa values, these functional groups dissociate and become negatively charged. It has been observed from the experiment and Fig. 4 (d) that the removal of COD and color maximum occurs at a pH of 7. At the pH of 7, the carboxyl acid dissociates into carboxylate (–COO) and accounts for the adsorption of COD and color onto the bio-adsorbent surface.

The hydrogen bonding generally occurs between the hydroxyl group of the adsorbent surface and the possible aromatic rings of the dye present in the textile effluent (known as Yoshida hydrogen bonding) and due to dipole–dipole hydrogen bonding between the adsorbent surface hydrogen ion from the hydroxyl group and the nitrogen and oxygen present in the dye. The FT-IR results in Fig. 2 (a) the peak of the OH group at 3453 cm−1 has reduced significantly and changed to broad peaks from sharp peaks. This confirms the presence of dipole–dipole and Yoshida hydrogen bonding interactions in the adsorption mechanism (Blackburn 2004).

In the case of n-π interactions, the oxygens from the carbonyl groups on the surface of the adsorbent act as electron donors, while the cationic dyes act as electron acceptors. The FTIR results have demonstrated the reduction in intensity, shifting, and broadening of the sharp peak of C–O and C = O after the adsorption of dye molecules and contaminants. The results have been consistent with the previously reported literature (Tran et al. 2017a; Tran et al. 2017a, b, c, d).

The contribution of different adsorption mechanisms for the WSAC for COD and color desorption could be summarized as follows: hydrogen bonding and n-π interaction for COD and color desorption by methanol (50.759 and 58.386%) and electrostatic attraction together with cation exchange in the desorption experiments carried using the NaCl and HCl correspond to 29.3 and 13.811% for COD and color desorption.

Kinetics study

The COD and color adsorption rate are assessed using the nonlinear PFO, PSO, and intraparticle diffusion model (Sharma et al. 2019; Tran et al. 2017a, b, c, d). The kinetic studies are conducted at the maximum adsorption conditions (temperature = 40 °C, pH = 7, adsorbent dose = 2 g/l) and by varying the contact time (10, 20, 40, 60, 80, 100, 120, 140, … 200 min). The specific batch experiment is performed for the kinetic study for COD and color adsorption. These models are shown in Fig. 13 and Table 9 for the COD and color adsorption, respectively. The adsorption rate for COD and color is high for the first 20 min, which later decreases and starts attaining a plateau after 60 min. The higher initial adsorption rate shows the higher affinity of bio-sorbent for the adsorption of cationic dyes (Peng et al. 2021; Rostamian et al. 2022). Table 9 lists the kinetic model parameters for both COD and color adsorption. According to the coefficients of determination for the PFO model (R2 = 0.982, 0.993), the PSO model (R2 = 0.992, 0.995), and the intraparticle diffusion model (R2 = 0.71, 0.73). The better fit of the experimental data for the PSO kinetic model suggests the possibility of chemical adsorption. It indicates that the adsorption rate depends on the availability of adsorption sites rather than on the concentration of pollutants. It can be observed that during the initial 20 min, 74% of the COD and 72% of color removal took place, while with time, sites get gradually occupied with the pollutants, and the adsorption rate decreases. The maximum adsorption capacities for the COD and color at the equilibrium condition observed from the PSO and presented in Table 9 are 439.9 mg/g and 337.9 PCU/g, respectively, less than 887.3 mg/g observed for methylene blue adsorption in Zhang et al. (2019).

Fig. 13
figure 13

Kinetic study models for a COD adsorption and b color adsorption by WSAC

Table 9 Kinetic parameters for the nonlinear methods

Economic study

The percentage yield of the WSB is 10.763%. The WSB is prepared using the tube furnace, and the maximum amount produced is 0.064 \(\pm\) 0.01 kg from 0.6 kg of wheat straw. At one time, a kg of wheat straw is chemically treated while 1.2 kg is carbonated using two vessels in the tube furnace. The production cost, including the raw material (wheat straw), the chemical used, distilled water, and electricity, has been computed. The detailed cost for each component is given in Supplementary Table A2. Commercially available carbon costs $12–15/kg, while the overall cost of developing WSB is $10.71/kg, which is 16.66% cost-efficient. Also, Zhang et al. (2019) have shown that wheat straw-activated carbon is cheaper than commercially available carbon.

Conclusion

The present study shows the use of agricultural waste product wheat straw as a low-cost, efficient, environment-friendly adsorbent for the removal of pollutants from the textile industrial effluent. The amount of pollutants uptake on the treated wheat straw activated carbon increases with increasing process parameters and became stationary. However, the rapid adsorption of COD and color within 10 min of the addition of WSAC. In the first 10 min of the addition of WSAC, more than 70% of adsorption takes place. The main advantage of the study is the practical solution for treating wastewater at a meager cost without generating harmful sludge.

WSAC is characterized using FTIR, pHPZC, FESEM-EDX, BET, and XRD, which describe the adsorbent properties. The morphology of the WSAC shows the development of a highly porous structure consisting of mesopores. Polynomial quadratic regression and ANN is used to model the experimental data. Both models are compared using statistical measures such as R, R2, MSE, and RMSE. Furthermore, the COD and color removal efficiency at the optimum conditions (contact time = 85.229 min, WSAC dose = 2.045 g/l, initial pH = 7.181, and temperature = 40.885 \(^\circ{\rm C}\)) were 90.92 and 94.48%, respectively.

The nonlinear PSO model suited the experimental adsorption data better than the nonlinear intraparticle diffusion and PFO models. This signifies that the adsorption does not depend on the concentration but on the availability of vacant adsorbent sites. The results of the desorption study indicate that hydrogen bonding and n-π interaction are the predominate adsorption mechanism rather than electrostatic attraction. The economic study also shows the cost-effectiveness of the proposed approach. Hence, using WSAC could be one economic and environment-friendly solution for treating textile industry wastewater.