# A Type-2 Fuzzy Logic Approach for Forecasting of Effluent Quality Parameters of Wastewater Treatment

Authors: Samyabrata Bhattacharjee; Khalid A. Alattas; Fayez F. M. El-Sousy; Ardashir Mohammadzadeh; Jihad H. Asad; Saleh Mobayen; Noorhan Alshaikh
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In this investigation, we have studied and designed a type-2 fuzzy logic controller (IT2FLC) for the wastewater treatment plant at Haldia, India. To avoid modeling complex physical, chemical, and biological treatment processes of wastewater, this present work represents an ensemble of fuzzy models as surrogates for the wastewater treatment plant (WWTP). Using measured influent water quality data, each fuzzy model predicts water quality after the process of water treatment parameters. The pH, biological oxygen demand (BOD), total suspended particles (TSS), chemical oxygen demand (COD), and temperature are taken into account as input variables. Finally, the sensitivity of the IT2FLC model is evaluated by several statistical parameters like RMSE, MAE, MAPE, and most importantlyR2 value. For the current model, the values of the three parameters are almost 0, whereas the value of the R2 is almost close to 1, which signifies that the IT2FLC model is accurate and more efficient in predicting response compared to other conventional methods reported in various literatures.


---

## Body

## 1. Introduction

The use of wastewater as a source of water needs for special uses such as agriculture due to its high reliability and nutrients such as nitrogen, phosphorus, and potassium has received much attention. Due to the growth of urbanization, the amount of wastewater is increasing [1, 2].Therefore, proper management of wastewater treatment plants is one of the important management factors in the water sector. The performance of treatment plants is a function of various qualitative and environmental factors. Therefore, it is important to use methods that can predict the performance and efficiency of treatment plans based on quantitative and qualitative changes in the incoming wastewater. The parameters, which are often considered for assessment of water quality reported in the literature, are pH, BOD, COD, DO, TS, T-Alk, temperature, and several inorganic substances [3, 4]. Numerical models are not cost-effective due to the need for a lot of data, time-consuming, and calibration processes. In addition, in these models, there are limitations in terms of calibration of reaction coefficients and their validation, in which, with increasing the number of characteristics and their interactions with each other, the accuracy of predicting qualitative behavior is decreased. In intelligent models, without considering complex equations, the dynamics of the system can be extracted, and thus, the outputs of the model can be predicted [5, 6].Wastewater treatment involves complex physical, chemical, and biological operations. Most of the processes related to wastewater treatment have nonlinear behavior like other operations in various fields of engineering, which are difficult to model with conventional linear models. To control and develop a model that can estimate the output of nonlinear multivariable processes with high accuracy, increase the need of advance machine learning algorithms. The constant advancement of these algorithms takes place to increase its prediction efficiency. In literature, several works were published, which demonstrate the credibility of several ML algorithms applied to several processes in the field of engineering [7–9]. In recent years, many studies have been performed based on wastewater quality criteria using fuzzy-neural systems. But most of them do not result in acceptable accuracy, specially considering high-uncertain data. In this study, a new approach on the basis of IT2FLCs is presented [10–13].


## 2. Literature Review

Zhao et al. [14] have developed a fusion method, merging the bioenergetics factorial model with the T1FLC technology, which have been planned to guess the feed necessity of grass carp and construct a precision feeding control (PC) system in outside pond culturing situations. To start with, we assess the development boundary of grass carp utilizing the aligned thermal unit development coefficient model in various development refrains; then, at that point, we assess the energy and nourishment requests grounded on the model of the bioenergetics factorial. At last, still up in the air, there are the feed need and feed rate every day as per the supplement arrangement of feed and apparent digestibility coefficient (ADC) of grass carp.Cabanillas et al. [15] acquainted another approach with evaluating the danger of water effluents from wastewater treatment plants (WWTPs) in light of fuzzy rationale framework, a renowned hypothesis to manage vulnerability, particularly in the ecological field, where information is regularly inadequate. The strategy has been tried utilizing the gushing’s contamination information coming from 22 wastewater treatment plants (WWTPs) situated in Catalonia (NE Spain). 38 toxins were examined along three missions performed yearly from 2008 to 2010.Kharat el al. [16] have endeavored to evaluate the degree of hazard in meat preparing utilizing type-1 Fuzzy rationale framework at five abattoirs in Onitsha North and South in Anambra State of Nigeria. To foster the danger assessment rules, contribution from natural specialists in services and literary works was successfully used.The review for recognizable proof of water quality status of the Godavari waterway at Nashik was completed (cf. Kharat et al. [16]) by utilizing the most prevalent municipal strong waste administration and native VWQI. It is clear that both national sterilization establishment water quality file (NSFWQI) and native Vedprakash water quality list (VWQI) show comparable outcomes and are in close connection, yet both lists experience the ill effects of “Overshadowing” and can not really address the high centralization of boundaries like BOD5 and absolute solids.Lu et al. [17] tended to the ideal plan of a half and half get together reusing network that, at the same time, incorporates the forward and turn around coordination’s among its multi-item multiechelon superstructure. Various wellsprings of crude materials including parts are considered at various phases of the forward get together interaction. At long last, an intuitive type 1 fuzzy improvement approach is created to tackle the issue by separating the piece-wise areas of agreeable degrees. At long last, an electronic get-together plant with its own reusing interaction is picked as the mechanical case to execute the proposed approach.Nadiri el al. [18] have zeroed in on the TWWTP and inspected its treatability. Thus, this review proposed a gathering of type-1 fuzzy rationale models as substitutions for the TWWTP to make the evasion of imagining the complex physical, compound, and organic treatment strategies. Each fuzzy logic model estimates the water quality boundaries of TWWTP by utilizing of estimated influent water quality information, like interest of biochemical oxygen, request of substance oxygen, pH, temperature, and whole suspended solids (Jeihoonian et al. [19], Panda et al. [20], Nadiri et al. [21], and Liang et al. [22]).More recently, IT2FLCs have been employed for different forecasting problems. However, less studies have considered IT2FLCs for forecasting of effluent quality [23–25]. Regardless the above proposed improvement, we have made the thought of the accompanying components, just as thoughts, as follows:(i)
Prediction of the refluent water quality boundaries of a wastewater treatment plant.(ii)
Adopt Interval type-2 models to imagine complex WT measured by utilizing unsure boundaries.(iii)
IT2FLC approach gives an accurate methodology for observing the presentation of the WT.(iv)
Validity of the explored model is made by abuse of the assistance of Statistical Analysis and MLR.


