Applied Soft Computing 11 (2011) 3812–3820
Contents lists available at ScienceDirect
Applied Soft Computing journal homepage: www.elsevier.com/locate/asoc
Adaptive dissolved oxygen control based on dynamic structure neural network Hong-Gui Han ∗ , Jun-Fei Qiao College of Electronic and Control Engineering, Beijing University of Technology, Beijing, China
a r t i c l e
i n f o
Article history: Received 31 May 2010 Received in revised form 25 November 2010 Accepted 13 February 2011 Available online 18 February 2011 Keywords: Dynamic structure neural networks (DSNN) Dissolved oxygen (DO) concentration control Wastewater treatment process (WWTP) Growing and pruning algorithm
a b s t r a c t Activated sludge wastewater treatment processes (WWTPs) are difficult to control because of their complex nonlinear behavior. In this paper, an adaptive controller based on a dynamic structure neural network (ACDSNN) is proposed to control the dissolved oxygen (DO) concentration in a wastewater treatment process (WWTP). The proposed ACDSNN incorporates a structure variable feedforward neural network (FNN), where the FNN can determine its structure on-line automatically. The structure of the FNN is adapted to cope with changes in the operating characteristics, while the weight parameters are updated to improve the accuracy of the controller. A particularly strong feature of this method is that the control accuracy can be maintained during adaptation, and therefore the control performance will not be degraded when the character of the model changes. The performance of the proposed ACDSNN is illustrated with numerical simulations and is compared with the fixed structure fuzzy and FNN approaches; it provides an effective solution to the control of the DO concentration in a WWTP. © 2011 Elsevier B.V. All rights reserved.
1. Introduction Water pollution is one of the most serious environmental problems due to the discharge of nutrients into receiving waters [1]. Hence, to improve the effectiveness of the treatment there is a need to implement better methods of control. However, the most popular treatment method used in the field of wastewater plants is biological [2]. In particular, processes based on activated sludge technology offer a very good solution for pollution removal in wastewater. Because of the complexity of the physical, chemical and biological phenomena associated with treatment units, the performance of the process is heavily dependent on environmental and operational conditions. Wastewater treatment processes (WWTPs) are difficult to control due to large disturbances in flow and load and also the different physical and biological phenomena which can take place. Several extensive surveys of the activated sludge process control using simulation can be found in the literature [3,4]. Nowadays, dissolved oxygen (DO) level control is the most widely used method since oxygen is a key substrate in animal cell metabolism and its consumption can therefore be used to effectively monitor the whole process [5]. The DO level in the aerobic reactors has significant influence on the behavior and activity of the heterotrophic and autotrophic microorganisms living in the activated sludge. The DO concentration in the aerobic part of
∗ Corresponding author. E-mail addresses:
[email protected],
[email protected] (H.-G. Han),
[email protected] (J.-F. Qiao). 1568-4946/$ – see front matter © 2011 Elsevier B.V. All rights reserved. doi:10.1016/j.asoc.2011.02.014
an activated sludge process should be sufficiently high to supply enough oxygen to the micro-organisms in the sludge so that organic matter is degraded and ammonium is converted to nitrate. On the other hand, however, an excessively high level of DO, which requires a high air inflow rate, leads to a high energy consumption and may result in a deterioration of the sludge quality. Experiments show that a high level of DO in the internally recirculated water also makes the denitrification less efficient. Hence, both for economic and processing reasons it is important to control the DO concentration. A lot of research has been published about methods to control the DO in order to improve the process. The classical methods (on/off [6] and proportional-integral-derivative (PID) [7]) have largely been tried, but due to the nonlinear character of the bioprocesses and the lack of available models, the controllers were developed for specific operating and environmental conditions. More recently, researchers have started to employ artificial intelligence techniques, which can be found in a wide variety of application fields including chemicals [8], food processing [9], automation [10], and other complex nonlinear systems [11]. The most popular artificial intelligence techniques used to control DO concentration are fuzzy and neural networks. Ferrer et al. [12] studied a fuzzy approach to the DO control in the aeration process. The inputs to the fuzzy controller are the actual DO concentration, the value of the error, the error change and the accumulated error; the outputs are the air flow and its change. Compared with conventional on/off control, the fuzzy controller can save about 40% of the energy. Traore et al. [13] have presented a fuzzy logic strategy to control the DO level in a sequential batch reactor (SBR) pilot plant. The strategy was shown to be both robust and effective; it was
H.-G. Han, J.-F. Qiao / Applied Soft Computing 11 (2011) 3812–3820
also easy to integrate it into a global cost management monitoring system. However, despite the fact that the fuzzy approach has been successfully applied to many practical applications [14,15], there is still no clear and easy design methodology. This is mainly because constructing a fuzzy control rule base is semi-empirical rather than learned. Consequently, a neural network, which is able to learn nonlinear functional relationships without the need for a structural knowledge of the process has become popular. Syu and Chen [16] have proposed an adaptive control for DO concentration in the sewage treatment process using a BP neural network. The control system designed set the minimum dose for performance indicators and the effluent chemical oxygen demand (COD) to meet the emission targets. Lee et al. [17] have developed an automatic control system using a neural network and internet-based remote monitoring system that increases the operating efficiency of plants that have a serious influent loading variance. The results show that regardless of loading variance, more than 95% of organic matters and more than 60% of nitrogen and phosphorus are removed. Huang et al. [18] proposed an integrated neural–fuzzy process controller to control aeration for DO concentration. It was shown that there is an operational cost saving of almost 30% when the fuzzy–neural controller is switched on. There are other approaches based on neural networks which have also been used to control DO concentration [19,20]. However, it is difficult for designers and technical domain experts to estimate all the input-output data from such a complex system and thus determine the appropriate structure of the controller’s neural network. Previous works on controllers have had limited success because they have not addressed the main issues associated with the complex nonlinear WWTP: a successful control scheme must address the dynamic nature of the problem and the different methods used by plants in different operating regions. In this paper, an adaptive controller based on a dynamic structure neural network (ACDSNN) is proposed which is capable of adapting to the nonlinear dynamics of the WWTPs used in different operating regions. The dynamic structure neural network can adapt both the network structure (number of hidden units) and parameters (weights). This characteristic makes it ideal for complex non-linear dynamic applications [21–23]. It is reasonable to suppose that feedforward neural network (FNN) design algorithms with structure adaptive strategies will have better performance. In this paper a new structure adjusting strategy is developed that is applicable to both constructing as well as pruning. The novel full structure optimization is intended to optimize the entire FNN structure by means of an approach combining the error reparation (ER) with the activities of the hidden units. The proposed dynamic structure neural network can obtain a compact structural size on-line according to the characters of the WWTPs. The ACDSNN improves several key areas of the controller—its response, accuracy and robustness. This paper applies the ACDSNN to the WWTP and shows how it is able to improve the control of the DO concentration. The outline of this paper is as follows: in Section 2, the activated sludge system model is described. Section 3 briefly discusses the FNN model and introduces the winning frequency function and redundant frequency function for structure design. Section 4 discusses the proposed ACDSNN. The experimental results of the simulations are presented in Section 5. The performance of the ACDSNN is compared with several other intelligent methods. The simulation results demonstrate that ACDSNN is a more effective controller: it can ensure that the water quality meets the expected level and has a smaller overshoot. Finally, Section 6 concludes the paper. For convenience of discussion, Table 1 lists the acronyms used in this paper.
3813
Table 1 Lists of acronyms. Acronym
Description
ACDSNN COD DO DSNN ER FNN MISO MSE PID SBR WWTP WWTPs
Adaptive controller based on a dynamic structure neural network Chemical oxygen demand Dissolved oxygen Dynamic structure neural network Error reparation Feedforward neural network Multi-input and single-output Mean square error Proportional-integral-derivative Sequential batch reactor Wastewater treatment process Wastewater treatment processes
Fig. 1. The activated sludge wastewater treatment process.
2. Activated sludge system model The WWTP is a dynamic model. In order to simulate the processes that occur in a biological treatment process, the benchmark represents a continuous-flow pre-denitrifying activated sludge process which contains a reactor tank and a settling tank. The fundamentals of the activated sludge WWTP are shown in Fig. 1. A mathematical model is obtained based on the following assumptions [24]: (1) The microorganisms’ growth rate is larger than their death rate and obeys the Monod law [27]. (2) No biochemical reactions take place inside the settling tank; biomass in the sedimentation tank is negligible. (3) The inflow stream contains no biomass; complete settling is achieved, hence the sludge wastage is restricted to a waste stream. The model is then given by
⎧ dX SX O Q Qw ⎪ ⎪ ⎪ dt = ks + S ko + O − kd X + V Xi − V CX ⎪ ⎪ ⎨ dS
=
SX
O
YSH ks + S ko + O dt ⎪ ⎪ ⎪ ⎪ ⎪ dO (1 − ffs YSH ) SX ⎩ = dt
fYSH
+
Q (S − S) V i
(1)
O − fs kd X + u ks + S ko + O
where X is the biomass concentration in the aeration tank, Xi is the inflow biomass concentration, S is the reactor substrate concentration, Si is the substrate concentration contained in inflow, O is the oxygen concentration in reactor tank, is the maximal specific growth rate, ks is the half-velocity constant, substrate concentration at one-half the maximal growth rate, ko is the oxygen half-saturation coefficient for heterotrophic biomass, kd is the endogenous decay coefficient, Q is the inflow, V is the reactor volume, Qw is the wastage flow, C is concentration factor in the sedimentation tank, Y is the yield coefficient, YSH is the observed yield coefficient, f is a factor, which correlates the substrate with
3814
H.-G. Han, J.-F. Qiao / Applied Soft Computing 11 (2011) 3812–3820
Hidden layer: There are N units in this layer. The output values of this layer are
M
vj = f
wij gi
i=1
i = 1, 2, . . . , M;
,
(4)
j = 1, 2, . . . , N,
f(x) = (1 + e−x )−1 ,
vj is the output of jth unit, wij is the weight where value connecting the ith unit in the input layer with the jth unit in the hidden layer. Output layer: There is only one unit in this layer. The output value of this layer is y=
N
wj vj ,
j = 1, 2, . . . , N,
(5)
j=1
Fig. 2. The feedforward neural network (FNN) structure.
oxygen demand, fx is the consumption factor, and u is the oxygen transfer rate. In practice, the parameters ks S and ko O, so the system dynamics in (1) can be re-written as
where y is the output of the layer, wj is the weight connecting the jth unit in the hidden layer with the output unit. In order to estimate the FNN, the mean square error (MSE) for the output unit is defined as 1 (ydp (t) − yp (t))2 , T T
E(t) =
(6)
p=1
x˙ (t) = A (t) x (t) + Bu (t) y (t) = Cx (t) + Du (t)
(2)
where T is the total number of samples, yp (t) is the output of the pth sample at time t and ydp (t) is the desired output of the pth sample at time t.
⎤
3.2. Dynamic structure neural network (DSNN)
where
X(t) x(t) = S(t) O(t)
B=
0 0 1
,
⎡
CQw (t) 0 ı V ⎢ ⎥ Q (t) ⎢ ⎥ A(t) =⎢ − 0⎥, − V ⎣ (1 − fY (t))Y + ff Y (t)k ⎦ x SH SH d 0 ı − fYSH (t) − kd −
,
C = [0
0
1 ],
D = [0
0
0 ].
This process is a multi-input and single-output (MISO) model, nonlinear dynamic system. Because of the influence of the physical parameter values, it is hard to control the DO concentration online. For this reason, an adaptive controller based on the characteristics of the system is developed.
The dynamic nature of the neural network is determined based on the contribution ratios of the hidden neurons or units. Hidden units with sufficiently small contribution ratios will be eliminated while new units will be added when the FNN cannot satisfy certain design objectives. Initially the FNN begins with no hidden units or few hidden units, to avoid pre-determining the structure. Each step in the algorithm is given below. For each unit j in the hidden layer of the network, calculate the contribution ratio for the FNN’s output P(j) =
wj uj y
,
(7)
3. Design of the dynamic structure neural network
where wj is the connecting value between the jth hidden unit and the output unit. uj is the output value of the jth hidden unit, y is the output value of the network. Select the biggest and smallest contribution ratio.
3.1. Feedforward neural network
= Max(P(j)),
N
(8)
j=1
Without loss of generality, a single hidden layer FNN is used in this paper. The structure of the FNN is shown in Fig. 2. Bypass weights from the input layer to the output layer are used, but are not shown in Fig. 2 for clarity. As the process described above is a MISO system, the FNN is also a MISO. There are M units in the input layer, N units in the hidden layer, and one unit in the output layer. The function and activation of each layer are: Input layer: there are M units in this layer; each input represents an input variable of the FNN. The output values can be expressed as gi = xi ,
i = 1, 2, . . . , M.
(3)
where gi is the ith output value, and the input vector is X = [x1 , x2 , . . . , xM ] .
N
˝ = Min(P(j)),
(9)
j=1
where is the biggest contribution ratio of the hidden unit and ˝ is the smallest ratio of the hidden unit. N is the number of units in the hidden layer. If P(k) is , P(j) is ˝, winning times twk and the tlj redundant times will be added. Calculate the activity of the hidden units. The winning frequency function is chosen as hwj (1) = h0 − Sw e−aw , hwj (twj ) = hwj (twj − 1) − Sw e−aw twj ,
(10) twj ∈ [2, +∞),
(11)
where hwj (twj ) is the winning frequency function value of the jth hidden unit with winning times twj . h0 is the initial activity of the hidden units. Sw , ˛w is the modifying parameters.
Winning and redundant activity thresholds
H.-G. Han, J.-F. Qiao / Applied Soft Computing 11 (2011) 3812–3820 Table 2 Dynamic structure FNN algorithm.
1
Redundant activity threshold
(1) Initialize the parameters. (2) Train a given randomly FNN. (3) Find the winning and redundant hidden unit in every training step. twj = twj + 1, tli = tli + 1, twj is the wining time of the wining unit j and tli is the redundant time of the redundant unit i. (4) Calculate the activities of the hidden units based on formulas (11) and (14). (5) Compute the activity thresholds based on formulas (12) and (15). (6) Determine the growing and pruning conditions, if the network needs to add new units, go to step (7), if the network has redundant units, go to step (9). Otherwise, go to step (10). (7) Add a new hidden unit to the network. Initialize the parameters of the new unit according to formula (17). (8) The winning activities of the winning and new hidden units are h0 ; their wining times are 1. (9) Prune the redundant hidden units. Initialize the parameters of the left unit according to formula (19). (10) Restart neural network training.
Winning activity threshold
0.8
0.6
0.4
0.2
0 1
0.8
0.6
0.4
0.2
3815
0
MSE value E gence the new inserted unit is given based on the ER, and the initial parameters of the new unit are
Fig. 3. The activity thresholds on the MSE.
If E(t) ≥ Ed ( is a constant, > 1; Ed is the expected error), this means that the network has poor generalization performance. If the activity hwj ≥ hTw , a new unit should be added, hTw the winning activity threshold, and hTw = h0 − ˇw e−w
E2
,
(12)
hlj (tlj ) = hlj (tlj − 1) − Sl e−al tlj ,
tlj ∈ [2, +∞),
2
w·new =
(17)
1 w , 2 ·j
(14)
j = min wj (t) · vj (t) − ε(t) ,
(15)
where ˇl , l is the pre-set positive constant, ω is the pre-set convergent constant and ω = (e−tL − 1),
vj (t)
(13)
where hlj (tlj ) is the redundant frequency function value of the jth hidden unit with the tlj redundant times. h0 is the initial activity of the hidden units. Sl , ˛l is the modifying parameters. If the activity hlj ≥ hTl , the redundant unit j will be deleted, where hTl is the redundant activity threshold hTl = ˇl e−l E − ω,
vj (t)
ε(t) ⎪ , ifj > ε(t). ⎩ wnew = −
where wnew is the weight of the new unit between the hidden layer and the output layer, and w·new is the weight of the new unit between the hidden layer and the input layer. j is the minimal distance between the output value of the hidden layer and the approximation error ε(t)
where ˇw , w is the pre-set positive constant and E is the MSE value. The redundant frequency function is given as hlj (1) = h0 − Sl e−aj ,
⎧ ε(t) ⎪ ⎨ wnew = , ifj ≤ ε(t).
(16)
where , is the pre-set constant, tL is the pruning times. In order simplify the algorithm Sl = Sw = S, ˛l = ˛w = ˛, ˇl = ˇw = ˇ, l = w = . Fig. 3 shows the wining activity threshold and the redundant activity threshold for the hidden units. It shows that the winning activity threshold is small when the MSE value E is large—the network has poor approximation performance. New hidden units should be inserted immediately. However, when E converges to zero the network has good approximation performance. The winning activity threshold is large, and the redundant activity threshold is small. Redundant units can be deleted to ensure the compact structure of the neural network. The design of the dynamic structure neural network algorithm is based on the characteristics of the objects and the winning and redundant activities. After the hidden units are inserted or pruned, the initial parameters of the new unit and the remaining units are given as follows. For growing: If the MSE E(t) is larger than Ed , and the activity hwj ≥ hTw , a new unit will be inserted. In order to speed up conver-
(18)
where ε(t) = ydp (t) − yp (t), ydp (t) is the expected output of the pth sample and yp (t) is the real-output of the network at time t. For pruning: If the hth redundant activity hlh ≥ hTh , the hth hidden unit will be pruned. And the parameters of the nearest unit will be changed to w h-nearest (t) = wh-nearest (t) + w·h-nearest (t) = w·h-nearest ,
vh (t) w (t) vh-nearest (t) h
(19)
where the h-nearest unit is the one which has the minimum Euclidean distance to the hth unit, wh-nearest is the weight between the hidden layer and the output layer and w·h-nearest is the weight between the hidden layer and the input layer. The main steps of the proposed dynamic structure neural network algorithm are given in Table 2. 3.3. Convergence Analysis of the Dynamic Structure FNN For the proposed dynamic structure FNN, the convergence of the algorithm with respect to the added hidden units and the deleted units is an important issue and needs careful investigation. In the following analysis it is shown that the change to the hidden units due to the FNN cause the MSE value to decrease until a local minimum is found or a given stopping criterion is reached. The convergence cases which occur during the constructing phase, the pruning phase and the structure unchanging phase are investigated. These cases can yield an estimate of the convergence that the dynamic structure FNN can theoretically achieve. Furthermore, through this analysis a better understanding of the implications of the proposed ACDSNN can be obtained.
3816
H.-G. Han, J.-F. Qiao / Applied Soft Computing 11 (2011) 3812–3820
3.3.1. The growing phase Once the network with n − 1 hidden units has been constructed, the initial parameters of the new inserted unit are calculated using formula (18) (in this paper only one unit is inserted at a time). After the new (namely the nth) hidden unit has been added to the network, the output estimation error e(t) of the n hidden unit(s) becomes e(t) = yd (t) − yn (t) = yd (t) − n−1
n
j=1 n−1
⎪ ε(t) ⎪ ⎪ w (t)vn (t), (i > ε(t)) wj (t)vj (t) + ⎪ ⎩ yd (t) − Gi (t) i j=1
where ε(t) is the approximation error before the constructing phase, yd (t) is the expected output, yn (t) is the real-output of the FNN with n hidden unit(s), Gi (t) = wi (t)vi (t), then (i ≤ ε(t))
j=1 n−1
⎪ ⎪ ⎪ yd (t) − wj (t)vj (t) + ε(t) ⎪ ⎩
u(t)
Object
y (t )
4. Discussion of the adaptive controller based on a dynamic structure neural network (ACDSNN)
⎧ n−1 ⎪ ε(t) ⎪ ⎪ y (t) − wj (t)vj (t) − w (t)vn (t), (i ≤ ε(t)) d ⎪ ⎨ Gi (t) i
e(t) =
ACDSNN
Fig. 4. Schematical representation of the control system.
wj (t)vj (t) − wn (t)vn (t)
⎧ n−1 ⎪ ⎪ ⎪ y (t) − wj (t)vj (t) − ε(t) d ⎪ ⎨
Disturbance
yd (t )
wj (t)vj (t) = yd (t)
j=1
j=1
=
E
=
0, ifi ≤ ε(t). 0, ifi > ε(t).
(20)
(i > ε(t))
j=1
According to the above analysis, the growing phase in the proposed dynamic structure FNN will not change the MSE value. The initial weights of the new units can ensure that the output estimation error e(t) will be zero. This method is defined as the ER technique. 3.3.2. The pruning phase Once the network with n hidden units has been constructed and trained using the gradient decent method [25], the MSE E(t) for the n hidden unit(s) is obtained. There is a redundant unit which should be pruned. The parameters of the left units are changed according to formula (19). Therefore, the output estimation error e(t) for the n − 1 hidden unit(s) will be: n−1
e(t) = yd (t) − yn−1 (t) = yd (t) −
wj (t)vj (t)
j=1,j = / h-nearest − wh-nearest (t)vh-nearest (t) = yd (t) −
n
wj (t)vj (t) = ε(t),
(21)
j=1
where ε(t) is the approximation error before the pruning phase, yd (t) is the expected output, yn−1 (t) is the real-output of the network with n − 1 hidden unit(s). It is clear from formula (21) that the output estimation error e(t) will not change after pruning. The remaining weights are trained by the gradient decent method. 3.3.3. The phase where the structure does not change In this phase, the neural network structure will not be changed; the weights of the FNN are adjusted based on the gradient decent method. In the paper [25], the authors have shown convergence of the online gradient method. Here, the details are omitted. As can be seen in the three phases presented above, the convergence of the proposed DSNN can be maintained or speeded up.
The main and most obvious control goal to be achieved at a wastewater treatment plant is, of course, to keep the plant running. The second one is to fulfill the effluent quality standards, while minimizing the operational costs. The wastewater treatment is a complex nonlinear system which is hard to model. This paper proposes using the ACDSNN to address these problems. It can realize adaptive control by changing the structure as well as parameters of the neural network when applied to activated sludge wastewater treatment system. The wastewater treatment system is used as the control object and the DO concentration is used as the control variable. The structure of the control system is shown in Fig. 4. ACDSNN is a three-layer FNN controller based on a dynamic structure algorithm. It employs two inputs, the required signal (yd (t)) and the real output value (y(t)); it has only one output, u(t), which is fed to the plant. There are a number of issues that must be considered when attempting to model the activated sludge wastewater treatment process. First, the adopted model has to be periodically updated (adapted) by means of some kind of feedback in order to deal with changing operating conditions. Second, coherence cannot be guaranteed between the model used in the design phase in the initial state and the model used at the later stages in the implementation. Third, due to slow disturbances, accurate target optimization must be done to guarantee that the output controlled by ACDSNN is feasible and as close as possible to the desired set-points to keep the WWTP running successfully. Note that, although neural networks are commonly used in process control, in this case, most of the parameters in A(t) are influenced by the process conditions such as the inflow Q, the reactor volume V, the wastage flow Qw . Hence, the control problem is non-deterministic: adaptive or robust control technology is needed in order to handle it. In order to estimate the ACDSNN, the error for the DO value at time t is defined in formula (4). The main aim of the ACDSNN is to minimize the error E(t) in order to obtain the required DO concentration. For the proposed ACDSNN, the adjusting phase consists of parameter adjusting and structure adjusting–these are important to improve the capabilities of the controller. 5. Experimental studies To demonstrate the effectiveness of the proposed ACDSNN, the controller developed in this work is implemented in three cases. First, sudden step load increase and load reductions without disturbances are considered for this case. The constant DO concentration is required for the WWTP. The inflow rate Q and the wastage flow Qw is given in Fig. 5. In the Figures, the wastewater treatment plant works at a high rate from time 8:00 to 16:30, and works at a low rate at other times. Second, sudden step load increases and load reduction without disturbances are treated in the same way as the first case. DO concentration is given by the requirement. Third, sudden step load increases and load reduction with disturbances are
Inflow Outflow
30
4
3.5
3
2.5
2
25 20 15 10 5
0
5
10 Time(h)
15
20 0 0
5
Fig. 5. Inflow and outflow wastewater rate.
15
20
Fig. 7. Hidden units of the neural network in the control process.
2.5 Fuzzy controller Fixed NN controller ACDSNN
2
1.5
10
Time(h)
0
5
10
15
20
Time(h) Fig. 6. Controller results.
65
Neural Network Output(air flow 10 2 m3/h)
Dissloved oxygen concentration(mg/L)
3817
35
4.5
Hidden Unit Number
Inflow and outflow rate of wastewater (105 m3/h)
H.-G. Han, J.-F. Qiao / Applied Soft Computing 11 (2011) 3812–3820
60
55
50
45
also considered. The DO requirement is the same as the second case. In this paper, the initial neural network structure is 2-3-1, the other initial parameters of the dynamic neural network are chosen at random. The initial value of x(t) = [150 200 1.5]T . The parameters in formula (2) are chosen as ˆ = 2, YSH = 0.7, C = 2, kd = 0.06, ˆ = 2, YSH = 0.6, C = 2, f = 0.66, fx = 1.41, ko = 2, ks = 79 for low rate and kd = 0.05, ks = 80, fx = 1.55, f = 0.71, ko = 2 for high rate, respectively. The training samples were obtained from a wastewater treatment plant in Beijing. The sampling time is one minute for the proposed control action. The results are compared with the classical fuzzy control strategy [13] and the fixed structure neural network control [17] strategy. The initial structure of the fixed neural network is 2-25-1, and the fuzzy algorithm is based on a 7 × 7 rules base. Simulated results demonstrate the effectiveness and the superiority of the proposed ACDSNN. 5.1. Constant DO concentration required of a sudden step load increase and load reduction without disturbances The inflow rate and outflow rates are shown in Fig. 5. The characteristics of the activated sludge wastewater treatment process change as the load increases or decreases. The DO requirement is 2 mg/L in this case (DO concentration of the wastewater treatment always contains about from 1.6 to 2.4 mg/L [26]). The results of the ACDSNN are shown in Figs. 6–8. Fig. 6 shows the results of the three controllers. Fig. 7 shows the hidden units of the dynamic neural network in the control process. The neural
0
5
10
15
20
Time(h) Fig. 8. Neural network output (air inflow rate).
network output (air inflow) is given in Fig. 8—this is an indicator of the energy cost in the treatment process. It can be seen from Figs. 6 and 7 that the ACDSNN performs better due to its adaptive nature, especially when the character of the system is changed by a sudden step load increase or load reduction. A number of averaged values were chosen in order to measure the performance of the controller over 20 independent runs: the rise time, the overshoot, the mean air inflow rate, and the control error. The detailed results are compared in Table 3. As can be seen from the results, the proposed ACDSNN is more accurate than fuzzy and fixed structure neural network controllers. The results prove that this proposed ACDSNN obtains good performance for the DO concentration. It should be noticed that ACDSNN is independent of the initial structure of the neural network and is not affected by sudden changes in the character of the wastewater system. The cost of the system is also lower. 5.2. Inconstant DO concentration required of a sudden step load increase and load reduction without disturbances The inflow rate and the outflow rate are suddenly changed in example A. The DO concentration required is 2 mg/L from 0:00 to 10:00, 2.4 mg/L from 10:00 to 15:00, and 1.8 mg/L from 15:00 to
3818
H.-G. Han, J.-F. Qiao / Applied Soft Computing 11 (2011) 3812–3820
Table 3 A comparison of the performance of different controllers (using 20 independent runs) (first example). Controllers
Rise time (h)
Overshoot (mg/L)
Mean air inflow rate (103 m3 /h)
Fixed fuzzy controller [13] Fixed NN Controller [17] ACDSNN
0.47 0.56 1.01
0.49 (24.5%) 0.13 (6.5%) 0.10 (5%)
92.64 75.42 53.21
Error (mg/L) Max.
Mean
0.49 0.21 0.10
0.122 0.061 0.011
Table 4 A comparison of the performance of different controllers (using 30 independent runs) (second example). Rise time (h)
Dissloved oxygen concentration(mg/L)
Fixed fuzzy controller [13] Fixed NN Controller [17] ACDSNN
0.47 0.56 1.01
0.49 (24.5%) 0.26 (13%) 0.10 (5%)
3
Fuzzy controller Fixed NN controller ACDSNN
2.8 2.6 2.4 2.2 2 1.8 1.6
0
5
10
15
20
Time(h)
Max.
Mean
0.49 0.26 0.10
0.143 0.072 0.013
100 90 80 70 60 50
0
5
10 Time(h)
15
20
Fig. 11. Neural network output (air inflow rate).
Fig. 9. Controller results.
air inflow is smooth and the energy cost of the system lower. The same averaged values as in example A were chosen as measures of the performance. The detailed results compare with other different algorithms are shown in Table 4. Based on the results, ACDSNN obtains a good performance for the control of DO concentration when the wastewater treatment system has different DO requirements. It should be noted that this ACDSNN used in this case is robust to the changing characteristics of the system and different DO concentrations.
30 25
Hidden Unit Number
Error (mg/L)
105.14 87.33 60.15
40
1.4
20 15 10
5.3. Inconstant DO concentration required of a sudden step load increase and load reduction with disturbances
5 0
Mean air inflow rate (103 m3 /h)
Overshoot (mg/L)
Neural Network Output(air flow 10 2 m 3/h)
Controllers
0
5
10
15
20
Time(h) Fig. 10. Hidden units of the neural network in the control process.
24:00. The results of the ACDSNN are shown in Figs. 9–11. Fig. 9 shows the control results of the three algorithms. Fig. 10 shows the hidden units of the dynamic neural network in the control process. The neural network output (air inflow) is given in Fig. 11. Figs. 9 and 10 show that the ACDSNN can improve the control performance in this case because of its adaptive nature. The overshoot and error of the ACDSNN is much smaller than fuzzy and fixed neural network controllers particularly when the DO requirement changes during the control process. As shown in Fig. 11, the
The efficiency of a WWTP has to be satisfactory under all environmental conditions; thus, ideally, a series of rain events, varying in intensity and duration, need to be considered in the dynamic influent data to extend the evaluation of the WWTP performance to also include the effects of rainfall as an influent disturbance. In this case, the influent disturbances are given in Fig. 12. The inflow rate and the outflow rate are suddenly changed as in example A. The DO concentration is required as in example B. The results of the ACDSNN are shown in Figs. 13–15. The control results of the three algorithms are given in Fig. 13. Fig. 14 shows the hidden units of the dynamic neural network in the control process. The air inflow is given in Fig. 15. The air inflow rate is also smooth in this example. Figs. 13 and 14 show that ACDSNN can control the DO concentration by successfully using an adaptive strategy. The same averaged values as in example A were chosen as measures of the performance. Table 5 shows the results in
H.-G. Han, J.-F. Qiao / Applied Soft Computing 11 (2011) 3812–3820
3819
Table 5 A comparison of the performance of different controllers (using 20 independent runs) (third example). Rise time (h)
Overshoot (mg/L)
Mean air inflow rate (103 m3 /h)
Max.
Mean
Fixed fuzzy controller [13] Fixed NN Controller [17] ACDSNN
0.49
1.50 (75%)
134.35
1.50
0.177
0.57 1.01
0.32 (16%) 0.12 (6%)
101.68 63.42
1.21 0.23
0.105 0.017
Disturbance (10 5 m 3/h)
0.5
0.4
0.3
0.2
0.1
0
0
5
10
15
20
Neural Network Output(air flow 10 2 m 3/h)
Controllers
140 120 100 80 60 40 20
0
5
Time(h)
Dissloved oxygen concentration(mg/L)
10
15
20
Time(h)
Fig. 12. The input disturbances.
Fig. 15. Neural network output (air inflow rate).
3.5 Fuzzy controller Fixed NN controller
3
ACDSNN
2.5
detail. The results show that the proposed ACDSNN is more accurate than fuzzy and fixed structure neural network controllers in this case. The results prove that ACDSNN obtains a good performance for the DO concentration. The ACDSNN used in this case is robust to the dynamic characters of the system and the influent disturbances.
2
6. Discussion and conclusion 1.5 1 0.5
0
5
10
15
20
Time(h) Fig. 13. Controller results.
40 35
Hidden Unit Number
Error (mg/L)
30 25 20 15 10 5 0
0
5
10
15
20
Time(h) Fig. 14. Hidden units of the neural network in the control process.
Three critical issues in the WWTP are its dynamic characteristic, different DO concentration requirements and influent disturbances. By using an adaptive controller based on dynamic neural network architecture, ACDSNN offers an efficient solution to the DO control problem when dealing with the wastewater treatment system. Specifically, its online architecture learning capability enables the process to adapt when the operating character of the WWTP changes. Another benefit of using the proposed dynamic neural network is that it is possible to save energy costs. Experiments on the simulation indicate that appropriate inflow air can greatly be obtained to reduce the energy cost of the WWTP running. The results demonstrate that this newly developed controller is successful and can be easily used in control applications. In addition, the ACDSNN can produce superior performance, in terms of overshoot, mean air inflow rate, and control error. A comparison with fuzzy and fixed neural network approaches can be summarized as follows. The results of these studies show the ACDSNN is able to control DO concentration. The comparisons show that the ACDSNN can improve the control performance due to its adaptive strategy, particularly when the required DO concentration is changed in the control. The adaptive strategy is better suited to cope with different conditions that may arise at different stages of the WWTPs. This feature is very useful if users have little experience of neural network design. The results of the experiments not only show how the dynamic structure neural networks solves the problems of DO concentration
3820
H.-G. Han, J.-F. Qiao / Applied Soft Computing 11 (2011) 3812–3820
control in the WWTP, but also introduce a general methodology for creating and exploiting neural networks. Although the above findings and conclusions are limited to the DO concentration problem, similar results can be obtained in other applications areas. It is believed that the presented behavior of dynamic structure neural networks will facilitate the work of other researchers, deciding to use the neural networks as a tool of controlling and modeling in the complex systems. Acknowledgements The authors would like to thank Prof. Ralph for reading the manuscript and providing valuable comments. The authors also would like to thank the anonymous reviewers for their valuable comments and suggestions, which helped improve this paper greatly. This work was supported by the National 863 Scheme Foundation of China under Grant 2009AA04Z155 and 2007AA04Z160, National Science Foundation of China under Grants 61034008 and 60873043, Ph.D. Program Foundation from Ministry of Chinese Education under Grant 200800050004, Beijing Municipal Natural Science Foundation under Grant 4092010, Funding Project for Academic Human Resources Development under Grant PHR (IHLB) 201006103. References [1] M.D. Gracia, P. Grau, E. Huete, J. Gomez, J.L. Garcıaheras, E. Ayesa, New generic mathematical model for WWTP sludge digesters operating under aerobic and anaerobic conditions: Model building and experimental verification, Water Research 43 (2009) 1–17. [2] Z. Li, M. Ierapetritou, Process scheduling under uncertainty: review and challenges, Computers and Chemical Engineering 32 (2008) 715–727. [3] B. Chachuat, N. Roche, M.A. Latifi, Optimal aeration control of industrial alternating activated sludge pants, Biochemical Engineering Journal 23 (2005) 277–289. [4] B. Holenda, E. Domokos, A. Redey, J. Fazakas, Aeration optimization of a wastewater treatment plant using genetic algorithm, Optimal Control Applications and Methods 28 (2007) 191–208. [5] M.R. Schnobrich, B.P. Chaplin, M.J. Semmens, P.J. Novak, Stimulating hydrogenotrophic denitrification in simulated groundwater containing high dissolved oxygen and nitrate concentrations, Water Research 41 (2007) 1869–1876. [6] J.H. Cho, S.W. Sung, I.B. Lee, Cascade control strategy for external carbon dosage in predenitrifying process, Water Science and Technology 45 (2002) 53–60. [7] B. Carlsson, A. Rehnstrom, Control of an activated sludge process with nitrogen removal—a benchmark study, Water Science and Technology 45 (2002) 135–142. [8] P.M. Marusak, Advantages of an easy to design fuzzy predictive algorithm in control systems of nonlinear chemical reactors, Applied Soft Computing 9 (2009) 1111–1125.
[9] A. Kruszewski, R. Wang, T.M. Guerra, Nonquadratic stabilization conditions for a class of uncertain nonlinear discrete time TS fuzzy models: a new approach, IEEE Transaction on Automatic Control 53 (2008) 606–611. [10] A. Bagheri, T. Karimi, N. Amanifard, Tracking performance control of a cable communicated underwater vehicle using adaptive neural network controllers, Applied Soft Computing 10 (2010) 908–918. [11] U. Simsir, S. Ertugrul, Prediction of manually controlled vessels’ position and course navigating in narrow waterways using Artificial Neural Networks, Applied Soft Computing 9 (2009) 1217–1224. [12] J. Ferrer, M.A. Rodrigo, A. Seco, J.M. Penyaroja, Energy saving in the aeration process by fuzzy logic control, Water Science and Technology 38 (1998) 209–217. [13] A. Traore, S. Grieu, S. Puig, L. Corominas, F. Thiery, M. Polit, J. Colprim, Fuzzy control of dissolved oxygen in a sequencing batch reactor pilot plant, Chemical Engineering Journal 111 (2005) 13–19. [14] E. Murnleitner, T.M. Becker, A. Delgado, State detection and control of overloads in the anaerobic wastewater treatment using fuzzy logic, Water Research 36 (2002) 201–211. [15] W.C. Chen, N.B. Chang, J.C. Chen, Rough set-based hybrid fuzzy-neural controller design for industrial wastewater treatment, Water Research 37 (2003) 95–107. [16] M.J. Syu, B.C. Chen, Back-propagation neural network adaptive control of a continuous wastewater treatment process, Industrial Engineering Chemistry Research 37 (1998) 3625–3630. [17] H. Lee, K.M. Lee, C.H. Park, Y.H. Park, Application of remote monitoring and automatic control system using neural network for small wastewater treatment plants in Korea, Water Science and Technology 51 (2005) 249–257. [18] M.Z. Huang, J.Q. Wan, Y.W. Ma, Y. Wang, W.J. Li, X.F. Sun, Control rules of aeration in a submerged biofilm wastewater treatment process using fuzzy neural networks, Expert Systems with Applications 36 (2009) 10428–10437. [19] P. Holubar, L. Zani, M. Hager, W. Froschl, Z. Radak, R. Braun, Advanced controlling of anaerobic digestion by means of hierarchical neural networks, Water Research 36 (2002) 2582–2588. [20] B.C. Cho, S.L. Liaw, C.N. Chang, R.F. Yu, S.J. Yang, B.R. Chiou, Development of a real-time control strategy with artificial neural network for automatic control of a continuous-flow sequencing batch reactor, Water Science and Technology 44 (2001) 95–104. [21] M.M. Islam, M.A. Sattar, M.F. Amin, X. Yao, K. Murase, A new adaptive merging and growing algorithm for designing artificial neural networks, IEEE Transaction on Systems, Man Cybernetics-Part B: Cybernetics 39 (2009) 705–722. [22] U. Yüzgec¸, Y. Becerikli, M. Türker, Dynamic neural-network-based modelpredictive control of an industrial baker’s yeast drying process, IEEE Transaction on Neural Networks 19 (2008) 1231–1242. [23] J.M. Lian, Y.G. Lee, S.H. Zak, Variable neural direct adaptive robust control of uncertain systems, IEEE Transaction on Automatic Control 53 (2008) 2658–2664. [24] G.M. Zeng, X.S. Qin, L. He, G.H. Huang, H.L. Liu, Y.P. Lin, A neural network predictive control system for paper mill wastewater treatment, Engineering Applications of Artificial Intelligence 16 (2003) 121–129. [25] Z.H. Man, H.R. Wu, S. Liu, A new adaptive back-propagation algorithm based on Lyapunov stability theory for neural networks, IEEE Transaction on Neural Networks 17 (2006) 1580–1592. [26] R. Piotrowski, M.A. Brdys, K. Konarczak, K. Duzinkiewicz, W. Chotkowski, Hierarchical dissolved oxygen control for activated sludge processes, Control Engineering Practice 16 (2008) 114–131. [27] W. Gujer, M. Henze, T. Mino, M.V. Loosdrecht, Activated sludge model No. 3, Water Science & Technology 39 (1999) 183–193.