Optimized dosage control of the ozonation process in drinking water treatment

Ozonation is an important process in drinking water treatment. Determination of optimal ozonation dose is of significant importance for enhancing the quality of treated water and reducing the energy cost. It is known that keeping the dissolved ozone residual constant is an effective and reliable dosage control scheme. However, some external disturbances, such as large changes in raw water quality and water flow rate, always exist in the ozonation process. Meanwhile, the ozonation is a nonlinear process with large time constant and long time delay. Thus, it has been always a challenge for dosage control to maintain the dissolved ozone residual constant. The traditional control strategies such as PID and MPC merely utilize feedback regulation to suppress disturbances. This will degrade the control performance when strong disturbances occur. In this work, an effective control method integrating MPC method with disturbance observer (DO) is put forward to improve disturbance suppression performance. DO is utilized to estimate the disturbances and uncertainties, and then the estimated values are employed to conduct feed-forward compensation. The test results indicate that significant disturbance suppression improvements can be accomplished under the proposed method in comparison with the conventional MPC method in the ozonation process.


Introduction
The drinking water treatment is significantly important, since it provides numerous barriers to protect public health by removing chemicals and microorganisms that may result in illness to consumers. 1 Ozonation process, which aims to replace attractively chlorine to disinfect the water, oxidate the organic matter along with the micropollutants, and remove the odor and color, has been receiving abundant attention in the drinking water treatment. 2,3 Other advantages of ozone in water treatment include enhancement in coagulation, settling and filtration. 4 In the ozonation process, overdosage is not economical and can also result in unwanted health problems due to high levels of DBP (disinfection byproducts). 5,6 On the contrary, insufficient dosage cannot guarantee to remove water matrix compounds and thus conduct unreliable disinfection. 7 Therefore, it is vital to optimize the ozone dosage for the sake of effective treatment of the drinking water. In general, there are two dosage control methods for ozonation process. 4,8,9 The easy strategy is a constant ozone dosage method. Compared with it, keeping dissolved ozone residual constant is a more extensively-used and effective control scheme, [10][11][12] in which operators attempt to keep the dissolved ozone residual at the setpoint by manually controlling the ozone dosage. However, changes in the water flow rate and water quality (turbidity and COD) also largely influence the dissolved ozone residual. 13,14 In the practical production, the raw water quality and the water flow rate constantly vary and it is usually difficult to model these changes with a precise mathematical model. 15,16 In addition, the ozonation process contains complex physical and chemical reactions. 13 As a result, some unwanted features, such as long time delay and nonlinearity 17 as well as multiple sources of disturbances and uncertainties, exist in the ozone dosage control system. 4,18 It is rather challenging to control the dissolved ozone residual constant under the unpredictable and always variable water quality and flow rate.
In order to control the dissolved ozone residual constant, an extensively used method is to construct a feedback control system 19,20 using programmable logic controller (PLC), ozone generator and ozone concentration analyzers. 4,21 Apart from conventional PID control algorithm, 11,12 plenty of advanced control strategies have been put forward and employed, such as, internal model control, 22 neural network, 23,24 fuzzy logic algorithm, 25,26 model predictive control, 21,27,28 etc. Among these algorithms, MPC algorithm has been attracting a great amount of attention and extensively applied to a variety of industrial processes. [29][30][31] Since the control output of the MPC method is based on the deviation between the setpoint and predicted value of the process output instead of the current value as in the PID method, the MPC method is capable of handling those systems with long time delays. 29 However, it should be highlighted that the aforementioned advanced control methods attenuate disturbances merely using the feedback control without directly utilizing controller design to deal with the disturbances.
It has been widely recognized that a crucial task of dosage control in ozonation process is to attenuate multiple external disturbances and enhance robustness performance in the presence of some uncertainties. In the constant dissolved ozone residual control system, there exist both external and internal disturbances. The former mainly include large variances in water flow rate and raw water quality (COD, turbidity and temperature), while the latter are usually generated from model mismatches. Given the disturbances in the ozonation process are difficult to be measured or forecasted, a disturbance observer (DO) is introduced as feedforward compensation to improve the control performance. DO can effectively estimate the slow-varing disturbances and take full advantage of the system dynamic model. It has been extensively employed in various practical systems, including flight control system, 32 mechanical control system 33 and others. [34][35][36][37][38][39] Based on the pilot-plant facilities of ozonation process in Suzhou xiangcheng water plant of China, this work put forward a DO-MPC method to enhance the disturbance attenuation performance of the ozonation process. More specifically, the proposed scheme leverages MPC and DO for feedback regulation and feedforward compensation respectively such that both advantages of MPC and DO are combined for ozonation dosage control. The organization of the paper is as follows. In section 2, the ozonation process is introduced and the MPC method is briefly reviewed. In section 3, the DO-MPC control scheme is put forward for dosage control, followed by a thorough analysis and discussion of disturbance attenuation performances in section 4. Finally, the conclusions are presented.