## 3. Resources and Approaches

### 3.1. Chemicals

Chemicals are required mainly to control the pH of the water. pH is one of the input parameters of the predicted model. Sulfuric acid and the caustic solution are used to maintain the pH in a range of 6 to 7. Alum and Deoiling Poly-electrolyte are added for coagulation-flocculation and deemulsification. In the case of high sulfide content>20mg/l, hydrogen peroxide is also used to reduce the sulfide from the water.


### 3.2. Type-2 Fuzzy Sets

In a FLS, the standard of vulnerabilities can be made by arithmetical or semantic vulnerabilities in the information. These vulnerabilities can be presented by utilizing of T2FSs. The likelihood of a T2-fuzzy system can be calculated as a stipend of the likelihood of a Type 1 system [26, 27]. A T1FS’s enrollment grade is a new number in the range 0,1. Whatever the case may be, a Type 2’s enrollment grade is an FS in 0,1. Incorporating vulnerabilities is easy with a T2FS. A Type 2 fuzzy set Z˜ is well-defined by the membership function μz˜q,r , where r∈Jq⊆0,1 and q∈Y , i.e.,(1)Z˜=q,r,μZ˜q,r|∀q∈Y,∀q∈0,1,which is often talked about as the point-esteemed articulation of a T2 FS. Jqy is the essential participation of q, and μZ˜q,r is likewise chosen as fqr. The two-dimensional sustenance of μZ˜q,r is known as the impression of vulnerability (FOU) of Z˜ , i.e.,(2)LMFZ˜=μZ˜q=FOUZ˜.The coarea (or essential membership) at eachq∈Y of Z˜ is implied Jq and (see Figure 1 when q = q2) is the interval LMfZ˜,UMFZ˜, i.e.,(3)Jq=r∈0,1|μZ˜q,r>0=LMFZ˜,UMFZ˜=μZ˜q,μZ˜q.Figure 1
Block diagram of IT2FLS.The secondary MF ofZ˜ is a vertical slice of μZ˜q,r, and it is represented as μZ˜q and is the limit of function μZ˜:Y×0,1⟶0,1 to q∈Y. The optional participation grades of a span type-2 fluffy set (IT2 FS) are equivalent to 1. Since they are comparable, an IT2FS can be ordered by its LMF and UMF. An IT2 FLS is normally aloof of five squares, and these are Fuzzifier, Rules, Inference, Type-decrease, and Defuzzifier [28, 29]. The outline of a T2 FLS is as displayed in Figure 1. Considered from different perspective, IT2FLSs are made out of Mamdani IT2FLSs and Takagi–Sugeno–Kang (TSK) IT1FLSs or Singleton IT2FLSs and Non-Singleton IT2FLSs. While Mamdani IT2FLSs are made out of Mamdani IT2FLSs, Mamdani IT1 non-singleton T2FLSs, and Mamdani IT2 non-singleton T2FLSs. In the event that one of the resultant or forerunner sets of fuzzy standards is T2FS, we portray the framework as T2FLSs. Instances of the FOU of an IT2FS are portrayed in Figure 2.Figure 2
FOU for Gaussian primary MF with uncertain mean and uncertain standard deviation.


## 3.1. Chemicals

Chemicals are required mainly to control the pH of the water. pH is one of the input parameters of the predicted model. Sulfuric acid and the caustic solution are used to maintain the pH in a range of 6 to 7. Alum and Deoiling Poly-electrolyte are added for coagulation-flocculation and deemulsification. In the case of high sulfide content>20mg/l, hydrogen peroxide is also used to reduce the sulfide from the water.


## 3.2. Type-2 Fuzzy Sets

