You are on page 1of 9

Engineering Applications of Artificial Intelligence 16 (2003) 121–129

A neural network predictive control system for paper mill


wastewater treatment
G.M. Zenga,*, X.S. Qinb, L. Hea, G.H. Huanga,b, H.L. Liua, Y.P. Linb
a
Department of Environmental Science and Engineering, Hunan University, Changsha, Hunan 410082, China
b
Faculty of Engineering, University of Regina, Regina, Saskatchewan, Canada S4S 0A2

Abstract

This paper presents a neural network predictive control scheme for studying the coagulation process of wastewater treatment in a
paper mill. A multi-layer back-propagation neural network is employed to model the nonlinear relationships between the removal
rates of pollutants and the chemical dosages, in order to adapt the system to a variety of operating conditions and acquire a more
flexible learning ability. The system includes a neural network emulator of the reaction process, a neural network controller, and an
optimization procedure based on a performance function that is used to identify desired control inputs. The gradient descent
algorithm method is used to realize the optimization procedure. The results indicate that reasonable forecasting and control
performances have been achieved through the developed system.
r 2003 Elsevier Ltd. All rights reserved.

Keywords: Coagulation; Environment; Neural network; Nonlinear optimization; Predictive control; Simulation; Wastewater treatment

1. Introduction to meet the regulated discharge standards in a cost-


effective manner, an optimal control strategy is needed
Operation of a wastewater treatment system is often (Eckenfelder, 2000). Due to the difficulty in expressing
affected by a variety of physical, chemical, and the related processes mathematically, a neural network
biological factors. Previously, applications of control becomes an attractive approach to tackle above
theory to wastewater treatment mainly focused on issues problems.
of nonlinearity, uncertainty and posterity (Zhang and With inherent ability to approximate any nonlinear
Stanley, 1999) where difficulties in establishing accurate continuous function without requiring any prior knowl-
mathematical models and designing reliable controllers edge, the neural network theory has been greatly
existed. In a broad sense, predictive models describe the developed and widely used in the fields of environmental
functional relationship between inputs and outputs of a prediction and process control (Sang et al., 2000;
system. When applied to real-world cases, it is usually Kolehmainen et al., 2001). Tian et al. (1998) discussed
hard to precisely define a set of inputs that can the applicability of back-propagation (BP) and radial
potentially affect the outputs in a particular process. basis function (RBF) neural networks in the water
Often, this may be further complicated by the existence purification system through establishment of ozonation
of interactions among the related parameters; analytical and biological activated carbon system models. Bogdan
expression of these relationships may be especially and Andrzej (1999) studied the decision support of
challenging. water distribution networks based on neural networks in
Optimization problems also exist in studying the the presence of uncertainties. Wang et al. (2000) studied
wastewater treatment processes. For example, coagula- the ozone oxidization-organism activated carbon tech-
tion is commonly employed for the removal of wastes in nique and gave a modeling scheme based on the BP
suspended or colloidal form. Several factors may play neural network.
critical roles in their removal, such as coagulant type, Neural network techniques have been applied very
application dosages, pH level, and temperature. In order successfully to the identification and control of dynamic
systems (Narendra and Parthasarathy, 1990). The
*Corresponding author. universal approximation capabilities of the multiplayer

0952-1976/03/$ - see front matter r 2003 Elsevier Ltd. All rights reserved.
doi:10.1016/S0952-1976(03)00058-7
122 G.M. Zeng et al. / Engineering Applications of Artificial Intelligence 16 (2003) 121–129

