Disturbance rejection control for the dissolved oxygen in a wastewater treatment process

In wastewater treatment processes, the concentration of dissolved oxygen affects the performance of wastewater treatment directly. It is one of the key factors that determines effluent quality of the wastewater treatment. However, a simple closed-loop control has a high-energy consumption, and it cannot guarantee the effluent quality due to large perturbations in wastewater treatment plants, such as the influent rate, the temperature, and the complex biochemical reactions. In this paper, a new disturbance rejection controller is designed to address those perturbations. Dynamics of dissolved oxygen is transformed into a controllable canonical form. Discrepancy between the dissolved oxygen dynamics and the controllable canonical form is estimated by a disturbance observer and compensated by a control law. Stability and the bound of tracking errors are obtained. Finally, numerical results on the benchmark simulation model number 1 are presented to confirm the proposed method.


Introduction
Shortage of the fresh water and increasing demand on it are a prominent contradiction. Therefore, the demand for reclaimed water, especially for the waterlacking areas, is increasing remarkably. 1 Wastewater treatment attracts extensive attention from all over the world. 2 Various kinds of new techniques have been proposed. 3 However, a wastewater treatment process is not only a biochemical reaction. Actually, automatic control plays a vital role in maintaining the effluent quality and improving efficiency of the treatments. 4 Simultaneously, it should be pointed out that control and optimization of a wastewater treatment is a challenge, due to the complexity of a biochemical reaction, diversity of the time constants involved in a biological process, and the variability of the influent patterns. 5 To address those challenges in wastewater treatment plants (WWTPs), numerous control strategies have been put forward over the past years. Typical methods include proportional-integral-derivative (PID) control, 6,7 multi-objective optimal control, 8 multivariable control, [9][10][11] and nonlinear model predictive control (NMPC). [12][13][14] The PID control, a commonly used approach in industrial processes, is also popular in wastewater treatment processes. However, nonlinearities and disturbances greatly degrade the performance of PID. 6 Multivariable control 9 can get satisfied effects. However, it largely depends on the accuracy of a neural network model, and the structure of neural network is determined by trial and error. 15 NMPC is designed in wastewater treatments for its advantages. For example, it simply integrates constraints into an optimization problem. 6 However, NMPC is a data-driven control, whose robustness may be deteriorated owing to uncertainties in the WWTPs. 16 Actually, if nonlinearities, uncertainties, and external disturbances-such as coupling, influent temperature, influent rate, and constituents-are considered as time-varying disturbance, desired performance can be obtained by estimating and eliminating disturbance by an advanced control algorithm. Starting from this idea, a wide variety of disturbance rejection approaches have  [17][18][19] and disturbance observer-based control (DOBC). 20,21 For successful applications in various industrial sectors, disturbance rejection control has become a hot topic in recent years. In this paper, we also focus on the disturbance rejection control and its application on the WWTPs.
For DOBC approach, internal disturbance from processes definitely degrades system performance. Although an extended state observer (ESO) designed in ADRC is able to estimate the internal and external disturbances, an ESO still has steady-state estimation errors for a time-varying disturbance. Motivated by improving system performance, a new disturbance rejection control (NDRC) is designed to achieve satisfied dissolved oxygen (DO) concentration in WWTPs.
In NDRC, a controllable canonical form is taken as the standard dynamics. Any discrepancy between the standard form and system dynamics is considered as the generalized disturbance. Observers designed in NDRC are able to estimate the generalized disturbance effectively. Rather than depending on a concrete model of a WWTP, estimating and eliminating the disturbance in real time make the DO concentration control more reliable. In other words, by choosing proper tunable parameters of the baseline controller and the observers, the NDRC can get satisfied level of the DO concentration. In addition, clear physical explanations of those parameters are also helpful for design and use of NDRC.
The rest of this paper is organized as follows. In section ''System description and problem statements,'' the dynamics and control problems of the WWTPs are described. In section ''Disturbance rejection control,'' a disturbance rejection control, stability, and its tracking error are presented. In section ''Numerical studies,'' simulation results are provided to demonstrate the NDRC.

