Forecasting Wastewater Treatment Results with an ANFIS Intelligent System

Wastewaters caused by industrial and manufacturing production containing pollutants which beside degradation and depletion of natural resources, impose excessive pressure on the Earth's ecosystems and exacerbate water shortages. One of the pollutants is a toxic substance named Malachite Green (MG). Wastewater treatment means to obtain usable water by separating contaminants of contaminated water. One of its main purposes is the recovery and re-use of wastewater for a variety of uses including agriculture and aquaculture, especially in arid and semi-arid countries, as well as providing environmental protection. The main purpose of the present study was to investigate MG separation efficiency by nano composite materials. Poly-aniline was covered on Wheat Husk Ash in order to prepare this type of nano composite. The material was analyzed by X-ray radiation and scanned by an electron microscope. The level of separation depends on the initial value of wheat husk ash and poly-aniline and the initial concentration of MG and the intensity of ultraviolet radiation and radiation time. The effect of these parameters was investigated and optimum operating conditions were obtained. An adaptive neural fuzzy intelligent system was used to forecast the results of the MG separation process. The comparison between the results forecasted by the designed model and experimental data strengthens the validity of the process. Keywords-Malachite Green (MG); industrial wastewater treatment; adaptive neural fuzzy intelligent system; ANFIS


INTRODUCTION
Wastewaters caused by industrial and manufacturing production contain various pollutants and have a huge environmental impact.Therefore, treatment should be applied before discharging wastewaters into the environment.The issue of reducing the volume of pollution and removing pollutants and toxins and colored wastewaters has been one of the most important research topics in recent years and many works has been done in this field.[1-3, 5-21, 25-26].Polymer and nano materials are bound to play an important role in such treatments, therefore specific works in this field [4,[22][23][24][27][28][29] are of interest for researchers focusing on wastewater treatment.As a detail laboratory evaluation of different treatments is time and cost consuming, advanced forecasting techniques are often employed for assessment [1-3, 15, 17, 20, 21 In this study, a new method, using an ANFIS model is proposed to forecast treatment results.ANFIS is a Fuzzy inference tool that has been implemented within the framework of adaptive networks.This method combines the ability to fuzzy learning with the versatility and the self-learning of neural networks.In this study, a subtractive clustering method was also employed to increase forecasting speed and efficiency.

A. Industrial wastewater
The quality of industrial wastewater is very diverse because of a large variety of chemicals are used and it highly depends on the related industry.In the metal industry for example, production process or coating metal parts create a large amount of wastewater contaminated with heavy metals such as copper, cadmium, silver, mercury, chromium or nickel which are considered as most dangerous pollutants.In the dairy industry, a lot of fat-soluble wastes are generated different parts of the production unit which.In textile, leather, cosmetics and personal care and paper making industries, colors and organic materials are the most often found pollutants.
Industrial wastewater is usually divided into the following groups: • Wastewater related to the industrial process for the production line • Wastewater of utilities sector related to the process of water treatment, water boiler and cooling tower and public facilities • Sewage of washing tanks, premises and sudden discharge which are similar to the wastewater of production line.
The concentration of industrial wastewaters is usually measured by contaminants.Since, the nature of the above pollutions are mostly different, there are different methods to treat the industrial wastewaters.

1) Malachite Green (MG)
One of contaminants in industrial wastewaters is a toxic substance named malachite green (MG).Malachite green is usually used for dyeing cotton, cream, silk and paper stuck.
Malachite green filtration and separation process is done using poly-aniline Nano-composites.Composite is a compound material with a few structures.Wheat husk ash in combination with poly-aniline forms a composite.Poly-aniline polymerase is derived from aniline, which is a chemical substance and used to treat wastewater.Wastewater treatment means to obtain usable water by separating and removing pollutants from contaminated water.

2) Industrial wastewater treatment
The first step of industrial wastewater treatment is to carry out qualitative analysis and identifying the type of contamination.In the next step, the wastewater treatment system is designed and implemented based on the type of contamination.
At present, in gas (air), liquid (water) and solid (soil) phases there are three kinds of treatment method which can be used separately or in combination with each other: Chemical methods can be expensive or produce dangerous excipients and in the case of facing a pollutant with excessive construction, the condition will be more critical, because of high costs, low rate of chemical reaction, the need of building reactors with certain characteristics and the possibility of chemical substance remaining on the process which itself can be dangerous.Whatever the size of pollutant's particles is smaller, its physical removal needs more costs.On the other hand most physical methods are not able to remove contaminants with very small sizes.Biological methods have low costs and are commonly used, but they are sufficient for all pollutants and they also suffer in terms of speed, controllability and efficiency.

