Intelligent system for improving dosage control

Coagulation is one of the most important processes in a drinking-water treatment plant, and it is applied to destabilize impurities in water for the subsequent flocculation stage. Several techniques are currently used in the water industry to determine the best dosage of the coagulant, such as the jar-test method, zeta potential measurements, artificial intelligence methods, comprising neural networks, fuzzy and expert systems, and the combination of the above-mentioned techniques to help operators and engineers in the water treatment process. Current paper presents an artificial neural network approach to evaluate optimum coagulant dosage for various scenarios in raw water quality, using parameters such as raw water color, raw water turbidity, clarified and filtered water turbidity and a calculated Dose Rate to provide the best performance in the filtration process. Another feature in current approach is the use of a backpropagation neural network method to estimate the best coagulant dosage simultaneously at two points of the water treatment plant. Simulation results were compared to the current dosage rate and showed that the proposed system may reduce costs of raw material in water treatment plant.


Introduction
Water is one of the most important elements for sustaining life.Undesired substances and microorganisms should be removed when it is used for human consumption.Water treatment process comprises several steps to obtain treated water, one of which is the coagulation stage aimed to destabilize the dirt particles in raw water.Since decisions on the coagulation process are often carried out based on the experience of the human operator, several studies have been conducted on resources of computational intelligence at this stage of water treatment process, with good results in predicting coagulant dosage.
Artificial intelligence techniques and mathematical models have demonstrated their efficiency and optimal results, particularly when applied in a multivariable and nonlinear system, such as water treatment plants (Böling, Seborg, & Hespanha, 2007).For example, the use of mathematical modeling in water treatment process foregrounds the study of variations in costs and inputs at various stages, including clotting, according to operating conditions (Malzer & Strugholtz, 2008;Mostafa, Bahareh, Elahe, & Pegah, 2013;Ogwueleka & Ogwueleka, 2009).
In this context, the proposed system employs a multilayer perceptron network particularly designed to determine the best coagulant dosage at two distinct sites of the water treatment plant, especially by using two additional dose rates as inputs for neural network, to guarantee the best performance for the filtration stage.

Water treatment process
Treatment of water for distribution and consumption is mandatory.In some cases, only chlorine and fluoride are added when raw water is collected from wells.Nevertheless, when raw water comes from reservoirs or rivers, conventional treatment may be required.For instance, the addition of chlorine and lime should guarantee quality in distribution systems and avoid dirt in water.Treatment generally comprises prechlorination, pre-alkalinization, coagulation, flocculation, sedimentation, filtration and disinfection.
During the first steps, water undergoes coagulation, or rather, coagulants are added to raw water to destabilize particles, for subsequent agglomeration, with the formation of flocs that will separate from the water in sedimentation tanks.
In some cases, coagulation process is described in terms of destabilization of colloids initially present in a water supply.However, coagulants are used not only to destabilize colloidal particles but also to remove natural organic matter (Pernitsky & Edzwald, 2006;Xie et al., 2012).
Many primary coagulants, such as aluminum sulfate, polyaluminum chloride, ferric chloride and ferric sulfate, may be added for water coagulation (Annadurai, Sung, & Lee, 2003;Griffiths & Andrews, 2011).The choice of coagulants and coagulant dosage depends on raw water quality, which varies from one reservoir to another, on the occurrence of rains or alga blooms.
Two techniques are widely used to determine optimum dosage of coagulants, namely, specific equipment in zeta-potential measurements and jar tests (Joo, Choi, & Park, 2000).However, these techniques are time-consuming, expensive and usually less adaptive to changes in raw water quality in real time (Wu & Lo, 2008;2010).
In general, few adjustments are required when raw water quality is stable although, when variations are substantial, new dosages are required and jar tests must be carry out to obtain a new reference value.As explained above, these tests take a relatively long time and the operators use reference rates based on their intuition and experience.Whenever a process is controlled by personal experiences, mistakes may occur, i.e., bigger dosages than necessary (Wu & Lo, 2010).
Moreover, coagulation dosing is related to the raw water's chemical and physical features.Thus, the control of optimal coagulant rate consists of a challenge for the operators and engineers, especially when weather conditions contribute to the changes of parameters such as turbidity, temperature, pH and others.Therefore, optimum dosage usually depends on the above characteristics of the raw water.Since in this type of process, features like turbidity, conductivity, pH, temperature, and reactions between the particles are non-linearly, it is very hard to obtain the coagulant dosage by conventional methods (Zhang & Luo, 2004).

