Hierarchical Dissolved Oxygen Control For Activated Sludge Processes
Hierarchical Dissolved Oxygen Control For Activated Sludge Processes
Abstract
A hierarchical controller for tracking the dissolved oxygen (DO) reference trajectory in activated sludge processes is proposed and
investigated. The removal of nitrogen and phosphorous from wastewater is considered. Typically, an aeration system itself is a
complicated hybrid nonlinear dynamical system with faster dynamics compared to the internal dynamics of the DO in a biological
reactor. It is a common approach to neglect these dynamics and also important operational limitations of this system, such as the limits
on the allowed frequency of switching of the blowers and on their capacity. The paper proposes a two-level controller to track the DO
reference trajectory. The upper level control unit generates trajectories of the desired airflows to be delivered to aerobic zones of the
biological reactor. A nonlinear model predictive control algorithm is applied to design this controller. The lower-level controller forces
the aeration system to follow these set-point trajectories. The predictive control is also applied to design the lower-level controller based
on piecewise linearised hybrid dynamics of the aeration system. The overall hierarchical controller is validated by simulation based on
real data records.
r 2007 Elsevier Ltd. All rights reserved.
Keywords: Hierarchical control; Predictive control; Optimising control; Hybrid systems; Wastewater systems
0967-0661/$ - see front matter r 2007 Elsevier Ltd. All rights reserved.
doi:10.1016/j.conengprac.2007.04.005
ARTICLE IN PRESS
R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131 115
synthesised. The DO control design was considered in e.g., linear input–output models locally approximating the
Brdys and Konarczak (2001), Brdys and Diaz-Maiquez nonlinear DO dynamics was proposed by Brdys and
(2002), Chotkowski, Brdys, and Konarczak (2005), Haars- Diaz-Maiquez (2002) and its improved computational
ma and Keesman (1995), Holmberg, Olsson, and Anderson efficiency while maintaining the nonlinear control perfor-
(1989), Lindberg and Carlsson (1996a), Olsson and Newell mance was demonstrated. An output from all these
(1999) and Yoo, Lee, and Lee (2002). Under a high controllers is a desired airflow trajectory to be provided
variability of influent flow and of the concentration of by the aeration system, the controller actuator. This is
pollutant, the plant operating point can vary considerably. shown for the aeration system at Kartuzy Wastewater
Since the DO dynamics is highly nonlinear, a fixed Treatment Plant (WWTP), Northern Poland, with four
parameter linear controller is not able to maintain a aerobic biological reactor zones, illustrated in Fig. 1.
satisfactory tracking performance under the full range of The aeration system shown in Fig. 1 is typical for
operating conditions and requires on line parameter tuning WWTP with a continuous flow throughout the plant as
(Yoo, Lee & Lee, 2002). A nonlinear, direct adaptive model opposed to the sequential batch reactor (SBR) WWTP and
reference controller was proposed by Chotkowski et al. alternating activated sludge processes (Fikar, Chachuat, &
(2005). However, there exist constraints on the magnitude Latifi, 2005). The control design methodology proposed in
and rate of change of the airflow delivered by the aeration the paper applies to the continuous flow WWTP but is not
system that can be properly handled only by a MPC directly applicable to the other two WWTP.
algorithm. The MPC based on a linearised model of the In this figure, Sref
o;j and So, j, j 2 1; 4 denote the prescribed
DO dynamics was first considered by Haarsma and and actual DO concentrations in the aerobic reactor zones,
Keesman (1995) for the removal of nitrogen. The MPC respectively, and Qair, j are the airflows into these zones that
approach based on state space linear models identified in control the DO concentrations.
advance and fed by disturbances with modelled dynamics Typically, an aeration system itself is a complicated
was investigated by Sanches and Katebi (2003) for the hybrid nonlinear dynamical system with faster dynamics
removal of nitrogen. The linear controller was favourably compared to the internal dynamics of the DO at a
compared against a fixed parameter PI controller. The biological reactor. A common approach, including the
nonlinear predictive control was proposed by Brdys and work described above, is to neglect these dynamics and also
Konarczak (2001) for the removal of nitrogen and the important operational limitations of this system
phosphorus and further developed in Chotkowski et al. imposed by the blower station. Once a blower has been
(2005). A superior performance of the nonlinear predictive switched off, it cannot be switched back on immediately,
controller over the linear one was demonstrated. but only after some time period. If the time period is long
A nonlinear fuzzy Takagi–Sugeno MPC based on multiple compared to the rate of change of the airflow, then this
Δ Δ
needs to be taken into account by a controller scheduling where the optimised DO trajectories Sref o are generated for
the operation of the blowers. Otherwise, the desired airflow all the aerobic reactor zones. The objectives of the
demand may not be met as the needed blower is disabled controller are to force the DO concentrations So in the
and cannot be activated when needed. zones to follow the prescribed references and at the same
The energy cost due to blowing the air is taken into time to minimise the associated electrical energy cost due to
account at the MCS. However, due to the MCS time scale, blowing the air that is distributed into the zones through-
only an average cost can be minimised when determining out the aeration system pipes, throttling valves and
the optimised Sref
o;j trajectories by this control layer (Brdys, diffusers. The control handles are located at the aeration
Grochowski, Gminski, Konarczak & Drewa, 2007). An system and they are: blower structure on/off, blower speeds
exact evaluation of this cost is possible only at the FCS that and the angular positions of the throttling valves. These
directly considers the aeration system. The existing handles uniquely determine the trajectories of the airflows
aeration system controllers are PLC-programmed PI Qair, j into the reactor zones (see Fig. 1). Hence, regarding
algorithms that do not aim at all at combining the tracking the process variables, the resulting So mainly depends on
functions with refining the cost optimisation. The paper the Qair, the external inflow Qin into the reactor and its
further develops the results presented in Brdys, Chotkows- pollutant concentrations (disturbances). There are several
ki, Duzinkiewicz, Konarczak, and Piotrowski (2002), external factors indirectly influencing the So. For example,
Chotkowski et al. (2005); Piotrowski, Duzinkiewicz, and the wastewater temperature directly affects the So satura-
Brdys (2004) and Piotrowski and Brdys (2005) and it is tion limit S ref
o , hence it indirectly affects So. The airflows
organised as follows: The structure of a hierarchical two- Qair, j can therefore be taken as the manipulated variables
level controller for optimised DO concentration tracking is that couple the aeration system to the biological reactor.
presented in Section 2. Section 3 presents a synthesis of the A multilevel decomposition of the control problem can
upper level controller (ULC). The aeration system model- now be applied (Brdys & Tatjewski, 2005) to structure the
ling is described in Section 4. A hybrid model predictive controller into a two-level hierarchy (see Fig. 2). The ULC
controller at the lower control level is derived in Section 5. uses the manipulated variables Qair as its control outputs
Application of the overall controller to Kartuzy WWTP is forcing So to follow Sref o . The LLC acts as an actuating
described in Section 6 and the simulation results based on system and takes the ULC outputs that are the reference
real data records are presented. Section 7 concludes the trajectories Qref
air of the airflows to be provided. The LLC
paper. uses the aeration system control handles in order to
produce the airflow trajectories Qair that follow the
trajectories Qrefair prescribed by the ULC and to minimise
2. Controller structure
the electrical energy cost due to blowing the air. The blower
switching constraints are catered for by the LLC. The
The optimised DO concentration tracking controller is
magnitude and rate limits on Qair are naturally obeyed by
illustrated in Fig. 2. It operates within a multilayer
the LLC and they are also taken into account at the upper
hierarchical control structure (Brdys et al., 2007) at the
control level so that feasible trajectories of manipulated
FCS. This control system is directly coupled to the MCS
variables can be prescribed by ULC to be delivered by
the LLC.
Let us notice that the LLC operates on the fast time scale
while the ULC operated on the slow one. The decomposi-
tion of the plant dynamics into two time scales described
above does not achieve the exact separation of the two time
scales, in contrast to the presented in Kumar and Daoutidis
(2002). However, the overall plant dynamics considered in
Kumar and Daoutidis (2002) are continuously differenti-
able. Hence, a standard singular perturbation method can
be applied. Due to the on/off blower control variables, the
aeration system dynamics is hybrid. To the best of the
authors’ knowledge, a method for an exact time scale
separation in hybrid systems is not available.
techniques, remains fairly constant while the parameters At the time instants kuTu, the NMPC at the upper
and Monod constant K0 need to be periodically identified control level solves its optimisation task by minimising the
by using one of the model calibration techniques. performance function (4) with respect to the aeration flows
As R^ r; j ðtÞ changes slowly, this value is taken as the subject to the constraints (6) and (7). The DO concentra-
_
estimate Rr; j ðku þ 1jku þ 1Þ of Rr, j(ku+1) and then also as tions So, j(ku+i|ku), i ¼ 1 : H up at the aerobic zones pre-
_ dicted over H up are calculated by using the discretised
the prediction Rr; j ðjku þ 1Þ of Rr, j(t) over the horizon
models (2). The respirations Rr, j(ku+i1) in these models
ku þ 1 : ku þ 1 þ H up in the model-based optimisation are replaced by their predictions Rr, j(ku+i1|ku) that are
problem to be solved by the NMPC at the instant calculated according to (3) based on the DO measurements
(ku+1)Tu (at the ku+1 control step). Let us introduce at the zones. The initial conditions So, j(ku|ku) are taken
the aeration zone index set Ja, where J a 91 : J. from the measurements. This results in the optimised
It should be pointed out that a standard approach to fQ^ air; j ðku jku Þ; . . . ; Q^ air; j ðku þ H up 1jku Þg, j 2 J a , DO tra-
handle the additive and unmeasurable disturbances in the jectories over the prediction horizon. Depending on the
linear MPC by introducing an integral action (Maciejowski, sampling interval and prediction horizon at the lower
2001) is not applicable here. This is because the disturbance control level, certain values of the optimised airflows will
is not additive and the dynamics of So are nonlinear. be taken as the references for the LLC. The above
The NMPC performance function for zone jAJa is procedure repeats at the time instant (ku+1)Tu based on
defined as the updated respiration prediction and the initial condition
taken from the DO measurements at (ku+1)Tu. The ULC
JU u
j ½Qair; j ðku jk u Þ; . . . ; Qair; j ðk u þ H p 1jk u Þ determines the control actions in a centralised manner.
u
Hp
X Its suboptimal decentralised version was presented by
¼ ðS o; j ðku þ ijku Þ S ref
o; j ðk u þ ijk u ÞÞ
2
Brdys et al. (2002).
i¼1
H up 1 4. Modelling the aeration system
X
þ gj ðQair; j ðku þ ijku Þ Qair; j ðku þ i 1jku ÞÞ2
i¼1 Aeration is an important and expensive activity. The
þ gj ðQair; j ðku 1jku 1Þ Qair; j ðku jku ÞÞ2 oxygen delivered into the aerobic zones by the aeration
Hp u system is a fundamental component of the biological
X
þ Wj ðQair; j ðku þ i 1jku ÞÞ2 , ð4Þ processes. It is essential to maintain the DO in a biological
i¼1 reactor at the right level. At least 0.2 mg dm3 is required
for the nitrification processes to be carried out. An
where Qair; j ðtÞ9Qair; j ðku þ ijku Þ, t 2 ðku þ i 1ÞT u ; ðku þ excessive DO concentration does not accelerate the
iÞT u and So, j(ku+i|ku) is the model based prediction of nitrification but only increases the energy cost due to
So, j((ku+i)Tu) performed at the instant ku. airflow pumping. The blower station contains several
The first term in (4) represents the tracking error. The blowers that force air to the collector and then the airflow
second and third terms describe rates of changes of the is divided among diffusers of the aeration tanks (see
control input over H up while the fourth term represents the Fig. 1). This airflow must obey the minimum and
control cost. The weights gj.Wj, jAJa are tuning knobs used maximum pressure constraints.
to achieve a desired compromise between the tracking Two types of motors driving the blowers are used: fixed-
error, the intensity of switching the blowers and the cost of speed motors and variable-speed motors. Variable-speed
the energy used due to pumping the air. An overall NMPC blowers are powered through inverters. Both types of the
performance function reads: blowers have important operational limitations. A blower
J U ½Qair; 1 ðku jku Þ; . . . ; Qair; 1 ðku þ H up 1jku Þ; . . . , once switched off cannot be immediately switched back on,
but only after a certain time period. The required airflow of
Qair; J a ðku jku Þ; . . . ; Qair; J a ðku þ H up 1jku Þ each diffuser is maintained through positioning of a
X h i throttling valve. Generally, the relationship between air-
¼ JU j Q air; j ðk u jk u Þ; . . . ; Q air; j ðk u þ H u
p 1jk u Þ . ð5Þ
flow through the diffuser and the pressure drop across the
j2J a
diffuser is nonlinear. The diffusers are located inside the
The instantaneous control magnitude and rate con- aerobic tank at a level of 4–5 m. The level implies a
straints are as follows: hydrostatic pressure in the tank. The generic diffusers are:
X disc diffuser, pipe diffuser and membrane diffuser and they
air p
Qmin Qair; j ðku þ i 1jku ÞpQmax
ir ; i ¼ 1 : H up (6) offer different operational efficiency. Once the blower
j2J a control actions have been applied, the controllers (typically
proportional marked R in Fig. 1) are used to provide the
Q þ i 1jku Þ Qair; j ðku þ i 2jku ÞpDQmax required airflows. Due to the throttle valve features (dead
air; j ðk u air; j ;
zone, saturation), it is in fact a nonlinear system. The
j 2 J a ; i ¼ 1 : H up . ð7Þ airflows should not be throttled too much. This means that
ARTICLE IN PRESS
R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131 119
a pressure at the collector node pc, should have a suitable The blower station model is obtained in a straightfor-
value to allow the throttling valves to work at as open a ward manner by utilising the blower models (8) and the
position as possible. parallel station structure:
An aeration system itself is a complicated nonlinear X
Qb ¼ f b ðxb ; Dpb ; nb Þ9 f b; i ðxb; i ; Dpb; i ; nb; i Þ, (9)
dynamical system with fast dynamics. The blower switch-
i2I b
ing constraints introduce additional (hidden) discrete time
and with discrete valued variable type of dynamics. The where Qb, pb, pa are the airflow into the blower node,
control inputs at the blower station are integer valued in pressure at the blower station node and atmospheric
order to define which blowers are to be on/off and pressure, respectively;
continuously valued in order to define the motor speeds. Dpb 9pb pa ¼ Dpb; i ; i 2 Iv [ If , (10)
Hence, the aeration system as a whole is described by a
nonlinear hybrid dynamics and the design of the LLC is h i
xb ¼ xb; 1 ; ...; xb; i ; ...; xb; I v þI f ;
not a trivial task. The control systems currently used in the
wastewater industry are far from satisfactory. The cost of xb; i 2 f0; 1g; i 2 Iv [ If
energy used is high and the control performance low.
Again, the MPC technology will be applied to design the nb ¼ ½nb; 1 ; . . . ; nb; i ; . . . ; nb; I v þI f . (11)
LLC. In this section, the model of the aeration system will
The binary vector xb defines which of the blowers are on
be developed.
and off. Thus, xb defines the blower station operating
structure, hence its state.
4.1. Physical modelling
4.1.2. Collector pipe
The physical model of the aeration system consists of the The collector pipe is treated as the fluid flow capacitance
following main element models: blower station, collector with negligible fluid-flow resistance (Woods & Lawrence,
pipe and aeration segment unit. First the element models 1997) and its electrical analogy is illustrated in Fig. 4.
are presented following Piotrowski and Brdys (2005). Next Applying the standard mass balance principle at the
an overall model is obtained by integrating the element collector node yields:
models according to the aeration system structure as in
dpc 1 Vc
Piotrowski and Brdys (2005). ¼ ðQ Qc Þ and C c ¼ , (12)
dt Cc b pc
4.1.1. Blower station where Cc, Qc, Vc and pc are the collector fluid-flow
The blower station compresses air assuring appropriate capacitance, collector flow, collector volume and pressure
pressure pc at the collector node. The station consists at the collector node, respectively.
of blowers with fixed-speed and variable-speed motors. The above differential equation is nonlinear. As the fluid
The fixed-speed blower can run with one speed or several flow resistance of the collector is negligible, pc ¼ pb.
constant speeds e.g., 1500 and 2900 r.p.m. for the two
speeds. In contrast to the fixed-speed blowers, the 4.1.3. Aeration segment unit
variable-speed blower can run with speed varying con- The aeration segment unit system is composed of the
tinuously over a certain range. The blowers are in throttling valve, diffuser and collector–diffuser pipe. As the
parallel. Let us denote by Iv and If the index sets for the fluid-flow resistance of the collector–diffuser pipe is
variable-speed and multiple fixed-speed blowers, respec- negligible, the unit system is modelled as a fluid-flow
tively, and I b 9I f [ I v . Each fixed-speed and variable-
speed blower is described by Qb, i ¼ fb, i(xb, i, Dpb, i, nb, i), pb Qb pc Qc
iAIb, where Qb, i, Dpb, i, nb, i are the blower output air-
flow, pressure drop across the blower and motor rotational
pb pc
speed, respectively, and xb, i defines whether the ith
Qb Qc
blower is on or off. The speed variables nb, i are discrete
valued for iAIf and continuously valued for iAIv and
Qb - Qc
their ranges are N if and N iv , respectively. The functions
Cc
fb, i( ) are barely nonlinear in reality and they are
approximated as linear for control design. The blower is
assumed to be a flow source and the following linear
approximated model is proposed for ith variable-speed
or fixed-speed blower:
Qb; i ¼ f b; i ðxb; i ; Dpb; i ; nb; i Þ9xb; i ðai Dpb; i þ bi nb; i þ ci Þ; pa
i 2 I b; xb; i 2 f0; 1g. ð8Þ Fig. 4. Collector pipe and its electrical analogy.
ARTICLE IN PRESS
120 R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131
capacitance Cd, j catering for the collector–diffuser pipe with where Rv, j, jj are the throttling valve resistance and
two resistances Rv, j, Rd, j regarding the throttling valve and angular valve position, respectively; k ¼ 9, a4 ¼ 120000,
diffuser, respectively. This is followed by a hydrostatic b4 ¼ 3, c4 ¼ 1.
pressure source (hydrostatic pressure of sewer) in cascade. The flow against pressure drop relationship for the valve
The system and its electrical analogy are illustrated in Fig. 5. reads:
The throttling valve resistance is a nonlinear function of
Dpv; j ¼ Rv; j ðjj ÞQcj 4 ; j 2 J a, (14)
the angular position of the valve. There are limits on the
valve opening angle and on the pressure of airflow entering where Qj is the airflow through the valve.
the main pipe. The limits are modelled by using the initial In a compact form:
opening angle, dead zone and saturation. The manufac-
turer’s data have been used to determine an expression for Dpv; j ¼ f v; j ðQj ; jj Þ; j 2 J a. (15)
the valve resistance as: An example of comparison of the valve model with the
!c4 valve catalogue data is illustrated in Fig. 6, showing a
a4
Rv; j ¼ k b4 ; j 2 J a, (13) reasonable modelling accuracy.
jj In Fig. 5, the Rd, jCd, j circuit together with the voltage
source Dph, j constitutes an electrical representation of the
diffuser and collector–diffuser pipe system. The resistance
Rd, j represents the diffuser. It is assumed that pipe diameter
is constant along the pipe and also, that it is large enough
so that the pipe resistance can be neglected. Hence, the pipe
is represented only by the fluid flow capacitance Cd, j.
Let us now consider the diffuser resistance. For steady-
state conditions, the diffuser is described by a nonlinear
function Qair, j ¼ fd, j(Dpd, j) relating the airflow through the
diffuser and the pressure drop across the diffuser. The
manufacturer’s data have been used to determine a
piecewise approximation of this function as:
( Dp Dpopen
for Dpd; j XDpopen
d; j d; j
Rd; j d; j j 2 Ja
Qair; j ¼ , (16)
0 otherwise
where Qair, j, Rd, j, Dpd, j are the airflow into aeration zone j,
fluid-flow diffuser resistance and pressure drop across
diffuser, respectively.
An example of comparison of the function fd, j( ) and its
Fig. 5. The aeration segment unit and its electrical analogy. piecewise approximation is shown in Fig. 7. The dead zone
Δ Δ
Fig. 6. Example of the valve model and catalogue data and the approximate pressure loss-angular position relation for 1.0 [m3 s1] airflow through
the valve.
ARTICLE IN PRESS
R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131 121
7
6.5
6
5.5
5
Airflow [m3/h] 4.5
Diffuser opened
4
3.5
3
2.5
2
1.5
1
0.5
Diffuser closed
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.8 4 4.2
Pressure drop across [kPa]
Fig. 7. Example of the diffuser approximate airflow-pressure loss model and catalogue data.
Dpopen
d; j and the diffuser response when open can be clearly The total airflow delivered to the aeration segment unit is
seen and Dpopen
d; j ¼ 2.25 kPa.
X
The model completes with two parameters describing the Qc ¼ Qj . (19)
j2J a
diffuser dip depth and a number of diffusers in aeration
tank. Without loss on generality it is assumed that all the The pressure drop across the aeration segment unit
diffusers are described by the same functions. It will be with a diffuser that is open is described by the equation
further assumed that all diffusers are open and this is (see Fig. 5):
guaranteed by pc Xpminc . The above model was validated on
pc pa ¼ Dpv; j þ Dpd; j þ Dph; j ; j 2 J a. (20)
real data records.
Finally, the dynamics of the diffuser airflow can be
described as (see Fig. 5):
4.1.4. Overall physical model
dQair;j Modelling the aeration system elements has now been
Rd; j C d; j þ Qair;j ¼ Qj ; j 2 J a. (17) completed and a whole model of the interconnected system
dt
can now be derived. Similarly to interconnected networks,
In reality, the pipe diameter varies along the pipe. The not only the model structure will be required but also new
above model allows modelling of the varying diameter pipe physical relationships will emerge as the result of connect-
as well. The pipe is first decomposed into constant diameter ing the elements. Due to the modelling methodology
sub-pipes and the model is applied to each of the sub-pipes applied, the overall model enjoys the feature that it is easy
yielding the corresponding RdCd circuits (see Fig. 5). The to redesign the element models and change the parameters.
sub-models are then connected in cascade in order to The electrical circuit in Fig. 8 is used to summarise the
produce final model of the diffuser–collector pipe system. derived physical model of the aeration system.
The values of the electrical components in the final model In this model the control variables are binary variables
must be identified from real data measurement records by xb determining the blower on or off status, continuous
applying system identification methods. As the diffuser variables nb, i, iAIv determining speeds of the variable-speed
outflow pressure is nearly constant, the Cd, j can also be blowers, discrete variables nb, i, iAIf determining gears of
treated as having a constant value. the fixed-speed blowers and continuous variables Qj,jAJa
The hydrostatic pressure in the aeration tank is modelled determining angular positions of the throttling valves.
as: The output variables are pressure at the collector node pc
and the airflows Qair, j, jAJa.
Dph; j ¼ rghj ; j 2 J a, (18) The following assumptions are made: the blower station
can be represented by a current source and only the
where r, g, hj are the wastewater density at aeration tank, capacitances of the main collector pipe and aeration
acceleration due to gravity and the height of the diffuser in segment units are taken into account as the dominant
the wastewater at the aeration tank, respectively; since hj is ones. The circuit in Fig. 8 will now be used for calculating
typically constant, Dph, j is constant as well. the segment unit flows into the aeration tanks: Qair, j, jAJa.
ARTICLE IN PRESS
122 R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131
pc ¼ Dpopen
d;j þ Rd; j Qair;j þ f v; j ðQj ; jj Þ þ Dph; j þ pa ; j 2 J a ,
(23)
where nb, xb, jj, jAJa are control variables, pc, Qair, j, jAJa
are state variables being at the same time the output
0
variables.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
The blower states xb in this model are the input variables
Time [hour]
and their dynamics will be derived in the next section.
This model is described by set of nonlinear differential Fig. 9. Gear of blower 1.
and algebraic equations where the algebraic Eq. (23)
implicitly determine flows Qj, jAJa in terms of the states 2700
and control inputs.
2600
1800
4.2. Modelling the dynamics of the blower switching 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
constraints Time [hour]
The blower states can be changed immediately in a Fig. 10. Speed of blower 2.
controlled manner every klTl time units, where kl is an
integer variable representing discrete time at the Every blower can be switched on or off implying changes
lower control level while Tl is the sampling interval. of the blower state between 0 and 1. Let us define the
The switching time is assumed zero so that with switching control variables for the blower iAIb as the
off
xb ðkl Þ9xb ðkl T l Þ, xb(t) ¼ xb(kl+1)Tl ¼ xb(kl+1), tA(klTl, binary and discrete time variables uon on
b; i , ub; i . If ub; i ðk l Þ ¼ 1
(kl+1)Tl]. and xb, i(kl) ¼ 0, then the blower is switched on and
ARTICLE IN PRESS
R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131 123
50 uoff on
b; i ðk l Þ þ ub; i ðkl Þp1; i 2 I f [ I v. (24)
ϕ3
40 Moreover, in order to maintain the range {0, 1} for
the blower state trajectory xb, i(kl) in the equation describ-
30
ϕ4 ing its dynamics, the pairs fxb;i ðkl Þ; uon b;i ðk l Þg ¼ f0; 1g and
20 fxb;i ðkl Þ; uon ðk Þg ¼ f1; 1g are excluded by introducing the
b;i l
10 following constraints:
0 xb; i ðkl Þ uoff
b; i ðk l ÞX0,
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
xb; i ðkl Þ þ uon
b; i ðk l Þp1 i 2 I f [ I v . ð25Þ
Time [hour]
56 5. Lower-level controller
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time [hour]
As described earlier, the control problem at the lower
Fig. 13. Pressure at the collector node. level is to schedule the blowers and determine their speeds,
ARTICLE IN PRESS
124 R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131
determine the throttling valve openings so that the airflow pc ðkl þ 1Þ ¼ Dpopen
d; j þ Rd; j Qair; j ðk þ 1Þ
demand prescribed by the ULC is met with the lowest
þ f v; j ðQair; j ðkl þ 1Þ; jj ðkl ÞÞ
possible energy cost and the constraints are satisfied.
Hence, the control variables at the lower control level are: þ Dph; j þ pa ; j 2 J a x, ð30Þ
uoff on off on
b , ub , nb, j composed of ub; i , ub; i , nb,i, iAIf [Iv and jj, with the simple bound constraints on the variables:
jAJa, while Qair, j, jAJa are relevant for the ULC output
variables and pc is a relevant output for the LLC c ppc ðkl þ 1Þppc ; xb; i ðk l þ 1Þ 2 f0; 1g; i 2 I b ;
pmin max
performance. The switching control inputs are implemen-
j pjj ðk l Þpjj
Qair; j ðkl þ 1ÞX0; jmin max
; j 2 Ja;
ted in the system by simple PLCs. The speed control inputs
are forced in the system by inverters. The throttling valve nb; i ðkl Þ 2 N iv ; i 2 I v ; nb; i ðkl Þ 2 N if ; i 2 I f . ð31Þ
openings are forced by local PLC loops around the valves
(see Fig. 1) with the corresponding output airflows as the As the model is implicit the decision variables in the
set-points and the openings as the loop inputs. Due to the HNMPC using this model are: xb(kl+1), nb(kl), pc(kl+1),
nonlinearity of the input–output model and constraints Qair(kl+1), j(kl) The model Eqs. (29) and (30) and
and because the variables involved are mixed integers, a the inequalities (31) are the equality and inequality
hybrid nonlinear model predictive control (HNMPC) will constraints, respectively, in the HNMPC optimisation
be applied to derive the LLC algorithm. First, the problem.
constraints and performance function of the HNMPC will
be formulated. This will lead to a nonlinear mixed integer
5.1.2. Switching constraints
formulation of the HNMPC optimisation task. There is no
Eqs. (26) and (27) describing the blower switching
solver available at present that can solve such a problem in
dynamics constitute the equality constraints, while the
a robust manner, meeting the time constraints set by the
inequalities (24), (25), and (28) form the inequality
on-line implementation. Therefore, the optimisation pro-
constraints in the HNMPC optimisation problem. Notice
blem will be linearized by introducing additional contin-
that the optimisation problem is dynamical and this is
uous and discrete variables to obtain mixed integer linear
entirely due to the switching frequency limit. New decision
(MIL) formulation that can, for example, be effectively
variables introduced into the HNMPC by the constrained
approached by the CPLEX solver.
switching dynamics are: uoff, uon, Sb.
5.1. Constraints
5.2. Performance function
There are two types of constraints to be accounted for:
the constraints implied by the physical aeration system The electrical energy cost due to blowing the air is
model and the switching constraints. proportional to the collector pressure pc. Hence, the
performance function is formulated as:
H lp
"
5.1.1. Model-based constraints X
L
The speed and valve opening control variable trajectories J ¼ Zðkl þ i 1Þpc ðkl þ ijkl ÞT l
are piecewise constant and determined by sequences of the i¼1
#
vectors {n(kl), j(kl)}kl such that X ref
nb(t) ¼ nb(kl), tA(klTl,(kl+1)Tl] and j(t) ¼ j(kl), þ Qair; j ðkl þ ijkl Þ Qair; j ðkl þ ijkl Þ , ð32Þ
tA(klTl,(kl+1)Tl]. j2J a
The aeration system model response over tA(klTl,(kl+1)Tl] where H lp denotes the prediction horizon at the lower
is then determined by n(kl), j(kl), x(kl+1) to produce the level.
outputs pc(t), Qair(t), Qj(t). As it has been seen in The second term in (32) represents the airflow tracking
Section 4.1, the steady-state values of the outputs are very error. The absolute value was taken instead of a traditional
quickly achieved. Hence, pc(t) ¼ pc((kl+1)Tl), Qair(t) ¼ square in order to exactly linearise the tracking term. The
Qair((kl+1)Tl), Qj(t) ¼ Qj((kl+1)Tl) and can be assumed coefficient Z includes the time varying electricity tariff.
over tA(klTl,(kl+1)Tl]. Thus, (22) implies that Qj((kl+ The reference airflows Qrefair; j ðkl þ ijk l Þ are prescribed by
1)Tl) ¼ Qair((kl+1)Tl), jAJa. the ULC.
Denoting pc ðkl þ 1Þ9pc ððkl þ 1ÞT l Þ, Qair ðkl þ 1Þ9Qair
ððkl þ 1ÞT l Þ, Eqs. (21)–(23) yield the steady-state model of
the aeration system in the form: 5.3. Hybrid nonlinear model predictive controller
X (HNMPC)
f b; i ðxb; i ðkl þ 1Þ; pc ðkl þ 1Þ; nb; i ðkl ÞÞ
i2I v [I f
X At the time instants kuTl, the HNMPC at upper control
Qair; j ðkl þ 1Þ ¼ 0, ð29Þ level solves its optimisation task by minimising the
j2J a performance function (32) with respect to the following
ARTICLE IN PRESS
R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131 125
xb ðkl þ ijkl Þ; uoff ðkl þ i 1jkl Þ; uon ðkl þ i 1jkl Þ, zi; j pQref
air; j ðk l þ ijk l Þ Qair; j ðkl þ ijk l Þpzi; j ,
Sb ðkl þ ijkl Þ; nb ðkl þ i 1jkl Þ; pc ðkl þ ijkl Þ, zi; j X0; i ¼ 1 : H lp ; j 2 J a . ð34Þ
Qair ðkl þ ijkl Þ; jðkl þ i 1jkl Þ; i ¼ 1 : H lp ,
which include both the control and output variables over 5.4.2. Throttling valve model
the prediction horizon H lp . Given the control inputs at The functions fv,j( ) in (30) are nonlinear (see (14) and
kl over H lp , the outputs Qair(kl+i|kl), pc(kl+i|kl) and (15)). They will be piecewise plane approximated by linear
states xb(kl+i|kl), Sb(kl+i|kl) over H lp are predicted by relationships with mixed integer variables. Given j, let us
solving the mixed dynamic and implicit steady-state set up a grid fQm n
air; j ; jj g, where m ¼ 1 : N Q; j and n ¼
hybrid model Eqs. (26), (27) and (29), (30), respectively.
1 : N j; j over an operating range of the jth valve, where
The initial states xb(kl|kl), Sb(kl|kl) needed to perform the
fQair; j ; jj g 2 fQmin air; j pQair; j pQair; j ; jair; j pjair; j pjair; j g.
max min max
predictions are taken from the measurements. This is
an information feedback from the system that allows The pressure drops at the grid points are: Dpm; n
v; j ¼
m n
correcting of the model-based states when the switching f v; j ðQair; j ; jj Þ: The grid points partition the operating
hardware errors occur. These equations together with range into rectangular cells. Without loss of generality let
the inequalities (24), (25), (28) and (31) constitute the us consider the cell defined by the points with m ¼ 1,2 and
equality and inequality constraints of the HNMPC n ¼ 1,2. The points fQ1air; j ; j1j g; fQ2air; j ; j1j g and fQ1air; j ; j2j g
optimisation problem at kl. Solving this problem yields uniquely determine a plane that approximates fv, j( ) over
the optimised trajectories over H lp of the switching the left half of the triangular cell (see Fig. 14) and values of
variables fuoff ðkl þ i 1jkl Þ, uon ðkl þ i 1jkl Þg, the blower
_ _ the linear approximation f lin v; j ðÞ over this set can be
_
speeds fnb ðkl þ i 1jkl Þg and the throttling valve openings calculated as:
_
fjðkl þ i 1jkl Þg. 1;1 1;1 1;2 1;2 2;1 2;1
f lin
v; j ðQair; j ; jj Þ ¼ lj Dpv; j þ lj Dpv; j þ lj Dpv; j , (35)
Only the first control step values uoff ðkl jkl Þ, uon ðkl jkl Þ,
_ _
_ _
nb ðkl jkl Þ, jðkl jkl Þ are applied to the aeration system. At the Qair; j ¼ l1;1 1 1;2 1 2;1 2 1;1 1
j Qair; j þ lj Qair; j þ lj Qair; j and jj ¼ lj jj þ
time instant (kl+1)Tl., the above procedure repeats based
l1;2 2 2;1 1 1;1 2;1 1;2
j jj þ lj jj where lj , lj , lj are nonnegative real
on the updated airflow references Qref air; j ðk l þ 1 þ ijk l þ 1Þ 1;1 2;1 1;2
and the switching state initial conditions xb(kl+1|kl+1), numbers and lj þ lj þ lj ¼ 1:
Sb(kl+1|kl+1) taken from the measurement at (kl+1)Tl.
models are approximated with certain accuracy, the control After a blower motor has been shut down it cannot be
actions generated by the two controllers are close to each started again within 10 min. The four throttling valves are
other if this accuracy is high. Clearly, this needs to be strongly nonlinear.
traded against the increased dimension of the HLMPC as The operation of the control system was simulated over
already stated. Nevertheless, as there are no solvers 46 h under the influent scenarios shown in Figs. 16 and 17.
available that are capable of solving the HNMPC Large variations of the wastewater inflow to the plant and
optimisation tasks online, the HLMPC is a realistic its pollution can be observed. The biological processes were
alternative.
3600
6. Case study simulation results
3400
This section presents results of application of the derived
controller to the case study WWTP in Kartuzy, northern 3200
1.8
1.6
1.4
Respiration Rr,1 [mg / m3h]
1.2
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8
Time [day]
Fig. 18. Respiration in aeration tank 1. Fig. 21. DO concentration in aeration tank 2.
ARTICLE IN PRESS
R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131 129
Gear
0
50
49.5 1
49
48.5
Pressure pc [kPa]
48
Gear
47.5
47
46.5
46
45.5
0
45
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8
0.285 0.29 0.295 0.3 0.305 0.31
Time [day]
Time [day]
Fig. 23. Optimal pressure at the collector node.
Fig. 26. Expanded parts of the schedule.
3000 90
2800 80
2600 70
Opening degree ϕ1 [deg]
2400 60
Speed nvb [r.p.m.]
2200 50
2000 40
1800 30
1600 20
1400 10
1200 0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8
Time [day] Time [day]
Fig. 24. Speed of the variable-speed blower. Fig. 27. Opening angle of the valve 1.
ARTICLE IN PRESS
130 R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131
and much less variable collector pressure values were activated sludge processes. In Proceedings of the 15th IFAC world
achieved than ever seen at the plant so far. congress, Barcelona, 21–26 July 2002.
The variable-speed blower schedule is shown in Fig. 24 Brdys, M.A., & Diaz-Maiquez, J. (2002). Application of fuzzy model
predictive control to the dissolved oxygen concentration tracking in an
while Figs. 25 and 26 illustrate the fixed-speed blower activated sludge process. In Proceedings of the 15th IFAC world
control activity. The wide speed range 1200–2900 r.p.m. of congress, Barcelona, 21–26 July 2002.
the variable-speed blower helps to follow the airflow rate Brdys, M. A., Grochowski, M., Gminski, T., Konarczak, K., & Drewa,
trajectory determined by UCL with good accuracy. It can M. (2007). Hierarchical predictive control of integrated wastewater
be seen from Fig. 26 that the standstill period is indeed systems. Control Engineering Practice.
Brdys, M.A., & Konarczak, K. (2001). Dissolved oxygen control for
obeyed by the LLC. activated sludge processes. In Proceedings of the 9th IFAC/IFORS/
Finally, the opening of valve 1 is shown in Fig. 27. The IMACS/IFIP symposium on large scale systems: Theory and applica-
throttling valve opening allowed varies from 01 to 901. tions, Bucharest, 18–20 July 2001.
Valve 2 remains fully open all the time while valve 1 also Brdys, M.A., & Tatjewski, P. (2005). Iterative algorithms for multilayer
remains wide open. This confirms that the hierarchical optimizing control. London, Singapore: World Scientific Publishing
Co. Pte. Ltd.; New York, USA; Imperial College Press.
controller optimises the operating cost and does not Brdys, M.A., & Zhang, Y. (2001). Robust hierarchical optimised control
throttle the airflow provided by the blowers more than of municipal wastewater treatment plant. In Proceedings of the 9th
that is necessary. IFAC/IFORS/IMACS/IFIP symposium on large scale systems: Theory
and applications, Bucharest, 18–20 July 2001.
Chotkowski, W., Brdys, M. A., & Konarczak, K. (2005). Dissolved
7. Conclusions oxygen control for activated sludge processes. International Journal of
Systems Science, 36(12), 727–736.
The paper has considered a DO reference trajectory Fikar, M., Chachuat, B., & Latifi, M. A. (2005). Optimal operation of
tracking for activated sludge processes. Both nutrient and activated sludge processes. Control Engineering Practice, 13(7), 853–861.
Flouds, Ch. A. (1995). Nonlinear and mixed-integer optimization. Funda-
phosphorous removal from wastewater by biological
mentals and applications. Oxford University Press.
treatment using an activated sludge technology have been Gams (2005). User’s guide /www.gams.comS.
considered. A two-level model predictive controller has Haarsma, G. J., & Keesman, K. J. (1995). Robust model predictive
been proposed and investigated. In contrast to previous dissolved oxygen control. In 9th forum for applied biotechnology.
work, the control of the aeration system has also been MFLRBER, 60(4b), 2415–2426.
Henze, M., Gujer, W., Mino, T., Matsuo, T., Wentzel, M. C., Marais, G.
included in the overall controller design. This integrated
V. R., et al. (1999). Activated sludge model no. 2d. Water Science and
approach has allowed catering for the essential operational Technology, 39(1), 165–182.
constraints of the aeration system in a proactive manner. Holmberg, U., Olsson, G., & Anderson, B. (1989). Simultaneous DO
This, in turn, has led to the least energy cost and robust control and respiration estimation. Water Science and Technology, 21,
DO tracking. The properties and tracking performance of 1185–1195.
Keesman, K.J., Lukasse, J.S., & Van Straten, G., (1999). Modelling and
the controller have been investigated by a simulation based
control of an N-removing activated sludge processes. In Proceedings of
on the data records from Kartuzy WWTP and very the ECC’99, Karlsruhe, September 1999.
promising results have been obtained. The computing time Kim, H., McAvoy, T. J., Anderson, J. S., & Hao, O. J. (2000). Control of
needed by the controller to generate the control actions is an alternative aerobic–anoxic activated sludge system—Part 2:
small and its real-time implementation is very feasible. Optimization using a linearized model. Control Engineering Practice,
8, 271–278.
Kumar, A., & Daoutidis, P. (2002). Nonlinear dynamics and control of
Acknowledgments process systems with recycle. Journal of Process Control, 12(2002),
475–484.
This work was supported by the Polish State Committee Lindberg, C. F., & Carlsson, B. (1996a). Nonlinear and set-point control
of the dissolved oxygen concentration in an activated sludge process.
for Scientific Research under Grant no. 4T11A-020-25 and Water Science and Technology, 34(3–4), 135–142.
by the European Commission under Contract no. EVK1- Lindberg, C. F., & Carlsson, B. (1996b). Estimation of the respiration rate
CT-2000-00056 SMAC. The authors wish to express their and oxygen transfer function utilising a slow DO sensor. Water Science
thanks for the support. and Technology, 33(1), 325–333.
Lukasse, L.J.S., Keesman, K.J., Van Straten, G. (1998). Optimal control
of N-removal in ASP’s. In IAWQ world congress, 1998.
References Maciejowski, J. M. (2001). Predictive control with constraints. Harlowe,
England: Prentice Hall, Pearson Education Ltd.
Bechmann, H., Nielsen, M. K., Madsen, H., & Poulsen, N. K. (1998). Nielsen, M.K., (2001). Control of wastewater systems in practice.
Control of sewer systems and wastewater treatment plants using Scientific and technical report (Part 3). In IWA ICA conference,
pollutant concentration profiles. Water Science and Technology, Malmo, 3–7 June 2001, pp. 82.
37(12), 87–93. Olsson, G., & Newell, R. (1999). Wastewater treatment systems.
Bemporad, A., & Morari, M. (1999). Control of systems integrating logic, Modelling, diagnosis and control. London: IWA Publishing.
dynamics and constraints. Automatica, 35, 407–427. Piotrowski, R., & Brdys, M.A., (2005). Lower-level controller for
Brdys, M. A., & Chen, K. (1995). Joint estimation of state and parameters hierarchical control of dissolved oxygen concentration in activated
in quantity models of water supply and distribution systems. sludge processes. In Proceedings of the 16th IFAC world congress,
Automatisierungstechnik, Oldenbourg Verlag, 43(2), 77–84. Prague, 4–8 July 2005.
Brdys, M.A, Chotkowski, W., Duzinkiewicz, K. Konarczak, K., & Piotrowski, R., Duzinkiewicz, K., & Brdys, M.A. (2004). Dissolved
Piotrowski, R. (2002). Two-level dissolved oxygen control for oxygen tracking and control of blowers at fast time scale. In
ARTICLE IN PRESS
R. Piotrowski et al. / Control Engineering Practice 16 (2008) 114–131 131
Proceedings of the 10th IFAC symposium on large scale systems: Theory Van der Veen, P.J., Babuŝka, R., & Verbruggen, H.B. (1999). Comparison
and applications, Osaka, 26–28 July 2004. of nonlinear predictive control methods for a wastewater
Puta, H., Reichl, G., & Franke, R. (1999). Model-based optimization of a treatment benchmark. In Proceedings of the ECC, Karlsruhe,
wastewater treatment plant. In Proceedings of the ECC’99, Karlsruhe, September 1999.
September 1999. Wiliams, H. P. (1994). Model building in mathematical programming. New
Sanches, A., & Katebi, M.R., (2003). Predictive control of dissolved York: Wiley.
oxygen in an activated sludge wastewater treatment plant. In Woods, R. L., & Lawrence, K. L. (1997). Modelling and simulation of
Proceedings of the ECC’2003, Cambridge, UK. dynamic systems. Upper Saddle River, NJ: Prentice Hall.
Simba (2005). User’s guide /www.simba.ifak.fhg.deS. Yoo, C.K., Lee, H.K., & Lee, I.B. (2002). Comparison of process
Sorensen, J., Thornberg, D. E., & Nielsen, M. K. (1995). Optimisation of a identification methods and supervisory control in the full scale
nitrogen-removing biological wastewater treatment plant using on-line wastewater treatment plant. In Proceedings of the 15th IFAC world
measurements. Water Environment Research, 66(3), 236–242. congress, Barcelona, 21–26 July.