3) Supplying and preparing the materials
Aniline, potassium iodates (KIO3), ferric chloride (FeCl3), sodium hydroxide (Na-OH), sulfuric acid and malachite green were obtained from Merck (Germany) and used without any purification.Wheat straw (WHA) is a by-product obtained using a wheat mill.The SEM image of wheat straw is shown in Figure 1.Distilled water was used to wash wheat crust, which was then dried in the oven at C ° 60 for 2 hours.At the next step, it was washed using acetone and sodium hydroxide (M0.3) to separate dust and other contaminants in it and was dried in the oven at C ° 60 for 24 hours [21].SEM image of a wheat straw 4) Nano-composites / poly-aniline synthesis WHA 1 g of KIO3 was added to 100 ml of sulfuric acid to prepare the nano-composites of aniline/wheat straw and then a uniform solution was obtained using a magnetic stirrer.In continue, 1 g of wheat husk ash was added to the solution and then 1 ml of fresh distilled aniline monomer was added to the solution.The reaction lasted for 5 hours at room temperature.As a result, the product was filtered on filter paper and washed with distilled water for several times to isolate the oligomers and impurities.Then, it was dried in the oven at C ° 60 for 24 hours.The SEM and IR spectrum are shown in Figures 2 and 3

5) Analytical method
The Nano-composite of MG was used as pollutants in the vicinity of PAN/WHA.All samples were gathered and analyzed at 690 nm using a UV-VIS Spectrophotometer (200, high settings of England biotech).The linear correlation between the concentration and absorption of MG in the range of 1-10 mg was obtained at correlation coefficient level of R2=0.9.The following equation was used to calculate the photo-catalytic removal efficiencies (R %) in the experiment [21].

6) Wastewater treatment using poly-aniline nano-composite
Cheap raw materials, cheap and environmentally friendly methods of preparation are among advantages of the Nanocomposites.The synthesize of suitable nano-composites was done using poly-pyrrole and aniline monomers and base materials.Different nano-composites polymers were synthesized and different effects such as the type of oxidizing, synthesis environment, temperature conditions, etc. were investigated to obtain the most proper composite.Among the most striking characteristic of this nano-composite, is removing color, odor, anionic and cationic only in one stage and in a very short time period.

B. Adaptive neural fuzzy intelligent system (ANFIS)
The ANFIS system was firstly proposed in [30].In such a system, fuzzy logic is combined with artificial neural networks to facilitate the learning and adaptation process.An adaptive network which generally is a leading multi-layer neural network is used in fuzzy-neural models to solve the problem of fuzzy inference system parameters' identifying.An adaptive network is a leading multi-layer structure which the overall output behavior of it is determined by a number of modifiable parameters.The main form of fuzzy systems' usage which is fuzzy " if and then" rules and optimizing model's parameters is gained by using adaptive neural network.The most common type of fuzzy inference systems which can exposure in an adaptive is the Takagi-Sugeno fuzzy system.To simplify, it is assumed that the under investigation fuzzy inference system includes inputs of x and y and an output of "f" with rule base of "if and then".The rules of this system are:  The second rule: if x is A 2 and y is B 2 , then: f 2 = p 2 x + q 2 y + r 2 Where, A 1 and A 2 are the membership functions of input x and B 1 and B 2 are the membership functions of input y and p 1 , q 1 , r 1 , p 2 , q 2 and r 2 are the parameters of output function.The overall structure of a fuzzy inference-neural system is shown in Figure 4 where N is the input variable (here N is equal to 4).Five layers have been used to make this model.Each layer includes e few nodes which has been defined by the function of the node.The Compatible nodes signed with squares show the parameters sets which are adaptable in the nodes.In contrast, the fixed nodes signed with circles indicate the fixed parameters of model.The fuzzy inference-neural system Layer1: the first layer is a fuzzy layer which turns inputs to a fuzzy set by membership functions.These layers are adaptive nodes which are as follow: o =μ (y), for i=3,4 Where, x and y are the input nodes of "I".A and B are time tags corresponding to each node.μ(x) and μ(y) are membership functions.
Layer2: each node in this layer is a fixed node tagged by П. o 2,i is the output of the second layer: Layer3: each node in this layer is a fixed node tagged by N. o 3,i is the output of third layer: ) w + w Layer4: each node in this layer is an adjustable node.o 4,i is the output of third layer: Layer5: each node in this layer is a fixed node and the output is: The simplest rule of fuzzy-neural inference system is "back-propagation" which calculates the error signals in a propagation manner from output layer (layer5) backward to input nodes (layer1).In training of these systems, with utilizing from training data the non-linear parameters of fuzzy membership functions in the first layer and the linear parameters of fourth layer are determined in a way that the desired output is reached for each arbitrary input.This hybrid training method is one of the most important training methods of adaptive neural network-based fuzzy inference systems.In this method, the error back propagation approach in the first layer and the least squares estimator approach in the fourth layer are used to training.The actual structure of the ANFIS model used is shown in Figure 5.