System description
In order to evaluate a control approach in a WWTP objectively, a benchmark simulation model number 1 (BSM1) has been developed by the International Water Association (IWA), and the layout of the BSM1 is presented in Figure 1. 22 The BSM1 can be divided into two parts. One is a biochemical reactor, which is composed of a fivecompartment activated sludge reactor consisting of two anoxic tanks (V 1 = V 2 = 1000 m 3 ) followed by three aerobic tanks (V 3 = V 4 = V 5 = 1333 m 3 ). The other part is a secondary clarifier (V = 6000 m 3 ). It is divided into 10 layers evenly. Top layer outputs the water that satisfies the discharge standard, and the bottom layer outflows the waste.
The DO concentration in the fifth tank directly affects the effluent quality, and it is critical to regulate it at an appropriate level. Dynamics of the DO concentration in the fifth tank is 22 where Q 4 is the effluent flow rate of the fourth biological reactor, S O , 4 denotes the DO concentration of the fourth biological reactor, K La5 is the oxygen transfer coefficient of the fifth biological reactor, S Ã O is the saturation concentration of DO (8 g m 23 ), Q 5 is the effluent flow rate of the fifth biological reactor, S O , 5 is the DO concentration of the fifth biological reactor, and r Z , 5 is the appropriate conversion rate of the fifth biological reactor 23 where X B,A and X B,H represent the active autotrophic biomass and the active heterotrophic biomass of the fifth biological reactor, respectively; S S is the readily biodegradable substrate of the fifth biological reactor; and S NH denotes the NH 4 + and NH 3 nitrogen of the fifth biological reactor. The other parameters are listed in Tables 1 and 2

Problem statements
The DO concentration in a WWTP, to a great extent, determines the effluent quality. From equation (1), it can be seen that DO concentration is affected by numerous factors, such as the flow rate, constituents of the wastewater, biological activities, and nitrate concentration. However, in practice, those factors are usually unknown, nonlinear, and strongly coupled. Therefore, how to design and realize an effective control on a WWTP is a big challenge. Therefore, the control objective is to maintain the DO concentration in the fifth tank at an ideal level, even if uncertainties-such as the flow rate, constituents of the wastewater, and biological activities-exist.

Disturbance rejection control
In order to address the challenge, an NDRC approach is designed.
Consider a general n-order nonlinear system represents the unknown nonlinear dynamics. It includes internal uncertainties and unmodeled dynamics. d(t) is the unknown external disturbance, u(t) is the control input, and y is the system output. Let 2 R n , and D = f(x, t) + d(t) 2 R then system (5) can be rewritten as By solving equation (6), we have Clearly, the system output can be decoupled from both the internal and external disturbances, if u + D=0.

Control law design
In this paper, a disturbance rejection control law u is designed as 24 where u 0 is designed to stabilize the system and track the reference;D denotes the output of a disturbance observer, which is utilized to estimate the unknown dynamics and external disturbance. a = ½a n , a nÀ1 , . . . , a 1 T 2 R n is the parameter vector, x = ½x 1 ,x 2 , . . . ,x n T 2 R n is the estimated state, and y r = ½y r , _ y r , . . . , y r (nÀ1) T 2 R n is the vector consisted of a reference input y r and its derivatives. Remark 1. When substituting equation (8) into (6), we can get a controllable canonical form (9), and A = A x 2 Ba T is the system matrix of the controllable canonical form. In other words, disturbance rejection control law (8) is used to linearize the nonlinear uncertain system (6) into a linear time invariant (LTI) system where U = a Tx + a T y r +D 2 R,x = x Àx 2 R n , D = D ÀD 2 R, and   The state observer can be designed as where L = ½l 1 , l 2 , . . . , l n T 2 R n is the parameter vector. Meanwhile, the disturbance observer can be selected as 25D where p(x) = l n + 1x , in which l n + 1 is the tunable parameter.
Remark 2. The disturbance defined in NDRC is the difference between practical system dynamics and the controllable canonical form. The estimation error is bounded, and the control scheme of an NDRC system is shown in Figure 2. 24 Stability and tracking error Definition. A system is considered to be input-to-state stable if there are a class KL function b and a class K function g so that for any initial state x(t 0 ) and any bounded input u(t), the solution x(t) exists for all t . t 0 and satisfies 26 Consequently, we have Lemma 1.
SincexD ! 4d z and y r (n) is also bounded, without loss of generality, e(t) k k4d is assumed. Here, d is a constant.  and 2l 1 , 2l 2 ,..., 2l n are the eigenvalues of matrix A. From Lemma 2, we can see that, for the input-tostate stable closed-loop system (9), its tracking error is bounded. In addition, the following remarks have been made.

Numerical studies
In this section, numerical simulations are performed on the BSM1 in dry, rainy, and stormy days.

Controller design
Based on section ''Disturbance rejection control,'' a disturbance rejection control law can be designed as A state observer can be designed as The disturbance observer can be selected aŝ where p(x) = l 2x .

Simulation design
Two cases are considered to demonstrate the approach. The first case is the constant tracking response, and the second case is the varying setting value response. Based on the responses of the two cases, the difference among proportional-integral (PI) control, self-organizing fuzzy control (SOFC), and NDRC can be seen clearly.
In both cases, the parameters of NDRC are set to be l 1 = 10,000, l 2 = 300, and a 1 = 1500. The parameters of PI are taken the same as in Copp's 23 work, that is, where the tracking error e = y r 2 y.