Description of ozonation process
In the Xiangcheng water treatment plant, the ozonation process comprises preozonation step and postozonation step. The former step is aiming at improving the flocculation performance along with removing taste and color, whilst the latter step entails the disinfection and oxidation of micropollutants and organic matter, which thus directly influence the treated water quality. Therefore, this work focuses on the dosage control of postozonation step. As shown in Figure 1, a simplified ozonation control system consists of PLC controller, ozone generator, ozone contractor, ozone destruction, temperature meter and COD meter in raw water, dissolved ozone concentration analyzer and so on. To be specific, the PLC controller gathers real-time temperature and COD of raw water by meters, respectively. Meanwhile, the dissolved ozone residual can be measured by the dissolved ozone concentration analyzer. Then the PLC delivers the control signal to ozone generator for producing and determining the amount of ozone dosage.
In the postozonation process, the ozone contactor consists of six cells, which are separated by the five baffles. In cell 1, 3, 5, the ozone and oxygen mixed gas is injected into water using the fine bubble diffusers. Moreover, a three-level serial dosing style at the ratio of 2:1:1 is employed to enhance the dosage efficiency and decrease the formation of bromate byproduct. In order to test the dissolved ozone residual, three dissolved ozone concentration analyzer are installed. The water in the three monitoring points (in P1, P2, P3) is sampled by sampling pipes and measured by the ozone probes of the analyzer. The measuring data in point P3 is deemed approximately as the dissolved ozone residual of the outlet owing to the milder fluctuation. The ozone destruction device can be used to convert nondissolved ozone residual to oxygen. In the ozonation system, the dissolved ozone residual is controlled at an expected setpoint by adjusting the ozone dosage. Larger or smaller dissolved ozone residual than the setpoint will adversely influence the treated water quality or degrade the production efficiency. Nevertheless, there always exist strong external disturbances, such as variances in raw water quality (the COD, temperature value 4 ) and water flow rate. The water flow rate can change sharply when sludge discharge or backwash occur. The raw water quality (such as the COD, temperature) is dynamically varied with the season, weather, process operational conditions and time. 14 In particular, it will change dramatically when an unusual condition, for example, a heavy rain, happens. In addition, the ozonation process is a nonlinear process with long time delay. Thus, keeping the dissolved ozone residual constant is an important and rather challenging task in the ozonation process.
To sum up, in the ozonation process, the controlled variable is the dissolved ozone residual y (mg/L) and it will be maintained at a required setpoint (the target range is 0.2-0.45 mg/L). The ozone dosage x (mg/L), regulated by the PLC output, is the operating variable. It is noted that changes in flow rate d f and water quality (mainly the COD value d c ) are treated as external disturbances in this system.

Composite method based on MPC and DO
To sum up, in the ozonation process, the controlled variable is the dissolved ozone residual y (mg/L) and it will be maintained at a required setpoint (the target range is 0.2-0.45 mg/L). The ozone dosage x (mg/L), regulated by the PLC output, is the operating variable. It is noted that changes in flow rate d f and water quality (mainly the COD value d c ) are treated as external disturbances in this system.
In this section, a compound control method combining the MPC feedback controller and a disturbance observer is put forward to control the dissolved ozone residual in the ozonation process. More specifically, DO is employed to estimate and attenuate the undesired perturbation.
The ozonation process is typical and extensively used. In this process, the dissolved ozone residual is controlled by regulating the ozone dosage. It is well known that the ozonation process contains some chemical and physical reactions. In Refs. 21,26,31 this dynamic is modeled using a first order system plus time delay form. This model is extensively applied for characterizing the dynamics of various industrial processes. The nonlinear parts in the model can be treated as the internal disturbances (unmodeled dynamics). 32 In addition, the bandwidth of the dissolved ozone concentration analyzer satisfies the control system requirement, and its transfer function is approximately denoted using a proportional cycle.
As a result, the total transfer function of the constant dissolved ozone residual system in the ozonation process is formulated as Where K p denotes process gain. T p and u p represent time constant and time delay, respectively. The system output can be represented by the following equation where G OP s ð Þ = g s ð Þe Àus ; ð3Þ In equations (2)-(4), Y s ð Þ and X s ð Þ denote the controlled and operating variables, respectively.
ð Þ is the model of the ozonation process channel with the minimumphase part being g s ð Þ. G di s ð Þ is the ith disturbance channel model. G np s ð Þ is the nominal process model including the dead-time part e Àu np s and minimum phase part g np s ð Þ.
Model predictive control For the system (equation (5)), the process dynamic can be formulated as T l ð Þ in equation (6) denotes the dynamic matrix, which is generated from the coefficients of unit step response. x t ð Þ represents the operating variable and Considering the prediction correction term, the output predictionỹ t + m ð Þof the mth step forward can be calculated from equation (6) as where z t ð Þ denotes the prediction correction term, z t ð Þ=ỹ t ð ÞÀy t ð Þ. The term Dx t + m À l ð Þl = 1, Á Á Á , m ð Þ represents the future moves of operating variable. It can be got by solving the following optimization function In equation (9), e t + b ð Þimplies the prediction error while r t + b ð Þ is the set reference curve; CN and P denote the control and prediction horizon respectively. M e denotes the error weight matrix, while M i represents the input weight matrix. Here just the first move is utilized. The step will be repeated from the following sampling instance.
It is noted that the parameters including sampling time, prediction and control horizon exert a great influence on the robustness and stability performance of MPC algorithm. The dimension of the involved MPC matrix is determined by the prediction horizon (P). Compared with the prediction horizon (P), the control horizon (CN) is often taken as a shorter value. The sampling time (T s ) should be large enough for real-time implementation, while it should be sufficiently small for capturing the system dynamics. The detailed guidelines for MPC parameters adjustment can be found in Maciejowski. 29