In a FLS, the standard of vulnerabilities can be made by arithmetical or semantic vulnerabilities in the information. These vulnerabilities can be presented by utilizing of T2FSs. The likelihood of a T2-fuzzy system can be calculated as a stipend of the likelihood of a Type 1 system [26, 27]. A T1FS’s enrollment grade is a new number in the range 0,1. Whatever the case may be, a Type 2’s enrollment grade is an FS in 0,1. Incorporating vulnerabilities is easy with a T2FS. A Type 2 fuzzy set Z˜ is well-defined by the membership function μz˜q,r , where r∈Jq⊆0,1 and q∈Y , i.e.,(1)Z˜=q,r,μZ˜q,r|∀q∈Y,∀q∈0,1,which is often talked about as the point-esteemed articulation of a T2 FS. Jqy is the essential participation of q, and μZ˜q,r is likewise chosen as fqr. The two-dimensional sustenance of μZ˜q,r is known as the impression of vulnerability (FOU) of Z˜ , i.e.,(2)LMFZ˜=μZ˜q=FOUZ˜.The coarea (or essential membership) at eachq∈Y of Z˜ is implied Jq and (see Figure 1 when q = q2) is the interval LMfZ˜,UMFZ˜, i.e.,(3)Jq=r∈0,1|μZ˜q,r>0=LMFZ˜,UMFZ˜=μZ˜q,μZ˜q.Figure 1
Block diagram of IT2FLS.The secondary MF ofZ˜ is a vertical slice of μZ˜q,r, and it is represented as μZ˜q and is the limit of function μZ˜:Y×0,1⟶0,1 to q∈Y. The optional participation grades of a span type-2 fluffy set (IT2 FS) are equivalent to 1. Since they are comparable, an IT2FS can be ordered by its LMF and UMF. An IT2 FLS is normally aloof of five squares, and these are Fuzzifier, Rules, Inference, Type-decrease, and Defuzzifier [28, 29]. The outline of a T2 FLS is as displayed in Figure 1. Considered from different perspective, IT2FLSs are made out of Mamdani IT2FLSs and Takagi–Sugeno–Kang (TSK) IT1FLSs or Singleton IT2FLSs and Non-Singleton IT2FLSs. While Mamdani IT2FLSs are made out of Mamdani IT2FLSs, Mamdani IT1 non-singleton T2FLSs, and Mamdani IT2 non-singleton T2FLSs. In the event that one of the resultant or forerunner sets of fuzzy standards is T2FS, we portray the framework as T2FLSs. Instances of the FOU of an IT2FS are portrayed in Figure 2.Figure 2
FOU for Gaussian primary MF with uncertain mean and uncertain standard deviation.


## 4. Wastewater Treatment Process (WWTP)

Wastewater Treatment Plant (WWTP) has been planned to treat all the liquid effluent created during the process and otherwise from all process plants. The major pollutants in the liquid effluent received at WWTP battery limit are Oil and Grease, Total Suspended Solids (TSS), Dissolved Organics, Phenols, Thiosulfates and Sulfides, etc., which contribute to BOD and COD. The treatment scheme has been proposed to treat the effluent so that it can be discharged after meeting Treated Effluent Characteristics stipulated by the West Bengal Pollution Control Board. The plant has been designed to treat 150 m3/h of process effluent and 490 m3/d of sanitary waste.Depending upon the characteristics, the effluents from all points have been classified into nine streams as (i) raw material cracking unit, (ii) various polymer production units, (iii) sanitary waste, (iv) oily water sewage (OWS), (v) cooling tower blowdown, (vi) neutralization waste, and (vii) slop oil from KOD. A WWTP diagram is depicted in Figure 3.Figure 3
Graphical representation of WWTP.Effluent from all unit of industry received at WWTP b/l under pressure is routed to tilted filter bed for removal of free oil and suspended solids. This effluent along with the effluent obtain from high density polymeric unit received under pressure is routed further to the equalization tank for equalization of flow and quality. OWS effluent received at WWTP by gravity is routed to grit chamber and finally to filter bed through dedicated pumps in dry weather flow condition. The equalized effluent is pumped at constant flow rate to the pH adjustment tank for required pH adjustment and further routed to the Dissolved Air Flotation (DAF) tanks for removal of emulsified oil and suspended solids by deemulsification. Alum and Deoiling Polyelectrolyte are added for coagulation-flocculation and deemulsification. In case of high sulfide content (>20 mg/l), hydrogen peroxide is added to reduce the sulfide to elemental sulfur, which can be reduced in DAF tank.The effluent from DAF tank is routed to biological treatment system by Activated Sludge Process operating in extended aeration mode for removal of biodegradable organic matter, resulting in reduction of BOD and corresponding COD. Sanitary effluent is also routed to aeration tank after passing through bar screen and grit chamber. Dosing facility for urea and other chemicals has been provided to meet the nutrient requirement. The effluent from aeration tank is routed to clarifier unit, where biomass is settled, and clarified effluent is taken to pond. The settled sludge from the clarifier is routed to bio-sludge sump for recycling it, in part, to aeration tank inlet by pumping with dedicated pumps. Surface aerator is provided to maintain a DO level of 4.0 mg/l at the outlet. The effluent from pond is pumped for disposal through pipeline. Cooling tower blowdown (CTBD) and neutralization waste are received through separate pipes at WWTP b/l under pressure and shall be stored in CTBD and DM waste pond before pumping for disposal through pipeline. Slop oil from KOD is received under pressure and routed to slop oil tank of WWTP. During wet weather, the contaminated rainwater shall be pumped through dedicated WWF pump to pond. The effluent from pond shall be emptied at constant rate and pumped by dedicated pumps to tilted filter bed for free oil removal and then joining the mainstream.Regarding the slop oil skimmed from filter bed, equalization tanks and surge pond are routed to wet slop oil sump and further pumped to slop oil tank by dedicated pumps. The chemical and oil sludge collected from filter bed and DAF is routed to chemical and oily sludge sump from where it is routed to sludge thickener by dedicated pumps. Bio-sludge and chemical and oily sludge received in thickener are routed to thickened sludge sump after thickening and further routed to centrifuge by dedicated pumps. Dewatering polyelectrolyte is added to get higher concentration of sludge. The cent rate from centrifuge, decanted water from slop oil tank, and supernatant from thickener is routed to receiving sump through underground line by gravity.


