Introduction

Water scarcity has become one of the most severe issues in the twenty-first century because of the industrialization and urbanization. Different wastewater treatments have been developed to meet the need for freshwater. Membrane bioreactors (MBRs) have been gradually integrating their status in wastewater treatment during the previous few decades. The MBR system has some advantages like high permeate quality, less space requirement, less sludge production, high organic removal, etc. The disadvantages are the slower growth rate of microorganisms, require pretreatment, fouling tendency, and capital cost (Cartagena et al. 2013; Cantinho et al. 2016; Sonawane and Murthy 2020). MBR treatment can be used to treat a variety of wastewaters, including domestic, chemical industry wastewater, food industry wastewater, and pharmaceutical industry wastewater (Moya-Llamas et al. 2018; Battistelli et al. 2019; Sonawane and Murthy 2022), etc. Human excrement and greywater constitute the majority of the wastewater discharged after domestic use. Physical, chemical, and biological pollutants can all be found in wastewater. The chemicals in wastewater are determined by the source. If nutrients such as nitrogen and phosphorus are released into natural sources, algal growth will occur in lakes and streams, and eutrophication will occur (Predolin et al. 2021). In the MBR process, pre-treatment is required because wastewater contains a variety of organic, inorganic, and coarser compounds that must be removed. MBR is a secondary wastewater treatment system designed to treat wastewater ranging in strength from high to low. Because aeration rate is one of the most important parameters in the design of an MBR, transmembrane pressure (TMP) contributes for nearly 50% to 80% of energy requirements (Gao et al. 2021).

The three factors that have a significant impact on effluent quality are aeration flow rate, TMP, and biomass temperature. A standard aeration rate provides cross-flow aeration in aerobic MBR. The aeration flow rate maintains the appropriate oxygen level by suspending the wastewater, enabling effective scouring of the membrane surface and control of membrane fouling. Since the permeate obtained through the membrane is related to the standard aeration flow rate, it is one of the most important factors to be considered in the membrane bioreactor system (Fu et al. 2012). Additionally, the aeration flow rate not only maintains the wastewater suspended but also reduces the size of the particles and increases dispersion due to shear force (Faria et al. 2020).

Meanwhile, the aeration flow rate has a significant effect on the permeate quality and other membrane module characteristics. When the aeration flow rate is reduced, the quality of the product stream decreases, which has a significant effect on membrane permeability. However, the membrane system's overall efficiency decreases. As a result, an appropriate airflow rate could be capable of maintaining effluent quality. A maximum cross-flow of air is developed when the aeration system is installed beneath the flat sheets of the membrane module, resulting in less damage to the membrane (Rout et al. 2018). Although the fact that this method is very simple and only requires a three-level factorial design (Altunay 2021).

The response surface methodology (RSM) is used to optimize multiple process parameters and improves the system's efficiency. This RSM methodology includes the statistical technique and mathematical group, which includes, for example, appropriate selection of variables with a good impact on the experiments, selection of the design for carrying out experiments, evaluation of the model, and selecting the peak values for the variables under experimentation to obtain the best system performance. Designs for quadratic response surfaces may be found in the central composite design (CCD), the Box-Behnken design (BBD), and the three-level full factorial design (Bezerra et al. 2008).The relationships between variables are investigated using a combined systems response surface plot in an actual numerical method. It also discovers the interactions between factors and individual variables, as well as increasing yields in a range of variables and increasing yields based on BBD (Kohli et al. 2019). The response surface method is particularly beneficial, since it requires less preliminary examinations to assess several factors and their relationships (Rais et al. 2021). RSM is effectively used to optimize effective factors in wastewater treatment (Khani et al. 2019).

In the present work, an MBR wastewater treatment technique is used for the effective removal of pollutants such as COD, BOD, TKN, and TP. In addition, the influence of specific process parameters on the efficiency of pollutant removal is examined. As per the knowledge of authors, only a few research studies have been done to optimize the Box-Behnken design method and RSM for effective pollutants removal. Objectives of the present study are as follows: (1) Experimental investigation of the removal of pollutants using MBR technique; (2) Selection of process parameters such as temperature, TMP, and aeration rate; (3) Studying the effect of process parameters on pollutant removal efficiency; (4) Application of BBD design for optimization using response surface methodology; (5) Model fit and statistical investigation, and (6) Studying the removal efficiency of pollutants using 3D response surface and contour plot. Also, qualitative analysis of the resulting effluent of MBR system using GC–MS analysis is made.

Materials and methods

Materials and experimental setup

The bioreactor tank, which is cylindrical in shape and has an effective working volume of 500 L, is used in this study, and the schematic diagram is given in Fig. 1. The MBR unit is intended to satisfy operational requirements with a daily wastewater treatment capacity of 12,000 L. The wastewater for experiments is collected from a nearby sewage treatment plant. The MBR unit is supplied with sewage treatment plant primary clarified wastewater. The experimental study utilizes flat sheet polyvinylidene fluoride (PVDF) ultrafiltration membranes having pore sizes of 0.04 m and an effective surface area of 10 m2 for all 54 membranes in the module. On the structural frame, the membrane module is mounted along with the back-pulse tank arrangement on the top of the MBR system. Filtration is achieved using a suction pump, which transfers the treated water to an overhead back pulse tank. The permeate water flows into an adjacent permeate water storage tank by gravity.