perceptron have made it a popular choice for modeling state vector Z1 ; output vector Y1 and their relations
nonlinear systems and implementing general-purpose could be defined as follows:
nonlinear controllers (Murray et al., 1992). A number of 2 3 2 3
x1 z11
applications have been conducted for process control of 6x 7 6 7
wastewater treatment processes. A neural network 6 27 6 z12 7
X ¼6 7; W1 ¼ ðwij Þn0 n1 ; Z1 ¼ 6 7
1 6 T
7 ¼ W1 X ;
process model for coagulation, flocculation, and sedi- 4 ^ 5 4 ^ 5
mentation processes was built based on nearly 2000 sets xn0 z1n1
of process data by Zhang and Stanley (1999). Joo-Hwa 2 3
and Xiyue (1999, 2000) established a neural fuzzy model y11
6 17
for anaerobic wastewater treatment systems, and 6 y2 7
Y1 ¼ 6 7
6 ^ 7 ¼ f ðZ1 Þ:
explored application potential of the model to real-time 4 5
system control. y1n1
Traditional model predictive control (MPC) system
enhanced by feed-forward neural networks is called From layer k  1 to layer k; weight matrix Wk ; state
neural predictive control (NPC), which has been vector Zk ; output vector Yk and their relations could be
effectively applied to process control that incorporates written as
nonlinear optimization problems for manipulator con- 2 k3
z1
trol (Sanner and Slotine, 1995; Song and Koivo, 1998), 6 k7
chemical process control (Zamarreno and Vega, 1999), 6 z2 7
Wk ¼ ðwkij Þnk1 nk ; Zk ¼ 6 7 T
6 ^ 7 ¼ Wk Yk1 ;
and mobile robot path tracking (Ortega and Camacho, 4 5
1994). In these studies, the related system dynamics were zknk
defined by neural networks. The main drawbacks of 2 k3
such approaches include the undesirable local minima y1
6 k7
and the slow convergence of BP learning. 6 y2 7
Taking the wastewater treatment project for the Yk ¼ 6 7
6 ^ 7 ¼ f ðZk Þ;
4 5
Yuanling Paper Mill as a case, this paper aims to
yknk
develop a process control scheme for chemical addition
systems based on the neural predictive control. A multi- where yki ¼ f ðzki Þ; and f is the transfer function defined
layer back-propagation neural network is developed to as the following log-sigmoid style:
model the nonlinear relationships between the removal 1
rates of pollutants and the dosages of chemical addition, f ðsÞ ¼ : ð1Þ
1 þ expðsÞ
in order to adapt the related reactions to a large variety
of operating conditions and to acquire an enhanced The BP algorithm for multiplayer networks is a
learning ability. The system includes a neural network gradient descent optimization procedure where a mean
emulator, a neural network controller, and an optimiza- square error performance index is minimized. The
tion procedure based on a performance function to algorithm is provided with a set of networked behaviors:
identify desired control inputs. The gradient descent fX10 ; R1 g; fX20 ; R21 g; y; fXQ0 ; RQ g;
algorithm will be used to solve the optimization
problem. where Xi0 ði ¼ 1; 2; yQÞ is an input vector to the
network, and Ri ði ¼ 1; 2; y; QÞ is the corresponding
target output. As each input is applied to the network,
2. The back-propagation neural network the network output will be compared to the target. The
network parameters should be adjusted in order to
The BP neural network (i.e. BP network) contains two minimize the sum of squared errors:
stages: training and application. The first stage is to 1X T
Q
1X
Q
determine the weight levels, while the second one (also F ðwÞ ¼ ei ei ¼ ðRi  Yi0 ÞT ðRi  Yi0 Þ; ð2Þ
2 i¼1 2 i¼1
called working stage) (Hagan et al., 1996) is used to
tackle the detailed problems through developing the where w is a vector containing all of the network weights
neural network. and biases. The steepest descent algorithm for the
The structure of a typical BP network is shown in approximate mean square error could be written as
Fig. 1. Suppose that there is a neural network with K þ 

@e

1 layers, and the numbers of node points in every layer Wkþ1 ¼ Wk þ m  ; ð3Þ
@W
W ¼Wk
are n0  1 n1  1; y; and nk  1: For convenience, the
bias yk is incorporated within the weight vector of layer where m is the learning rate.
k as Wnkk ¼ y; and the first layer vector element xn0 ¼ Supposing that there is a BP network with one hidden
1: From layers 0 to 1, input vector X ; weight matrix W1 ; layer containing h nodes and that the number of input
G.M. Zeng et al. / Engineering Applications of Artificial Intelligence 16 (2003) 121–129 123

j
w ij
i

No. k-1 No. k No. k+1


Fig. 1. Structural representation of the BP network.

nodes is k; then the dynamic function of the BP network Optimization Loop


can be given by y p (t )