C. Subtractive clustering
The aim of clustering is to find similar clusters of objects among input samples [31][32].Although, there is no clear idea about the number of clusters, subtractive clustering is a quick method to solve this problem [33][34].Sometimes, the centers estimated by this method are considered as initial points of other clustering algorithms.The subtractive clustering is in fact a modified form of mountain method.In this algorithm, each point is considered as a potential to cluster's center.The measurement of potential is carried out and the the allocated potential to each cluster depends on its distance from other points and in the cases with integrated neighborhood leads to clusters with high potential.After calculating the potential of each point, point with the highest potential is selected as cluster centers.Then potential reduction is performed and the process is repeated until a stop criterion is satisfied.

A. Data preparing & forecasting scheme
The model includes four parameters of the initial concentration of MG, the initial amount of poly-aniline and wheat husk ash and time and intensity of UV radiation as input variables and removal percentage of MG as output variable as shown in Table I.The forecasting scheme is shown in Figure 6.As shown, inputs and outputs presented in Table I were logged on a neuron-fuzzy inference system for training and diagnosis.The training errors have been comprised based on ANFIS structure in combination with the 3 ways of network partitioning, clustering and fuzzy clustering and the system was trained by two algorithms (post-propagation and hybrid).Then the structure and algorithm of suitable training have been used to forecast the removal percentage of MG by comprising each of forecasted outputs with the real output.

B. Forecasting results
Since the training data error in the structure of neural adaptive fuzzy inference system have 0.008 error reduction in 100 iterations based on subtractive clustering structure, this structure was selected and re-trained considering training algorithms which its results have been represented in this section.The results from different structures for the back propagation case are shown in Figures 7-12 whereas the results from different structures for the hybrid case are shown in Figures 13-18.As shown, the difference between the obtained output and the real output is negligible in all cases.The ANFIS intelligent model was utilizing in MATLAB.Three different structures (ANFIS-GP, ANFIS-SUB, ANFIS-FCM) were compared and the ANFIS-SUB structure was finally chosen and trained by two methods (BP, Hybrid).The proposed model was trained by receiving actual data (70% of data) and then evaluated (30% of data).Then the forecast was compared to actual values.According to the histogram diagrams of error values, the adaptive neuron-fuzzy inference system trained by hybrid method led to better results.According to the training performance and evaluation, the difference between output data of ANFIS and detailed (real) output data in training and testing stages of ANFIS is negligible.The diagrams have high overlap on each other in the hybrid method and it can be concluded that utilizing from the subtractive clustering-based structure of adaptive neuron-fuzzy inference system trained by hybrid method provides better results.As shown, it is possible to provide an accurate and detailed forecasting about the removal percentage of Malachite Green and also, it is possible to use this factor in other similar cases after training the system.

V. CONCLUSION
Forecasting the results of wastewater treatment using an ANFIS model was investigated in this paper.Different schemes and training algorithms were evaluated.Finally, it was derived that the ANFIS-SUB structure trained under a hybrid algorithm provided the best results.The results showed a rather satisfying efficiency for the forecasting scheme.The pollutant tested was Malachite Green and actual data was used to train and evaluate the system.A similar approach however, could be used for other pollutants.

Fig. 2 .
Fig. 2. SEM image of WHA Nano-composite/poly-aniline Where c o (mg/L) and c t (mg/L) are the initial concentration of MG and MG concentration at the time of t, respectively.

Fig. 5 .
Fig. 5.The structure of the ANFIS model

Fig. 18 .
Fig. 18.Difference between ANFIS output and detailed output during the testing stage of FIS2