Fig. 1
figure 1

The schematic diagram of MBR pilot plant

Air circulation is usually provided inside the bioreactor to promote the growth of microorganisms and increase the decomposition of organic and inorganic chemicals. Air is circulated through the air diffusers at the module's base, which is controlled by an air blower (pump capacity 25 m3/h at 0–7 kgf/cm2, Airvac Industries Pvt. Ltd., Kundli, India). The permeate pump (Crompton Greaves Ltd. India) works in a discontinuous suction and relaxation mode. The back pulse occurs at 9-min filtration intervals and 1-min relaxation intervals. Permeate water from the overhead tank flows into the membrane module by gravity in this back-wash step. During filtration, relaxation, and back pulse, it removes pollutants and contaminants from the membrane surface, whereas air scouring maintains the membrane cleaned. A cleaning in situ (CIP) tank is arranged for the membrane's maintenance and regeneration. Nonetheless, the system is equipped with a programmable logic controllers (PLC) automation framework (Siemens, India) to control the MBR process.

MBR experimental methodology

From March to May 2019, a pilot-scale MBR operation would run for more than 60 days. The amount of wastewater in the bioreactor is kept constant at all times. The volume of wastewater present in the tank is used as the feed for treatment in the current study's batch submerged MBR system. The HRT is maintained for 6 h in order to keep membrane fouling under control. Although no chemical cleaning is carried out, the amount of solids deposited on the membrane's surface is regularly removed due to cross-flow aeration. In MBRs, the sludge retention time (SRT) is a critical factor that affects membrane fouling. With the formation of extracellular polymeric compounds (EPS), the SRT varies. According to the majority of research, increasing the SRT decreases the concentration of EPS because of biomass stays in the system longer, whereas lowering the SRT increases the concentration of EPS (Grossman et al. 2019). High SRT creates a starvation state in the bioreactor, enabling reduced EPS production, low sludge production, and nitrification (Mutamim et al. 2013; Azis et al. 2019). Although the COD/BOD ratio of raw domestic wastewater is greater, a higher SRT in the submerged MBR system is required. In this system, the generated sludge maintains its integrity over the stability period, enabling it in SRT of around 40 days for removing the maximum concentrated suspended solids from the MBR (400 L/day). This pilot-scale MBR system can handle domestic wastewaters with a pH range of 2–10. The backwashing operation can be used for manual cleaning. The flux of permeate water is kept at 15 2 L/m2h. Table 1 lists the operating conditions of the full-scale submerged MBR pilot unit used for the optimization experiment.

Table 1 Operating conditions of full-scale submerged MBR pilot unit for optimization study

Analytical methods