X
h r (t) u ' (t ) NN Plant −
Optimization
yðiÞ ¼ wj fj ðzð jÞÞ þ b ð4Þ model +
j¼1
u * (t )
and
X
p
zð jÞ ¼ wj;k xðkÞ þ bj ; ð5Þ Plant
k¼1 y (t )
where yðiÞ is the output at the ith node of the network; fj Fig. 2. Predictive control system supported by neural network and
is the output function for the jth node of the hidden optimization techniques.
layer; zð jÞ is the activation level of the jth node’s output
function; h is the node number in the hidden layer; p is
the number of input nodes; wj is the weight connecting (3) Conduct the optimization analysis to minimize the
the jth hidden node to the output node; wj;k is the weight cost function through calculation of new control
connecting the ith input node to the jth hidden node; bj inputs.
is the bias on the jth hidden node; and b is the bias on (4) Repeat steps 2 and 3 till the optimal result is
the output node. acquired.
(5) Use the first element in the optimal control-input
vector as the real control input to the plant.
3. Neural network predictive control (6) Go to the next series, and repeat steps 1–5.

3.1. The NPC formation It can be seen that the prediction and control horizons
are shifted ahead by one step and a new optimization
The NPC can be considered as a basic type of model- problem can then be solved by using updated measure-
based predictive system in which the model is a trained ments from the process. The system performance is
neural network (Fig. 2). It usually consists of four largely dependent upon the optimization procedure.
components: the plant to be controlled, the desired Several algorithms were successfully implemented in the
performance of the plant, a neural network that models NPC system, such as simplex (Takahashi, 1993),
the plant (i.e. an emulator), and an optimization process nongradient (Montague et al., 1991), successive quad-
that determines the optimal inputs needed to produce ratic programming (Song and Park 1993), and Newton–
the desired performance for the plant. The NPC Raphson methods (Haley and Soloway, 1997). The
normally optimizes the plant responses over a specified optimization process is generally based on minimizing a
time horizon (Hunt et al., 1992). The main steps of the cost function over a defined prediction horizon under
NPC algorithm are listed as follows: several constraints:
(1) Calculate a desired performance of the plant with a Z tk þP
reference model or appointed trajectory. If the value Min J ¼ Min jðyðtÞ; uðtÞ; tÞ dt ð6Þ
uðtÞ uðtÞ tk
is unknown, keep it constant or use the same value
(
as used in the last time. Eqð yðtÞ; uðtÞÞ ¼ 0
(2) Start with the previous control inputs, and predict s:t: ð7Þ
performance of the plant using the NN model. IEqð yðtÞ; uðtÞÞX0;
124 G.M. Zeng et al. / Engineering Applications of Artificial Intelligence 16 (2003) 121–129

where uðtÞAR is a set of control factors; yðtÞAR is the time t þ h ðh ¼ 1; y; Nm Þ can be written as follows:
output of the system that is related to both control
@J XN2
@yðt þ iÞ
factors uðtÞ and system states xðtÞ; Eq,IEq represents the ¼ ½rððt þ iÞ  yðt þ iÞ
equality and inequality constraints; tk is the discrete time @uðt þ hÞ i¼N
@uðt þ hÞ
1
at series k; and P is the prediction horizon. Nm
X @uðt þ iÞ
The objective function J will have different forms þ li uðt þ iÞ
under different control requirements. Generally, func- i¼0
@uðt þ hÞ
tion jðyðtÞ; uðtÞ; tÞ is used as the performance index. If Nm
X @Duðt þ iÞ
the constraints are linear, this nonlinear programming þ l0i Duðt þ iÞ : ð11Þ
problem may be cast into a quadratic one: i¼0
@uðt þ hÞ

( Item @Duðt þ jÞ=@uðt þ hÞ in function (9) can be written


1 XN2
in terms of the Kronecker delta function as follows
Min J ¼ Min jjrðt þ iÞ  yðt þ iÞjj2
uðtÞ uðtÞ 2 i¼N (Haley and Soloway, 1997):
1

1X
Nm @uðt þ jÞ @uðt þ j  1Þ
þ li jjuðt þ iÞjj2  ¼ dðh; jÞ  dðh; j  1Þ; ð12Þ
2 i¼0 @uðt þ hÞ @uðt þ hÞ
Nm
) where the Kronecker delta function is defined as
1X
þ l0 jjDuðt þ iÞjj2 ð8Þ (
2 i¼0 i 1 if h ¼ j;
dðh; jÞ ¼
0 if haj:

8 Obviously, @uðt þ jÞ=@uðt þ hÞ can be given by


> umin puðt þ iÞpumax ði ¼ 0; y; Nm Þ
>
> @uðt þ jÞ
< y pyðt þ iÞpy ði ¼ N1 ; y; N2 Þ ¼ dðh; jÞ: ð13Þ
min max
s:t: ð9Þ @uðt þ hÞ
>
> jjDuðt þ iÞjjpDu max ði ¼ 0; y; Nm Þ
>
:
Duðt þ iÞ ¼ 0 ði > Nm  1Þ; From formula (4) and (5), we have
X
h

where li ; l0i
are the weight matrices (positive, determi- yðt þ iÞ ¼ wj fj ðzj ðt þ iÞÞ þ b:
j¼1
nistic, and symmetric); N1 ; N2 are the minimum and
maximum output horizons, respectively; Nm is the Then @yðt þ iÞ=@uðt þ hÞ can be written as
control horizon; Duðt þ iÞ is the control increment at
time t þ i; written as Duðt þ iÞ ¼ uðt þ iÞ  uðt þ i  1Þ; @yðt þ iÞ Xh
@fj ðzj ðt þ iÞÞ
¼ wj : ð14Þ
rðt þ iÞ is the desired output; and jj jj represents the @uðt þ hÞ j¼1 @uðt þ hÞ
Euclidean 2-norm.
Use the chain rule, we have
@fj ðzj ðt þ iÞÞ @fj ðzj ðt þ iÞÞ @zj ðt þ iÞ
3.2. Optimization algorithm ¼ : ð15Þ
@uðt þ hÞ @zj ðt þ iÞ @uðt þ hÞ
The minimization of objective function J is performed Item @fj ðzj ðt þ iÞÞ=@zðt þ iÞ can be acquired through
repeatedly on-line at each sampling time. The control derivation of the output function. Normally, input
action is a time series vector ½uðtÞ; y; uðt þ Nm Þ : Only zj ðt þ iÞ is dependent upon control action uðt þ iÞ and
the first element uðtÞ is used as the real control input. time delay actions, i.e., uðt þ i  1Þ; uðt þ i  2Þ; y;
Since J is dependent on the sequence of control actions, uðt þ i  nÞ; as well as system output yðt þ i  1Þ
an iterative process can be used to determine the and its corresponding delay nodes, i.e. yðt þ i  2Þ;
best control u: For a given iterative step i at the time yðt þ i  3Þ; y; yðt þ i  mÞ: Suppose that the number
t; the gradient descent algorithm can be calculated as of the input nodes is K; the nodes of 1 to q is uðt þ i  nÞ
follows: ðn ¼ 0; 1; y; q  1Þ; and those of q þ 1 to K  q is y
ðt þ i  1  mÞ ðm ¼ 0; 1; y; K  q  1Þ: Thus, we have
@J
uiþ1 ðtÞ ¼ ui ðtÞ  a ; ð10Þ X
q1
@ui ðtÞ
zj ðt þ iÞ ¼ wj;nþ1 uðt þ i  nÞ
n¼0
where aARþ is the optimization step. The procedure is X
Kq1
repeated until the change in uðtÞ is less than the þ wj;mþqþ1 yðt þ i  1  mÞ: ð16Þ
appointed e: The derivative of the objective function at m¼0
G.M. Zeng et al. / Engineering Applications of Artificial Intelligence 16 (2003) 121–129 125

Then, item @zj ðt þ iÞ=@uðt þ hÞ can be calculated as 4.2. Coagulation process


follows:
Fig. 4 is a typical coagulation clarifier. The coagulant
@zj ðt þ iÞ X
q1
@uðt þ i  nÞ used in this plant is alum ½Al2 ðSO4 Þ3 18H2 O : Several
¼ wj;nþ1 key parameters could influence the treatment efficiency.
@uðt þ hÞ n¼0
@uðt þ hÞ
In the case of alum coagulant, the optimum pH for
X
Kq1
@yðt þ i  1  mÞ coagulation tends to lie between 6 and 7. The average
þ wj;mþqþ1 : ð17Þ pH level of the influent is 7.5. Thus, pH adjustment
m¼0
@uðt þ hÞ
is essential before the coagulation process begins.
The addition of additive chemicals (e.g., polyacryla-
The maximum of h is Nm : Thus, if i  noNm ; then mides at 2–8 mg=l) will enhance the coagulation
@uðt þ i  nÞ=@uðt þ hÞ ¼ dði  n; hÞ; if i  nXNm ; then through promoting the growth of flocs. The opti-
dði  n; hÞ ¼ dðNm ; hÞ: mum pH and temperature are controlled at 6.5 and
As to @yðt þ i  1  mÞ=@uðt þ hÞ; its value could be
15 C; respectively. Control the dosages of Alum and
calculated through an iteration process, when i  1 
coagulant additions is critical for optimizing the
mo1; then the value will be zero. If zj ðt þ iÞ is also
treatment process.
related to other system conditions, e.g., xðt þ iÞ; then
Eqs. (14)–(17) can again be used to derive the solution
procedure.
4.3. Neural predictive control

4. Application In order to meet the regulated waste-discharge


standards, the removal rates of several pollutants will
4.1. Overview of the study system be used as control indexes. The controlled system
outputs (e.g., COD removal rate) should always meet
The Wuqiangxi Paper Mill is located in the Yuanling the regulated requirements instead of fluctuating around
County of Hunan Province, China. The annual waste- the standards. The MPC system could optimize the
water discharge amount from the mill was 8:014  plant response over a specified time horizon. In its
105 tons: They include 1674:14 tons of COD, optimization process, the wastewater discharge require-
637:02 tons of BOD, 0:82 tons of volatile phenol, and ment could be expressed in linear constraints. Due to the
2:15 tons of volatile phenol. Chemical coagulation and difficulties to build a dynamic simulation model to
sedimentation methods were used to handle the waste- predict the coagulation reactions, the scheme of neural
water (Fig. 3). The design waste-treatment capacity was network modeling is used to replace the empirical MPC.
1:64  105 l=h: The regulated maximum allowable waste Thus, the concept of NPC is initiated (Fig. 5). Its
discharging levels are listed in Table 1 (CEPA, 1992). architecture includes a neural network plant model (i.e.,
NN emulator), a neural network controller, and an
optimization process to identify the desired control
Coagulant and inputs. The related mechanisms have been introduced in
coagulant aid Section 3.1. The optimal control outputs at each
Chemical running cycle from optimization block can be directly
pH adjustment addition
used for plant control.
Paper
Sedimentation
However, the optimization process requires extensive
wastewater Pulp Water Effluent
recycling collecting
tank of time-consuming computational works which make it
coagulating
tank basin reaction impossible for guiding real-time controlling efforts. As a
Sludge
result, an NN controller is used to learn and produce the
desired inputs. After the training is completed based on
Sludge stack Sludge thickening tank a large amount of real-time data, the NN controller can
or landfill
then replace the optimization module for supporting the
Fig. 3. Process of wastewater treatment in the Wuqiangxi Paper Mill. process control.
From economic point of view, dosages of the chemical
additives should be as low as possible under the
Table 1 prerequisite of meeting the regulated standards. Thus,
Discharge standards for wastewater effluent PN m
as shown in objective function J; item 12 i¼0
2
Water quality index CODCr ðmg=lÞ BOD5 ðmg=lÞ pH li jjuðt þ iÞjj could be used to evaluate the system’s eco-
nomical efficiency. Through a number of interactive
Discharge standard 800 500 6–9
tests, weight matrices li ; l0i in function (8) can be defined
126 G.M. Zeng et al. / Engineering Applications of Artificial Intelligence 16 (2003) 121–129

Fig. 4. Typical coagulation clarifier.

meet the regulated standard. Thus the following


Optimization Loop
y pi (t ) y p (t ) constraint should be satisfied:
   
r (t ) u i (t ) NN Emulator − xðtÞ  R xðtÞ  xout ðtÞ
Optimization rðtÞ ¼ p ¼ yðtÞ pymin ;
+ xðtÞ xðtÞ
u * (t ) + − PNm ymin
where is the minimum removal rate. For item
0
1
2 l
i¼0 i jjDuðt þ iÞjj2 in the objective function, the
eu (t )
r (t ) improvements of the control practices will proceed step
Wastewater
NN Controller Treatment system
by step. To prevent excessive variations, the improve-
u (t ) y (t ) ments should be lower than a maximum value. In detail,
the constraints at time t are given as follows:
Fig. 5. Neural network predictive control system. ½rCOD ðtÞ; rBOD5 ðtÞ T pyðtÞ ¼ ½yCOD ðtÞ; yBOD5 ðtÞ T
p½80%; 80% T ;
½100; 1 T puðtÞ ¼ ½uAlum ðtÞ; uPAM ðtÞ T
p½800; 10 T mg=l;
as follows: jDuðtÞjp½100; 2 mg=l:
" # " #
0:005 0:05
li¼ ; l0i ¼ : 4.4. Neural network modeling
0:1 1

Two control horizons ðNm ¼ 1Þ and two prediction In order to perform a real-time control for the system,
horizons ðN1 ¼ 1; N2 ¼ 2Þ are chosen for function (8). the dynamic relationships between the removal rates and
Function yðtÞ is the predicted removal rates of a the chemical dosages should be analyzed. For example,
pollutant (BOD5 or COD) at time t; and rðtÞ means based on a number of batch tests, the relationships
the expected removal rates of the pollutant at time t: between the removal rate of COD and the dosages of
Supposing that the influent water quality is xðtÞ; then rðtÞ coagulant ðAl2 SO4 Þ and coagulant aid (PAM) for a
could be given as follows: specific influent (BOD5 ¼ 1100 mg=l; and COD ¼
2200 mg=lÞ can be obtained as shown in Fig. 6. From
xðtÞ  R
rðtÞ ¼ ; ð18aÞ Fig. 6, it is indicated that the treatment efficiency shows
xðtÞ
a complicated nonlinear function of the dosages of
where R is the discharge standard corresponding to a coagulant and coagulant aid.
given pollutant index. With respect to the wastewater However, the influent water quality is constantly
treatment problem, the future level of rðt þ 1Þ is always fluctuating, which makes it hard to accurately describe
unknown; it can be assumed to be the same as rðtÞ: The the complex relationships between the removal rates and
removal rate of each pollutant should be high enough to the chemical dosages. A neural network is known as a
G.M. Zeng et al. / Engineering Applications of Artificial Intelligence 16 (2003) 121–129 127

uAlum (t )

u PAM (t )
yCOD (t)

y COD ( t − 1)

yBOD (t − 1)
yBOD (t)
xCOD (t )

x BOD (t )

Fig. 6. Relationships between chemical addition and COD removal. Input layer with Hidden layer Output layer
6 nodes with 10 nodes with 2 nodes

universal approximator (Hornik et al., 1989). One of the Fig. 7. BP network architecture for the NN emulator.
advantages of neural network modeling is its ability to
learn relationships through the data itself rather than with six nodes in the input layer and two nodes in the
assuming the functional form of the relationships as output layer. We choose 10 nodes for the hidden layer.
done in the regressive methods. Through an iterative Theoretically, an infinite number of data points
learning process, neural network extracts information should be used to guarantee the performance of a
from the training set and stores the information in its network. However, this is not practically feasible. In
weight connections. The neural network not only can order to conduct the off-line training of the emulator
model any relationship to any degree of accuracy given before the process control begins, a series of experiments
that there is sufficient data for modeling but also can with different dosages of coagulant and coagulant aid
tolerate noisy and incomplete data representations. were carried out under different influent conditions.
Different from conventional regressive models, neural Since some deviations appear inevitably when applying
network can dynamically adapt to new process condi- the experimental results into real situations, continuous
tions through continuous training. training is necessary to keep the emulator adaptive and
After a network is trained, it can then be used to accurate. During the training process for the NN
provide predictions for new inputs. Normally neural controller, the input layer includes the influent water
network is used both as emulator and controller in a quality [i.e., xðtÞ] and the expected removal rates for
process control system. The neural emulator is trained COD and BOD5 [i.e., rðtÞ]. The output layer is the
off-line and can then be used to simulate the dynamics optimal control action un ðtÞ: After the training, the
of the coagulation process. The controller is trained by controller will operate quickly without the need for large
the data of real system inputs, operating results, and amounts of computational works.
control parameters. The training direction is adjusted
through minimizing the sum-squared error between the
network outputs and the target outputs. In this 4.5. Simulation results
application, a one-step-ahead BP predictive model of
the NN emulator is used to describe the reaction The NN emulator and the optimization algorithm are
dynamics. With respect to the inputs of the NN written in MATLAB language. The quadratic program-
emulator, the formula can be written as follows: ming problem in function (8) is solved by using the QP
function in the optimization toolbox of the MATLAB.
The BP network algorithm is realized using the
yðt þ 1Þ ¼ jðyðtÞ; xðt þ 1Þ; uðt þ 1ÞÞ; ð18bÞ
functions of Train, Init, and Sim in the neural network
toolbox of the MATLAB. The NN emulator is trained
where xðt þ 1Þ is the system state at time i þ 1; where the by real process data obtained from the study site. The
influent water quality at time t þ 1 is defined as xðt þ 1Þ; BP network for the emulator with six inputs, 10 hidden
yðtÞ is the removal rates of the pollutant at time t; uðt þ nodes and two outputs are implemented. The learning
1Þ is the chemical dosages at time t þ 1: Note that yðiÞ; rate is m ¼ 0:05: After about 18 000 times of training (see
uðiÞ and xðiÞ in this application are actual vectors, where Fig. 8), the sum squared errors between the observed
yðiÞ and xðiÞ have BOD5 and COD as its elements, i.e. outputs and modeled outputs are then lower than the
yðiÞ ¼ ½yCOD ðiÞ; yBOD ðiÞ ; and xðiÞ ¼ ½xCOD ðiÞ; xBOD ðiÞ : given level of e ¼ 0:005: The sampling time is set as 30 s:
The uðiÞ has alum and PAM dosages as its elements, Fig. 9 shows the output responses in 40 h when the
i.e. uðiÞ ¼ ½uAlum ðiÞ; xPAM ðiÞ : The architecture of the BP influent wastewater quality fluctuates significantly.
model is shown in Fig. 7. The model has three layers The corresponding control actions are shown in
128 G.M. Zeng et al. / Engineering Applications of Artificial Intelligence 16 (2003) 121–129

Fig. 11. Average COD and BOD5 removal rates in 120 h:


Fig. 8. Training process of the BP network.

Fig. 9. BOD5 and COD removal rates under fluctuating influent Fig. 12. Average alum and PAM dosages in 120 h:
quality.

Fig. 10. From Fig. 9, it can be seen that both COD and
BOD5 are able to follow the expected removal rates. The
real output removal rates are higher than the expected
ones. Under the given setting, the control action will
remain optimal at each time step. Figs. 11 and 12 show
the simulation results when the influent water quality
varies dynamically. Thus, the wavelets will be filtered
and the relevant data be averaged at the related time
steps, leading to satisfactory control effects.

5. Conclusions

This paper presents a process control scheme for a


waste coagulation process based on the neural predictive
control. A multi-layer BP neural network is developed
to model the nonlinear relationships between the
Fig. 10. Control of alum and PAM dosages under fluctuating influent pollutant removal rates and the chemical additive
quality. dosages. The method can adapt the system to a large
G.M. Zeng et al. / Engineering Applications of Artificial Intelligence 16 (2003) 121–129 129

variety of operating conditions with an enhanced Hunt, K.J., Sbarbaro, D., Zbikowski, R., Gawthrop, P.J., 1992.
learning ability. It includes a neural network emulator, Neural networks for control system—A survey. Automatica 28,
a neural network controller, and an optimization 1083–1112.
Joo-Hwa, T., Xiyue, Z., 1999. Neural fuzzy modeling of anaerobic
procedure based on a performance function for identify-
biological wastewater treatment systems. Journal of Environmental
ing desired control inputs. The gradient descent algo- Engineering 125 (12), 1149–1159.
rithm method is used to realize the optimization Joo-Hwa, T., Xiyue, Z., 2000. A fast predicting neural fuzzy model for
procedure. The NPC algorithm is programmed in high-rate anaerobic wastewater treatment systems. Water Research
MATLAB language using the optimization and neural 34 (11), 2849–2860.
network toolboxes. Kolehmainen, M., Martikainen, H., Ruuskanen, J., 2001. Neural
networks and periodic components used in air quality forecasting.
Simulation result under different conditions shows
Atmospheric Environment 35, 815–825.
that both COD and BOD5 can satisfy the expected Montague, G.A., Willis, M.J., Tham, M.T., Morris, A.J., 1991.
removal rates using the NPC. Since the pollutant- Artificial neural network based control. International Conference
discharge limits are expressed as linear constraints in the on Control 1, 266–271.
optimization model, the actual output removal rates are Murray, R., Neumerkel, D., Sbarbaro, D., 1992. Neural networks for
higher than the required ones. With the environmental modeling and control of a non-linear dynamic system. Proceedings
of the 1992 IEEE International Symposium on Intelligent Control,
standards being satisfied, another system objective will
Glasgow, Scotland, pp. 404–409.
then be the minimization of the treatment cost, i.e., the Narendra, K.S., Parthasarathy, K., 1990. Identification and control of
dosages of chemical additives should be minimized. The dynamical systems. IEEE Transactions on Neural Network 1 (1),
optimization-based control system can effectively tackle 4–27.
both environmental and economic objectives of the Ortega, J.G., Camacho, E.F., 1994. Neural network GPC for mobile
system in a real-time basis. robot path tracking. Robotics and Computer-Integrated Manu-
facturing 11, 271–278.
Sang, H.S., Sea, C.O., Byung, W.J., et al., 2000. Prediction of ozone
formation based on neural network. Journal of Environmental
Acknowledgements Engineering 126 (8), 688–696.
Sanner, R.M., Slotine, J.E., 1995. Structurally dynamic wavelet
This research has been supported by the Natural networks for the adaptive control of uncertain robotic systems.
Science Foundation of China and the Teaching and Proceedings of the 34th Conference on Decision & Control, New
Research Award Program for Outstanding Young Orland, LA, pp. 2460–2467.
Song, B., Koivo, A., 1998. Neural network model based control of a
Teachers of MOE. The authors are thankful to the flexible link manipulator. Proceedings of the IEEE International
anonymous reviewers for their insightful comments and Conference on Robotics & Automation, Leuven, Belgium, pp. 812–
suggestions. 817.
Song, J.J., Park, S., 1993. Neural model-predictive control for
nonlinear chemical processes. Journal of Chemical Engineering of
References Japan 26 (4), 347–354.
Takahashi, Y., 1993. Adaptive predictive control of nonlinear time-
varying system using neural network. IEEE International Sympo-
Bogdan, G., Andrzej, B., 1999. Neural networks based decision
sium on Neural Networks 3, 1464–1468.
support in presence of uncertainties. Journal of Water Resources
Planning and Management 125 (5), 272–280. Tian, Y., et al., 1998. Comparative of BP and RBF artificial neural
CEPA (China Environmental Protection Agency). 1992. Standards for network’s function on model building of ozonation and biological
wastewater discharge from paper mill industry. GB3544-92. activated carbon water purification system. China Environmental
Eckenfelder, W.W., 2000. Industrial Water Pollution Control, 3rd Science 5, 393–397.
Edition. McGraw-Hill Series in Water Resources and Environ- Wang, C., Gao, X., et al., 2000. The research on modeling water-
mental Engineering. McGraw-Hill, Boston. processing system by neural networks. Control and Decision
Hagan, M., Demuth, H., Beale, M., 1996. Neural Network Design. (China) 15 (3), 378–380.
PWS, Boston. Zamarreno, J.M., Vega, P., 1999. Neural predictive control: applica-
Haley, P., Soloway, D., 1997. Generalized predictive control for active tion to a highly non-linear system. Artificial Intelligence 12, 149–
flutter suppression. IEEE Control Systems Magazine 17 (4), 64–68. 158.
Hornik, K., Stinchcombe, M., White, H., 1989. Multi-layer feed- Zhang, Q., Stanley, S.J., 1999. Real-time water treatment process
forward networks are universal approximators. Neural Networks control with artificial neural networks. Journal of Environmental
2, 359–366. Engineering 125 (2), 153–160.

You might also like