ARTIFICIAL NEURAL NETWORKS MODEL USED FOR CLEAR WATER TREATMENT PLANTS. Fernández, E. and Gálvis, A.

Size: px
Start display at page:

Download "ARTIFICIAL NEURAL NETWORKS MODEL USED FOR CLEAR WATER TREATMENT PLANTS. Fernández, E. and Gálvis, A."

Transcription

1 ARTIFICIAL NEURAL NETWORKS MODEL USED FOR CLEAR WATER TREATMENT PLANTS Fernández, E. and Gálvis, A. Instituto Cinara, Universidad del Valle. Dirección Postal Cali, Colombia. ABSTRACT Artificial neural networks, ANNs, have been widely used especially in the last two decades. ANNs have a wide range of scientific applications, they are used for pattern recognition and forecasting of natural mechanisms. In water treatment, ANNs have enormous potential, especially to support workers in plant operation. In clear water plants are taking large volumes of data, especially information about water quality parameters. Analysis and classification of such information is quite difficult without any software to support the analysis. The relationship between water quality parameters and pattern recognition is also difficult even using statistical methods. The use of ANNs make pattern knowledge easier and pattern recognition of the hidden relationship between water quality parameters. With the last point in perspective, ANN models could be used as a support for workers in operating clear water treatment plants. Plant managers, based on ANN modelling, can take action to improve water treatment operations. ANNs can be used for water quality predictions. With use of ANNs in real time, systems will get more efficient, so reducing operation costs and improving the quality of water produced. In the Puerto Mallarino clear water plant, located in Cali, a series of numerical experiments which used optimal doses of coagulants for water treatment were analyzed. The experiments, in real time, demonstrated the closeness of fit that can be achieved with data sets collected using Artificial Neural Networks (ANNs). KEY WORDS Artificial neural networks, clear water treatment plants, modelling. INTRODUCTION For many years water researchers have worked to predict the relationship between water quality parameters and the most efficient points for water treatment facilities in clear water plants. The progress made was focused on statistical analysis using multi varied regressions. The adoption of artificial intelligence and particularly techniques such as Artificial Neural Networks (ANNs) and Genetic Algorithms can contribute to optimizing performance in clear water plants operation. The particular advantage of the ANN is that even if the exact relationship between sets of input and output data is unknown but is known to exist, the network can be trained to learn that relationship, requiring no a priori knowledge of water sources. In the water quality context, the input patterns consist of water quality parameters such as turbidity, color, ph, flow, and chemical doses (water coagulants) as well as the treatment behaviour of such water quality parameters. Since the ANN relates the pattern inputs to the pattern outputs, volume continuity is not a constraint. However, care must be taken to avoid the presenting contradictory information to the ANN. The learning process in ANN does not depend upon any assumptions relating to the form of the input-output transfer function, the number of active or inactive parameters or their possible physical interaction. In rough terms, the ANN could be regarded as a black-box model. According to the modelling results, the most simple ANN architectures have more difficulty in learning nonlinear relationships. In water treatment plants, the treatment performance has an almost direct relation to water quality parameters. The ANN model is only the first step towards testing all types of ANNs in a wider spectrum in water treatment systems. Universidad del Valle/Instituto Cinara Fernández, E. and Gálvis, A. 243

