Apr 15, 2005 - Ideally, the water's pH would match the pH of the river or lake that receives the output of the plant. ..... Facultative Lagoon. Aerobic Lagoon.
1
CBR-ANN hybrid model to optimize the sequence of wastewater treatments
Yanet Rodríguez Sarabia1, Xiomara Cabrera Bermúdez 2, Rafael Jesús Falcón Martínez1, Zenaida Herrera Rodríguez 2, Ana M. Contreras Moya2, Maria Matilde García Lorenzo1
1 2
Computer Science Department, Central University of Las Villas, Environmental Virtual Institute, Central University of Las Villas.
Abstract This paper refers to a way of proposing the optimal sequence of treatments that should be applied to wastewater by using a hybrid model. It combines cases-based reasoning and artificial neural networks, getting the best of both approaches. Preliminary results demonstrate that it is a feasible model.
1.
Domain Description
The hydric resources of our country have been affected for the industrial and domestic wastewater emissions, some of them with deficient treatments. Wastewaters have contaminant properties that can be transmitted to the final receptor. In order to know the contaminant power of wastewaters it is necessary to study theirs physical, chemical and biological properties. Besides, designing, control and good operation of the wastewater treatment plants is important to determine such parameters. Among the common parameters for an adequate characterization, we can find the following: (Díaz, 1986) Temperature- It is important due its effect on the aquatic life, on the chemical reactions and on the microorganism’s development with the perturbation in the treatment process. pH - This is the measure of the water's acidity once it leaves the plant. Ideally, the water's pH would match the pH of the river or lake that receives the output of the plant. BOD5 (biological oxygen demand) – It is a measure of the strength of the wastewater. BOD5 is a measure of how much oxygen in the water will be required to finish digesting the organic material left in the effluent.
ITEE 2005
15/04/2005
2
COD – (Chemical Oxygen Demand). This is the amount of oxygen necessary to oxidize the organic matter present in the water using a strong oxidant agent. Solid content - Its determination is very useful to determine the best technological process of depuration, usually expressed in mg/L. The total solids (ST) constitute the residue after the evaporation of a sample to total dried at temperature between 103 and 105ºC. Different classifications can be found in the literature; (Diaz 1986) divides them in Suspended Solids (SST) and Filterable Solids (STF). The Suspended Solids represent the dry weight of solids captured by filtering a known volume of untreated sewage effluent, others effluents or river water. The suspended solids can be divided in Settleable Solids (Suspended solids which will settle out of an effluent), (Porteous, 2000) and non Settleable Solids. The Filterable Solids can be divided in Colloidal and Dissolved Solids. All of these solids can be classified in Fixed and Volatile Solids. Fixed Solids are those that do not volatilize for burning at 550ºC during one hour. Total phosphorous and nitrogen - This is the measure of the nutrients remaining in the water. The nitrogen compounds have a great interest for their influence in the life processes of all plants and animals. The nitrogen contents are extremely important in liquid waste treatments because there must be a relation with carbon and phosphorous compounds content in order to obtain an efficient biological treatment. For another part, Phosphorous is essential for the growth of algae in lagoons and rivers but if this element exists in a great quantity jointly with Nitrogen, the Eutrophication can be produced.
The main Cuban producers of liquid wastes are basic, mechanic, agriculture, construction materials, food, chemical industries and particularly the sugar industry and its byproducts. The attention was focused at the three latter. During many years the sugar industry has been the most important in our country and this includes sugar mills, alcohol distilleries, yeast production, artificial woods and others. In general, this industry is the most contaminant of our country, not only for its contaminant charge concentration but for the high waste volumes that are produced in this kind of industry. Many efforts have been done for diminishing this contamination. For example, to try to reuse its residues inside the same sector as fertile irrigation for cane sugar fields, animal foods, biogas production and others. When the sugar mills include sugar refineries or alcohol distillation, the contaminant charge is greater in relation when these processes are not included. In the yeast industry we can observe the higher values of nutrients, which is equivalent to a high aggregated value of this waste. The chemical wastewaters industries show a great variability in their parameters depending on the particularity of the manufacturing process. In this case biological treatment combined with physical-chemical treatment can be used. On the other hand, high organic loads and BOD5/COD relation greater than 0.4 are observed in nutritional and farming industry wastewaters what demonstrates the necessity of biological treatment and the possibility of anaerobic treatments, especially in the anaerobic digestion, which is very used in our country for the residual biogas production. Logically, before making any external treatment to the wastes it is necessary to take into account where these treated wastes are going to be spilled. The norms of spill and analysis of the general process will allow diminishing wastes streams and reusing these in different parts of industry itself.
ITEE 2005
15/04/2005
3 In the case where the necessity of extern treatment is imminent, the analysis of waste characteristic is the starting point. It is important to take in account the contaminant charge magnitude, the pH of the waste stream, the BOD5/COD relation, the quantity of solids and its quality, it means to know if it is possible that they can settle or not. It is necessary to indicate that it is very important to take into consideration the criteria of experts for deciding the optimal sequence of treatments. In spite of this, some treatment sequences for the study object industries are exposed. It is clarified that before to the proposed treatments for each type of industry, it is necessary to include the preliminary screening to remove large suspended solids, metal and rags because this kind of materials could obstruct the following stages of treatment. Normally it is based on physical procedures that include the sifting, equalization and sand elimination
2. Feasibility of applied Artificial Intelligence techniques In the past few years, artificial neural networks (ANN) have been used in describing and modeling wastewater treatment processes. ANN models can potentially contain a great amount of information about the system to be modeled, including the same type of information contained in conventional deterministic methods. An exhaustive review of the usage of ANN models in environmental problems was made in (Gamal,2004). In 1991, Capodaglio et al. applied a feed-forward, back propagation network to the analysis of bulking conditions at a wastewater treatment plant (WWTP). After twenty days, the results achieved by the ANN model indicated that the improvements in prediction were clearly superior to those achieved by the stochastic auto-regressive, moving average (ARMA) and auto-regressive transfer function (ARTF) methods. Tyagi and Du (1992) demonstrated the application of neural network techniques for kinetic model building of heavy metals inhibition in the activated sludge process. Feedforward, backpropagation networks for the cases of both unacclimated and acclimated microorganisms of batch operation were developed. An ANN was used by Pu and Hung (1994) to predict the performance of a mediumsized, municipal wastewater treatment plant, using rotating biological contactors and an activated sludge process in treating medium-strength, municipal wastewater. The data used by the ANN model included raw wastewater flow rate, influent and effluent total suspended solids (TSS) and BOD5 of the primary settling tank and the secondary settling tank. When compared with multiple regression models, the ANN models gave average relative errors for the secondary effluent BOD5 and TSS concentrations that were 12 and 18% lower, respectively. Simulation and prediction of the biochemical oxygen demand (BOD) of the output stream of the biological WWTP at Ripasa, Brazil. It was successfully achieved in [BRU02] through the use of a multilayer perceptron neural network (MLP), which was preceded by a preprocessing stage ruled by Principal Component Analysis (PCA). It was necessary to introduce the PCA component in order to overcome the unsatisfactory performance of a simple feedforward backpropagation network with only a hidden layer for the data set treated here. Case-based reasoning (CBR) systems have been used in a broad range of domains to capture and organize past experience and to learn how to solve new situations from previous solutions. CBR systems have been applied to planning, design, classification, di-
ITEE 2005
15/04/2005
4 agnosis, understanding and analysis, interpretation, and explanation. In the WWTP domain, CBR has been used for designing most suitable operations for a set of determined input contaminants. In (Sánchez, 1997) a CBR system was presented that is part of a target architecture named DAI-DEPUR, which is able to support reasoning in a poorly understood and illstructured domain and to learn from previously solved problems and to adapt the available experiential knowledge over the domain (dynamic learning environment). Starting from some initial cases (learning by observation), the system evolves, adapting its experiential knowledge (learning by own experience) from the actual operation of the WWTP under control. The result is a more accurate supervisory system. Recording previous experiences—cases—in the system helps to solve new similar or related situations in the plant with less effort than other methods that start from scratch to build up new solutions. Moreover, the continuous execution of the system enhances its adaptation to new situations that could appear. Also, the CBR component did a good job in (Rodriguez, 2002), where it was used to easily retrieve the 24-hour period state or experience within a facility. Its working cycle was as follows: Gathering and processing data from the process to define the current case. Searching the case library and retrieving the case that best fits the current one. Adapting the solution if the retrieved case does not perfectly match the current case. Applying the adapted solution to the process. Evaluating its consequences. Learning details about the new experience. A comparative study of the use of similarity measures in CBR was done in (Núñez, 2003). Besides the Clark and Canberra measures, two other heterogeneous distance measures were analyzed too: the Heterogeneous Value Difference Metric (HVDM) and interpolated value difference metric (HVDM). The authors finally proposed a new heterogeneous, weight sensitive similarity measure named L’Eixample, which seems to outperform the others. (Krovvidy, 1998) depicts and implements a learning system that generates several expert system rules for treatment technologies from the treatability database. It was used the ID3 machine learning algorithm to learn from a set of samples and produce humanly readably rules with relative sense.
3. Description of the hybrid model In order to solve the problem a hybrid model was applied (García, 2000). This model combines CBR and ANN along with fuzzy sets. This model takes into account the existence of values or neurons that exemplify the ANN construction. The use of fuzzy sets enables us to select neurons and enhance precision. In this case a multi-layer net is used, having a layer (group) for each feature. In each group a node for each element of the dominance of the corresponding field is located. A non-directed arch exists between all the pairs of nodes except between the ones located in the same group.
ITEE 2005
15/04/2005
5 For each arch in ANN a weight Wij exists. Usually the learning procedure of the ANN is the one responsible for determining the weight associated with each arch. The case base described above is taken as the training set; each article of this case base will be an example. The Wij value represents the strength of the connection between neurons i and j, belonging to groups I and j respectively (I≠J). A measure of this strength is the number of cases in the case base in which both values i and j appear simultaneously. Other alternative proposed is using the correlation coefficient to calculate Wij. The cases-based explanation consists of justifying the solution given to the problem by the ANN presenting the similar cases to the problem and their solution. The similarity can be calculated using the similarity function. This comparison function has the interval [0, 1] as an image. It reaches value l when two sets of values for a predicting feature has the same force for the prediction of the value for the objective feature, and reaches value 0 when one of the set of values has a maximum predicting force and the other one, none. The comparison between the value in the problem P and case R is based on the relation of these values with the value inferred to the goal feature.
4. Hybrid model applied to wastewater treatment In order to apply the selected model to wastewater treatment, cases base should be defined. In problem solving, experts consider the characteristics of residual waters that are listed in table 1 below. All of them except “treatment” are considered predictor features of the problem, having continuous values. To the effects of decision making, specified categories are considered after obtaining them via a discretization method (Liu, 1995), i. e., pH is taken as acid, neutral or basic as categories, not by its values. The last of the features refers to the treatment to carry out which is specified by means of a treatment outline. A treatment outline is a sequence of stages of the process. Specifying a treatment outline is a task that requires expert knowledge. Human experts have to select the appropriate stages and the order in which they are to be carried out. Therefore for each problem in this feature the sequence of stages is specified to conform the outline of appropriate treatment for the case. In an initial study of this problem, 29 representative cases of 3 types of Cuban industries were considered. The absence of information, which accounts for 40.22% of the data is a characteristic to be considered when selecting the appropriated solution method.
Figure 1. Topology of ANN.
ITEE 2005
15/04/2005
6
Attribute BOD5
Interpretation biological oxygen demand
COD BOD/COD pH
Chemical Oxygen Demand BOD / COD rate water's acidity once it leaves the plant Nitrogen compounds Phosphorous compounds the residue after the evaporation Volatile Total Solids Filterable Solids Volatile Dissolved Solids Suspended Solids Settleable Solids possible treatment alternatives
N P ST STV SDT SDV SS SSV Treatment
Modalities Low, Slightly Low, Medium, High Low, High Low, Medium, High Acid, Neutral, Basic Low, High Low, High Low, High Low, High Low, High Low, High Low, High Low, High Mixed and neutralization Anaerobic Lagoon Facultative Lagoon Aerobic Lagoon Fertile irrigation Coagulation and flocculation Sedimentation Oxidation/reduction Activated sludge Sifting
Table 1: Attributes table
The design of the ANN'S topology used to solve this problem is illustrated at figure 1. In the calculation of Wij of the network’s connections, the Pearson correlation coefficient (Spiegel, 1977) was used. The ANN's output would be a partial solution to the problem, because it will considerate the stages of the process to be included in the treatment outline (treatment), but not the order of execution of these stages. In such a way, the ANN is complemented with the cases-based component which retrieves similar cases (pass solutions) to the present problem. The user can estimate, in the context of the solutions given to these similar problems, the correct order of the treatment stages proposed by the ANN.
ITEE 2005
15/04/2005
7
5. Preliminary results and future works It is feasible to apply the proposed model to this problem because: It allows information absence. Information is taken from cases that contribute to train the ANN. The objective feature may take multiple values at once. Other neural network models, like MLP allow to infer a single value. The design of the similarity function doesn't require an additional effort, because it uses the weights of the ANN. Handling of continuous features is natural by means of categories. To each neuron in the ANN, we associate one of the possible categories, and it even allows for their handling in a crisp and fuzzy way. The results obtained with the ANN to propose the treatment were satisfactory (prediction accuracy of 90%). Besides according to the expert points of view, the application of this model is feasible. It is possible to obtain the appropriate treatment from the union of ANN's output and the most similar past cases. In the developed Hybrid Expert System, all attributes has to be discrete ones. In order to handle continuous attributes some representative values must be defined for each feature. In the group representing this feature in the ANN, a neuron is placed for each representative value. It takes into account the existence of values or neurons that exemplify the ANN construction and that also measure “how close” a value is to the one that represents it. The model supports the previous idea by using fuzzy sets. Therefore, linguistic variables (Zadeh, 1976) as representative values for every attribute listed in Table 1 should be obtained. Another aspect that might be reached in future works would be to automate the process completely, that is, to achieve that the system proposes a definitive solution of the problem. That is, to implement an adaptation module that allows performing the appropriate corrections to the ANN’s output, using the more similar cases retrieved through the proposed similarity function. A feasible variant of the adaptation module would be a rules-based system.
6. Bibliography Bruns, R. (2002): Simulation of an industrial wastewater treatment plant using ANN and principal component analysis, Brazilian Journal of Chemical Engineering, v. 4, n. 4, pp. 365-370. Bueno, J. (et al) (1997): Contamination and Environmental Engineering. Volume III: Water Contamination. Edition FICYT. CITMA, (1997): Cuban Norm of Wastewater Spilling. Specifications. Comas, J. (2001): Knowledge discovery by means of inductive methods in wastewater treatment plant data. AI Community, volume 14, pp. 45-62. Díaz, R. (1986): Water and Wastewater Treatment”, Edit. ISPJAE. Gamal, A. (2004): Application of artificial neural networks in wastewater treatment. Journal of Environmental Engineering and Science, supplement S1, S45-S48. García, M. (et. al.) (2000): Usando conjuntos borrosos para implementar un modelo para sistemas basados en casos interpretativos. In Proceedings of IBERAMIA-SBIA. Eds por M. C. Monard y J.S. Sichman, Sao Paulo, Brasil, Nov. 2000. Hernández, A. (1994): Wastewater Depuration. Editor Paramimbo. 3ra edition. Spain.
ITEE 2005
15/04/2005
8 Herrera, Z. (1996): Complex Processes Analysis Application to the problem of contamination for wastewater sugar industry. Thesis for Master Degree in Process Analysis in Chemical Industry. Santa Clara. UCLV. ICIDCA, (1986): Cane Sugar and Byproducts Industry. Cap. XIX. Page 496-507. Scientific and Technical Edit. La Habana. Justiz, D. (1995): Contaminant Characteristics of Wastewater of “Hermanos Díaz” Refinery”, Journal Tecnología Química, Vol. 15, No 1, Krovvidy, S (1998): Intelligent Tools for wastewater treatment design. Computer-Aided Civil and Infrastructure Engineering, volume 13, pp. 219, 226; ISSN: 1093-9687. Liu, H. (et. al.) (1995): R.Chi2: Feature selection and discretization of numeric attributes. In Proceedings of the IEEE 7th Conference on tolls with AI. López, L. (1997): Updating and control of different contaminant focus. Diploma Work. Faculty of Chemistry and Pharmacy. UCLV. Mireia, F. (2003): Enhancing biological nitrogen removal in a small WWTP by regulating the air supply. Water Science Technology # 48, pp. 11-12; ISSN: 0273-1223. Núñez, H (2003): A comparative study on the use of similarity measures in CBR to improve the classification of environmental system situations. Environmental Modelling & Software. Porteous, A. (2000): Dictionary of Environmental Science and Technology. Third Edition. John Wiley &Sons, LTD. Rodriguez, I. (et. al.) (2002): A hybrid supervisory system to support WWTP operation: implementation and validation. et al, Water Science & Technology, volume 45 no. 4-5, pp. 289-297. Sánchez, M. (1997): Learning and adaptation in wastewater treatment plants through CBR. Special issue on Machine Learning of Microcomputers in Civil Engineering 12, pp. 251-266. Spiegel, M. (1977): Teoría y problemas de Estadística. Edit. Pueblo y Educación. Torres, R. (1992): Characteristics of “Ramon Ponciano” Sugar Mill Wastewater: Evaluation of its quality for fertile irrigation”. Rev. ICIDCA, Vol. XXVI, No 2. Vidal, N. (et al) (2002): Design of wastewater treatment plants using a conceptual design methodology. Industry & Engineering Chemical Results, volume 41, pp. 4993-5005; ISSN: 0888-5885. Zadeh, L. (1976): The concept of a lingüistic variable and its application to approximate reasoning. Information Science 9, pag. 43-80.
ITEE 2005
15/04/2005