Simulation results
In this section, simulation results have been presented.
Case 1: constant DO set value. In this case, the DO concentration is set to be 2 mg/L and the simulation time is 14 days. PI is commonly used in the process control, and the SOFC proposed by Qiao et al. 27 is also considered in BSM1. In order to evaluate the closed-loop performance, the DO concentrations regulated by NDRC, PI, and SOFC 27 are compared. As shown in Figure 3, in dry weather, it is obvious that NDRC has a better tracking response than PI. From K La5 curves given in Figure 4, we can see clearly that, with similar control energy, NDRC is able to achieve much better tracking response. In other words, NDRC needs much lower energy than PI when they achieve similar tracking performance. Figure 5 illustrates that disturbance estimator is able to estimate disturbance precisely.
Performance indexes in dry weather are listed in Table 3. Compared to SOFC, 27 there is a 55.6% decrease in IAE, DEV max has dropped by 55.5%, and the ISE is reduced by 84.7%. In addition, by comparison with PI, performance is improved more significantly. IAE, DEV max , and ISE fall by 96.8%, 29.0%, and 99.9%, respectively. The data given in Table 3 show that NDRC is the best method.
As to the effluent, NDRC also satisfies the requirements. For instance, NH is 2.4 mg/L, N tot is 16.8 mg/L, total suspended solids (TSS) is 13.0 mg/L, 5-day biochemical oxygen demand (BOD 5 ) is 2.7 mg/L, and COD is 48.2 mg/L. Therefore, NDRC is effective in WWTPs.
For rainy and stormy conditions, simulations are also performed. Numerical results are shown in Figures  6-11.
As shown in Figures 6 and 9, in rainy and stormy days, NDRC has superior tracking responses. K La5 curves given in Figures 7 and 10 describe that NDRC needs much less energy than PI when they achieve similar tracking performance. Figures 8 and 11 present that disturbance estimator is able to estimate disturbance precisely. Performance indexes in rainy and stormy days are displayed in Table 4.
As shown in Table 4, IAE, ISE, and DEV max of NDRC are better than those of PI and SOFC in rainy and stormy days. Therefore, compared to both PI and SOFC, NDRC is the most suitable approach.
Case 2: varying DO set value. Furthermore, to validate NDRC, varying DO set points are taken into consideration. According to Copp,23 data in rainy weather contain 1 week's dry weather influent data and a long rainfall event during the second week. Stormy weather is a combination of dry weather with two stormy events. Therefore, in this case, rainy and stormy conditions are taken to test the closed-loop performance.
Varying DO set points are taken the same as those utilized in Qiao et al.'s 27 work, and tracking performance is shown in Figure 12. Quantitative comparisons have been listed in Table 5.
The results presented in Figure 12 show that NDRC can track the varying set points much better than PI. Indexes shown in Table 5 reveal that, by comparison, NDRC is the best approach among the three approaches listed in Table 5. It means that NDRC has much stronger disturbance rejection ability, and it is able to achieve superior performance in this case.
In Qiao et al.'s 27 work, only the control results in rain weather are provided. In order to illustrate the tracking ability of NDRC, stormy weather is also considered. The simulation results are given in Figure 13.
The results shown in Figure 13 demonstrate that, compared to PI, NDRC can achieve better performance for the varying set value tracking in stormy days. Performance indexes are provided in Table 6. From those values, similar conclusion can be drawn   that, in stormy days, NDRC still has much stronger disturbance rejection ability than PI.

Discussion
Generally speaking, the DO concentration of a WWTP is difficult to control due to its nonlinear, uncertainties, and couplings. Observers utilized in this paper are capable of estimating system states and disturbance more accurately, and the control law designed is able to compensate the disturbance more effectively. NDRC, by comparison, has much stronger disturbance rejection ability, and it is able to improve the closed-loop performance greatly. In addition, compared to the SOFC      proposed by Qiao, 27 adjustable parameters of NDRC are clearer in physical backgrounds, which is useful to select the tunable parameters, and it is easier to obtain a group of suitable parameters.

Conclusion
In this paper, an NDRC has been designed for DO concentration control in a WWTP. With the help of observers, the time-varying disturbance in a WWTP can be estimated, and the system dynamics can be approximately transformed into an LTI system with controllable canonical form. Based on a commonly accepted platform BSM1, PI, SOFC, and NDRC are simulated under the same conditions to get unbiased comparison results. Both constant tracking responses and varying set values' responses under different weathers have been presented. From the simulation results, it is obvious that the NDRC is able to obtain more satisfactory performance for its advantage on disturbance estimation and rejection. However, it still needs to be verified in a real WWTP, and it is our future work.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the Key Program of Beijing Municipal Education Commission (grant no. KZ201810011012) and the National Natural Science Foundation of China (grant no. 61873005).