2 This document presents the Puerto Mallarino plant description, a brief resume of chemical treatment and the ANN conceptual frame work. Finally, the results from artificial neural network modelling are presented and discussed. WATER TREATMENT PLANT DESCRIPTION The Puerto Mallarino clear water treatment plant is the most important treatment system in Cali. It treats at least 70% of total clear water for Cali (for 2 million inhabitants). It is around 6.6 m3/s. The treatment system takes raw water from the Cauca river. The treatment facilities are 2 grid chambers, 2 junction chambers for hydraulic mixing of chemicals, 4 clarifiers, and 12 rapid filters. The plant clarifiers were constructed in two stages. The first couple were built in the 1970s and the second couple in the 1990s. Due to geometry, and according to measures, clarifiers have different performance levels, with the older clarifiers being more efficient. Figure 1 shows the Puerto Mallarino Plant. Rapid Mix Reactors Filters Figure 1. Puerto Mallarino Plant. In the purification process, the main chemical used in coagulation is alum-sulphide liquid which is added to the chamber for rapid mixing. The coagulant doses depend on raw water quality. The parameters for treatment control are turbidity, ph, color, flow and percentage of solids stored in clarifiers. All input parameters are manually measured each two hours. Currently the city spends around US$2.5 million/year on chemicals for water treatment. According to new regulations, the implementing stricter controls to get safe water with lower treatment costs is necessary. New modelling technologies, like artificial neural networks, allow for implementing the necessary controls in real time to make the treatment systems operation to its best performance. Chemical Treatment. Coagulation Coagulation is defined as destabilization by particle charge neutralization and initial aggregation of colloidal and finely divided suspended matter by organic coagulants. The chemicals involved in coagulation are known as coagulants or coagulant aids. Coagulants are simple electrolytes that are water soluble, with a low molecular weight in organic acid, bases or salts. Choice of specific coagulants and coagulant aids depend on the nature of the solid liquid system to be separated. In the Puerto Mallarino clear water plant, the coagulant most commonly employed is alum [Al 2 (SO 4 ) 3 ] with good results. Universidad del Valle/Instituto Cinara Fernández, E. and Gálvis, A. 244

3 Jar test: The jar test is the most widely used method to determine coagulant dosage and associated parameters. The objective of the test is simply to simulate the plant-scale coagulation-flocculation process in the laboratory. From theoretical considerations or experience, the range of ph and coagulant dosages that are approximately equivalent to the dosages required for optimum operating conditions are determined. The simple jar test cannot perfectly simulate conditions in a full scale flocculation or a clarificationflocculation process, and such tests usually indicate higher dosage requirements than those that will be actually needed in practice. The jar test is only a rough approximation of dosage requirements owing to the condition changes between the reality in reactors and the controlled laboratory conditions. Sludge Blanket Clarifiers (SBC) Sludge blanket clarifiers are solid contact units. The SBC unit at the Puerto Mallarino plant, contains a central mixing zone for partial flocculation and a fluidized sludge blanket in the lower portion of the settling zone. The sludge level is normally 2-3m below the water surface, and clarified water is collected in launder troughs along the top of the unit. The efficiency of the clarifier depends upon the depth of the sludge blanket, hydraulic loading and the slurry recirculation. Generally, sludge blanket clarifiers should be used only where the raw water characteristics and flowrates are relatively uniform. However, in the Puerto Mallarino plant, the clarifiers are quite efficient due to their slow hydraulic loading, and in spite of water quality fluctuations. Artificial Neural Networks The ability of the brain to perform difficult operations and to recognize complex patterns, even if those patterns are distorted with a high degree of noise, has fascinated scientists for centuries. The particular ability of the brain to learn from experience without predefined knowledge of the underlying physical relationship makes it an exceptionally flexible and powerful calculating device that scientists would like to mimic. Other scientists are devoted to reproducing, or modelling physical phenomena by making use of electronic computation machines to solve increasingly complex partial differential equations and empirical relationships. These scientists are supported by the rapid increase in the computational capacity of modern computers and an emerging recognition of the advantages of massive parallel computation (parallel distributed processing) that performs the required calculations with increasing speed. However, although the design and construction of the hardware for parallel computation is relatively straightforward, the software required for creating algorithms to most efficiently use this parallel architecture is still quite limited. The selection of an appropriate architecture for ANN will depend upon the problem to be solved and the type of learning algorithm to be applied. In particular, the use of Kohonen networks for unsupervised classification of patterns and the use of Hopfield networks for recalling previously learned patterns are two approaches commonly used in pattern recognition. For the more general approach to systems identification, training an ANN to provide a correct output response to a given input stimulus is desirable. In particular, to get the most efficient points, BEP, in a ANN model in clear water plants, the input stimulus corresponds to the measured water quality parameters and the output to the doses of coagulant that produce the best system response. Figure 2 shows a general schematization of the network, feed-forward ANN of the type that was used in this study. Universidad del Valle/Instituto Cinara Fernández, E. and Gálvis, A. 245