Using a direct online automated control system, the temperature, aeration rate, pH, and permeate flow rate are determined over the period of the experiment. Using a HACH DRB/200 and Standard Methods 5220A, the chemical oxygen demand (COD) is determined (APHA1995). The biochemical oxygen demand (BOD) is measured according to standard methods 5210A (APHA, 1995). The concentration of dissolved oxygen (DO) is measured using a DO meter (Model No: HACH SC1000). Total phosphorus (TP) is measured according to Standard Methods 4500-P (APHA 1995) and determined using the spectrophotometric method (Spectrophotometer DR 5000 (HACH, Germany). The total Kjeldahl nitrogen (TKN) is measured according to standard methods (APHA 1995). The influent and effluent samples for analytical determination are obtained every 24 h from the feed and permeate tank.

Gas chromatography-mass spectroscopy (GC–MS)

In the present study, identification of MBR effluent is carried out using GC–MS, which allows for the detection of non-polar, volatile, and thermostable compounds. Before the GC–MS analysis, liquid–liquid extraction is performed on a 100-mL filtered effluent using 70 mL dichloromethane (GC–MS grade, Merck) (Zhang et al. 2016). This solvent is selected because it is usually used by previous researchers for effluent analysis using GC–MS (Chen et al. 2019; Kotowska et al. 2021). All the glassware is washed with acetone prior to the procedure. Mixing is done for 3 min by manually inverting the extraction funnel, and separation of the 2 phases occurred in over 5 min. Traces of the water are removed by mixing the solvent phase with 5 mL of Na2SO4. The solvent is evaporated at 50 °C under vacuum until 1 mL of the solvent remained. The effluent sample is then analyzed using a gas chromatograph (5890 Series) equipped with a QP2010 Ultra Mass Spectroscopy Detector (Shimadzu, Japan). The analytes are separated using an Rtx-5MS column (30 m × 0.25 mm with a film thickness of 0.25 µm). The GC–MS oven temperature program is 50 °C, hold 7 min, rate 7 °C min−1 and then after that increased to 325 °C and hold 14 min. Helium is the carrier gas at a flowrate of 1 mL/min. The injector temperature is set at 270 °C, and the MS is operated in the electron impact ionization mode (70 eV). The transfer line and ion source temperatures are 290 and 220 °C, respectively. Scan runs are made with a range from m/z 30 to 560. The chromatograms are analyzed using the NIST11 library (National Institute of Standards and Technology, Gaithersburg, MD, USA). The library calculates the retention indexes according to standards retention times (Gao et al. 2021).

Key parameters and their effects on the MBR performance

After approximately 19 days, the submerged MBR system reaches a steady state. The evolution of steady membrane flux and stable mixed liquor suspended solids (MLSS) concentration determines the system's stability. However, several automation system problems initially delayed the process of achieving stability. The TMP is monitored within 35 to 63 mmHg during the operational period, resulting in a very low permeability loss. The relationship between biomass characteristics and membrane hydrodynamic performance is difficult to set up in the MBR system (Lim et al. 2019). The raw wastewater characteristics are given in Table 2. In this pilot-scale submerged MBR unit, the sludge temperature is in the range of 27.6–37.4 °C from day 19 to day 60 (from March to May 2019). The feed wastewater temperature of the unit is monitored to be in the range of 27.6 °C and 37.4 °C during the study period. As the environment's temperature rises in summer, the biomass temperature inside the MBR will also increase. Furthermore, constant air circulation in the MBR unit's submerged tank increases the wastewater temperature to around 35–37 °C. The viscosity of biomass decreases as the temperature of the biomass increases continuously. The viscosity of the sludge generally influences the concentration of suspended solids and vice-versa (Palmarin and Young 2019). In addition, microbial development starts, and the rate of biodegradation ultimately increases. When shorter SRT periods are available in the MBR, the sludge microbial population and rheological properties of sludge are influenced. Over the course of the experiment, the dissolved oxygen (DO) concentration inside the MBR varied between 2.1 and 7.39 mg/L. The oxygen circulation effectiveness is hindered by the high mixed solids concentration, needing a high aeration flow rate to maintain the dissolved oxygen concentration (Liu et al. 2022). The disadvantages of MBR system are minimized by selecting the best process parameters and operations. The temperature of the bioreactor is optimized at 37.39 °C, which improves the rate of microorganisms development. This temperature is ideal for microbial development. The development of microorganisms is increased by keeping the temperature of the bioreactor above 35 °C (Ilyas and Masih 2018). The MBR system disadvantages are addressed by selecting the best process parameters and operations. The temperature of the bioreactor is optimized at 37.39 °C, which improves the rate of microorganisms development. This temperature is ideal for microbial development. The development of microorganisms is increased by keeping the temperature of the bioreactor above 35 °C (Alisawi et al. 2020). The wastewater in this study is first treated with a 0.5–1 mm screen plate before being fed into the bioreactor tank. The main issue with the MBR system is membrane fouling, which decreases the system flux. Membrane fouling is avoided in the present MBR system by backwashing in the bioreactor tank (Xu et al. 2019). After 9 min of filtration, the bioreactor tank is backwashed for 1 min. As a result, all suspended particles and particulate matter deposited on the membrane surface are removed. The fouling tendency of membranes in MBR systems is prevented in this way. In general, the aeration operation for MBR wastewater treatment required more investment. Aeration is provided in the membrane bioreactor to keep the wastewater suspended in the tank and to remove particulates by air scouring (Xu et al. 2019). In this work, the aeration rate is optimized using the BBD model and RSM methodology. The optimal aeration rate is found to be 90 L/min, which is sufficient to keep the wastewater suspended and control membrane fouling.

Table 2 Raw domestic wastewater characteristics

Experimental design

With factorial design methodologies like the Box-Behnken design, the response surface method is frequently used for the design. At maximum (+ 1), central (0), and minimum (− 1) levels, the effects of temperature, TMP, and aeration flow rate on effluent quality are investigated. Table 5 lists the 15 trails of the Box-Behnken design. The total number of tests is significantly reduced with this technique (merely 15 against the 27 probable arrangements of the comprehensive factorial design). These are expensive in terms of repetition for several potential applications. The experimental runs are designed using statistical software (Design- Expert Version 10.0.8 (Stat- Ease, Inc. Minneapolis)) and are represented by a second-order polynomial quadratic equation given as follows:

$$ Y_{i} = \beta_{0} + \beta_{1} A_{1} + \beta_{2} B_{2} + \beta_{3} C_{3} + \beta_{12} A_{1} .B_{2} + \beta_{13} A_{1} .C_{3} + \beta_{23} B_{2} .C_{3} + \beta_{11} A_{1}^{2} + \beta_{22} B_{1}^{2} + \beta_{33} C_{3}^{2} $$
(1)

Equation 1 demonstrates the computable effects of critical process independent variables (A1, B2, C3) and their relations on the projected response Yi. Also, the polynomial quadratic model and the regression coefficient are indicated by (β); described as β0 is the intercept, the first-order coefficient are β1, β2, and β3, the cross-product constants are β12, β13, and β23 (represent interface effects) and squared coefficients are β11, β22 and β33.

Temperature, TMP, and aeration rate are chosen as independent variables in this study to optimize effluent quality and are designated as A1, B2, and C3, respectively. Table 3 shows the levels, symbols, and independent variables. The BBD is used in the quadratic response surface experiment. The number of experiments (N) to be conducted according to BBD is given by N = 2 k(k-1) + Cp, where k and Cp denote the number of data points and central points, respectively (Bezerra et al. 2008). According to BBD, three data points and 15 experiments are obtained. Temperature (A1), TMP (B2), and aeration rate (C3) are the three variables used in this study. All three independent variables are assumed to be continuous and controllable manually by experiments with negligible errors (Fu et al. 2012; Zhou et al. 2022). To optimize the system, it is necessary to find a suitable true functional relationship between the independent variables and the response surface. The dependent variables are preferred to be COD, BOD, TKN, and TP, with probability represented as a P-value (Angelucci et al. 2019).

Table 3 Levels, symbols, and independent variables for BBD

Results and discussion

The removal efficiencies of pollutants

The removal efficiencies of each pollutant throughout the experiment are discussed in the following sections.

COD and BOD removal

The removal efficiency of pollutants such as COD is investigated using the MBR system, as illustrated in Fig. 2. The wastewater has a high MLSS content, which indicates it has a lot of organic matter in it. Furthermore, organic compounds degrade, resulting in a high and stable COD removal rate. The average COD concentration in the feed wastewater is around 992 mg/L. The COD concentration decreased during the experiment due to organic compounds microbiological degradation (Katam et al. 2021). As a result, the permeate contains a very low concentration of COD at the end of the experiment. The COD removal efficiency is determined to be about 96.83%. The COD removal performance confirms that a submerged MBR system can remove maximum amount of COD (Lim et al. 2019; Palmarin and Young, 2019). Figure 3 illustrates the influent and permeate BOD concentrations and the BOD removal efficiency over the period of the experiment. Standard procedure is used to measure the BOD of the influent and permeate every three days. After the stability period, the MBR demonstrated effective BOD removal ability, as seen in Fig. 3 (Faria et al. 2020; Lim et al. 2019). The BOD in permeate obtained below 30 mg/L due to the treatment, with a removal efficiency of 94.24%. As a result, MBR is more effective at reducing pollutant concentrations than other secondary wastewater treatment processes (Rout et al. 2018; Goswami et al. 2018).

Fig. 2
figure 2

COD concentration and removal rate with the experimental period

Fig. 3
figure 3

The concentration of biological oxygen demand over the experimental study

TKN and TP removal

The Total Kjeldahl Nitrogen (TKN) in influent, permeate, and removal efficiency is presented in Fig. 4. The TKN is the bound sum of organic nitrogen, ammonia (NH3), ammonium (NH4+) observed in sewage wastewater sample (Rout et al. 2021; Cheng et al. 2020). As seen in Fig. 4, the average influent concentration of TKN is unstable before the stability period. Biomass TKN concentrations range between 9.86 and 21.6 mg/L on an average. As a result, the TKN removal efficiency will reach 94.52%. The efficient biological phosphorus removal obtained in this investigation is shown in Fig. 5. Also, the average TP concentration in this process effluent is around 0.7319 mg/L.

Fig. 4
figure 4

Total Kjeldahl Nitrogen removal mechanism through the MBR unit

Fig. 5
figure 5

Total Phosphorous removal through domestic wastewater by MBR treatment

The rate of phosphorus removal is determined by the activity of the microorganisms within the bioreactor (Goswami et al. 2018). However, the concentration of TP in MBR effluent is found to be almost stable from the beginning to the end of the experiment, ranging between 0.25 and 0.75 mg/L. The TP removal efficiency is observed to be as high as 96.13%.

Characterization and identification of effluent using GC–MS

The composition of the resulting effluent after the MBR treatment is analyzed by the GC–MS technique. Table 4 shows a fairly complex composition identified in the effluent of MBR system consisting of: Alkanes (Pentane, 1,4-Pentadiene, 1-Pentyne, 4-methyl-, Heptane), Alkenes (2-Heptene), Ketones (Acetone, 2-Butanone, 2,5-Furandione, dihydro-3-methyl, 3-Pentanone), Aldehydes (Propanol, 2-Butenal, 2-Ethylacrolein, Pentanal, 2-Pentanal, 2-Butanal, 3-methyl), Alcohols (1-Butanol, 2-methyl-, 1-Pentane-3-ol, 1,4-Pentadien-3-ol), Esters (Butanoic acid, methyl ester), Benzene (Toluene), and other compound (Trimethylamine, 1-propylamine hydrochloride, Butane, 1-(2-propenyloxy), Azetidine, Ethyl isocyanide, Propanoic acid, anhydride). The challenge is to assess the efficiency of the MBR system in removing the unwanted compounds. The GC–MS analysis of the resulting effluent compounds shows the complete removal of compounds having retention time below 12 min, namely heptasiloxane, octasiloxane, linalool, octadecene, etc. (Chen et al. 2019). However, the other compounds having retention time over 12 min correspond to long chain alkanes. They seem to be slightly biodegradable as they are found in effluent but at minimum traces (Zhang et al. 2016). Figure 6 shows the GC–MS chromatograms of resulting effluents from the MBR system after domestic wastewater treatment at the end of the experiment.

Table 4 Compounds identified in the effluent of MBR system
Fig. 6
figure 6

GC–MS chromatograms of the resulting effluent from the MBR system

The MBR shows excellent biodegradability at the end of the experiment after continuous treatment of domestic wastewater. In domestic wastewater, different aerobic microorganisms are present, which degrade a wide range of benzenes, butanoic acid, and methyl ester entirely.

Model fit and statistical investigation

Table 5 shows the actual terms and predicted COD, BOD, TKN, and TP eliminated yields for a number of situations, which is consistent with the literature(Fu et al. 2012).The removal efficiencies of COD, BOD, TKN, and TP are determined using four second-order polynomial equations in coded formulae. The operational variables of coded values are A1, B2, and C3, which include temperature, TMP, and aeration flow rate, respectively. The polynomial equations are given as follows:

$$ \begin{gathered} Y_{COD} = 220.59 + 1.55A_{1} + 0.41B_{2} - 3.98C_{3} + 0.002A_{1} B_{2} - 0.018A_{1} C_{3} \hfill \\ - 0.004B_{2} C_{3} - 0.00093A_{1}^{2} - 0.00149B_{2}^{2} + 0.0288C_{3}^{2} \hfill \\ \end{gathered} $$
(2)
$$ \begin{gathered} Y_{BOD} = 116.73 - 0.21A_{1} - 0.72B_{2} - 0.54C_{3} + 0.001A_{1} B_{2} - 0.0044A_{1} C_{3} \hfill \\ + 0.0085B_{2} C_{3} + 0.0085A_{1}^{2} + 0.00059B_{2}^{2} + 0.0042C_{3}^{2} \hfill \\ \end{gathered} $$
(3)
$$ \begin{gathered} Y_{TKN} = 2.67 + 2.009A_{1} - 1.43B_{2} + 1.72C_{3} + 0.0125A_{1} B_{2} \hfill \\ - 0.024A_{1} C_{3} + 0.0122B_{2} C_{3} - 0.0079A_{1}^{2} - 0.00016B_{2}^{2} - 0.0066C_{3}^{2} \hfill \\ \end{gathered} $$
(4)
$$ \begin{gathered} Y_{TP} = 501.38 + 0.0019A_{1} + 0.02B_{2} - 10.15C_{3} + 0.007A_{1} B_{2} + 0.0061A_{1} C_{3} \hfill \\ - 0.002B_{2} C_{3} - 0.010A_{1}^{2} - 0.00088B_{2}^{2} + 0.0617C_{3}^{2} \hfill \\ \end{gathered} $$
(5)
Table 5 Actual and projected values of COD, BOD, TKN, and TP removal efficiencies

The removal efficiencies of BOD, TKN, and TP are increased with temperature (A1), aeration flow rate (C3). In contrast, COD and BOD are increased with temperature (A1), TMP (B2), and aeration flow rate (C3) (Fu et al. 2012).The F-values are checked by numerical effects of Eqs. (2) to (5), and for response surface quadratic models, the outlines of the analysis of variance (ANOVA) as shown in Table 6. The F-values and R2 are further checked by the model. Removal of COD, BOD, TKN, and TP is highly considerable (P < 0.01) in the regression models, shown by the analysis of variance.

Table 6 ANOVA results: response surface quadratic model for COD, BOD, TKN, and TP

The quantities of COD, BOD, TKN, and TP models related to pure error specified that it is insignificant for lack of fit (P > 0.05). The standards of adjusted R2 (0.8928, 0.9717, 0.9747, 0.9838) for the four models recommended that the overall variances are 89.28%, 97.17%, 97.47%, and 98.38% for the removal efficiencies of COD, BOD, TKN, and TP, respectively. Only about 10.72%, 2.83%, 2.53%, and 1.62% of the total variance might not be described by the models (Angelucci et al. 2019). The R2 values adjacent to one suggest a superior correlation among the actual and projected standards (Pujari and Chandra 2000). The R2 of the four models are calculated as 0.9617, 0.9685, 0.9910, and 0.9942 for COD, BOD, TKN, and TP, respectively, representing good interaction between the actual and projected values of the response. The independent variable and the response could be well explained by the results in the interactions (Rais et al. 2021).

For each coefficient, the statistical significance is described by Eqs. (2)–(5). It is determined by correlating the F-value and P-value. The removal efficiencies of the COD, BOD, TKN, and TP models are determined by the P-value of the regression coefficients in Table 6. P-values are used to represent the interface effect between each independent variable and are used to assess the significance of each coefficient. The coefficients are highly significant when the P-values of the factors are at 1% (P < 0.01). The increases in every linear value and the quadratic coefficients for the COD, BOD, TKN, and TP models, their removal efficiency, and the interface coefficients are significant, as shown in Table 6, and the effects on removal efficiencies are significant. The response three-dimensional surface plots describe two variables center and interface effects (Fu et al. 2012; Zhou et al. 2022).

The removal efficiency of COD using 3D response surface and contour plot

Figure 7 describes response surface plots for the interaction effects among temperature, TMP and aeration flow rate on the removal efficiency of COD at constant (A) = 82.5 L/min, (B) = 32.5 °C and (C) = 49 mm Hg). The design of symmetrical elliptical contours and response surface plots is shown by the relative rationality of the real parameters. At a constant temperature (32.5 °C), Fig. 7(a) depicts the overall influence of TMP and aeration flow rate on COD removal efficiency (Obaid et al. 2015). When TMP is between 35 and 63 mm Hg, a higher air flow rate increases COD removal efficiency, subsequently decreasing. Under the TMP, the aeration flow rate, which varies from 49 to 63 mmHg, has a minor effect on COD removal efficiency. At an aeration flow rate of 87–90 L/min and a TMP of 50–63 mmHg, the maximum COD removal efficiency (> 95.5%) is observed, which might be attributed to the aeration flow rate giving a precise amount of oxygen for the micro-activity. Figure 7(b) depicts the effect of the interface between aeration flow rate and temperature on COD removal. At a constant TMP (49 mm Hg), the effect of aeration flow rate and temperature on COD removal efficiency is presented. The operational temperature conditions for MBR in this study are in the mesophilic range. Above the temperature of 39 °C, the reaction rate of mesophilic microorganisms decreases (Goswami et al. 2018; Alisawi 2020).The efficiency of COD removal increases as the temperature increases. With a increase in temperature from 30.4 to 37.4 °C, the COD rejection rate increases and then decreases. Under the aeration flow rate of 87–90 L/min, the temperature does not influence COD removal. At temperatures ranging from 34.6 to 37.4 °C, there is a high level of COD rejection (> 96%). This COD rejection is achieved by the microorganisms' ability to degrade organic and inorganic pollutants at the ideal temperature. The elliptical contour plot indicates that temperature and aeration flow rate substantially impacted COD removal efficiency. At an 82.5 L/min continuous aeration flow rate, Fig. 7(c) depicts the overall influence of temperature and TMP on COD removal. Rather than TMP, the temperature has a considerable influence on COD removal. The most important variables on COD removal efficiency (> 96.4%) are determined to be aeration flow rate of 87–90 L/min and temperature of 34.4–37.4 °C in the combined study.

