1. Introduction
WWTPs are vital infrastructure for converting wastewater from urban and industrial areas into safe effluent for discharge. They play an essential role in protecting the environment, public health, and socio-economic development. Effective control of WWTPs is essential to ensure their efficient and reliable operation. However, due to the use of different benchmark models in previous studies, it is difficult to evaluate and compare the performance of these control strategies. To address this issue, J. Alex et al. proposed the benchmark simulation model no. 1 (BSM1) [
1] to simulate WWTPs, which has been widely used in many subsequent studies. In [
2], linear quadratic dynamic matrix control was applied to the BSM1 with the addition of a feedforward action to improve performance in the presence of disturbances. In [
3], a tracking MPC scheme was applied and compared with the method proposed in [
2], and the results showed that the MPC control strategy performed better. Similarly, in [
4], a comparison was made between MPC and the proportional integral derivative (PID) controller, and a similar conclusion was drawn. In [
5], the application of economic MPC (EMPC) to WWTPs resulted in improved performance. However, since implementing MPC (EMPC) for the BSM1 requires online construction and the solving of large-scale optimization problems, it often needs significant computation time. Therefore, the aim of this study was to reduce the computational burden without compromising performance. There are various approaches to reduce the computational complexity of MPC (EMPC) for WWTPs. These include using distributed design [
6], model reduction [
7,
8], and variable-horizon MPC, as proposed in [
9]. In this work, we also consider event-triggered control (ETC) [
10]. The proposed approach can be combined with these approaches to further reduce the computational complexity.
In recent years, ETC has gained more attention due to its ability to achieve high-performance control while minimizing communication and computation overhead. The sampling time in networked control systems is determined by the occurrence of events rather than the passage of time. The impact of this idea was analyzed in [
11]. It was pointed out that a communication network connects system components, such as sensors, controllers and actuators, and that the event-triggered approach can also save communication costs significantly in a networked control system, as shown in [
12,
13]. One of the challenges in ETC-based control is the design of triggering conditions. Tabuaba [
14] defined a trigger condition for nonlinear systems to ensure input-state stability (ISS). This is necessary because non-periodic control event intervals may lead to error accumulation. In [
15], event-triggered strategies for control of discrete-time systems were proposed and analyzed. The control law is updated once the control target violates the triggering condition involving the measurement error norm. This also means that, when the trigger condition is not satisfied, the controller will maintain the previous control action, thereby reducing the computational load. Eqtami extended this approach to a distributed model predictive control model in [
16]. In [
17], for continuous-time nonlinear systems, an event-triggering logic was defined by using the error between the optimal prediction and system state measurement, and it was proved that, if the design of the prediction horizon is reasonable and the disturbance is small enough, the feasibility of the event-triggered MPC algorithm can be guaranteed. In [
18], an event-triggered PID controller was proposed specifically for WWTPs; adjustable auxiliary variables were introduced, and the deviation between the tracking error and auxiliary variable was used to design the trigger logic. More recently, the authors of [
19] designed a triggering logic using the output error and predicted horizon. While successful in reducing computation, the results presented did not consider the most important factor; i.e., effluent quality indicators. In [
20], Boruah N. employed the threshold range and first derivative of the controlled variable to develop an event-triggered tracking MPC that is well suited for practical applications. However, the paper did not provide a method for determining the appropriate threshold value to use. Therefore, the operator might induce hazardous outcomes as a consequence of excessively large threshold settings. Additionally, even when employing a minute threshold setting under nominal conditions, the resulting control pattern could continually oscillate between triggering and non-triggering, introducing significant uncertainty in effluent quality performance.
In this paper, effluent quality is further integrated into the design of the event-triggered logic and evaluated using a receding horizon approach. This integration empowers the model predictive controller to proactively determine whether to engage in solving the optimization problem, as driven by performance metrics. The primary goal is to mitigate the computational burden on the controller while safeguarding the effluent quality performance from significant compromise. This method effectively sidesteps the limitations inherent in single-threshold logic, particularly the uncertainty resulting from the oscillating pattern of meeting trigger conditions and subsequently failing to meet them. Moreover, effluent quality-aware event-triggered control ensures robust effluent quality protection, even when operating within relaxed threshold settings. Through simulation, our results indicated a significant average reduction of 25.9% in computational workload under threshold settings with moderately relaxed tracking outputs. This reduction was achieved without compromising the continuous operation of the controller with poorer performance, ensuring optimal setpoint tracking during this period. Additionally, when adopting narrower threshold settings, we observed a minor decrease in trigger occurrences while maintaining effluent quality performance comparable to traditional MPC.
This paper is organized as follows:
Section 2 provides a brief description of the BSM1 and outlines the performance evaluation criteria.
Section 3 presents a brief description of the control system structure and a scheme is provided. Subsequently, the design of an event-triggered model predictive controller is described, which includes the triggered logic and implementation algorithm.
Section 4 presents simulation results for three different types of weather and demonstrates the effectiveness of the algorithm. Finally,
Section 5 summarizes the conclusions of this paper and suggests ideas for future research.
3. Effluent Quality-Aware Event-Triggered MPC
3.1. Brief Introduction
As numerical optimization techniques and the computing capabilities of computers continue to advance, MPC is gradually maturing. In MPC, control actions are obtained by online solving of a finite-time optimal control problem at each sampling instant, where the initial state is the current state of the plant. Optimization yields a finite control sequence, with the first control action applied to the plants. Thus, MPC differs from traditional control, where control laws are pre-computed. MPC implements an implicit control policy. The construction of an MPC problem typically involves these main components: (a) a mathematical model for predicting the system’s evolution over a certain time horizon; (b) mapping the system’s trajectory within the prediction horizon to a real-valued cost function, where real numbers represent performance evaluations, such as tracking performance or economic performance; (c) consideration of constraints on system states, control inputs, and other relevant factors; (d) a receding horizon implementation.
As previously mentioned, the implementation of MPC involves building and solving optimization problems online, as well as selecting appropriate control and prediction horizons. However, this process can be time-consuming and challenging, even when the existence of a solution is guaranteed, especially for large-scale models such as BSM1. In this work, we propose event-triggered MPC to reduce computational complexity in WWTPs. The structure consists of the WWTP system, model predictive controller, and event-triggered logic, along with the actuator. The event-triggered logic is designed based on the deviation of the output variables from the setpoints and the effluent quality performance. The structure diagram of the event-triggered control system is shown in
Figure 2.
At each sampling time , the event-triggered logic is evaluated to determine if it is satisfied. If the logic is satisfied, the model predictive controller can calculate the optimal control action for the current time and send it to the actuator. If the logic is not satisfied, the model predictive controller cannot obtain the optimal solution at the current sampling time. In this case, the actuator maintains the control action from the previous time when the triggered condition was satisfied.
3.2. Design of Effluent Quality-Aware Event-Triggered Logic
At the initial sampling time
, the MPC strategy is implemented to initialize the system. At subsequent sampling times
, the need for control action updates is determined based on trigger conditions. The evaluation of trigger conditions mainly involves two aspects. Firstly, the tracking performance of the outputs with respect to the optimal setpoints is considered. If the outputs’ error relative to the optimal setpoints exceeds a predefined maximum allowable deviation, the triggered logic is satisfied. The model predictive controller calculates the optimal control action to drive the output state towards the allowable state set. The expression is as follows:
The first triggered logic is satisfied when . Here, represents the maximum allowable tracking error. The value of is often determined based on experience. If it is set too small, it may result in a less significant improvement in computation. On the other hand, if it is set too large, it may result in poor performance. In other words, relying solely on threshold values for logical judgments is not reliable. Therefore, the second aspect is considered, which incorporates effluent quality into the logic design. By intuitively setting the desired effluent quality, performance can be ensured. This allows for further analysis of whether control action updates are necessary, even with an unreasonable setting.
Instead of comparing the actual effluent quality with the desired quality at each sampling time step, it is preferable to detect changes in effluent quality earlier in order to make judgments sooner. Therefore, this paper combines effluent quality evaluation with MPC receding horizon optimization. This method can detect deviations from the desired effluent quality over a certain period of time. At sampling time
, if the MPC has satisfied the trigger condition at time
, the optimal control sequence
is solved for
, as well as the corresponding state sequence
for
. Additionally, the optimal effluent quality sequence
is obtained based on Equation (
20). The triggered logic is defined based on the cumulative error between the N optimal effluent qualities and the desired qualities. The expression is as follows:
here,
represents the maximum allowable effluent quality deviation within the horizon. If the trigger logic is not satisfied at time
, the MPC does not take action and, thus, the sequence information cannot be obtained. In this case,
. The effluent quality deviation is evaluated based on the average value of the maximum allowable deviation within the horizon. When
, the second trigger condition is satisfied. If both trigger conditions are met simultaneously, the event triggers the model predictive controller to calculate the optimal control action. Otherwise, the previous optimal control action is maintained until the triggered logic is satisfied.
3.3. Design of Event-Triggered MPC and Algorithm
Whether to perform new calculations for the MPC depends on the satisfaction of the triggered logic; specifically, the evaluation of whether
and
are greater than zero. If this condition is met, the MPC acquires the latest state updates at the current sampling instance. Event-triggered MPC employs a conventional dual-layer control structure. In this structure, the upper real-time optimization (RTO) layer is responsible for executing steady-state economic optimization to ascertain the optimal setpoint. This setpoint is then transmitted to the lower-layer MPC, where nonlinear output feedback tracking MPC is implemented to track the optimal setpoint from the RTO layer. The MPC problem can be formulated at sampling time
as shown below:
where
and
denote the prediction and control horizon, respectively;
represents the setpoints; and
represents the change in control action.
Q and
R are weighting matrices that determine the importance of the process states and control inputs throughout the horizon. A larger weight on
Q favors sacrificing control effort to ensure state tracking, while a larger weight on
R places greater emphasis on control changes. Equation (28a) represents the cost function of the MPC optimization problem. Equations (28b) and (28c) describe the plant model, where
represents the predicted state trajectory of the system for the input trajectory calculated by the MPC optimization problem and
is defined in Equation (
18). In this study, it is assumed that there is no model error or measurement disturbance, which means that the predicted value
is equal to the measured value
. Equation (28d) denotes the initial condition at time
. Equations (28e) and (28f) represent output constraints and physical constraints for safety reasons, respectively. After solving for the optimal control sequence
at time
, the first item
is applied to the system. The symbol * denotes the optimal solution. At the next sampling time that satisfies the triggering logic, the model predictive controller updates the initial state and repeats the process until the end time is reached. Algorithm 1 summarizes the proposed event-triggered MPC implementation strategy.
Algorithm 1: Effluent quality-aware event-triggered algorithm |
- 1
k = 0, get ; then; - 2
solve problem (28); get ; and ; then; - 3
for k = 1 to [sampling end time] do: - 4
if or notrigger_times = N: - 5
solve problem (28); - 6
trigger logic = 1; get ; ; - 7
= ; then; - 8
calculate effluent quality sequence ; - 9
notrigger_times = 0; - 10
else: - 11
trigger logic = 0; - 12
; - 13
get ;; - 14
notrigger_times+=1; - 15
end - 16
end
|
Remark 1. As can be seen from Equations (28b) and (28c), we have not taken into account the influence of the model error. In this paper, we emphasize an event-triggered approach for WWTPs that aims to conserve computational resources without compromising performance. For addressing the model error, please see reference [24]. 4. Simulation Results
In this section, we evaluate the performance of the effluent quality-aware event-triggered MPC strategy under three different weather conditions: dry, rainy, and stormy. We compare the results obtained with the event-triggered MPC with those obtained with a PI controller and the traditional MPC strategy. Additionally, we investigate the effectiveness of effluent quality-aware event-triggered control.
4.1. Simulation Settings
4.1.1. Relevant Plant Simulation Settings
The influent data used in this study were obtained from the International Water Association (IWA) website and cover a period of 14 days with a sampling time interval of 15 min. The weather data for the first 7 days remain consistent, while the data for the following days reflect the corresponding weather conditions. Therefore, in the evaluation of the results,
d,
d, and
d. The initial conditions for the five bioreactors are shown in
Table 2, and the initial conditions for the secondary settler are shown in
Table 3.
4.1.2. Relevant Control Settings
In the MPC simulation, both the control horizon and prediction horizon were set to 8; i.e.,
. The setpoints for the outputs were defined as
gN/m
and
g(−COD)/m
. The maximum allowable deviation for the tracking variables, denoted as
, was set to [0.5,0.5]. The desired effluent quality under the three weather conditions was set to
kg.poll.units.day
. The maximum allowable cumulative deviation for the effluent quality within the horizon, denoted
, was set to 10
kg.poll.units.day
. The weight matrices in Equation (28a) were defined as follows:
The input constraints were defined as follows:
where
18,446 m
/d. In addition, two operating regions were defined for the two outputs:
All simulations were conducted using Casadi with the Ipopt solver. The parameters of the two PI controllers can be found in
Table 4.
4.2. Simulation in Dry Weather
In this simulation, we initially compared the performance of traditional model predictive and PI controllers under dry weather conditions. The upper plots in
Figure 3 and
Figure 4 depict the trajectories of the outputs
and
. The blue solid line represents the traditional model predictive control strategy, while the black dashed line represents the PI control strategy. From the figures, it is evident that the output trajectories under the traditional model predictive controller quickly converged to the setpoints after minor fluctuations, whereas the PI controller exhibited larger oscillations and slower response time. Therefore, the traditional model predictive controller demonstrated superior performance in terms of setpoint tracking compared to the PI controller.
Under the MPC strategy, the relative variation ranges of
and
with respect to their setpoints were
gN/m
and
gN/m
, respectively. However, under the PI controller, the relative variation ranges of the two outputs with respect to their setpoints were
gN/m
and
gN/m
. The lower plots in
Figure 3 and
Figure 4 present the corresponding control input trajectories
and
. The blue dashed lines in the figures represent the upper limits of the control inputs, and it can be observed that all control actions remained within their constraint ranges. This was because MPC inherently addresses the interactions between controlled variables, handles system constraints, and utilizes future behavior trajectories to compute control actions. However, it is important to note that this process may involve unnecessary computational steps, hence the application of the algorithm proposed in
Section 3 to the WWTP.
Under dry weather conditions, the effluent quality-aware event-triggered MPC was implemented in the system. The output and input trajectories under event-triggered control are represented by orange dotted lines in
Figure 3 and
Figure 4. After applying Algorithm 1, the present control action is not optimized when the event-triggered condition is not satisfied. Instead, the optimal control action from the previous triggered time is retained. The optimal control action is only updated and applied when the triggered condition is satisfied at some future time. As a result, the performance in terms of setpoint tracking is not as good as traditional MPC. However, it is important to note that the control of the BSM1 in wastewater treatment differs from trajectory optimization models that primarily focus on parameter tracking. Good tracking performance only reflects the capability of the controller and does not necessarily indicate the overall effectiveness of the control system. Therefore, the main considerations should be the effluent quality (
) and the operational cost index (
). The
result obtained using the proposed event-triggered MPC in this study was 5970.88 kg.poll.units.day
, with an
of 16,386.08. On the other hand, under traditional MPC, the
was 5966.71 kg.poll.units.day
, with an
of 16,382.68. The difference between the two is relatively small, but the event-triggered control reduced the computational effort by 27.06%.
Within a period of 14 days, there were a total of 1345 sampling instances (every 15 min).
Figure 5 presents an evaluation of the triggering events for the last seven days. The y-axis values in the figure represent whether the triggered logic was satisfied. A value of “0” represents no triggering of control actions or update information, while a value of “1” indicates that the controller received new states and recalculated control actions. To provide a clearer view of the simulation results, the triggered events for days 10 to 11 are magnified in the figure. The purple line represents the effluent quality (normalized). From the figure, it can be observed that long periods of continuous triggering often occurred during times when the effluent water quality was relatively poor. This indicates that the controller was able to maintain operation and track the steady-state optimal setpoint even under conditions of poor effluent quality.
Table 5 compiles an overview of the performance exhibited by the three control strategies during dry weather conditions. Additionally, it presents results for
set at 0.01, with these outcomes closely mirroring the performance observed under traditional MPC. Furthermore, the table offers delineations of the limits for the variables
,
,
,
, and
. The simulation results indicated that all these variables were within the corresponding limits specified for wastewater discharge regulations.
4.3. Simulation in Rainy and Stormy Weather
In this section, we evaluated the performance of the three control strategies under rainy and stormy weather conditions. The rainy weather file consisted of one week of dynamic dry weather data followed by long-term rainfall data for the second week. Similarly, the stormy file included one week of dynamic dry weather data followed by the addition of storm event data to the dry weather data for the second week.
Figure 6 and
Figure 7 display the trajectories of the outputs
and
with these three strategies, as well as the corresponding control input trajectories, under the rainy weather condition. Similarly,
Figure 8 and
Figure 9 show the output and control input trajectories of the three control strategies under stormy weather conditions.
Figure 10 and
Figure 11 illustrate the triggering behavior and effluent quality curves under event-triggered MPC for each weather condition. Similar to what was observed under dry weather conditions, continuous triggering occurred when the effluent quality was relatively poor. Under rainy weather conditions, the
with the PI controller was 8339.92 kg.poll.units.day
; with MPC, it was 8108.55 kg.poll.units.day
; and with event-triggered MPC, it was 8108.79 kg.poll.units.day
. Under stormy weather conditions, the
with the PI controller was 7288.69 kg.poll.units.day
; with MPC, it was 7098.53 kg.poll.units.day
; and with event-triggered MPC, it was 7099.11 kg.poll.units.day
. The effluent quality performance under event-triggered MPC was almost the same as that under traditional MPC. However, the triggered times were reduced by 24% and 25.4%, respectively, indicating that this approach can avoid unnecessary computations based on performance indicators.
Table 6 summarizes the performance of the three control strategies under rainy and stormy weather conditions. The table also provides the limits for the variables
,
,
,
, and
. The simulation results indicate that all these variables were within the corresponding limits specified by wastewater discharge regulations. The table additionally presents results for
under two different weather conditions, and these outcomes were largely consistent with the performance achieved under traditional MPC. This observation highlights the efficacy of effluent quality-aware event-triggered control with smaller threshold settings in mitigating the occurrence of the alternating trigger and non-trigger patterns inherent in single-threshold logic. Furthermore, even with larger threshold values, this approach maintains the ability to track optimal setpoints during periods of poorer effluent quality.
4.4. Comparative Experiment
In this section, we compare the event-triggered control algorithm proposed in this paper with the algorithm presented in [
20] under stormy weather conditions. The triggered logic designed in [
20] is defined as follows:
where
represents the maximum allowable deviation of the one-step-ahead predicted output from the desired setpoint. It is also stipulated that the maximum time interval for situations not meeting the triggered logical is
, where
represents the sampling time interval. The event-triggered behavior when applying this triggered logic to a WWTP in stormy weather conditions is depicted in
Figure 12.
From the figure, it is clear that, even during sampling intervals with poor effluent quality, the controller was permitted to remain inactive. While this triggered logic did help reduce computational load, effluent quality performance exhibited uncertainty, which was closely related to the values of and . Finding the appropriate threshold to balance the relationship between computational load and performance may be challenging for operators.
The comparative data for the two different event-triggered logic methods are summarized in
Table 7, where
corresponds to the results obtained using the event-triggered logic from Equation (32) and
corresponds to the results obtained using the event-triggered from Equations (
26) and (
27). It can be observed that the effluent quality achieved using the trigger logic from Equation (32) was 7154.09 kg.poll.units.day
, which was unsatisfactory compared to the effluent quality of 7098.53 kg.poll.units.day
achieved under traditional MPC. However, the effluent quality obtained by applying the trigger logic from Equations (
26) and (
27) was 7099.11 kg.poll.units.day
, aligning with the performance of traditional MPC. Operators can intuitively set the desired effluent quality to strike a balance between computational load and performance. In other words, the event-triggered logic proposed in this paper for WWTPs has the capability to conserve computational resources without compromising performance.
5. Conclusions and Future Work
In this paper, an effluent quality-aware event-triggered model predictive control strategy was proposed for the BSM1 to reduce the computational burden of the controller. Simulation results demonstrated that both the traditional MPC and the event-triggered MPC outperformed the PI control strategy in terms of controlling the wastewater treatment process. However, the event-triggered MPC strategy, which is based on the deviation of effluent quality performance and tracking variables, seeks a balance between computational time and performance requirements. Therefore, it can shorten the computation time while achieving performance comparable to traditional MPC. On average, this algorithm can reduce the computational load by 25.49%, with almost no impact on performance.
For future work, we will consider the problem of model error to enhance the robustness of event-triggered control. The proposed method may also be combined with other schemes to ensure effluent quality and further reduce computational burden. For example, by applying a variable horizon strategy based on the event-triggered control, the horizon can be incorporated into the decision variables of the optimization problem to minimize the single-step computation time. In simple terms, the event-triggered control strategy determines “whether to do”, while the variable horizon control strategy determines “how to do”. Therefore, effluent quality-aware event-triggered control represents a promising approach that can greatly enhance wastewater treatment efficiency.