4 Figure 2. Representation of a multi-layer, feed-forward artificial neural network (ANN) The workings of an ANN can best be described by following the operations involved during training and computation. An input signal, consisting of an array of numbers xi is introduced to the input layer of processing units or nodes, as shown in Figure 1. The signals are carried along connections to each of the nodes in the adjacent layer and can be amplified or inhibited through weights, wi, associated with each connection. The nodes in the adjacent layer act as a summation device for the incoming weighted signals. (Fig. 3). The incoming signal is transformed into an output signal. Oj, within the processing units by passing it through a threshold function. A common threshold function for the ANN depicted in Fig. 2 is the sigmoid function defined as equation 1.: f ( x) x 1 = 1 + e (1) which provides an output in the range 0< f(x) < 1. In most thresholding routines, the threshold function usually takes the form of a single-valued, hard-delimiter. The sigmoidal threshold function is chosen for mathematical convenience because it resembles a hard-limiting step function for extremely large positive and negative values of the incoming signal and also gives useful information about the response of the processing unit to input that is close to the threshold value. Furthermore, the sigmoid function has a very simple derivative that makes subsequent implementation of the learning algorithm much easier. Figure 3 A typical ANN node O j = e x i w i (2) This output signal (equation 2) is subsequently carried along the weighted connections to the following layer of nodes and the process is repeated until the signal reaches the output layer. The Universidad del Valle/Instituto Cinara Fernández, E. and Gálvis, A. 246

5 one or more layers of processing units located between the input and output layers have no direct connections to the outside world and are referred to as hidden layers. The output signal can then interpreted as the response of the ANN to the given input stimulus. The ANN can be trained to produce known or desired output response for given input stimuli. The ANN is first initialized by assigning random numbers to the interconnection weights. An input signal is then introduced to the input layer and the resulting output signal is compared to the desired output signal. The interconnection weights are then adjusted to minimize the error between the ANN output and the desired output. This process is repeated many times with many different input/output tuples until sufficient accuracy for all data sets has been obtained. The adjustment of the interconnection weights during training employs a method known as error back-propagation in which the weight associated with each connection is adjusted by an amount proportional to the strength of the signal in the connection and the total measure of the error. The total error at the output layer is then reduced by redistributing this error value backwards through the hidden layers until the input layer is reached. The next input/output tuple is then applied and the connection weights readjusted to minimize this new error. In this way, the back propagation algorithm can be seen to be a form of gradient descent for finding the minimum value of the multi-dimensional error function. This procedure is repeated until all training data sets have been applied. The whole process is then repeated starting from the first data set once more and continued until the total error for all data sets is sufficiently small and subsequent adjustments to the weights are inconsequential. The ANN is now said to have learned a relationship between the input and output training data sets. The exact form of this relationship cannot be extracted from the ANN but rather is encapsulated in the stored series of weights and connections between nodes. The absolute values of the individual weights cannot be interpreted as having any deeper physical meaning. Although the error back-propagation method does not guarantee convergence to an optimal solution since local minima may exist, it appears in practice that the back-propagation method leads to solutions in almost every case. In fact, Hornik et al. (1989) concluded that standard multi-layer, feed-forward networks are capable of approximating any measurable function to any desired degree of accuracy. They further state that errors in representation appear to arise only from having insufficient hidden units or the relationships themselves being insufficiently deterministic. For this reason, a standard, multi-layer, feed-forward ANN using back-propagation learning techniques was used in this study. Data used for Training and Verifying the ANN Since the purpose of the numerical experiment reported below is to evaluate the ability of ANNs to learn the relationship between the pattern of inputs provided by water quality parameters of Cauca river raw water, as inflow of the Puerto Mallarino water plant, and the outputs in the form of chemical doses. Standardization of data Prior to presenting the data to the ANN for training, a standardization must be applied in order to restrict the data to the interval of 0 (zero) to 1 (one), corresponding to the output limits of the nodes. The significance of these standardization factors should not be under-estimated. The choice of range for standardization may therefore influence the performance of the ANN significantly. In water quality modelling, the standardization factors adopted were the maximum value for each parameter. The same procedures were applied for the verification set of data. Universidad del Valle/Instituto Cinara Fernández, E. and Gálvis, A. 247