Fig. 7
figure 7

Response surface plots (3-D) and contours for interaction results of (a) Airflow rate, b Temperature, and c TMP on COD rejection rate

The removal efficiency of BOD using 3D response surface and contour plot

The following three-dimensional response surface plot is the interactions between temperature, TMP, and aeration flow rate on the BOD removal efficiency. At a temperature of 32.5 °C, Fig. 8(a) shows the combined effect of airflow rate and TMP on BOD removal performance. For the temperature of 32.5 °C, the BOD removal significantly increased with an aeration flow rate ranging from 86 to 90 L/min, which means that due to extreme concentration of suspended oxygen enhanced the biological activity, simultaneously the biodegradation rate of organic compound increases. The maximum BOD removal efficiency (> 94%) is observed at 90 L/min of aeration flow rate and a minimum at TMP ranging from 45 to 63 mm Hg. At a constant TMP of 49 mmHg, Fig. 8(b) shows the combined effect of aeration flow rate and temperature on BOD removal efficiency. Aeration is the mechanical method of maximizing the interaction between wastewater and oxygen. It is the most fundamental approach for enhancing water and wastewater's physical and chemical characteristics (Nadayil et al. 2015). When the aeration rate increases from 85 to 90 L/min, the BOD removal efficiency improves at first, then slowly decreases. With temperatures ranging from 27.4 to 36 °C, the aeration rate has an adverse effect on the BOD removal rate. At an aeration flow rate of more than 90 L/min, the highest BOD removal of > 94% is achieved, which might be attributed to the availability of the appropriate quantity of oxygen for the aerobic biological process. Figure 8(c) confirms the collective effect of TMP and temperature on the BOD rejection at a constant aeration flow rate of 85.5 L/min. When the TMP increases, the permeate flow begins to rise as well, but solids sedimentation and compression increase, accelerating the fouling of the membrane surface (Alavijeh et al. 2017). Therefore, the removal efficiency of pollutants decreases with increasing the TMP (Vergine et al. 2017). When the temperature is between 34.8 and 37.4 °C and the TMP is between 49 and 63 mm Hg, the BOD removal efficiency is obtained 90.2 and 91%. The maximum BOD removal efficiency is reached when the aeration flow rate increases from 87 to 90 L/min and the temperature increases from 34.6 to 37.4 °C, as shown by this combined effect of different variables. These are the ideal operating conditions for removing BOD from domestic wastewater.

