Department of Information Technology

Stability based ammonium control in waste water treatment

Ammonium control

In an activated sludge process oxygen is supplied to allow microorganisms to reduce nitrogen and organic carbon from the water. The oxygen concentration affects the respiration rate of the microorganisms (6,7) and thereby affects the rate by which they contribute to the removal of unwanted material in the water. Ammonium control is a popular strategy for activated sludge processes designed for nitrification. The input to this process is the aeration where the air flow rate is controlled by a valve. The valve position is controlled by inner dissolved oxygen (DO) controllers, thereby ensuring that the DO concentration is maintained at the right level. A too low level leads to inefficient ammonium control, while a too high level is costly since the aeration consumes much energy. The output of the process is the ammonium concentration which is delayed sue to the settler dynamics. The process is depicted in Fig. 1 which also appears in 2.


Figure 1. Block diagram of a three tank ammonium control system in a waste water treatment plant.

In the present work, the inner DO control loop is treated as a static nonlinearity using a saturation. The decreasing effect of an increasing DO concentration is also incorporated in the static nonlinearity. The reamining bio-chemical dynamics is treated as a linear dynamic process. Together with the delayed output signal, the resulting process model has a Hammerstein structure, as noted in 5. The Hammerstein model is much simpler than e.g. the activated sludge model no. 1 (ASM1) developed by the international water association, and the accuracy is therefore not as high. However, the simple structure of the Hammerstein model simplifies controller design and this is the topic here. More precisely the intention is to design controllers that are guaranteed to be globally stable (for the Hammerstein model), despite the saturation and the delayed output measurement. The so obtained controllers are then validated using simulation on the ASM1 model.

Hammerstein model based identification of the ammonium dynamics

As a basis for the controller design a dynamic Hammerstein model is needed. The paper 4 and the report 2 treat two methods to identify such models from data. The report 2 applied and compared black-box Hammerstein methods in a single tank setup. Discrete time transfer function operators were combined by piecewise linear parameterizations. The compared methods were shown to provide fairly accurate input-output descriptions of simulated data, which was generated by the benchmark simulation model no 1 (BSM1). The methods of 2 do however not utilize the available prior information of the static nonlinearity. Therefore, in the paper 4, a grey-box Hammerstein model was introduced where the static nonlinearity is modeled as a Monod function. This reduces the number of free parameters and forces the model to behave more like the waste-water plant. Again a single tank setup was used in 4. As in 2 , the grey-box Hammerstein model was shown to provide reasonably accurate models of the plant, simulated with the BSM1.

Finally, to provide data for the controller design, the Monod based Hammerstein model was extended to a three tank version in 3. The result for the validation data set is shown in Fig. 2.


Figure 2. The performance of the Monod based Hammerstein model when identified from data generated by a three tank BSM1 run.

L_2 stable ammonium control

The main idea of the controller design is to use the Hammerstein model to pre-compute the stabiltiy region of the control loop, in terms of selected controller parameters and the delay of the system. Given this information, a robustly stable (with respect to the loop delay) controller is selected. The Hammerstein based model of the ammonium control system is depicted in Fig. 3. Since there is a delay in the loop stability needs to be treated by input-output methods. Due to the saturation type static nonlinearity the relevant result to assess the stability of the ammonium control system is the the infinite-dimensional version of the Popov-criterion. This leads to a conclusion on L_2 stability of the control loop, cf. 3.


Figure 3. Block diagram of the Hammerstein model based ammonium control loop. Note that the delay which is a part of G_p,2 has been moved to the feedback path to be consistent with framework of T. Wigren, "Low-frequency limitations in saturated and delayed networked control", Proc. IEEE CCA 2015, Sydney, Australia, pp. 564-571, Sep. 21-23, 2015. DOI: 10.1109/CCA.2015.7320690. That framework is used in the L_2 stability analysis of 2.

The pre-computation of the stability region applies gridding of a selected number of controller parameters and the loop delay. Then, with a process model and a selected controller, the linear loop gain follows for each grid point. The Popov inequality, which depends on the maximum slope of the static nonlinearity, can then be evaluated for each grid point. This leads to a conclusion on L_2 stability of the control loop, for each grid point, cf. 3. These evaluations allow the maximum allowed delay that results in L_2 stability of the loop, to be computed for each value of the controller parameters. The resulting surface provides the description of the stability region. An example appears in Fig. 4 where the maximum delay is plotted as a function of the proportional and integrator gains of the leaky PI-controller.


Figure 4. The subset of the stability region predicted by the Popov-criterion.

As can be expected, Fig. 4 reveals that the stability margin is reduced when the amount of integration gain is increased. For fixed integration gain, there is a proportional gain that optimizes the stability margin. This is easy to understand since a very high loop gain together with a delay is known to be harmful for stability. At the same time, a too low proportional gain leads to a dominating contribution from the integral part of the controller. This is also well known to be negative for stability.

The controller is then easily selected from the graphical representation of the stability region. To evaluate the stability and performance of the controller for the plant, the controller was simulated using BSM1. The result that appears in Fig. 5 indicates that the stability analysis is indeed relevant for the more complicated plant.


Figure 5. Step response for the Hammerstein model based control loop (green) and the BSM1 control loop (red).

The paper 1. augments the L_2 stable controller design approach, with feedforward. This feedforward from the measurable inflowing waste water was found to significantly improve the system performance, cf. Fig. 6.


Figure 6. L_2-stable Ammonium control with and without feedforward from the inflow.


1. T. Chistiakova, T. Wigren and B. Carlsson, "Combined L_2-stable feedback and feedforward aeration control in a wastewater treatment plant", to appear in IEEE Trans. Contr. Sys. Tech., 2019. DOI: 10.1109/TCST.2019.2891410. Available:

2. T. Chistiakova, P. Mattsson, B. Carlsson and T. Wigren, "Nonlinear system identification of the dissolved oxygen to effluent ammonium dynamics in an activated sludge process", Technical Reports from the Department of Information Technology, 2018-011, Uppsala University, Uppsala, Sweden, August, 2018.

3. T. Chistiakova, T. Wigren and B. Carlsson, "Input-Output Stability Based Controller Design for a Nonlinear Wastewater Treatment Process", ACC 2018, Milwaukee, USA, pp. 2964-2971, June, 27-29, 2018.

4. T. Chistiakova, B. Carlsson and T. Wigren, "Non-linear modelling of the dissolved oxygen to ammonium dynamics in a nitrifying activated sludge process", Proc. ICA 2017, Quebec City, Quebec, Canada, pp. 85-93, June 11-14, 2017.

5. T. Chistiakova, B. Carlsson and T. Wigren, "Nonlinear stability analysis of an ammonium feedback control system", Abstract (unpublished), Reglermöte 2016, Gothenburgh, Sweden, June 8-9, 2016.

6. B. Carlsson and T. Wigren, "On-line identification of the dissolved oxygen dynamics in an activated sludge process", Preprints 12th World Congress of IFAC, Sydney, Australia, vol. 7, pp. 421-426, 1993.

7. B. Carlsson and T. Wigren, "On-line identification of the dissolved oxygen dynamics in an activated sludge process", UPTEC 92111R, Department of Technology, Uppsala University, Uppsala, Sweden, September, 1992.

Updated  2019-04-09 09:42:00 by Torbjörn Wigren.