DO-based MPC method
In this section, a disturbance observer is added to construct a composite control method for enhancing the performance of the MPC feedback controller. It estimates disturbances by filtering the differences between control input value and the calculated input value via the inverse of nominal plant. Figure 2 presents the block scheme of the proposed composite control method.
In this figure, r s ð Þ represents the setting curve of controlled variable.D de s ð Þ denotes the disturbance estimation. M s ð Þ is the MPC controller output. Since the inverse of the dead-time part e Àu np s cannot be physically realized, the nominal model G np s ð Þ is divided into the dead time part e Àu np s and the minimum phase part g np s ð Þ.
It can be seen from equations (10)-(12) that the selection of filter L s ð Þ plays a critical role for the disturbance rejection performance. Firstly, moreover, its relative degree should be greater than or equal to that of the nominal plant G np s ð Þ such that L s ð Þg À1 np s ð Þ is feasible in implementation. Moreover, when L(s) is designed as a low-pass filter enjoying unit steady-state gain (lim w!0 L jw ð Þ= 1), lim w!0 G dis jw ð Þ= 0 can be obtained, which implies that the actual low-frequency disturbances can be suppressed asymptotically. To this end, L s ð Þ is designed as Next, the robustness analysis is conducted. From Substituting equation (14) and X s ð Þ = M s ð ÞÀ D de s ð Þ, yieldsD Then the error between the real lumped disturbance and its compensation termD err s ð Þ is calculated as In this case, when the steady-state gain of L s ð Þ is 1, it is obvious thatD err ' ð Þ = 0 holds. This implies that the disturbances will be suppressed asymptotically. A small filter parameter h will be employed, which can bring a better transient dynamics in estimation and a smaller static disturbance estimation error. 40 Moreover, DO is not difficult to implement and the computational cost will not increase significantly due to the introduction of DO. Accordingly, it is effective and practical for the modified disturbance observer to handle the process with time delay.
Remarks: The proposed DO-MPC method enjoys some promising characteristics such as the separation principle for the ease of control design. This implies that two control loops can be designed separately. To be specific, the outer baseline MPC controller loop solves nominal performance requirements, whilst the inner disturbance observer loop suppresses uncertainties and suppresses disturbances.

Control implementation
In the constant dissolved ozone residual control system, the dissolved ozone residual y(mg/L) is the controlled variable. The ozone dosage x (mg/L) is the manipulated variable. The main external disturbances are the changes of COD value d c and flow rate d f . Figure 3 presents the structure of control system.
It is clearly shown in Figure 3 that the ozone dosage (system input) directly influences the dissolved ozone residual (system output). The transfer function can be developed based on the dosage step response in the pilot-plant facilities. 4 In this work, the set point of the dissolved ozone residual is 0.3 mg/L. The external disturbances affect the ozonation process via disturbance channels. In the ozonation process, the flow rate and water COD have a great impact on the dissolved ozone residual. For instance, ozone dosage under the decreased water COD or increased flow rate will lead to an increased dissolved ozone residual, and these disturbance dynamics are also modeled using a first-order system with time delay form Wang and Zhou. 21 The disturbance channel models G dc s ð Þ and G df s ð Þ can also be got as follows by step response tests. It is noted that accurate disturbance models are not required in the DO method. Here the time constants are seconds. G dc s ð Þ and G df s ð Þ encode the disturbance channel models of COD value and flow rate, respectively. Here not real physical unit but relative variation form is employed to express the disturbances. For example, dc = 10% means water COD value increases by 10%.
In addition, the filter of DO in this work is utilized as Here, the parameters of MPC controller are adopted as