Fig. 8
figure 8

Response surface plots (3-D) and contours proposed the interaction properties of (a) Air flowrate, b Temperature, and c TMP on BOD rejection ability (at constant (a) = 82.5 L/min, (b) = 32.5 °C and (c) = 49 mm Hg)

The removal efficiency of TKN using 3D response surface and contour plot

The response surface plots (3-D) in Fig. 9 show the relationship between temperature, TMP, and aeration flow rate on the TKN removal efficiency. Figure 9(a) illustrates the combined effect of aeration flow rate and TMP on the TKN removal at a constant temperature of 32.5 °C. As the TMP increased from 42 to 63 mm Hg, the TKN removal decreased significantly. When the TMP is decreased, there is no noticeable difference in TKN removal observed (Vergine et al. 2017). It indicates that the aeration flow rate has a more significant effect on the TKN removal efficiency than the TMP. The higher aeration flow rate keeps the wastewater suspended, and due to which higher removal of permeate is observed (Katam et al. 2021). The maximum TKN removal efficiency is obtained about (> 94%) at an airflow rate of 86–90 L/min due to the balanced concentration of dissolved oxygen inside the aerobic bioreactor. Figure 9(b) presents the combined interaction of aeration flow rate and temperature on the TKN removal efficiency at a constant TMP of 49 mm Hg. For this TMP, the TKN removal extensively increases when the aeration flow rate increases and temperature decreases, ranging from 27.4 to 35.8 °C. Nutrients like ammonia and phosphorous are very temperature sensitive. The activity of these nutrients decreases if the temperature increases above 39 °C (Metcalf and Eddy 2003). The TKN removal process is strongly depended on the aerobic biological process. The maximum TKN removal efficiency (> 92%) is observed when the aeration flow rate ranges from 86.8 to 90 L/min. The combined effect of aeration flow rate and temperature demonstrates that at a higher aeration flow rate, more than 93% TKN removal is obtained, and at a temperature ranging from 27.4 to 36 °C, TKN removal efficiency of 86% is obtained. Figure 9(c) illustrates the combined effect of temperature and TMP on the TKN removal efficiency at a constant aeration flow rate of 82.5 L/min. The above-mentioned three interactions revealed that the aeration flow rate significantly affects the TKN removal efficiency in the MBR system.