## 5. Interval Type-2 Fuzzy Logic Approach

We are utilizing the Haldia wastewater treatment plant to convey confirmed proof to this hypothesis. Haldia is one the very pinnacle of mechanically progressed and metropolitan urban areas in our India. To the standout of data, this examination contributes the exceptionally beginning work to demonstrate the techniques for a wastewater treatment plant by utilizing of IT2FLC approaches. The examination does not investigate any prior evaluations of the natural impacts of the plant or the resulting formative periods of this.


### 5.1. Preparation of the Proposed Model

In this exploration, we have set up a fluffy assessment model of wastewater treatment from any modern wastewater as characterized in the accompanying unit. The unit proportions of info and yield variable amount for the proposed model on wastewater are additionally characterized. The T2FS hypothesis is a fitting numerical execution that has the capacity cycle these sorts of phonetic terms clearly. Hence, the interval type 2 fuzzy strategies are applied to propose a proficient and coordinated vulnerability displaying in this exploration [9]. We have set up this model under interval type 2 fuzzy environmental elements for ideal wastewater treatment interestingly. The relevance of T2FL on this model is additionally presented in this part. A square chart has been portrayed in Figure 4.where OutiT2FL represents the output to each specific T2FL model as shown in Figure 5, which is the ith input to the T2FLC.Figure 4
MFs for input variables of the process BOD, COD, TSS,T, and pH.Figure 5
MFs for outputs variables of the process parameters BOD, COD, and TSS.(4)Out^i=T2FLiBOD,COD,TSS,T,pH,


#### 5.1.1. Selection of Input-Output Variables

For the development of the fuzzy model to predict the quality of water in IT2FL scenario, we consider several input parameters for raw water like Biochemical Oxygen Demand (BOD), Chemical Oxygen Demand (COD), pH, Total Suspended Solids (TSS), and temperature. Any other parameters, such as ammonia, are excluded because their presence in wastewater is reflected in their BOD and COD levels. All the above consider the input parameter to directly affect the quality of water. The output parameters considered for treated water are Biochemical Oxygen Demand (BOD), Chemical Oxygen Demand (COD), and Total Suspended Solids (TSS).The terminologies Biochemical Oxygen Demand (BOD) and Chemical Oxygen Demand (COD) measure the amount of Dissolved Oxygen (DO) utilized by the aerobic organism for the decomposition of organic matter at a certain temperature, whereas COD measures the oxygen used for chemical breakdown of organic substance. Total Suspended Solids (TSS) measure the weight of all the particles that are not soluble in water under dry conditions. Lowering the value of BOD, COD, and TSS better is the quality of the water. The water quality parameters of entering and outgoing water stream from a wastewater treatment facility are measured monthly and tabulated in Tables1 and 2. In total, 17 data points are tabulated. In case of IT2FLC, the repetition of data does not have any significance since the algorithms always provide the same response in corresponding to the same input parameters. This calculation of many ranges of output parameters helps manufacturers articulate such system environment to sustain the process situations in an appropriate way throughout the wastewater treatment. This knowledge encourages us to express the planned model. It is the collection of six functional steps of FIS.Table 1
S.D and mean of input parameters for BOD, COD, TSS,T, and pH.
i/pBODCODTSSTpHS.DmS.DmS.DmS.DmS.Dm124.2429.5522.75592.919.3212.690.9821.140.157.78217.55388.7516.25559.7516.89231.161.2523.140.187.74321.8416.5915.42555.8613.89302.491.4924.10.27.49415.15359.511.1506.4621.4208.550.9521.550.198517.9303.1512.11499.4913.79300.51.4517.290.268.29617.5386.5818.77569.9213.19258.591.1122.120.197.59713.6324.6526.18442.1926.26185.80.9619.360.188.6822.35425.5734.12632.7811.29271.960.8820.160.1987.41916.85309.6811512.1813.68298.521.1918.720.198.251020407.9513.19538.4719.17217.481.121.860.117.881114.75326.1511.1512.517.77230.091.5223.690.187.961215.3320.511.46503.916.51310.191.1619.10.218.291324.4428.3818.5958011.7282.591.1221.660.197.61417.5305.8511.5503.5512.49283.281.1919.780.187.991515.28335.8711.18511.1912.69286.791.2917.980.257.31618.75394.3711.3520.4912282.791.16318.890.197.681716.1372.5415.09486.8517.69226.481.122.080.177.7Table 2
S.D and mean of output parameters for BOD, COD, and TSS.
o/pBODCODTSSS.DmS.DmS.Dm13.8738.684.5654.892.0511.7823.4935.693.9950.481.1916.1931.9326.83.6848.591.5220.2441.9825.442.8840.581.9112.3652.2922.552.938.891.4919.9862.322.823.16391.6113.6271.8827.773.1146.622.2610.2184.3941.127.1565.841.2919.7591.9625.32.9838.491.6119.99103.4836.365.33571.7512.81112.6520.393.6134.321.1917.69122.3122.112.9138.481.3217.16133.2634.885.19571.1116.9914224.482.9938.591.3919.19152.1424.492.9639.441.4919.49162.3922.13.3936.121.2915172.229.013.1343.522.0112.01Linguistic variables are employed to create fuzzy membership functions for inputs to the projected model by combining data obtained on the variance of three outputs for enhancing quality of the water with the specialized judgement of professionals. Low (L), medium (M), and high (H) (refer to Figure6) are the linguistic variables for all five input parameters: BOD, COD, TSS, temperature, and pH. BOD, COD, and TSS are the output parameters, which are often categorized into the same linguistic terms as the input parameters.Figure 6
IT2FIS rule.


