Variation of the tuning of the controllers over the BSM1

Effect of the controller tuning on the performance of the
BSM1 using a data driven approach
J.D. Rojas*, J. A. Baeza** and R. Vilanova*
* Departament de Telecomunicació i Enginyeria de Sistemes. Universitat Autònoma de Barcelona,
08193 Bellaterra, Barcelona, Spain
(E-mail: [email protected]; [email protected])
** Departament d'Enginyeria Química, Universitat Autònoma de Barcelona, 08193 Bellaterra,
Barcelona, Spain
(E-mail: [email protected])
Abstract
The effect on the performance of the BSM1 is tested for different tuning of the controllers with
several control strategies. The tuning method is the Virtual Reference Feedback Tuning, which is
based entirely on data measured from a simulated experiment on the plant. Several simulations
were carried out to check the variability of the performance and the associated cost. Depending on
the configuration, it was found that the change in the parameters could affect the Effluent Quality
or the Operational Cost Index in different degree: a simpler strategy affects more the effluent
quality while a complex strategy affects more the cost.
Keywords
BSM1; data-driven control; simulation; virtual reference feedback tuning; wastewater treatment
INTRODUCTION
In the control area, it is well known that the selection of the parameters of the controller is an
important task that influences the performance of the plant. For example, in Gever (2002), Iterative
Feedback Control (IFT) is applied to a chemical process achieving a reduction of the variance of the
error of nearly 87% in a temperature control problem.
In this paper, the effect of different control strategies over the Benchmark Simulation 1 (BSM1)
(Alex et al., 2008) is presented. A similar study has been done in Gernaey et al. (2007) where the
results from several control strategies are compared to check the relationship between the Overall
Cost Index (OCI) and the Effluent Quality (EQ) (Copp, 2002). However, the parameters of the
controllers in that study remain constant even when the strategy is changed. In this paper, the study
on the variation of the OCI vs EQ relationship is performed for several configurations by varying
the parameters of the controller to see the effect that the control strategy and the tuning of the
parameter have over the performance of the plant.
The models in the BSM1 are very complex to be used directly to find suitable controllers. On the
other hand, data-driven control only uses data taken directly from the process to compute the
parameters of the controllers without any modeling step. In all cases, an optimization problem is
solved to find the parameters of the controllers based solely on data. Several different
methodologies have appeared in the literature. Among them, the Virtual Reference Feedback
Tuning (VRFT) (Campi et al., 2002) is one of the most popular. This method translates the model
reference control problem into an identification problem, being the controller the transfer function
to identify. The basis of the VRFT is the computation of some “virtual signals” using a batch of
data taken directly from an open-loop experiment. Using these virtual signals, an optimization
problem is solved in order to have a predefined behavior in the form of a desired closed-loop
transfer function (i.e. model matching control).
One of the characteristics that makes the VRFT appealing is that the methodology is easy to extend
to other structures, as for example in Rojas and Vilanova (2009) an alternative two degrees of
freedom controller was presented where the design of the disturbance rejection controller was
decoupled from the reference-following controller design. Moreover, the idea of using a DataDriven approach to control a WWTP, is technically sound, given the number of uncertain
parameters that should be fitted in complex models like the Activated Sludge Models (Henze et al.,
2002).
In addition, several applications of the VRFT have appeared in the literature. In Previdi et al. (2004)
the VRFT is used to find the controller for neuroprotheses; in Kansha et al. (2008) is applied to the
tuning of adaptive PID controllers and applied to a continuous polymerization reaction; in Nakano
et al. (2009) a multivariable VRFT is used in decoupling controllers for a two dimensional thermal
process; in Rojas et al. (2010a) it is applied to a pH neutralization process and in Rojas et al.
(2010b) was applied for the first time to the BSM1.
The purpose of this paper is twofold: first, it presents the effects on the relation OCI vs EQ when
the tuning of the controllers are changed and it also presents the application of data-driven control
on this highly non-linear and complex plant.
VIRTUAL REFERENCE OVERVIEW
In order to do a fair comparison between each parameterization of the controllers it is necessary to
use the same framework on all of them. In general, the models used for simulation (for example the
BSM1) are very complex to be readily used as part of a control strategy. A linearization and an
order reduction technique can be applied to the simulation model to try to find a suitable model to
control the plant, or part of the plant. If the controller to be used has a PID-like structure, the model
of the plant has to be of low order (for example, a first order plus dead-time for the Internal Model
Control (IMC) case (Morari and Zafirou, 1989). The modeling step for control can be avoided using
a data driven control technique, like the VRFT.
The VRFT is a one-shot method for the design of feedback controllers. The original idea was
presented in Guardabassi and Savaresi (2000) and then formalized in Campi et al. (2002). Suppose
that the controller belongs to the controller class C  z;  given by C ( z; )   T ( z) .,  ( z ) is a
vector of base transfer functions that defines the controller and  is the vector with the parameters
that corresponds to each element of  ( z ) . The control objective is to minimize the model-reference
criterion given by:
 P( z )C ( z; )

J MR    
 M ( z ) W ( z )
 1  P( z )C ( z; )

Where 
2
2
2
(1)
2
represents the square of the two norm of the transfer function enclosed (Skogestad and
Postlethwaite, 2007), M ( z ) is the desired closed-loop dynamics, P ( z ) is the unknown plant and
W ( z ) is an optional weight function (useful to give more importance to certain frequencies). The
main idea of the method is that, given a set of input-output data from the plant in open-loop (i.e.
u (t ) and y (t ) respectively), the designer should be able to minimize (1), without a model of the
plant. This can be achieved by creating a “virtual” signal constructed from the open-loop data. If the
real output of the open-loop y (t ) had been taken in closed-loop and the selected closed-loop
transfer function is M ( z ) , one can find a “virtual reference” r (t ) that, if applied to the closed-loop
system with the ideal controllers, would yield y (t ) as the output. Then, the output of the controller
should be equal to u (t ) . This controller can be found by identifying the transfer function which
yields the output u (t ) when the input e (t )  r (t )  y (t ) is applied as depicted in Figure 1.
The VRFT algorithm, as presented in Campi et al. (2002), is as follows: Given a set of measured
I/O data u (t ), y(t )t 1,, N
1. Calculate:
a. a virtual reference r (t ) such that y (t )  M ( z )r (t ) , and
b. the corresponding tracking error e (t )  r  y (t )
2. Select the controller parameter vector, say, ˆN , that minimizes the following criterion
N
JVR
  
1
N
N
 u
t 1
L
(t )  C ( z; )eL (t ) 
3. If C ( z; )   T ( z) , where   z    1  z 
and   1  2
2
(2)
 n  z  is a known vector of transfer functions,
T
 n  is the vector of parameters, the criterion (2) can be written as
T
N
JVR
  
1
N
 u
N
t 1
L
(t )   LT (t ) 
2
(3)
with L (t )   ( z )eL (t ) . The optimal parameter vector ˆN is given by

N

ˆN  L (t )L (t )T 
 t 1

1 N

t 1
L
(t )uL (t )
(4)
The problem solved in (2) is not exactly the same as the control problem in (1). To approximate
these two equations, the data is filtered. This filter L( z ) can be found by comparing (1) and (2) in
the frequency domain using the Parseval theorem. This filter should holds (Campi et al., 2002):
2
2
2 1
L  1 M M W
(5)
u
The z term in the transfer functions has been dropped for simplicity.  u is the spectral density of the
input u (t ) .
THE BENCHMARK SIMULATION MODEL 1
The BSM1 is a benchmark model to test different control strategies on WWTP's. It is detailed in
Copp (2002) and Alex et al. (2008). The layout of the plant is presented in Figure 2.
Figure 1: Controlled system using the VRFT
The WWTP has five bioreactors: the first two are anoxic (theoretically, they do not have oxygen)
and the last two are aerobic. A portion of the flow is recycled to the first bioreactor ( Qa ) while the
rest is introduced in the clarifier, where the biomass is separated from the effluent. Then it is further
separated into two flows: the external recirculation ( Qr ) is send back to the first anoxic tank and the
excess sludge is disposed as wastage ( Qw ).
Each one of the reactor is modeled using the Activated Sludge Model 1 (Henze et al., 2002). In the
aerated section, carbon removal is achieved by aerobic growth of heterotrophs. For ammonia
removal, a two steps process takes place: in the aerated section: the ammonia is nitrified by
autotrophs that use oxygen to convert ammonia into nitrite and nitrate. In the anoxic section, nitrite
and nitrate are used for heterotrophic denitrification. The clarifier is modeled according to the
Takács et al. (1991) double exponential settling model with 10 layers.
To measure the quality and cost of the performance of the controllers, the benchmark provides two
performances indexes. The Effluent Quality ( EQ ) is a measure of the quality of the discharged
water. It takes into account the nitrogen levels, suspended solids, Chemical Oxygen Demand (COD)
and Biochemical Oxygen Demand (BOD). The Operational Cost Index ( OCI ) is a measure of the
cost of operating the plant. The aeration energy, pumping energy, sludge production, consumption
of external carbon source and the mixing energy are included in the OCI .
VARIATION OF THE TUNING OF THE CONTROLLERS OVER THE BSM1
As stated above, the BSM1 is a control benchmark. In this work, the effect of the variation of the
controller tuning over the performance is investigated. The control strategies and nomenclature used
are as presented in Gernaey et al. (2007). The tuning of the controller’s parameter is varied by
changing the time constant of the target closed-loop in the VRFT algorithm. Each loop controller is
found independently, i.e. a decentralized control is applied to the benchmark. All the combinations
of the different controllers for each strategy are tested using the dry weather influent provided in the
BSM1. The tested strategies are as follow:
 Basic loops: Using a discrete PI controller to control the Dissolved Oxygen concentration
SO in the last aerated tank manipulating the value of the oxygen transfer coefficient K L a ,
and nitrate and nitrite nitrogen concentration ( S NO ) of the second anoxic tank with the
internal recirculation rate.
Figure 2: BSM1 Layout

S6 strategy: Control the ammonia concentration ( S NH ) in the last aerated tank using a
cascade control: the master controller determines the SO set point for the controllers that
manipulate the K L a in each aerated tank. S NO is controlled as in the basic loop.

S7 strategy: The same as S6, but S NO is controlled by adding carbon in the last anoxic tank
Qcarb
The controllers have a discrete time PI structure:
C ( z) 
 0  1 z 1
(6)
1  z 1
where  0 and 1 are the tuning parameters that are found with the VRFT method. The sampling
time was set as Ts  1min for SO controllers, Ts  2min for the S NH controller and 15 minutes for
the S NO controller.
The data that was used to compute the controller’s parameters is presented in Figure 3. The
manipulated variables are in the left column and in the right the corresponding controlled variables.
This data was obtained by using a random signal around the operation point of each loop. The tests
were performed by using 10 different closed-loop constant times for each loop. The constant times
are related with the settling time, which is defined as the time it takes to the system to reach the
95% of the final value in a step change in the reference. The settling time is approximately equal to
four times the time constant. The variation in the settling time of the closed-loops is presented in
Table 1. These values where chosen based on the experience with the BSM1.
The results of the simulation are presented in Figure 4. A total of 100 combinations of controller
parameters were tested for the Basic loops. OCI variation is below 0.2% (from 16357 up to 16383)
while the EQ shows a maximum deviation around 4% (from 6176 to 6415). The behavior is as
expected: the best effluent quality (lower EQ value) is achieved with the highest cost (higher OCI).
The discretized version of the original tuning of the benchmark is also included, showing a good
EQ but at one of the highest OCI for this strategy. For the S6 strategy, 1000 simulation were carried
out (10 different cases for the closed loop time). The variation of EQ is lower but the variation of
OCI is greater. In this case, there are some combinations that give a better EQ with lower OCI.
Another 1000 simulation where carried out for the S7 strategy. An improvement of the effluent
quality is obtained with a higher cost for this strategy. The separation between each strategy is
considerable, both in EQ as in OCI. In Table 2, the average and standard deviation are presented, as
well as the maximum OCI deviation from the average. As it can be seen, the tuning of the parameter
plays an important role in the results: as the strategy becomes more complex, the tuning of the
controllers impacts directly on the cost while the effluent quality remains relatively constant. If the
control strategy is simpler, the cost remains relatively constant while the effluent quality variability
is larger. However, in all cases, the variation of the quality and the cost has a limited range within
each strategy.
The control of this plant is difficult for two main reasons: the well-known variability of the influent
and the limited effect of the manipulated variables over the quality indexes.
But, on the other hand, it is evident that the selection of the strategy is determinant: each strategy
has different EQ and OCI ranges. In fact, the results plotted in Figure 4 do not overlap each other,
i.e. one strategy cannot obtain the same ranges as other different strategy by only varying its tuning
parameters.
Table 1: Settling time of each loop
Min
settling time
Max
settling time
Controlling SO manipulating K L a
5.76min
10.08min
Controlling SNO manipulating Qa
3.6 h
8.4 h
Controlling S NH controlling the setpoint of oxygen
controllers
2.4 h
7.2 h
Controlling SNO manipulating Qcarb
2.4h
8.4h
Target Closed-Loop Transfer Function
Table 2: Statistic values for each strategy
Effluent Quality
Operational Cost index
Strategy
Average
Std. Dev.
Average
Std. Dev
Basic loops
6328.4
69.3
16370
6.5
 max from
average value
12.4
S6
5916.2
7.2
17000
44
95
S7
5597.0
2.7
18486
58
119
Figure 3: Data used to find the controller parameters with the VRFT approach
CONCLUSIONS
In this paper, the VRFT was used to find the parameters of several discrete time PI controllers to be
used in three different decentralized strategies for controlling the BSM1. Using this methodology,
the effect in the effluent quality and the cost index was analyzed when the parameter of the
controllers were changed according to certain desired closed-loop settling time. It was found that,
the control strategy used has a larger effect on the performance than the variation on the parameters.
But, as it was discussed, depending on the strategy, the variation of the parameter some effect either
on the EQ or the OCI: for the simplest strategy, the variation in the parameters did not change much
the OCI, but the variation in the EQ was more important. The opposite happened with the more
“complex” strategy, where the variation on the parameters had more effect on the OCI than in the
EQ. It is important to note that the influent and the noise in the sensor were used in the simulation
of the controllers, but not for the data collected to compute the controllers. A study where the data
recorded to compute these controllers is contaminated by these two factors is now under research.
Figure 4: Variation of the OCI and EQ, using a discrete PI controller for each strategy: Basic loop (blue
asterisks), S6 (red circles) and S7 (green triangles)
ACKNOWLEDGEMENT
This work has received financial support from the Spanish CICYT program under grant DPI201015230 and from AECI, project AECI-PCI A 025100 09. Research work of J.D. Rojas is done under
research grant supported by the Universitat Autònoma de Barcelona. The work on the
implementation of the BSM1 model is acknowledged to the Division of Industrial Electrical
Engineering and Automation (IEA) of Lund University, Lund, Sweden.
REFERENCES
Alex, J., Benedetti, L., Copp, J., Gernaey, K., Jeppsson, U., Nopens, I., Pons, M.-N., Rieger, L.,
Rosen, C., Steyer, J., Vanrolleghem, P., and Winkler, S. (2008). Benchmark Simulation Model no.
1 (BSM1). Technical report, Industrial Electrical Engineering and Automation, Lund University.
Campi, M. C., Lecchini, A., and Savaresi, S. M. (2002). Virtual reference feedback tuning: a direct
method for the design of feedback controllers. Automatica, 38(8):1337 – 1346.
Copp, J. B., editor (2002). The COST Simulation Benchmark: Description and Simulator Manual.
Office for Official Publications of the European Communities, Luxemburg.
Gernaey, K. V., Vrecko, D., Rosen, C., and Jeppsson, U. (2007). BSM1 versus BSM1 LT Is the
control strategy performance ranking maintained? In Proceedings of the 7th International IWA
Symposium on Systems Analysis and Integrated Assessment in Water Management, Watermatex.
Gevers, M. (2002). A decade of progress in iterative process control design: from theory to practice.
Journal of Process Control, 12(4):519 – 531.
Guardabassi, G. and Savaresi, S. (2000). Virtual reference direct design method: an off-line
approach to data-based control system design. Automatic Control, IEEE Transactions on,
45(5):954–959.
Henze, M., Gujer, W., Mino, T., and van Loosdrecht, M. (2002). Activated Sludge Models ASM1,
ASM2, ASM2d and ASM3. Scientific and Technical Report. IWA Publishing, 1 edition.
Kansha, Y., Hashimoto, Y., and Chiu, M.-S. (2008). New results on VRFT design of PID controller.
Chemical Engineering Research and Design, 86(8):925 – 931.
Morari, M. and Zafirou, E. (1989). Robust Process Control. Prentice-Hall International, New Jersey.
Nakano, M., Matsunaga, N., Okajima, H., and Kawaji, S. (2009). Tuning of feedback type
decoupling controller for two-dimensional thermal process based on vrft method. In ICCAS-SICE,
2009, pages 925 –930.
Previdi, F., Schauer, T., Savaresi, S., and Hunt, K. (2004). Data-driven control design for
neuroprotheses: a virtual reference feedback tuning (VRFT) approach. Control Systems Technology,
IEEE Transactions on, 12(1):176–182.
Rojas, J. D., Tadeo, F., and Vilanova, R. (2010a). Control of a pH neutralization plant using the
VRFT framework. In Control Applications (CCA), 2010 IEEE International Conference on, pages
926 –931.
Rojas, J. D. and Vilanova, R. (2009). FeedForward Based Two Degrees of Freedom Formulation of
the Virtual Reference Feedback Tuning Approach. In Proceedings of the European Control
Conference 2009, pages 1800–1805.
Rojas, J. D., Vilanova, R., and Alfaro, V. M. (2010b). Application of the virtual reference feedback
tuning on wastewater treatment plants: a simulation study. In Proceedings of the 15th IEEE
International Conference on Emerging Technologies and Factory Automation, Bilbao, Spain.
Skogestad, S. and Postlethwaite, I. (2007). Multivariable Feedback Control, Analysis and Design.
John Wiley & Sons, West Sussex, England, second edition.
Takács, I., Patry, G., and Nolasco, D. (1991). A dynamic model of the clarification-thickening
process. Water Research, 25(10):1263 – 1271.