Introduction

Applications of repetitive control in activated sludge
processes
L. Åmand*,**, J. Nygren** and B. Carlsson**
* IVL Swedish Environmental Research Institute, P.O. Box 210 60, 100 31 Stockholm,
(E-mail: [email protected])
** Department of Information Technology, Uppsala University, P.O. Box 337, 751 05, Uppsala
(E-mail: [email protected])
Abstract
The load to municipal wastewater treatment plants varies significantly over the day. The load pattern is often
similar from one day to another which could be used in plant control. Repetitive control (RC) is a control
method developed to track or reject periodic signals. In this paper, ideas how to apply RC to activated sludge
systems are presented, and the concept is demonstrated through simulations of RC combined with feedback
control of the effluent ammonia concentration in the IWA/COST Simulation Benchmark. Due to its simple
structure, low number of tuning parameters and flexibility, RC could be an attractive method for practical
applications in wastewater treatment to improve the performance of present feedback control when the goal is
to track a reference signal. Challenges for full scale implementation include handling of non-periodic
disturbances such as rains, and to manage variations over the week such as weekends.
Keywords
Dissolved oxygen; repetitive control; supervisory aeration control; wastewater treatment
INTRODUCTION
Control of wastewater treatment operation is often considered a challenging task. The processes at
work in the biological reactors are referred to as being nonlinear, stiff (large range of timeconstants) and non-stationary and to suffer from interactions between variables, model uncertainty
and constraints (Weijers, 2000; Rosen 2001). Despite these challenges, application of classical
control methods such as PI control, cascade control and various kinds of feedforward control
utilising measurable disturbances have proven to yield good results in supervisory aeration control
(Ingildsen et al., 2002; Vrecko et al., 2006). These control methods work well with the level of
instrumentation seen at many municipal plants. More advanced control has been used to meet the
above mentioned challenges. Some examples are fuzzy control to handle model uncertainties
(Baroni et al., 2006), model-based control such as Model Predictive Control to cope with
constraints (Holenda et al., 2008) and hierarchical control to handle for example stiffness (Brdys et
al., 2008).
A challenge for wastewater process control is that the raw material for the process, i.e. the incoming
wastewater, normally cannot be controlled but is to be considered a disturbance to the system. The
load variations are large with an inherently diurnal pattern. The contribution of this paper is to
suggest the use of repetitive control (RC) to make use of the regular nature of the incoming
disturbance to the plant. The idea behind RC is to update the control signal from previous periods of
operation to achieve rejection of a periodic disturbance or tracking of a periodic reference. RC was
originally developed for control of power supply (Inoue et al., 1981a; Inoue et al., 1981b). The RC
design is based on the internal model principle (Francis & Wonham, 1976) which concludes that a
zero steady state error can be achieved if a disturbance or a reference signal can be regarded as the
output of an autonomous generator inside a stable feedback loop.
A close relative to repetitive control is Iterative Learning Control (ILC). ILC was developed in the
1980’s within robotics research and is traditionally applied to finite time dimensional systems
where the system returns to the same initial condition before each repetition. ILC has earlier been
applied to a Sequencing Batch Reactor for wastewater treatment (Kim et al., 2009). Early results on
learning control for continuous wastewater systems was presented in Åmand & Carlsson (2010).
This paper presents ideas on how repetitive control can be applied to an activated sludge process.
Simulations of the activated sludge process with repetitive control of the aeration to achieve a
specific effluent ammonia set-point is used to demonstrate the benefits for continuous activated
sludge systems and a discussion on how this can be implemented in full-scale is included.
METHODS
System description
When applying repetitive control, the controller is supposed to track a reference or reject a periodic
disturbance. The simplest of RC algorithms (eq. (1)) has only one design parameter, γ, which makes
the control design especially easy.
(1)
In (1), u is the control signal from the repetitive controller, e the control error, p is the period length
and γ is the learning gain. The choice of γ is a trade-off between (monotonic) stability and
robustness to noise on one hand, and convergence speed on the other. The RC updates a signal from
one period to the other, and works as a feedback controller with respect to the periods. At the same
time, the algorithm can be non-causal since it can use knowledge from later time steps in previous
periods, as in (1). In this respect, the controller is a feedforward controller in the time domain. The
use of higher-order algorithms, where information from more than one period back can be
incorporated in the learning to handle sensitivity to non-periodic inputs and uncertainty in the
period-time (Chang et al., 1988; Steinbuch, 2002).
To improve the control with respect to non-periodic disturbances, a learning law is in many
applications combined in series or parallel to an existing feedback controller as an add-on controller
(Li et al., 2004). When a feedback controller is already working on the system, RC manipulating the
command given to the feedback controller is preferred (Longman, 2000). An overview of such a
system is found in Figure 1.
Figure 1. RC in series with a feedback PI controller.
Simulations
RC is evaluated in the COST/IWA Benchmark Simulation Model (BSM1) (Copp, 2002) with the
purpose to control the ammonia in the last aerobic compartment, an overview of the control scheme
is found in Figure 2. The original dry BSM1 load is in relation to the aerated volume in the
simulator high. The high loading rate reduces the control authority in the nitrification. Despite
efforts to change simulator or KLa or DO concentration trough control, the effluent ammonia
concentration stays unaffected during large parts of the day. To increase the control authority in the
process, a lower influent load was used in the simulations. Two coefficients were created to alter the
influent, one for the flow and another for the time varying influent parameters. Over a day, the flow
coefficients ranged from 0.4 to 0.8 and the parameter coefficients from 0.72 to 1.35. The same
values on the coefficients were used each 24-hour period. The change coefficients aimed at finding
the right level of load and flow, but also to decrease the variance of flow and load, hence
coefficients sometimes were above one. The resulting volumetric nitrogen load resembles that of a
low loaded activated sludge plant. The flow proportional averages in the load file used are presented
in Table 1.
Figure 2. Control scheme in BSM1.
Table 1. Flow proportional average values for the influent used in the simulations.
Parameter
Soluble inert organic matter
Readily biodegradable substrate
Particulate inert organic matter
Slowly biodegradable substrate
Active heterotrophic biomass
Active autotrophic biomass
Particulate products arising from biomass decay
Oxygen
Nitrate and nitrite nitrogen
NH4 + NH3 nitrogen
Soluble biodegradable organic nitrogen
Particulate organic nitrogen
Alkalinity
Flow
Symbol
SI
SS
XI
XS
XB,H
XB,A
XP
SO
SNO
SNH
SND
XND
SALK
Q
Value
30
70
51
212
29
0
0
0
0
32
7
11
7
11214
Unit
mgCOD/L
mgCOD/ L
mgCOD/L
mgCOD/ L
mgCOD/L
mgCOD/L
mgCOD/L
mgCOD/L
mgN/L
mgN/L
mgN/L
mgN/L
mole/L
m3/s
A repetitive controller was included in the Simulink BSM1 implementation together with
supervisory ammonia feedback control. Three aerated zoned was used and the ammonia set-point
was 1.5 mg/l. The maximum allowed DO-set point was set at 3.5 mg/l. The RC law was used to
modify the set-point to the feedback-ammonia controller. The feedback controller was slow (K=0.3, Ti=0.2), the same controller parameters have earlier been applied in Stare et al. (2007). The first
set of simulations was run without noise and all days had the same load as the first day. Several
values on the learning gain γ were tested. The second set of simulations included measurement
noise (variance= 1 mg/L) on the DO and ammonia measurements and also demonstrated the effect
of using a low pass butterworth filter Q according to eq. (2). In the last set of simulations the load
had daily and weekly variations as in the standard BSM1 dry influent, but modified as describes
above. No noise was used. A test was made with second order RC, where weighted information
from more than one period back in time is used (eq. (3)). In the last simulation, the signal from the
RC was lowered over the weekends to adjust for the error caused by the deviation in load and
proportional feedback was used. Simulation settings and controller parameters are summarised in
Table 2.
(2)
(3)
Table 2. Settings and parameters in the simulations: γ, use of noise or not, use of identical periods or not, cut-off
frequency (wc) and HORC weights (wj).
Nr.
1
2
3
4
5
6
7
8
9
10
11
γ
0.25
0.5
0.75
1
0.5
0.5
0.75
0.75
0.75
0.75
0.75
Noise
N
N
N
N
Y
Y
Y
Y
N
N
N
Identical days
Y
Y
Y
Y
Y
Y
Y
Y
N
N
N
wc (rad/s)
40
40
-
wj
Comment
Butterworth filter
Butterworth filter
1/N
2nd order RC (N=2)
Feedback P-controller,
RESULTS AND DISCUSSION
Simulation results
Results from combining RC with a slow ammonia feedback controller are found in Figure 3. The
RC signal is increased for each period, learning from the error of the previous period. The error is
approaching zero after several days. The rate of convergence is affected by the learning gain (γ) as
can be seen in Figure 4 expressed as the root mean squared error (RMSE) of the control error. A
reduction of RMSE of 47-88 % is achieved within 5 days of learning for different values on γ. The
size of this reduction is affected by how fast the feedback controller is.
(a)
(b)
Figure 3. Results from 18 days with RC added to ammonia feedback (simulation 2, γ=0.5), the nominal input and error
in dashed-bold. (a) Daily profile of the RC signal modifying the set-point to the feedback controller. (b) The daily
control error.
Figure 4. RMSE for different values of the learning gain γ (simulation 1-4).
A higher learning gain is increasing the sensitivity to measurement noise, as can be seen in Figure
5. Except for during the first week, the error is not monotonically decreasing as in the noise-free
simulations but is instead increasing some periods, especially when using a higher learning gain.
Filtering of the error in the RC algorithm effectively improves the performance. Despite filtering,
the error remains at a higher RMSE level due to the variance caused by the noise.
(a)
(b)
Figure 5. RMSE for simulations with noise and low pass filtering (simulation 2-3, 5-8). (a) γ = 0.5. (b) γ = 0.75.
Using identical influent profiles each day offers ideal prerequisites for repetitive control. When
simulating the plant with the full weekly variations, the variations between weekdays are well
handled by the controller, but the much lower load during the weekends affects the control
behaviour (Figure 6). Despite that higher-order RC is known to improve robustness to non-periodic
variations, second order RC only slightly improves the performance. A more elaborate method is
needed to handle the effect of weekends, and a simple strategy where the decrease in load over
weekends is compensated for in the output from the repetitive controller is also found in Figure 6.
The error during weekends is here very low, but the error is increased on the Monday. A more
sophisticated way to handle the difficulties caused by weekends would be to have separate learning
for weekdays and weekends.
Figure 6. RMSE for simulations with non-identical daily load profiles. First order RC, second order RC and P feedback
with RC and adjusted weekends (simulation 9-11).
Full-scale considerations
There are several considerations with respect to repetitive control in continuous wastewater
treatment systems. In a system where the disturbance varies over time, a higher order RC could be
attractive. The repetitive controller is flexible to use, since it could also be turned on and off in
periods. After sufficient performance is achieved after a certain number of days of learning, the RC
controller could be turned off and the controller signal from the RC could continue to work on the
system. Alternatively, the RC signal can be turned off when desired and the controller will be the
same feedback controller that previously worked on the system.
For practical applications, rules need to be developed to handle learning for instance during wetweather conditions and during weekends. In plants where the periods are not as similar from one
day to another as in the BSM1 example during weekdays, higher-order RC could smooth the effects
of non-periodic inputs. Low-pass filtering of the error fed to the RC is recommended in order to
reduce sensitivity to measurement noise.
A known challenge for ammonia feedback in activated sludge plants is a slow response due to the
placement of the sensor late in the process. RC could be a tool to speed up the control with its
feedforward action from previous periods, without the need of additional sensors.
Other possible benefits of RC in continuous wastewater treatment systems include control of
addition of precipitation chemicals or to use RC as a tool to improve the use of wireless sensors in
the system (Nygren & Carlsson, 2011). Wireless sensors are easy to install and could be an
attractive way to obtain an average from several positions in the system. Learning control could
decrease the sensor sampling time which reduces energy consumption in the wireless sensor
network.
CONCLUSIONS
In this paper, ideas on how to apply repetitive control in activated sludge processes are presented.
Repetitive control in combination with feedback to improve the tracking of the ammonia set-point is
demonstrated through simulations. The method in its most simple form is easy to implement and is
a way to make use of the knowledge contained in a periodic disturbance. Repetitive control is a
means to speed up a slow feedback system, without requiring any extra instrumentation. Challenges
for full scale application include development of rules for how to handle rain events and weekends.
ACKNOWLEDGEMENT
The authors would like to acknowledge the support provided by Stockholm Vatten,
Käppalaförbundet and Syvab which all operate wastewater treatment plants in the Stockholm
region. Co-funding is provided from the Foundation for IVL Swedish Environmental Research
Institute (SIVL) via grants from the Swedish Environmental Protection Agency and the Swedish
Research Council for Environment, Agricultural Sciences and Spatial Planning (Formas). The
project is also financially supported by the Swedish Water and Wastewater Association (project
number 29-116) and by the Swedish Foundation for Strategic Research (SSF) under research grant
RIT08-0065 for the project ProFuN: A Programming Platform for Future Wireless Sensor
Networks.
REFERENCES
Baroni, P., Bertanza, G., Collivignarelli, C. & Zambarda, V. (2006). Process improvement and
energy saving in a full scale wastewater treatment plant: Air supply regulation by a fuzzy logic
system. Environmental Technology, 27 (7), 733-746.
Brdys, M. A., Grochowski, M., Gminski, T., Konarczak, K. & Drewa, M. (2008). Hierarchical
predictive control of integrated wastewater treatment systems. Control Engineering Practice, 16
(6), 751-767.
Chang, W. S., Such, I. H. & Kim, T.W. (1988). Analysis and design of two types of repetitive
control systems. Automatica, 31 (5), 741-746.
Copp, J. (2002). The COST Simulation Benchmark—Description and Simulator Manual. Office for
Official Publications of the European Communities, Luxembourg.
Francis, B. A. & Wonham, W. M. (1976). The internal model principle of control theory.
Automatica, 12 (5), 457-465.
Holenda, B., Domokos, E., Rédey, Á. & Fazakas, J. (2008). Dissolved oxygen control of the
activated sludge wastewater treatment process using model predictive control. Computers &
Chemical Engineering, 32 (6), 1270-1278.
Ingildsen, P., Jeppsson, U. & Olsson, G. (2002). Dissolved oxygen controller based on on-line
measurements of ammonia combining feed-forward and feedback. Water Science and Technology,
45 (4-5), 453-460.
Inoue, T., Iwai, S. & Nakano, M. (1981a). High accuracy control of a proton synchrotron magnet
power supply. 8th IFAC World Congress, Kyoto, Japan, 24-28 August 1981.
Inoue, T., Nakano, M. & Iwai, S. (1981b). High accuracy control of servomechanism for repeated
contouring. Proceedings of the 10th Annual Symposium on Incremental Motion Control Systems
and Devices.
Kim, Y., Yoo, C., Kim, Y. & Lee, I. (2009). Simulation and Activated Sludge Model-Based
Iterative Learning Control for a Sequencing Batch Reactor. Environmental Engineering Science, 26
(3), 661-671.
Li, C., Dongchun, Z. & Xianyi, Z. (2004). A Survey of Repetitive Control. 2004 IEEE/RSJ
International Conference on Intelligent Robots and Systems, Sendai, Japan, 28 September-2
October 2004.
Longman, R. (2000). Iterative learning control and repetitive control for engineering practice.
International Journal of Control, 73 (10), 930-954.
Nygren, J., & Carlsson, B. (2011). Benchmark Simulation Model no. 1 with a Wireless Sensor
Network for Monitoring and Control. Submitted to 12th Nordic Wastewater Conference 2011.
Rosen, C. (2001). A chemometric approach to process monitoring and control- with applications to
wastewater treatment operation. PhD dissertation, Lund University, Lund, Sweden.
Stare, A., Vrecko, D., Hvala, N. & Strmcnik, S. (2007). Comparison of control strategies for
nitrogen removal in an activated sludge process in terms of operating costs: A simulation study.
Water Research, 41 (9), 2004-2014.
Steinbuch, M. (2002). Repetitive control for systems with uncertain period-time. Automatica, 38
(12), 2103-2109.
Vrecko, D., Hvala, N., Stare, A., Strazar, M., Levstek, M., Cerar, P. & Podbevsek, S. (2006).
Improvement of ammonium removal in activated sludge process with feedforward –feedback
aeration controllers. Water Science and Technology, 53 (4), 125-132.
Weijers, S. (2000). Modelling, Identification and Control of Activated Sludge Plants for Nitrogen
Removal. PhD dissertation, Technische Universiteit Eindhoven, Eindhoven, The Netherlands.
Åmand, L. & Carlsson, B. (2010). Learning control applied to continuous wastewater treatment
systems – an initial study. IWA Water and Energy, Amsterdam, The Netherlands, 10-12 November
2010.