### 5.2. Resultant Method

Fuzzy logic is a soft computing technique that has the credibility of taking into consideration nonlinear and ambiguous results. The most essential things are two sorts of FIS, that is, Mamdani and Sugeno fuzzy methods. At the point when the yield factors are likewise fluffy sets with participation work, then MFIS is the most habitually utilized deduction strategy.One more inference technique is the Takagi-Sugeno-Kang method of FIS. A distinctive canonical fuzzy rule for this technique has the following form:Ifq is D˜˜ and r is E˜˜, then s=fq,r, where D˜˜ and E˜˜ are interval type 2 fuzzy sets in the antecedent, and s=fq,r is a crisp function in the consequent. Usually, fq,r is a polynomial in the input variables q and r [30]. The key difference between the two approaches lies in the consequent of the fuzzy rules.The Mamdani span T2FLS structure is utilized in the IT2FLS Toolbox. The arranged fuzzy model with 5 input and 3 yield factors is now introduced in Figure7. In this proposed fuzzy model, we have utilized 17 rules of if-then type in this prediction scenario depicted in Figure 6. To evaluate the sensible combination AND and OR, the Min and Max operators were used. To do suggestion and comprehensive methodologies, we used the Min and Max operators, accordingly. The defuzzification is done using the centroid technique.Figure 7
Block diagram of SCT2FL process.


## 5.1. Preparation of the Proposed Model

In this exploration, we have set up a fluffy assessment model of wastewater treatment from any modern wastewater as characterized in the accompanying unit. The unit proportions of info and yield variable amount for the proposed model on wastewater are additionally characterized. The T2FS hypothesis is a fitting numerical execution that has the capacity cycle these sorts of phonetic terms clearly. Hence, the interval type 2 fuzzy strategies are applied to propose a proficient and coordinated vulnerability displaying in this exploration [9]. We have set up this model under interval type 2 fuzzy environmental elements for ideal wastewater treatment interestingly. The relevance of T2FL on this model is additionally presented in this part. A square chart has been portrayed in Figure 4.where OutiT2FL represents the output to each specific T2FL model as shown in Figure 5, which is the ith input to the T2FLC.Figure 4
MFs for input variables of the process BOD, COD, TSS,T, and pH.Figure 5
MFs for outputs variables of the process parameters BOD, COD, and TSS.(4)Out^i=T2FLiBOD,COD,TSS,T,pH,


### 5.1.1. Selection of Input-Output Variables