6 Artificial Neural Network Modelling In ANN terminology, the problem was reduced to the problem of pattern recognition for BEP (best performance) obtained in the field. The object of ANN modelling is then to relate each pattern to its corresponding best effect in water treatment. The number of nodes in the intervening hidden layers was chosen as roughly half the number of input nodes. In effect, each set of input values and its corresponding output become an event, and the series of events in turn is presented to the network. Once the sequence has been exhausted, the network returns to the first event, and the cycle is repeated. This procedure is continued until the global error of the network, which is based upon the sums of squares of the differences between observed and computed values, is driven down to an acceptable level. Training an ANN can take several hours on a powerful, desk-top personal computer. However, once the weights have been determined the running time for the model with a new input data sequence is only a few seconds. In order to demonstrate the degree of fit obtained, events from the training sequence have been selected for illustration in Figure 4. Modelling was done for two seasonal periods, winter and summer corresponding to Figure 4. Verification of ANN model for winter(1997) Figure 4 shows that the closeness of fit obtained was such that the majority of the efficiency coefficients varied only in the third decimal place. In both training and verification, the performance of the ANN on the linear case was the marginally the best, although there was little to choose between that and the two nonlinear cases. CONCLUDING REMARKS The results of the numerical experiments summarized above shows that ANNs are capable of identifying usable relationships between optimal doses of coagulants and inflow water quality of raw water parameters. The performance of the ANN deteriorated with increasing nonlinearity but only in the third decimal place. Extreme caution should be applied if ANNs were to be employed in studies of extremes events. Universidad del Valle/Instituto Cinara Fernández, E. and Gálvis, A. 248

7 The results tend to support the contention by Rumelhart et al (1994) that minimal networks can offer better generalized performance than more complex networks. Nevertheless, several outstanding problems, such as those of choosing appropriate standardization factors and input window lengths, remain to be explored before the approach can be widely applied in practice. According to the results, the city could save around 10% in Alum dosage (around US $0.20 million/year), because the dose identification is currently done every two hours. The shift between dose changes produces over-spending because of excess of chemicals (Alum). The on line ANN model implementation, in real time, coupled with an Alum ejector can also contribute to clean production as well as human protection against adverse effects caused by excess of alum in the water. REFERENCES Amirtharajah A. and Mills K.M. (1982), Rapid Mix Design for mechanisms of alum coagulation. J.AWWA. USA. 74 (4): Amirtharajah, and O Melia C. (1990). Coagulation Processes. Destabilization Mixing and Flocculation. Water Quality and Treatment: A Handbook of Community Water Supplies. USA, Babovic, V. & Minns, A. (1994). Use of Computational adaptive methodologies in Hydroinformatics. In: Hydroinformatics 94 (Proc. 1st internal Conf. On Hydroinformatics, Delft, the Netherlands). M.B. Abott, Y.B. Dibike (2001). The symbolic of Hydroinformatics processes using elements of category theory. IHE- Delft, The Netherlands Minns, A. (2000) Artificial Neural Networks. Lecture Notes in Hydroinformatics. IHE- Delft, The Netherlands). O Melia (1972). Coagulation and Flocculation. Physicochemical Processes for water Quality Control. (W.J Weber Jr. Editor ). John Wiley & Sons, New York. Semmens, M and Field T (1980). Coagulation: Experiences in organic Removal J. AWWA. USA.. 72 (8) Universidad del Valle/Instituto Cinara Fernández, E. and Gálvis, A. 249