You are on page 1of 4

Arrijicid Intelligence in Engineering 11 (1997) 4Ob404

0 1997 Elsevier Science Limited. All rights reserved


Printed in Great Britain
ELSEVIER PII: SO954-18lO(97)00010-0 0954-1810/97/$17.00

Modelling of coagulant dosage in a water


treatment plant
Claude Gagnon, Bernard P. A. Grandjean” & Jules Thibault
Department of Chemical Engineering, Laval University, Sainte-Foy, Qutbec, Canada, GlK 7P4

(Received for publication 6 January 1997)

The coagulation-flocculation is a major step in the drinkable water treatment


process allowing the removal of colloidal particles. The water treatment facilities
of the City of Sainte-Foy have been well instrumented and process variables such
as temperature, pH, turbidity, conductivity of raw and treated water along with
actual coagulant dosage available have been measured and stored each 5 min for
several years. Using such a data bank, the objective of this paper is to report on
the development of a neural network predictor of coagulant dosage in order to
facilitate process operation. Feedforward neural models have been built using a
quasi-Newton method along with the early stopping approach to avoid over-
fitting. Annual and seasonal models have been built and their performances are
discussed. 0 1997 Elsevier Science Limited.

Key words: neural networks, coagulant dosage, water treatment.

INTRODUCTION final disinfection. The water is then stored and ready for
distribution.
Drinkable water is without doubt the most essential The coagulation-flocculation step which requires the
element for mankind. Since high quality water from addition of alum (aluminium sulphate) as a chemical
natural sources is becoming scarce in the vicinity of large coagulant, is the critical treatment that is required to
cities, the need for water treatment is more important remove colloidal solids. Basically, alum dosage is chosen
than ever. Water treatment is a well known process that empirically by operators based on their past experience,
has been in use for several years. However, contrary to laboratory jar-testing and various on-line information
most industrial processes for which the quality of the on water quality parameters. In view of assisting the
input raw material is under control, the quality of a operators to take the proper corrective action, a neural
given raw water source may fluctuate due to natural network based model was developed to predict the alum
perturbations. In addition, due to the complex phenom- dosage as a function of the incoming raw water proper-
ena occurring at the various steps of the water treat- ties. The water and wastewater treatment community
ment, the ability to simulate the process often does not
exist. Then, in many cases, the efficiency of a drinking
Raw
water treatment plant relies on operator’s decisions.
This is the case for the drinking water facilities of the
City of Sainte-Foy (Quebec, Canada) which draw their
water from the Saint-Lawrence River.
The Ste-Foy water treatment plant, which provides
water to more than 96000 inhabitants, has a nominal
capacity to process 136 500 m3 of water per day but
has been used to only half its capacity during recent
years. Figure 1 presents a schematic overview of the
various operations necessary to treat the water. The
treatment consists essentially of preliminary disinfec-
tion, coagulation-flocculation, settling, filtration and

*To whom correspondence should be addressed. Fig. 1. Flow sheet of the Sainte-Foy’s water treatment plant.
401
402 C. Gagnon et al.

coefficients of each input variable with respect to the