For the development of the fuzzy model to predict the quality of water in IT2FL scenario, we consider several input parameters for raw water like Biochemical Oxygen Demand (BOD), Chemical Oxygen Demand (COD), pH, Total Suspended Solids (TSS), and temperature. Any other parameters, such as ammonia, are excluded because their presence in wastewater is reflected in their BOD and COD levels. All the above consider the input parameter to directly affect the quality of water. The output parameters considered for treated water are Biochemical Oxygen Demand (BOD), Chemical Oxygen Demand (COD), and Total Suspended Solids (TSS).The terminologies Biochemical Oxygen Demand (BOD) and Chemical Oxygen Demand (COD) measure the amount of Dissolved Oxygen (DO) utilized by the aerobic organism for the decomposition of organic matter at a certain temperature, whereas COD measures the oxygen used for chemical breakdown of organic substance. Total Suspended Solids (TSS) measure the weight of all the particles that are not soluble in water under dry conditions. Lowering the value of BOD, COD, and TSS better is the quality of the water. The water quality parameters of entering and outgoing water stream from a wastewater treatment facility are measured monthly and tabulated in Tables1 and 2. In total, 17 data points are tabulated. In case of IT2FLC, the repetition of data does not have any significance since the algorithms always provide the same response in corresponding to the same input parameters. This calculation of many ranges of output parameters helps manufacturers articulate such system environment to sustain the process situations in an appropriate way throughout the wastewater treatment. This knowledge encourages us to express the planned model. It is the collection of six functional steps of FIS.Table 1
S.D and mean of input parameters for BOD, COD, TSS,T, and pH.
i/pBODCODTSSTpHS.DmS.DmS.DmS.DmS.Dm124.2429.5522.75592.919.3212.690.9821.140.157.78217.55388.7516.25559.7516.89231.161.2523.140.187.74321.8416.5915.42555.8613.89302.491.4924.10.27.49415.15359.511.1506.4621.4208.550.9521.550.198517.9303.1512.11499.4913.79300.51.4517.290.268.29617.5386.5818.77569.9213.19258.591.1122.120.197.59713.6324.6526.18442.1926.26185.80.9619.360.188.6822.35425.5734.12632.7811.29271.960.8820.160.1987.41916.85309.6811512.1813.68298.521.1918.720.198.251020407.9513.19538.4719.17217.481.121.860.117.881114.75326.1511.1512.517.77230.091.5223.690.187.961215.3320.511.46503.916.51310.191.1619.10.218.291324.4428.3818.5958011.7282.591.1221.660.197.61417.5305.8511.5503.5512.49283.281.1919.780.187.991515.28335.8711.18511.1912.69286.791.2917.980.257.31618.75394.3711.3520.4912282.791.16318.890.197.681716.1372.5415.09486.8517.69226.481.122.080.177.7Table 2
S.D and mean of output parameters for BOD, COD, and TSS.
o/pBODCODTSSS.DmS.DmS.Dm13.8738.684.5654.892.0511.7823.4935.693.9950.481.1916.1931.9326.83.6848.591.5220.2441.9825.442.8840.581.9112.3652.2922.552.938.891.4919.9862.322.823.16391.6113.6271.8827.773.1146.622.2610.2184.3941.127.1565.841.2919.7591.9625.32.9838.491.6119.99103.4836.365.33571.7512.81112.6520.393.6134.321.1917.69122.3122.112.9138.481.3217.16133.2634.885.19571.1116.9914224.482.9938.591.3919.19152.1424.492.9639.441.4919.49162.3922.13.3936.121.2915172.229.013.1343.522.0112.01Linguistic variables are employed to create fuzzy membership functions for inputs to the projected model by combining data obtained on the variance of three outputs for enhancing quality of the water with the specialized judgement of professionals. Low (L), medium (M), and high (H) (refer to Figure6) are the linguistic variables for all five input parameters: BOD, COD, TSS, temperature, and pH. BOD, COD, and TSS are the output parameters, which are often categorized into the same linguistic terms as the input parameters.Figure 6
IT2FIS rule.


## 5.1.1. Selection of Input-Output Variables

For the development of the fuzzy model to predict the quality of water in IT2FL scenario, we consider several input parameters for raw water like Biochemical Oxygen Demand (BOD), Chemical Oxygen Demand (COD), pH, Total Suspended Solids (TSS), and temperature. Any other parameters, such as ammonia, are excluded because their presence in wastewater is reflected in their BOD and COD levels. All the above consider the input parameter to directly affect the quality of water. The output parameters considered for treated water are Biochemical Oxygen Demand (BOD), Chemical Oxygen Demand (COD), and Total Suspended Solids (TSS).The terminologies Biochemical Oxygen Demand (BOD) and Chemical Oxygen Demand (COD) measure the amount of Dissolved Oxygen (DO) utilized by the aerobic organism for the decomposition of organic matter at a certain temperature, whereas COD measures the oxygen used for chemical breakdown of organic substance. Total Suspended Solids (TSS) measure the weight of all the particles that are not soluble in water under dry conditions. Lowering the value of BOD, COD, and TSS better is the quality of the water. The water quality parameters of entering and outgoing water stream from a wastewater treatment facility are measured monthly and tabulated in Tables1 and 2. In total, 17 data points are tabulated. In case of IT2FLC, the repetition of data does not have any significance since the algorithms always provide the same response in corresponding to the same input parameters. This calculation of many ranges of output parameters helps manufacturers articulate such system environment to sustain the process situations in an appropriate way throughout the wastewater treatment. This knowledge encourages us to express the planned model. It is the collection of six functional steps of FIS.Table 1
S.D and mean of input parameters for BOD, COD, TSS,T, and pH.
i/pBODCODTSSTpHS.DmS.DmS.DmS.DmS.Dm124.2429.5522.75592.919.3212.690.9821.140.157.78217.55388.7516.25559.7516.89231.161.2523.140.187.74321.8416.5915.42555.8613.89302.491.4924.10.27.49415.15359.511.1506.4621.4208.550.9521.550.198517.9303.1512.11499.4913.79300.51.4517.290.268.29617.5386.5818.77569.9213.19258.591.1122.120.197.59713.6324.6526.18442.1926.26185.80.9619.360.188.6822.35425.5734.12632.7811.29271.960.8820.160.1987.41916.85309.6811512.1813.68298.521.1918.720.198.251020407.9513.19538.4719.17217.481.121.860.117.881114.75326.1511.1512.517.77230.091.5223.690.187.961215.3320.511.46503.916.51310.191.1619.10.218.291324.4428.3818.5958011.7282.591.1221.660.197.61417.5305.8511.5503.5512.49283.281.1919.780.187.991515.28335.8711.18511.1912.69286.791.2917.980.257.31618.75394.3711.3520.4912282.791.16318.890.197.681716.1372.5415.09486.8517.69226.481.122.080.177.7Table 2
S.D and mean of output parameters for BOD, COD, and TSS.
o/pBODCODTSSS.DmS.DmS.Dm13.8738.684.5654.892.0511.7823.4935.693.9950.481.1916.1931.9326.83.6848.591.5220.2441.9825.442.8840.581.9112.3652.2922.552.938.891.4919.9862.322.823.16391.6113.6271.8827.773.1146.622.2610.2184.3941.127.1565.841.2919.7591.9625.32.9838.491.6119.99103.4836.365.33571.7512.81112.6520.393.6134.321.1917.69122.3122.112.9138.481.3217.16133.2634.885.19571.1116.9914224.482.9938.591.3919.19152.1424.492.9639.441.4919.49162.3922.13.3936.121.2915172.229.013.1343.522.0112.01Linguistic variables are employed to create fuzzy membership functions for inputs to the projected model by combining data obtained on the variance of three outputs for enhancing quality of the water with the specialized judgement of professionals. Low (L), medium (M), and high (H) (refer to Figure6) are the linguistic variables for all five input parameters: BOD, COD, TSS, temperature, and pH. BOD, COD, and TSS are the output parameters, which are often categorized into the same linguistic terms as the input parameters.Figure 6
IT2FIS rule.