Fig. 9
figure 9

Response surface plots (3-D) and contours for the interaction results of (a) Airflow rate b Temperature and c TMP on TKN rejection rate (at constant (a) = 82.5 L/min, b = 32.5 °C and (c) = 49 mm Hg)

The removal efficiency of TP using 3D response surface and contour plot

Figure 10 demonstrates the response surface plots (3-D) for the correlation among air flowrate, temperature, and TMP on the TP removal efficiency. Figure 10(a) response surface plot designates that the TP reduction rate is liable to increase by the aeration flow rate and TMP at a temperature of 32.5 °C. The TP removal efficiency is increased and then reduced with increasing airflow rate and decreasing TMP. The airflow rate of 87.4–90 L/min depicts that more than 96% TP removal efficiency is obtained. The higher aeration flow rate keeps the wastewater in suspension, and due to which higher removal of permeate is observed (Katam et al. 2021; Rout et al. 2018).As the aeration flow rate decreased below 84 L/min, the TP removal efficiency is also decreased. The TMP slightly affects the TP removal efficiency when the aeration flow rate increases, indicating that more than 93% of TP removal is obtained. Figure 10(b) reveals the concurrent results of aeration flow rate and temperature on the TP removal efficiency at TMP of 49 mm Hg. The aeration flow rate of 87.8–90 L/min revealed that more than 94% TP removal could be obtained when the temperature ranges from 27.6 to 37.4 °C, indicating that temperature slightly affects the TP removal efficiency (Alisawi 2020). The TP removal rate is very low, up to 90%, in the medium aeration flow rate range. The TP removal efficiency improves when the aeration rate decreases and the temperature increases at a constant rate, as indicated. At a constant aeration flow rate of 82.5 L/min, Fig. 10(c) illustrates the combined influence of temperature and TMP on TP removal performance. Under a TMP range of 43–63 mm Hg, temperature values in the range of 30.4–37.4 °C had a significant influence on TP removal efficiency, showing that temperature aided as a significant control factor throughout the aeration.