alum concentration are relatively high, varying between
0.45 and 0.63. On the other hand, the input variables are
only weakly correlated among themselves. The highest
correlation coefficient is 0.37.
Long data time series, where no process variations
occur, have been truncated to only retain the steady-
state operation prior and after a transient period. As a
result, the 5min average data bank has been reduced
from 540000 to 340000 elements and then split into
three parts, learning, validation and testing data sets.
Fig. 2. Neural network topology. Neural network weights have been obtained using a
quasi-Newton method, BFGS version6 in order to
have already been attracted by neural network models minimize the sum of squares of the errors of the learning
for several years as reported in various papers.le5 data set. However, in order to avoid over-fitting, the
This paper will first present the methodology used to early stopping method has been used whereby the
derive neural network models for the prediction of the weights that lead to the optimum prediction using the
alum dosage. The results will then be presented and validation data set are retained. In order to reduce
discussed. computation time and to facilitate the optimization
procedure on the large 5min average data bank, the
initial values of the weights were those obtained at the
METHODOLOGY end of the optimization procedure on the daily average
data bank which contains 1500 events. A computation
The Sainte-Foy water treatment plant has been well time of 5-10 h, on a Hewlett Packard Model 715/80
instrumented for several years. Various process vari- Workstation, was required to obtain a converged model.
ables (see Fig. 1) such as the temperature, pH, turbidity,
conductivity of raw and treated water along with the
actual coagulant dosage are available both on the basis RESULTS AND DISCUSSION
of 5 min and daily averages for the years 1987 and 199 l-
4. Using this large industrial historical data bank, it is A first model, applicable all year around, and called the
desired to correlate alum dosage, which varies in the annual model, has been developed. The network input
range of lo-50 ppm, as a function of the quality of raw variables are the pH, turbidity, temperature and con-
water entering the process. In this investigation, the ductivity of the raw water (Fig. 2). The performances of
feedforward neural model of Fig. 2, with a single hidden this annual model are illustrated in Fig. 3 and Table 2.
layer, has been implemented. This neural network has Results confirm the generalizing capability of the annual
five input neurons to include the four process input model, at least on the data set used for testing.
variables (pH, turbidity, temperature, conductivity) The water treatment process operation is known to
which have the most influence on the alum dosage and vary from one season to the next. To evaluate if better
the bias. It has one output neuron for the coagulant predictions could be obtained within each season, four
dosage at the same instant as the four input variables. seasonal models were developed. In order to improve the
The hidden layer has four neurons, including the bias. data bank, the period from September to December
The number of neurons in the hidden layer was obtained 1994 has been added to the learning set and the data of
by trial and error and results of a compromise between 1993 were retained as the validation data set. Cumula-
accuracy and overfitting. tive performances of these models are given in Table 3
The composition of the input vector was determined and Fig. 4. Compared to the general model, seasonal
using statistical techniques such as the cross-correlation models lead to better predictions on both learning and
function. Table 1 gives the cross-correlation coefficients validation data sets.
for the input and output variables of the neural network It is important to mention that, basically, the models
model developed in this investigation. The correlation developed represent no more than the previous behaviour

Table 1. Cross-correlation coefficients


Alum PH Turbidity Temperature Conductivity
Alum 1.00 -0.522 0.453 -0.630 -0.468
PH -0.522 1.00 -0.226 0.305 0.368
Turbidity 0.453 -0.226 1.oo -0.119 -0.369
Temperature -0.630 0.305 -0.119 1.oo 0.223
Conductivity -0.468 0.368 -0.369 0.223 1.oo
Modelling of coagulant dosage 403

Table 2. Performakes of tbe ammal model for alum dosage predictions


Data sets Number of Standard Mean absolute
events deviation (ppm) error (ppm)
Learning: 87, 91, 92,
Jan.-Aug. 94 243 868 3.61 2.74
Validation: 93 IO 188 3.20 2.69
Verification:
Sept.-Dec. 94 18864 3.28 2.81

0
-10 -8 -6 4 -2 0 2 4 6 8 10 -10 -8 -6 -4 -2 0 2 4 6 8 10
Predictionermr@pm) Predictionerror @pm)
Fig. 3. Error distribution of the annual model (learning Fig. 4. Error distribution of the seasonal models (learning
data set). data set).