## 5.2. Resultant Method

Fuzzy logic is a soft computing technique that has the credibility of taking into consideration nonlinear and ambiguous results. The most essential things are two sorts of FIS, that is, Mamdani and Sugeno fuzzy methods. At the point when the yield factors are likewise fluffy sets with participation work, then MFIS is the most habitually utilized deduction strategy.One more inference technique is the Takagi-Sugeno-Kang method of FIS. A distinctive canonical fuzzy rule for this technique has the following form:Ifq is D˜˜ and r is E˜˜, then s=fq,r, where D˜˜ and E˜˜ are interval type 2 fuzzy sets in the antecedent, and s=fq,r is a crisp function in the consequent. Usually, fq,r is a polynomial in the input variables q and r [30]. The key difference between the two approaches lies in the consequent of the fuzzy rules.The Mamdani span T2FLS structure is utilized in the IT2FLS Toolbox. The arranged fuzzy model with 5 input and 3 yield factors is now introduced in Figure7. In this proposed fuzzy model, we have utilized 17 rules of if-then type in this prediction scenario depicted in Figure 6. To evaluate the sensible combination AND and OR, the Min and Max operators were used. To do suggestion and comprehensive methodologies, we used the Min and Max operators, accordingly. The defuzzification is done using the centroid technique.Figure 7
Block diagram of SCT2FL process.


## 6. Outcomes and Conversation

The outcome acquired from the model is the recognized worth. To control the yield boundary, COD, BOD, and TSS are some factual boundaries. In order to monitor the influence of the inputs on the output parameters, IT2FLC methodology provides several surface views, as depicted in Figures8–13. The affectability of the projected Box-Behnken methodology model has been assessed by utilizing the test information in the prepared information and looking at the yields and anticipated qualities. Measurable boundaries like the Root Mean Square Error (RMSE) and the Determination Coefficient R2 are applied to look and anticipating what is more, yield upside of the model. The RMSE is distinct by the accompanying(5)RMSE=1j∑i=1jrpredi−robsi2.Figure 8
Surface view of COD of the treated water with BOD of the raw water and temperature.Figure 9
Surface view of COD of the treated water with BOD of the raw water and pH.Figure 10
Surface view of BOD of the treated water with COD of the raw water and pH.Figure 11
Surface view of TSS of the treated water with pH and COD of the raw water.Figure 12
Surface view of BOD of the treated water with TSS of the raw water and pH.Figure 13
Surface view of COD of the treated water with TSS of the raw water and pH.Furthermore, the Determination CoefficientR2 can be planned by utilizing equation (6) that can be determined by(6)R2=1−∑i=1jrpredi−robsi2∑i=1jrobsi2.The normal of the squares of the errors can be determined using the Mean Absolute Percentage Error (MAPE). The smaller the value of a MAPE is, the more sensitive the predicting model will be. The MAPE can be determined by the accompanying(7)MAPE=1j∑i=1jrpredi−robsirpredi×100%.Nonetheless, the presentation and effectiveness of the proposed models are likewise examined by utilizing the Mean Absolute Error (MAE):(8)MAE=1j∑i=1jrpredi−robsi,where j is the quantity of accessible information designs in the informational collection, rpredi highlights the anticipated worth of one information point i, and furthermore, robsi is the recognized worth of one information point i. The graphical representation of such T2FL rule is displayed in Figure 6.