Fig. 10
figure 10

Response surface plots (3-D) and contours for the interaction results of (a) Air flowrate (b) Temperature and (c) TMP on TP rejection rate (at constant (a) = 82.5 L/min, (b) = 32.5 °C and (c) = 49 mm Hg)

The above investigation results show that the variables peak values are in the ranges, viz., air flowrate 87–90 L/min, temperature 34–37.4 °C, and TMP55 to 63 mm Hg. To verify the model acceptability for calculating the highest removal efficiency of COD, BOD, TKN, and TP, Design Expert 10.0.8software is used. Under ideal conditions, COD, BOD, TKN, and TP are experimentally observed to be 96.83%, 94.24%, 94.52%, 96.13%, and 96.71%, 92.39%, 93.81%, and 96.12 are found by model, respectively. These standards are similar to those evaluated by the RSM. This study can be used to enhance the parameters of domestic wastewater in an aerobic membrane bioreactor. The concentration of permeate and feed wastewater is used to calculate the removal efficiency of pollutants. The pollutant removal efficiency obtained by experiment and by the model is listed in Table 7.

Table 7 The removal efficiency of pollutants obtained by experiments and model using BBD

Predicted and experimental plots for COD, BOD, TKN, and TP

Figure 11(a) shows the equivalence plot linking the actual COD statistics compared to the projected responses of the model. The determination factor validated the model's integrity, R2 = 0.9617, with the regression line's recommendation in Fig. 11(a). This number is critical at the level of 96.1%. Additionally, R2adj value equivalent to 0.8928 specifies that all the variables transmit an effect on the projections. It is observed that the suggested model is rationally suggestive for viable applications. Figure 11(b) shows the values obtained from the presented model and compared with the values achieved from the experimental results. The factor of determination verifies the significance of the model, R2 = 0.9685. While the R2adj value equal to 0.9717 points out that the number of variables affects the projections, the used model is highly practical for further application. Figure 11(c) compares the experimental data of TKN versus the projected outcomes of the model, with the factor of determination, R2 = 0.9910. The adjusted R2 value equals to 0.9747 (very close to R2), which shows that the model effectively predicts all the particular variables. Figure 11(d) shows the values obtained from the presented model and compared them with the values achieved from the experimental results. The factor of determination fixed the model significance, R2 = 0.9942, which is suggested at the level of 99.42. The clustering of the points around the diagonal line indicates a satisfactory correlation between the experimental and predicted data, confirming the model's robustness (Ahmadi et al. 2016; Zhou et al. 2022).