of operators, none of the process dynamics. Then, the To derive a predictive model that would contain infor-
model mimics the overall background of process oper- mation on the dynamics of the process in the vicinity of
ation and would be valuable when inexperienced opera- the operating point, the dosage of alum should be
tors are on duty or when events out of the ordinary modified randomly and its effect on the turbidity of the
occur. However, an attempt was made to identify the treated water recorded. This would provide valuable
dynamics of the process by simulating, with a neural information that would also assist in determining if
network, the effect of coagulant dosage on the turbidity the alum concentration specified by the operators is
of the treated water. Such a model would allow one to optimal. If such action on the process is not possible
determine the minimum alum dosage required to obtain because the water has to meet the required quality at all
a specified turbidity of the treated water. However, due times, jar-testing could also be used to estimate the
to the fact that the plant operates most of the time close proper coagulant dosage. Jar-testing is a laboratory
to an acceptable operation point, the dynamics of the technique where samples of the water to be treated are
process could not be identified. poured into a series of glass beakers, and various
Table 3. Performances of the seasonal models for alum dosage dosages of coagulant are added to the beakers.’ The
predictions contents are then mixed for a given period of time and
Standard Mean then analysed. This procedure is employed in many
Data sets
deviation absolute water treatment plants but less frequently at the Sainte-
(PPm) error (ppm) Foy plant (several times a week).
Learning set: 87, 91, 92, 94 Despite the lack of dynamic content, the various
AlI seasons 289 2-21 neural network models can assist the operators to set the
Winter 2.36 1.79 proper dosage. The annual and seasonal models have
Spring 2.90 2.35 been implemented on-line at the Sainte-Foy water treat-
Summer 3.27 2.46 ment plant along with a third empirical model that was
Autumn 2.56 2.03
developed by Gravel.’ The process computer automa-
Validation: 93 tically calculates the predictions of the three models. If
AU seasons 2% 2.31 the turbidity of the treated water is less than 0.2, no
Winter 2.16 2.62 corrective action is taken. Above this value, the alum
Spring 2.90 2.46 dosage that is the closest to the previous process dosage
Summer 2.37 2.03
Autumn 3.14 2.57 is selected so that the new steady-state is attained more
progressively. This consequently adds robustness to
404 C. Gagnon et al.

the prediction. Another way would be to take the staff assistance is acknowledged, in particular A.
average of the process dosage predicted by the three Normand and S. Gravel for their keen interest in the
models. More robustness, if required, could be provided project and their enlightening discussion.
by stacking or combining in an appropriate manner
multiple neural networks where each individual model
would be obtained with a subset of the original data REFERENCES
using the bootstrap technique.’ By and large, the opera-
tors are very satisfied with the assistance of the models. 1. Baba, K., Enbutu, L. and Yada, M., Explicit representation
It is felt that this procedure has led to a reduction in of knowledge acquired from plant historical data using
chemical product usage. neural network. ZJCNN-90, 1990, 3, 155-160.
2. Boger, Z., Application of neural network to water and
wastewater treatment plant. ISA Trans., 1992, 31, 25-33.
CONCLUSION 3. Collins, A. G. and Glenn, W. E., Information processing
coupled with expert systems for water treatment plants.
ISA Trans., 1992, 31, 61-72.
This paper has addressed the development of neural
4. Cot&, M., Grandjean, B. P. A., Lessard, P. and Thibault, J.,
network models for the prediction of the coagulant Dynamic modelling of the activated sludge process:
dosage for the Sainte-Foy water treatment plant. A large improving prediction using neural networks. Water
da;, bank, obtained over many years of operation, has Research, 1995, 29, 995- 1004.
been used to develop these models. An annual and four 5. Mindennan, P. A. and McAvoy, T. J., Neural Net
Modelling and Control of a Municipal Waste Water
seasonal models have been obtained and implemented
Process. IEEE, Piscataway, NJ, 1993, pp. 1480-1484.
on-line. These models, however, do not contain any 6. Press, W. H., Flannery, B. P., Teukolsky, S. A. and
inforn2ation on the dynamics of the process, only the Vetterling, W. T., Numerical Recipes: The Art of Scientific
previous behaviour of operators. Designed perturba- Computing. Cambridge University Press, Cambridge, 1986.
tions and jar-testing could be used to obtain information 7. Reynolds, T. D. and Richards, P. A., Unit Operations and
Processes in Environmental Engineering, 2nd edn. PWS
on a larger range of operation.
Publishing Company, 1996.
8. Gravel, S., Modelisation mathematique du dosage de
ACKNOWLEDGEMENTS produits chimiques pour le traitement de l’eau potable a
l’usine de Sainte-Foy. Sciences et Techniques de L’eau, 1992,
25,259-264.
The data banks have been provided by the water 9. Wolpert, D. H., Stacked generalization. Neural Networks,
treatment facilities of the City of Sainte-Foy whose 1992, 5, 242-259.

You might also like