### 6.1. Error Analysis by Using of the MLR

On the off-chance thatxi is equivalent to dealing with boundaries, and ei means low prescient error that is streamlining objective, the Multiple Linear Regression or MLR can be recorded as(9)yi=b0+b1xi1+b2xi2+⋯+bnxin+ei.Statistical error analysis is done for measuring the sensitivity of the proposed model. The statistical correlation coefficientR2 can be used in MATLAB 2014a to evaluate the appropriateness of the forecasted result obtained from the planned model using observational evidence.For every input and output data, the developed model is computed for estimating the quality of the water discharge in the ecosystem by industry in IT2F environment. Considering the trial information, the outcome obtained from the model is worth noticing. To control the nature of the water by the logical model, we take some obvious measurable boundaries. The expectation capacity of the arranged model is assessed by utilizing the test information in the prepared information and making comparison among yields and estimated values. We executed a few data analyses and thought about them to illustrate the validity of the structured type 2 fuzzy model. This is solely for consistency of the yield bounds to demonstrate that we have made MLR and ANFIS, which also are supplied in Table3 through ANFIS and MLR findings that are totally predicted.Table 3
Statistically examination of information by utilizing of the ANFIS and MLR.
ApproachesRMSEMAEMAPER2MLR0.054130.07720.9680.9714ANFIS0.051870.07630.9780.9894The surface plot signifies the relationship between BOD, COD, Ph, temperature, and TSS. The result showed us that there has a very high degree of conformism in between the experimental and the observed data.A near report has been done from pragmatic information on the gushing water quality. We have determined the distinct T2FL, in which the MAPE for BOD, COD, and TSS in the testing stage is between 12 and 15%. In literature, the MAPE in the testing step is reduced to 6%–9% when the CFL model is used. In the testing step, the SCFL model strengthening reduces MAPE to 5%. The SCFL model is a better substitute for the individual T1FL and T2FL models used at the Wastewater Treatment Plant in terms of predicting the type of emerging water boundaries.


## 6.1. Error Analysis by Using of the MLR

On the off-chance thatxi is equivalent to dealing with boundaries, and ei means low prescient error that is streamlining objective, the Multiple Linear Regression or MLR can be recorded as(9)yi=b0+b1xi1+b2xi2+⋯+bnxin+ei.Statistical error analysis is done for measuring the sensitivity of the proposed model. The statistical correlation coefficientR2 can be used in MATLAB 2014a to evaluate the appropriateness of the forecasted result obtained from the planned model using observational evidence.For every input and output data, the developed model is computed for estimating the quality of the water discharge in the ecosystem by industry in IT2F environment. Considering the trial information, the outcome obtained from the model is worth noticing. To control the nature of the water by the logical model, we take some obvious measurable boundaries. The expectation capacity of the arranged model is assessed by utilizing the test information in the prepared information and making comparison among yields and estimated values. We executed a few data analyses and thought about them to illustrate the validity of the structured type 2 fuzzy model. This is solely for consistency of the yield bounds to demonstrate that we have made MLR and ANFIS, which also are supplied in Table3 through ANFIS and MLR findings that are totally predicted.Table 3
Statistically examination of information by utilizing of the ANFIS and MLR.
ApproachesRMSEMAEMAPER2MLR0.054130.07720.9680.9714ANFIS0.051870.07630.9780.9894The surface plot signifies the relationship between BOD, COD, Ph, temperature, and TSS. The result showed us that there has a very high degree of conformism in between the experimental and the observed data.A near report has been done from pragmatic information on the gushing water quality. We have determined the distinct T2FL, in which the MAPE for BOD, COD, and TSS in the testing stage is between 12 and 15%. In literature, the MAPE in the testing step is reduced to 6%–9% when the CFL model is used. In the testing step, the SCFL model strengthening reduces MAPE to 5%. The SCFL model is a better substitute for the individual T1FL and T2FL models used at the Wastewater Treatment Plant in terms of predicting the type of emerging water boundaries.


## 7. Conclusions and Upcoming Study Work

In our exploration, we have set up IT2FLC model to estimate profluent water quality over the wastewater treatment plant in India. The review shows that Mamdani T2FL and Mamdani T1FL models are astute to figure COD, BOD, and TSS boundaries for the TWWTP. Straight gathering of the three T2FL models by the CFL calculation dominates separate T2FL portrayals by refining the assessed result. Moreover, the results of utilizing the CFL-WA show work on fit to the deliberate water quality information more than the CFL with straightforward averaging (CFL-SA). The results convey the idea that the SCFL model can forecast more exact profluent water quality boundaries of TWWTP than different substitutions attempted in this venture. Impending review works could zero in on hourly information for gauging profluent quality boundaries more exactly. For additional review work, we will take advantage of and incorporate extra canny strategies, like interpretative primary demonstrating technique, Simulink, and fuzzy ANN, to appraise the size of proficiency of our current work.



---

*Source: 1965157-2022-06-03.xml*