Performance comparisons
Extensive evaluations are carried out to illustrate the advantages of the proposed method in this section. The baseline MPC is utilized in our comparative studies. In addition, the disturbance attenuation responses are explored in both the nominal and the model mismatch cases. Generally, the water COD value and flow rate fluctuate continuously in the ozonation process. Consequently, both step disturbances and sinusoidal disturbances are evaluated.
Step disturbances Assuming that: at t = 20 min the water flow rate increases by 20%; at t = 50 min the water COD value increases by 20%.
Nominal case. The nominal case is taken into account firstly, in which G np s ð Þ = G OP s ð Þ holds. Figure 4(a) presents the response curves of the dissolved ozone residual under the proposed DO-MPC and baseline MPC methods. It can be seen that the MPC controller parameters are suitable from the setpoint tracking part of curves. The external disturbance effects on the dissolved ozone residual and the estimations are provided in Figure 4(b). According to Figure  4(a), the proposed method outperforms the baseline MPC method. In contrast to the MPC method, the proposed method has a smaller amplitude of overshoot and higher rate of convergence. It is clearly observed from Figure 4(b) that the external disturbance effects can be effectively estimated by the proposed method and the estimation error is very small.
Furthermore, quantitative analysis for the disturbance suppression is made in Table 1. Peak overshoot and integral of absolute error (IAE) are exploited as the performance indices.
From Table 1, compared with the MPC method, the proposed method enables considerably decreasing both the IAE value and the overshoot amplitude.
Model mismatch case. In the practical system, in addition to the external disturbances, internal model mismatch disturbances are also known as crucial factors to influence the control performance. In section 3, it suggests that both external disturbances and internal disturbances resulting from model mismatches can be effectively attenuated by the proposed method. The lumped disturbance attenuation performance is demonstrated in this section.
Suppose the process channel model is formulated as follows Comparing (23) with (24), there exists severe model mismatch. In this mismatch case, the performances of the two competing methods are demonstrated in Figure  5(a), whilst the estimation of lumped disturbance effects is shown in Figure 5(b). In Figure 5(a), our method beats MPC by achieving smaller amplitude of overshoot as well as higher rate of convergence. Therefore, the proposed method leads to much better step disturbance attenuation even in the severe model mismatch case. In addition, our method reports small estimation error of lumped disturbance effects as observed from Figure 5(b).

Sinusoidal external disturbances
Assuming that: variations of the water COD value and water flow rate are sinusoidal, that is, d c = Csin wt ð Þ, d f = Fsin wt ð Þ, here C = 20%, F = 20%, w=0.3 rad/sec.
Nominal case. In Figure 6(a), it depicts the dissolved ozone residual response curves under the proposed DO-MPC and MPC methods. Figure 6(b) presents the estimation error of the disturbance effects in this case. In Figure 6(a), it can be inferred that the proposed method possesses much smaller fluctuation amplitude of the dissolved ozone residual than the MPC method. Moreover, from Figure 6(b), the real and the estimated disturbance effects almost coincide. As a consequence, compared with the baseline MPC method, the proposed method also reveals superiority in dealing with the sinusoidal external disturbances.
Model mismatch case. The dissolved ozone residual response curves and the estimation error of the lumped disturbance effects are respectively shown in Figure  7     method achieves much smaller fluctuation amplitude of the dissolved ozone residual against the baseline MPC approach, even having the analogous fluctuation frequencies. Meanwhile, Figure 7(b) indicates small estimation error of disturbance effects can be obtained by the proposed method. In summary, the above evaluation results suggest that compared with the baseline MPC method, the proposed composite method exhibits considerable advantages in suppressing the lumped disturbances including both external disturbances and internal model mismatch disturbances.

Conclusions
For the sake of optimal control of the dissolved ozone residual in the ozonation process, various disturbances bring about undesirable impacts. Conventional methods exemplified by MPC method cannot achieve satisfactory performance when encountering strong disturbances. In this work, a composite approach, which simultaneously incorporates DO and MPC, is proposed to enhance the disturbance attenuation performance. The evaluation results show that the proposed compound method can achieve shorter regulation time and smaller amplitude of overshoot than the MPC method in the presence of external disturbances and internal model mismatch disturbances, which dramatically demonstrates the superiority of the proposed method.

Authors' Note
Dan Niu, Xiaojun Wang, Xisong Chen, Jun Yang are also affiliated with Key Laboratory of Measurement and Control of CSE, Ministry of Education.

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.