Water treatment plant
The water treatment plant in current study has a 1.25 m³ s -1 water purification capacity and provides drinking water for about 400,000 inhabitants.According to information on this particular water plant, there are two dosage points wherein the operators must determine the best dosage rate.The first one is located at site "A" where the water is obtained by gravity and the other one, called site "B", where the water comes from a pumping system.Eventually, the raw water comes from the same place.Figure 1 shows the schematic diagram of the water treatment plant.
A large and a smaller dam form the source (wellspring) of the water plant.The volume of water is transferred from the larger to the smaller dam, where the raw water that will be used in the process is retrieved.Thus, the process uses distinct systems for flocculation and coagulation, considering the water source from the smaller one.For operational purposes, coagulant dosage is set by an automatic control by Supervisory Control and Data Acquisition (SCADA) systems and Programmable Logic Controller (PLC) devices.Control system for coagulant dosage The coagulant dosage is controlled by an automated system composed of programmable logic controllers (PLCs) and supervisory software (SCADA).The system allows the operator to adjust the reference rate (RA or RB), or desired output, for each control closed-loop in the water treatment plant.
The reference for coagulant dosage is usually defined preliminary by jar-tests or by only considering the background of the operators in the plant.Figure 3 shows the control closed-loop for coagulant dosage in A and B in the present water treatment system.In Figure 3, dosage coagulant references in A and B are identified respectively by RA(s) and RB(s), while YA(s) and YB(s) are the process´s output.In this type of control, GA(s) and GB(s) are the transfer function and PIDA and PIDB are the control rule for A and B. In current paper, only one artificial neural network provides the dosage coagulant references (RA(s) and RB(s)) for each control closed-loop in points A and B.

Results and discussion
In current assay, three neural network topologies were tested to define the best performance for chemical coagulant in two dosage points.In these cases, Levenberg-Marquardt Back-propagation Algorithm was used for training neural networks.The first one was trained by using 40 neurons.The second one was trained by using 60 neurons and the third used 80 neurons in the hidden layer.There is one hidden layer in all topologies.The hyperbolic tangent activation function has been chosen for neurons model and in all cases 1000 interactions were applied for the learning phase.Table 3 shows the mean square error and the average rates for each neural topology during learning phases and validation steps.Figure 5 shows the validation data for A and B, taking into consideration distinct neurons in the hidden layer.The figures reveal a good fitting between neural network output and desired rate for ANN topology using 40 hidden neurons, as shown in Figures 5(a) and 5(b).During the validation process, the neural network with 40 hidden neurons showed a dosage difference rate of 0.3766 mg L -1 when compared to current dosages used in the water treatment plant (WTP).
Dosage method control: a case study The proposed system has been implemented in a water treatment plant in Cotia SP Brazil, to provide the coagulant dosage references in real time for A and B. Figure 6 shows an industrial process screen in the supervisory system (SCADA), according to the coagulant dosage control and a button with a caption "ANN", wherein the operator is able to turn on the artificial neural network technique (Figure 7).In the screen one may see the dosage pumps and the set-point fields used by operation or determined by ANN.
Figure 7 shows the screen in which the fields are ready for the insertion of the physicochemical parameters determined in bench for neural network to process appropriate to the current scenario values of set points.The "Current" fields are the current parameters rates in use, while the "Prediction" fields show the new rates to be used after the processing of artificial neural network.Some additional options such as "Save data" and "Data visualization" are available for further analysis of the system's historical usage.Results revealed that it is possible to reach a reduction of the coagulant dosages presented in the neural network of 0.3766 mg L -1 lower than those compared to the current data; this means a 17,000 kg of aluminum sulfate savings during one year of the proposed use with the nominal flow production WTP of 1.25 m³ s -1 .

Conclusion
In current assay, a neural network-based system has been applied to predict the optimum coagulant dosage rate in a water treatment plant.A range of parameters has been used for determining the best water process control conditions according to the plant's historical data.The system has been implemented to estimate the optimum coagulant dosage simultaneously at two sites of a water treatment plant in the state of São Paulo, Brazil, and the predicted rates would import in a reduction of raw material.Further investigations will be conducted to improve the results on cost reduction and raw material consumption.

Figure 3 .
Figure 3.Control closed-loop for dosage coagulant in A and B.
Figures 4 (a), (b) and (c) illustrate the comparison between the desired rate and the rates generated by the neural networks during the training phase for the topologies with 40, 60 and 80 neurons in the hidden layer, respectively.

Figure 5 .Figure 6 .
Figure 5. Validation data for points A and B.

Figure 7 .
Figure 7. Artificial neural network screen in SCADA system.

Table 3 .
Mean square error and average during learning and validation step.