Microsoft Word - 12-745-ed.doc Engineering, Technology & Applied Science Research Vol. 6, No. 5, 2016, 1175-1181 1175 www.etasr.com Mahshidnia and Jafarian: Forecasting Wastewater Treatment Results with an ANFIS Intelligent System Forecasting Wastewater Treatment Results with an ANFIS Intelligent System Mansoureh Mahshidnia Department of Mathematics, Urmia Branch, Islamic Azad University, Urmia, Iran Mh.mahshidnia@yahoo.com Ahmad Jafarian Department of Mathematics, Urmia Branch, Islamic Azad University, Urmia, Iran. Jafarian5594@yahoo.com Abstract—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 I. 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-24, 27- 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. II. METHODS AND MATERIALS 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. Engineering, Technology & Applied Science Research Vol. 6, No. 5, 2016, 1175-1181 1176 www.etasr.com Mahshidnia and Jafarian: Forecasting Wastewater Treatment Results with an ANFIS Intelligent System 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 • Physical methods • Biological methods 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]. Fig. 1. 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 respectively [21- 27]. Fig. 2. SEM image of WHA Nano-composite/poly- aniline Fig. 3. IR spectrum of WHA Nano-composite/poly-aniline 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]. 100   o to c cc R Where co (mg/L) and ct (mg/L) are the initial concentration of MG and MG concentration at the time of t, respectively. 6) Wastewater treatment using poly-aniline nano-composite Cheap raw materials, cheap and environmentally friendly methods of preparation are among advantages of the Nano- composites. The synthesize of suitable nano-composites was Engineering, Technology & Applied Science Research Vol. 6, No. 5, 2016, 1175-1181 1177 www.etasr.com Mahshidnia and Jafarian: Forecasting Wastewater Treatment Results with an ANFIS Intelligent System 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 first rule: if x is A1 and y is B1, then: f1 = p1x + q1 + r1  The second rule: if x is A2 and y is B2, then: f2 = p2x + q2y + r2 Where, A1 and A2 are the membership functions of input x and B1 and B2 are the membership functions of input y and p1, q1 , r1 , p2 , q2 and r2 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. Fig. 4. 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: i i-2 1,i A 1,i B o =μ (x), for i=1,2 (1) o =μ (y), for i=3,4 (2) 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 П. o2,i is the output of the second layer:   i i-22,i i A B o =w =μ (x).μ (y), for i=1,2 3 Layer3: each node in this layer is a fixed node tagged by N. o3,i is the output of third layer: i 3 , i 1 2 w o = w = , f o r i = 1 , 2 ( 4 ) w + w Layer4: each node in this layer is an adjustable node. o4,i is the output of third layer: 4,i i io =w .f , for i=1,2 (5) Layer5: each node in this layer is a fixed node and the output is: i i 5,i i i i w .f io = w .f = =fout=overall output (6) i w   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. Fig. 5. The structure of the ANFIS model Engineering, Technology & Applied Science Research Vol. 6, No. 5, 2016, 1175-1181 1178 www.etasr.com Mahshidnia and Jafarian: Forecasting Wastewater Treatment Results with an ANFIS Intelligent System 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. III. RESULTS 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. TABLE I. VARIABLES Variable Range Input Layer x1=PANI/WHA-initial dosage (g/l) 0.1-1.5 x2=mg-initial concentration (mg/l) 1-12 x3=uv-light intensity (w/m2) 8.3-40.6 x4=irradiation time (min) 0-60 Output Layer Range y=removal of MG (%) 0-100 Fig. 6. The forcasting scheme Fig. 7. Difference between ANFIS output and detailed output during the training stage Fig. 8. Difference between ANFIS output and detailed output during the testing stage Fig. 9. Difference between ANFIS output and detailed output during the training stage of FIS1 Engineering, Technology & Applied Science Research Vol. 6, No. 5, 2016, 1175-1181 1179 www.etasr.com Mahshidnia and Jafarian: Forecasting Wastewater Treatment Results with an ANFIS Intelligent System Fig. 10. Difference between ANFIS output and detailed output during the testing stage of FIS1 Fig. 11. Difference between ANFIS output and detailed output during the training stage of FIS2 Fig. 12. Difference between ANFIS output and detailed output during the testing stage of FIS2 Fig. 13. Difference between ANFIS output and detailed output during the training stage of FIS Fig. 14. Difference between ANFIS output and detailed output during the testing stage of FIS Fig. 15. Difference between ANFIS output and detailed output during the training stage of FIS1 Fig. 16. Difference between ANFIS output and detailed output during the testing stage of FIS1 Fig. 17. Difference between ANFIS output and detailed output during the training stage of FIS2 Engineering, Technology & Applied Science Research Vol. 6, No. 5, 2016, 1175-1181 1180 www.etasr.com Mahshidnia and Jafarian: Forecasting Wastewater Treatment Results with an ANFIS Intelligent System Fig. 18. Difference between ANFIS output and detailed output during the testing stage of FIS2 IV. DISCUSSION 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. REFERENCES [1] J. Wan, M. Huang, Y. Ma, W. Guo, Y. Wang, H. Zang, W. Li, X. Sun, “Prediction of effluent quality of a paper mill wastewater treatment using an adaptive network-based fuzzy inference system”, Appl. Soft Computing., Vol. 11, No.3, pp. 3238-3246, 2011 [2] H. Honggui, L. Ying, Q. Junfei, “A fuzzy neural network approach for online fault detection in waste water treatment process”, Computers. Elec. Eng., Vol. 40, No.7, pp. 2216-2226, 2014 [3] S. Pommier, D. Chenu, M. Quintard, X. Lefebvre, “A logistic model for the prediction of the influence of water on the solid waste methanization in landfills”, Biotechnology and Bioengineering., Vol. 97, No.3, pp. 473-482, 2007 [4] S. Pavlidou, C. Papaspyrides, “A review on polymer-layered silicate nanocomposites”, Prog. In. Pol. Sci., Vol. 33, No.12, pp. 1119-1198, 2008 [5] I. Michael, A. Panagi, L. A. Ioannou, Z. Frontistis, D. Fatta-Kassinos, “Utilizing solar energy for the purification of olive mill wastewater using a pilot-scale photocatalytic reactor after coagulation-flocculation”, Wat. Res., Vol. 60, pp. 28-40, 2014 [6] A. Al-Kdasi, A. Idris, K. Saed, C. Guan, “Treatment of textile wastewater by advanced oxidation processes—a review”, Global Nest: the Int. J., Vol. 6, No. 3, pp. 222-230, 2004 [7] M. Henze, P. Harremoes, J. La Cour Jansen, E. Arvin, Wastewater treatment: biological and chemical processes, Springer Science & Business Media, 2001 [8] B. Guterstam, “Demonstrating ecological engineering for wastewater treatment in a Nordic climate using aquaculture principles in a greenhouse mesocosm”, Eco. Eng., Vol. 6, No. 1, pp. 73-97, 1996 [9] J. Hinge, H. Stewart, C. Etnier, B. Guterstam, “Solar wastewater treatment in Denmark: demonstration project at Danish Folkecenter for Renewable Energy”, Eco. Eng. Waste Water., pp. 169-171, 1991 [10] S. Peterson, J. Teal, “The role of plants in ecologically engineered wastewater treatment systems”, Eco. Eng., Vol. 6, No. 1, pp. 137-148, 1996 [11] APHA, AWWA, WEF (1995) Standard methods for the examination of water and wastewater 19th ed, Wash. DC. [12] K. Larsdotter, G. Dalhammer, “Phosphorus removal from wastewater by microalgae in a greenhouse in Sweden”, WEMS. Env. Bio., pp. 183-188, 2004 [13] M. Ghorbani, H. Eisazadeh, “Removal of COD, color, anions and heavy metals from cotton textile wastewater by using polyaniline and polypyrrole nanocomposites coated on rice husk ash”, Composites Part B. Eng., Vol. 45, No. 1, pp. 1-7, 2013 [14] A. Buasri, N. Chaiyut, K. Phattarasirichot, P. Yongbut, L. Nammueng, “Use of natural clinoptilolite for the removal of lead (II) from wastewater in batch experiment”, Chiang. Mai. Sci., Vol. 35, No. 3, pp. 447-456, 2008 [15] R. Noori, A. Faokhnia, S. Morid, H. Riahi Madvar, “Effect of input variables preprocessing in artificial neural network on monthly flow prediction by PCA and wavelet transformation”, J. Water and Wastewater., Vol. 1, pp. 13-22, 2009 [16] M. Bahram, R. Talebi, A. Naseri, S. Nouri, “Modeling and Optimization of Removal of Rhodamine-B from Wastewaters by Adsorption Modified Clay”, Chiang. Mai. Sci., Vol. 41, No. 5.2, pp. 1230-1240, 2014 [17] L. Xiong, A. Shamseldin, “A non-linear combination of the forecasts of rainfall-runoff models by the first-order Takagi-Sugeno fuzzy system”, Hyd., Vol. 245, No. 1, pp. 196-217, 2001 [18] R. Noori, R. Kerachian, A. Khodadadi, A. Shakibinia, “Assessment of importance of water quality monitoring stations using principal component and factor analysis: A case study of the karoon river.” J. of Water and Wastewater, 63, 60-69, 2007 [19] Y. Ouyang, “Evaluation of river water quality monitoring stations by principal component analysis”, Wat. Res., Vol. 39, No. 12, pp. 2621- 2635, 2005 [20] R. Noori, G. Hoshyaripour, K. Ashrafi, B. Araabi, “Uncertainty analysis of developed ANN and ANFIS models in prediction of carbon monoxide daily concentration”, Atm. Env., Vol. 44, No. 4, pp. 476-482, 2010 [21] F. Ghanbary, A. Jafarian, “Polyaniline/Wheat Husk Ash Nanocomposite Preparation and Modeling Its Removal Activity With an Artificial Neural Network”, Vol. 42, No. 3, pp. 1-12, 2015 [22] M. Enhessari, A. Parvizi, K. Ozaee, E. Karamali, “Magnetic properties and heat capacity of CoTio3 nanopowders prepared by stearic acid gel method”, Journal of Experimental Nanoscience, Vol. 5, pp. 61-68, 2010 [23] K. Gupta, P. C. Janab, A. K. Meikapa, “Optical and electrical transport properties of polyaniline–silver nanocomposite”, Journal of Synthetic Metals, Vol. 160 ,pp. 1566–1573, 2010 Engineering, Technology & Applied Science Research Vol. 6, No. 5, 2016, 1175-1181 1181 www.etasr.com Mahshidnia and Jafarian: Forecasting Wastewater Treatment Results with an ANFIS Intelligent System [24] I. Bekri, E. Srasra, “Solid-state synthesis and electrical properties of polyaniline/Cu-montmorillonite nanocomposite”, Materials Research Bulletin 45, pp. 1941-1947, 2010 [25] .M Ghorbani, M. Soleimani Lashkenari, H. Eisazadeh, “Application of polyaniline nanocomposite coated on rice husk ash for removal of Hg(II) from aqueous media”, Synthetic Metals., Vol. 161, pp. 1430– 1433, 2011 [26] M. Omraei, H. Esfandian, R. Katal, M. Ghorbani, “Study of the removal of Zn(II) from aqueous solution using polypyrrole nanocomposite”, Desalination, Vol. 271, pp. 248–256, 2011 [27] M. Ghorbani, H. Eisazadeh, “Synthesis and characterization of chemical structure and thermal stability of nanometer size polyaniline and polypyrrole coated on rice husk”, Synthetic Metals, Vol. 162, pp. 527– 530, 2012 [28] E. N. Konyushenko, M. Omastova, Z. Spitalsky, M. Micusik, L. Krupa, “Thin21- polyaniline and polyaniline/carbon nanocomposite films for gas sensing”, Journal of Thin Solid Films,Vol. 519, pp. 4123–4127, 2011 [29] W. Wang, A. Wang, “Nanocomposite of carboxymethyl cellulose and attapulgite as a novelpH-sensitive superabsorbent: Synthesis, characterization and properties”, Carbohydrate Polymers, Vol. 82, pp. 83–91, 2010 [30] J. Jang, “ANFIS: adaptive-network-based fuzzy inference system”, Sys. Man, Cyb., Vol. 23, No. 3, pp. 665-685, 1993 [31] J. Liang, L. Bai, Ch. Dang, F. Sao, “The-Means-Type Algorithms Versus Imbalanced Data Distributions”, Fuzzy Systems, Vol. 20, No. 4, pp. 728-745, 2012 [32] H. Izakian, A. Abraham, “Fuzzy C-means and fuzzy swarm for fuzzy clustering problem”, Exp. Sys. App., Vol. 38, No. 3, pp. 1835-1838, 2011 [33] D. Kim, K. Lee, D. Lee, K. Lee, “A kernel-based subtractive clustering method”, Pattern. Rec. Let., Vol. 26, No. 7, pp. 879-891, 2005 [34] N. Chen, “A hybrid ANFIS model for business failure prediction utilizing particle swarm optimization and subtractive clustering”, Inf. Sci., Vol. 220, pp. 180-195, 2013