Fig. 11
figure 11

Relative design among the projected and actual values: a COD, b BOD, c TKN, d TP

Also, the adjusted R2 value equals to 0.9838, which points toward certain variables profoundly exert an impact on the projections, and the model is significantly applicable for practical applications. It is observed that almost the maximum points of predicted and experimental responses are close to the 45°-line presenting the higher precision as predicted by the model. It is found that the established model effectively seizes the correlation among factors and response for each regression equation derived for each variable under study. The interactions between each of the variables are responsible for the removal of pollutants by MBR. Significantly, the aeration rate and temperature influence the rate of biodegradation. It is reported that decreasing operational temperature causes the bacteria to release more EPS. The aeration rate maintains the temperature of wastewater in the bioreactor at an optimum level so that the rate of biodegradation and pollutant removal increases (Palmarin and Young 2019).

Optimization and reliability of the BBD model and response surface methodology

Based on the experimental results, three independent factors, viz. temperature, TMP, and aeration rate are selected to implement the RSM. An effective response surface equation could be established in RSM only when the central point approached the optimal level (Khani et al. 2019). Thus, the univariate experiment optimum condition is generally considered the center point of the response surface distribution. In addition, the ‘low’ value and ‘high’ value of independent variables in the response surface distribution are determined according to the influence of each variable on the response value in the experiment (Rais et al. 2020). This has contributed in obtaining the best removal efficiency conditions quickly. Therefore, the influence range of the three variables are as follows: temperature (27.6–37.4 °C), transmembrane pressure (35–63 mm Hg), and aeration rate (75–90 L/min). The 15 experiments designed by RSM with BBD and their results with pollutant removal efficiencies response values are reported in Table 5. Multiple regression fittings are employed on experimental data to obtain the quadratic regressions, Eqs. (2)–(5), expressing the relationship between the response value and three independent factors.

The experimental variance and fitting degree are comprehensively analyzed by the results obtained from Design-Expert 8.0. As reported in Table 6, the low value (< 0.0001) of P represented the significance of the model. The ‘lack of fit’ term and correlation coefficient R2-value for respective pollutants indicated the model accuracy and fitting degree (Zhou et al. 2022). According to the regression model, response surface plots are generated and utilized to generally express the influence of variables and the influence of interaction between the variables on pollutant removal efficiency (Figs. 7, 8, 9 and 10). The regression equations obtain the optimal condition for the removal of pollutants from domestic wastewater. The experimental conditions giving maximum removal efficiency are as follows: temperature of 37.39 °C, transmembrane pressure of 35 mm Hg, and aeration rate of 90 L/min. Under these conditions, the average pollutant removal efficiency for the four pollutants is 95.43%. Hence, it is found that the established model has great accuracy and reliability.

Economical feasibility of the MBR process

A cost-effective treatment technology would definitely save a considerable quantity of water by treating the wastewater (Gao et al. 2021). In the present study, the economic feasibility of the MBR system is evaluated by analyzing energy consumption and membrane cost. The energy consumption and membrane cost are the driving factors for the overall cost of the MBR system. The estimation of energy consumption (by the aeration system, suction pump) is based on the energy consumption and membrane cost, and operating cost. The energy consumption is calculated by the following equation (Li et al. 2014):

$$ P\, = \,\frac{Q\gamma E}{{1000}} $$
(6)

where P is the power requirement (kW), Q is the flowrate (m3/s), γ is 9800 (N/m3), and E (m H2O) is head loss. The energy consumption for membrane filtration is calculated based on the average transmembrane pressure of 35 mm Hg and permeate flow of 15 L/m2h. During the analysis, the land cost is not considered as it varies with and within the cities. The cost analysis for the different variables is shown in Fig. 12. The economic analysis for different variables such as energy consumption (including aeration pump, suction pump, recirculation pump), membrane cost (including membrane cleaning), and operating cost (including labor cost, miscellaneous cost) is calculated and shown in Fig. 12. It is observed that out of the total cost of the MBR process, 22.36% cost needed for energy requirement. Further, the maximum cost is needed for the membrane, which is upto 58.22%. For the effective operation of MBR system for domestic wastewater treatment operation, cost needed around 19.40%.

Fig. 12
figure 12

Distribution of operational cost of the MBR system for domestic wastewater treatment

Conclusion

In this study, domestic wastewater treatment is carried out using the submerged MBR process. The Box-Behnken design is applied to optimize process parameters for the effective removal of pollutants from domestic wastewater. The influence of various operating parameters like aeration flow rate, temperature, and TMP on COD, BOD, TKN, and TP are studied. It is observed that the aeration flow rate is having a pronounced effect on the removal efficiency of pollutants than the other operating parameters. The maximum average removal of about 95.43% is obtained at 37.39 °C temperature, 35 mm Hg TMP, and 90 L/min aeration flow rate using the MBR system. By model, the pollutants removal like COD, BOD, TKN and TP is 96.71%, 92.39%, 93.81%, and 96.12%, respectively. After the treatment of domestic wastewater using MBR, the effluent is analyzed by GC–MS and found to be pollutant-free. The economic analysis indicates that electro-mechanical operations require the highest amount after the membrane cost. It is found that the experimental and predicted values are in good agreement with each other, which establishes the effectiveness of the developed model.