Next Article in Journal
Robust Closed–Open Loop Iterative Learning Control for MIMO Discrete-Time Linear Systems with Dual-Varying Dynamics and Nonrepetitive Uncertainties
Previous Article in Journal
Integral Formulae and Applications for Compact Riemannian Hypersurfaces in Riemannian and Lorentzian Manifolds Admitting Concircular Vector Fields
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Economic Model Predictive Control for Wastewater Treatment Processes Based on Global Maximum Error POD-TPWL

1
College of Information Engineering, Shenyang University of Chemical Technology, Shenyang 110142, China
2
Department of Chemical & Materials Engineering, University of Alberta, Edmonton, AB T6G 1H9, Canada
*
Author to whom correspondence should be addressed.
Mathematics 2025, 13(10), 1674; https://doi.org/10.3390/math13101674
Submission received: 4 May 2025 / Revised: 18 May 2025 / Accepted: 19 May 2025 / Published: 20 May 2025

Abstract

:
To address the challenge of low computational efficiency in nonlinear Economic Model Predictive Control (EMPC) for large-scale systems such as wastewater treatment plants (WWTPs), this paper proposes a Trajectory Piecewise Linearization (TPWL)-based EMPC framework integrated with global maximum error control (GMEC) and Proper Orthogonal Decomposition (POD). The TPWL method constructs a reduced-order model framework, while GMEC iteratively refines the linearization point selection process. A two-stage strategy is employed: first, coarse selection of candidate linearization points along the original nonlinear model’s state trajectory based on Euclidean distance, followed by refinement to determine optimal points that minimize global approximation errors. Simulation results demonstrate that the proposed method reduces computational time by at least 65% under identical weather conditions while maintaining effluent quality and total cost indices within acceptable thresholds. Compared with conventional TPWL-POD approaches, this framework achieves higher model accuracy and superior EMPC control performance. These advancements underscore the method’s potential for real-time implementation in complex industrial systems, balancing computational efficiency with control precision. Additionally, the framework’s modular design enables integration with existing optimization techniques to further reduce computational complexity without compromising effluent quality compliance.

1. Introduction

The intensification of industrialization and urbanization has exacerbated global water scarcity and pollution, positioning wastewater treatment and water quality optimization as pivotal challenges in environmental sustainability and resource recovery [1]. Internationally, water resource management has gained unprecedented policy emphasis, notably reflected in the United Nations Sustainable Development Goals (SDGs) that mandate urgent actions on clean water accessibility and aquatic ecosystem preservation [2,3].
Conventional control strategies in wastewater treatment, particularly Proportional-Integral-Derivative (PID) control, dominate industrial applications owing to their simplicity and cost-effectiveness for linear systems [4]. However, PID controllers are inherently limited in handling nonlinear dynamics, time-varying disturbances, and high-dimensional processes, often necessitating laborious parameter calibration to mitigate performance deterioration [5]. In contrast, Model Predictive Control (MPC) offers a systematic framework for handling multivariable nonlinear systems through receding horizon optimization, enabling global performance guarantees while explicitly accommodating constraints [6]. These advantages have spurred MPC’s adoption in wastewater treatment plants (WWTPs). For instance, Lin Yonggang et al. [7] applied MPC to optimize multipump station scheduling in sewage systems, effectively reducing complexity and costs. Martin M. et al. [8] implemented MPC in controlling cascaded bioreactors at wastewater treatment plants, achieving satisfactory performance with reduced steady-state errors. Economic Model Predictive Control (EMPC), an advanced variant of MPC, extends these benefits by directly incorporating economic objectives (e.g., energy minimization, operational cost reduction) into the optimization framework [9]. As evidenced by Zeng et al. [10], EMPC surpasses conventional PI and MPC in simultaneously enhancing effluent quality and lowering operational expenses. Nevertheless, deploying EMPC on high-fidelity models such as the Benchmark Simulation Model No. 1 (BSM1) entails solving computationally intensive nonlinear optimization problems at each sampling interval, posing prohibitive online computation demands for real-time implementation. Thus, reducing computation time is crucial for improving efficiency. To address this, scholars have proposed various methods to lower computational complexity. For example, Zhang et al. [11] introduced a distributed EMPC strategy, which enhanced effluent quality and energy efficiency through system-wide model design.
Model order reduction (MOR) techniques provide a systematic pathway to alleviate computational complexity. Among these, Trajectory Piecewise Linearization (TPWL) has emerged as a promising strategy that approximates nonlinear dynamics through locally linearized models along system trajectories [12]. By strategically selecting linearization points, TPWL enables tunable trade-offs between approximation accuracy and computational efficiency, making it particularly suited for real-time control of large-scale systems. For instance, Zhang et al. [13] applied TPWL to EMPC in wastewater treatment plants, demonstrating substantial improvements in computational efficiency through model approximation.
Proper Orthogonal Decomposition (POD), a common dimensionality reduction technique [14,15,16], has also been widely used in model simplification. By reducing the dimensionality of wastewater treatment plants (WWTPs) models and integrating TPWL, further simplification can be achieved.
The global maximum error control (GMEC) method iteratively refines approximate models by identifying and addressing the maximum error points during simulation until error thresholds are met.
Building on these advancements, this paper proposes a reduced-order TPWL-based EMPC framework integrated with GMEC for wastewater treatment plants. First, candidate linearization points are selected from the state trajectory of the original nonlinear model using TPWL. A reduced-order model is then constructed via POD, followed by TPWL simplification. During TPWL, linearization points are dynamically selected from the candidate pool using GMEC to ensure the maximum error of the simplified model meets predefined thresholds. Finally, the simplified model’s performance—including error magnitude, control efficacy, and computation time—is analyzed.
This study introduces a novel EMPC framework combining GMEC, TPWL, and POD (GMEC-POD-TPWL-EMPC), addressing the low computational efficiency of traditional EMPC in nonlinear wastewater treatment models. A two-stage linearization point selection strategy optimizes TPWL efficiency, overcoming the empirical limitations of traditional TPWL highlighted in [12,13]. Furthermore, by integrating POD, this work extends its application from fluid dynamics [14,15,16] to wastewater treatment control, offering new insights for real-time control of large-scale nonlinear systems.
An error feedback-based adaptive model simplification mechanism is developed, dynamically adjusting linearization point distribution via GMEC to balance computational efficiency and control accuracy. Compared with the single-point selection in [13], this paper’s dual-stage strategy combines state trajectory spacing with global error thresholds, minimizing redundant points and validating its applicability in complex industrial scenarios. Using BSM1 as a case study, the method’s effectiveness in high-dimensional nonlinear systems is demonstrated.
Additionally, this approach provides an efficient tool for real-time wastewater control. Experiments show that under controllable performance losses (e.g., effluent quality, energy consumption), the proposed method achieves optimization speeds meeting real-time requirements, outperforming traditional EMPC (e.g., the distributed strategy in [9,11] incurs extra communication costs). It quantifies the relationship between linearization points and computational efficiency, offering theoretical guidance for parameter tuning in industrial settings. Unlike intelligent control methods in [5,6], which rely on high-performance computing, this method reduces EMPC complexity, enabling deployment in resource-limited wastewater treatment plants.

2. Model Description

The wastewater treatment system analyzed in this study employs an enhanced configuration derived from the Benchmark Simulation Model No. 1 (BSM1), with schematic representation and parameter specifications provided in Figure 1 and Table 1, respectively. The system integrates a five-compartment sludge reactor coupled with an ideal secondary clarifier [17]. Biochemical reactions within the reactor are spatially segregated: denitrification is facilitated in the first two anoxic compartments, where nitrate reduction generates nitrogen gas, while nitrification dominates the subsequent three aerobic compartments, enabling ammonia oxidation to nitrate.
Hydraulic inputs to the primary reactor compartment include three distinct streams: (1) raw influent with volumetric flow rate Q 0 and pollutant concentration Z 0 ; (2) internal recirculation flow ( Q a , Z a ) recycled from the terminal aerobic compartment; and (3) external recirculation flow ( Q r , Z r ) extracted from the clarifier underflow. The clarifier partitions the reactor effluent into two streams: purified overflow discharge ( Q e , Z e ) and underflow sludge withdrawal ( Q w , Z w ). A residual flow ( Q f , Z f ) from the final aerobic compartment directly feeds the clarifier. The process dynamics are governed by eight core biochemical reaction mechanisms [18].
The modified BSM1-based wastewater treatment process is mathematically represented by a system of 78 coupled ordinary differential equations (ODEs). Each reactor compartment and the ideal secondary clarifier [19] are governed by 13 interdependent state variables, each associated with a distinct differential equation. These variables, comprehensively detailed in Table 2, encompass critical parameters such as substrate concentrations, biomass dynamics, and dissolved oxygen levels, collectively defining the system’s transient behavior.
For the first biological reaction chamber (k = 1):
d Z 1 d t = 1 V 1 ( Q a Z a + Q 0 Z 0 + Q r Z r + r 1 V 1 Q 1 Z 1 )
Q 1 = Q a + Q r + Q 0
For the second to fifth biological reaction chambers (k = 2, …, 5),
d Z k d t = 1 V k ( Q k 1 Z k 1 + r k V k Q k Z k )
Q k = Q k 1
for which the conversion rate r k of each component is shown in [19]. The special case for the concentration of dissolved oxygen is as follows:
d S O , k d t = 1 V k ( Q k 1 S O , k 1 + r k V k + K L a k V k ( S O S O , k ) Q k S O , k )
Equations (1), (3), and (5) define key parameters governing the biological reactor dynamics: S O , k denotes the dissolved oxygen concentration in the k-th compartment, Z k corresponds to the compound concentration (as specified in Table 2) within the k-th reactor compartment, V k represents compartment volume, r k quantifies the compound-specific reaction rate, s O is the oxygen saturation constant (fixed at 8 g · m 3 ), and K L a k signifies the compartment-specific oxygen transfer coefficient. Notably, K L a 1 and K L a 2 are nullified ( 0 d 1 ) in the anoxic compartments (Compartments 1–2) [19].
The ideal secondary clarifier [17] is modeled as a nonbiological membrane filtration unit. Soluble compounds are assumed fully homogenized within the clarifier, while particulate components undergo complete gravitational settling in its lower section [20].
In this case, the dynamic equation of the separator unit is as follows:
For soluble compounds:
d Z k d t = 1 V k ( Q f Z f + Q e Z e + Q r Z r + Q w Z w )
Z e = Z r = Z w = Z k
Z f = Z k 1 = Z k
For solid compounds:
d Z k d t = 1 V k ( Q f Z f + Q r Z r + Q w Z w )
Z r = Z w = Z k
Z f = Z k 1 = Z k
The following are some concentration and flow relationships in the process:
Z a = Z 5
Q f = Q 5 Q a = Q e + Q r + Q w = Q e + Q u
Z f = Z 5
Z w = Z r
For the WWTP, the modified BSM1 model can be expressed in the following compact form:
x ˙ ( t ) = f x ( t ) , u ( t )
where x R 78 denotes the state vector encapsulating all process variables, and u R 3 corresponds to the input vector comprising both manipulated and exogenous variables. The manipulated inputs include the internal recirculation flow rate Q a and the oxygen transfer coefficient K L a 5 in the fifth bioreactor compartment, whereas the influent flow rate Q 0 is treated as an uncontrolled disturbance.
The economic control indicators for the model are defined as follows:
l e = ω E Q E Q ( t ) + ω O C I O C I ( t )
where E Q ( t ) represents the effluent quality, O C I ( t ) denotes the overall cost index, which encompasses factors significantly affecting operational costs, ω E Q and ω O C I are the weighting coefficients for effluent quality and overall cost index. In this article, EQ ( kg pollution unit · day 1 ) is one of the important performance indicators. It represents the daily average value of the weighted sum of the emission concentrations of chemical substances. The concentrations of these compounds will affect the quality of treated water. EQ index can be described by the following:
EQ = 1 T · 1000 t 0 t f β SS · SS e ( t ) + β COD · COD e ( t ) + β N K j · S N K j , e ( t ) + β N O · S N O , e ( t ) + β BOD · BOD e ( t ) Q e ( t ) d t
where
SS e = 0.75 X S , e + X B A , e + X B H , e + X I , e + X P , e
COD e = S I , e + S S , e + X S , e + X I , e + X B H , e + X B A , e + X P , e
BDO e = 0.25 S S , e + X S , e + 1 f p X B A , e + X B H , e
S N K j , e = S N D , e + S N H , e + X N D , e + i X B X B A , e + X B H , e + i X P X I , e + X P , e
Equation (18) defines key evaluation parameters: t 0 and t f denote the initial and terminal instants of the assessment interval, respectively, with T = t f t 0 representing the evaluation duration (typically T = 7 days ). The effluent quality index (EQ) incorporates constituent concentrations—suspended solids ( S S ), chemical oxygen demand ( C O D ), biological oxygen demand ( B O D ), and Kjeldahl nitrogen ( S NKj )—weighted by coefficients β SS = 2 , β COD = 1 , β N K j = 30 , β N O = 10 , and β BOD = 2 . Stoichiometric parameters f p = 0.08 , i X B = 0.08 , and i X P = 0.06 [21] further refine the model, where subscript e designates the secondary clarifier effluent.
Operational cost optimization is critical for ensuring the economic sustainability of wastewater treatment. The total operating cost, influenced by multiple factors (summarized in Table 3), necessitates systematic control strategies to balance process efficiency and financial expenditures.
The sludge production rate, defined as the daily average mass of particulate solids generated during the operational evaluation period T, comprises two components: (1) particulate discharge via the secondary clarifier’s wastage flow Q w and (2) accumulated solids retained within the treatment facility. This metric is mathematically expressed as
SP = 0.75 T · 1000 t 0 t f X S , w ( t ) + X I , w ( t ) + X B A , w ( t ) + X B H , w ( t ) + X P , w ( t ) Q w ( t ) d t + 1 T · 1000 SS ( t f ) SS ( t 0 )
where subscript w designates the wastage outlet of the secondary clarifier.
Aeration energy consumption (AE) is influenced by multiple operational and design parameters, including wastewater characteristics, microbial metabolic activity, sludge settling properties, aeration system efficiency, environmental conditions, process configuration, and advanced control strategies. AE is quantified using oxygen transfer rates ( K L a i , i = 1 , , 5 ) under a standardized immersion depth of 4 m, as defined by
AE = S o s a t T · 1800 t 0 t f i = 1 5 V i · K L a i ( t ) d t
where V i represents the volume of the i-th reactor compartment ( i = 1 , , 5 ), K L a i denotes the compartment-specific oxygen transfer coefficient, and S O sat is the oxygen saturation concentration (fixed at 8 g / m 3 ).
In the whole sewage treatment process, pumping energy is related to hydraulic characteristics, pumping equipment performance, sewage physical characteristics, process design, and operation strategy. Here, the energy consumed by the pump for internal circulation Q a and external circulation Q r is mainly considered, and its mathematical description is as follows:
PE = 1 T t 0 t f 0.004 Q a ( t ) + 0.05 Q w ( t ) + 0 , 008 Q r ( t ) d t
The mixing energy refers to the energy consumed by mixing compounds in an anoxic chamber to avoid precipitation. The calculation of me depends on the volume of each reaction chamber and the oxygen transfer rate. As shown in (26), it is positively correlated with the volume of the reaction chamber. Its mathematical expression is as follows:
ME = 24 T t 0 t f i = 1 5 0.005 · V i d t
The overall cost index (OCI) approximates the total cost for WWTP operation by taking a weighted summation of the listed major factors as follows:
OCI = 5 · SP + AE + PE + ME

3. Preliminary Selection of TPWL Linearization Points and Construction of Reduced-Order Models

3.1. TPWL Method

The fundamental principle of the Trajectory Piecewise Linearization (TPWL) method [22] is to approximate a nonlinear model through piecewise linearization at multiple selected linearization points, thereby overcoming the limitations of single-point linearization. TPWL’s trajectory-adaptive linearization fundamentally differs from other model order reduction methods. Key procedural stages of the TPWL method include the selection of linearization points [23], the approximation of nonlinear functions, the construction of weighting functions, and weighted summation.
For the nonlinear model:
d x ( t ) d t = f ( x ( t ) ) + B u ( t ) y ( t ) = C x ( t )
where x ( t ) R n is the state vector of the system at time t, f(x) is a nonlinear function, B R n × p is the input matrix, u ( t ) R p is the control input, C R n × q is the output matrix, and y ( t ) R q is the output corresponding.
When the TPWL method is used to generate its approximate model, the original model is simulated with the given input U (T) in the time interval [ t 0 , t e ], the state trajectory is obtained, and the vector ( x 0 ,…, x n ) on the state trajectory is obtained; Then, according to certain rules, several state vectors are selected as linearization points ( x 0 l i n ,…, x s 1 l i n ), where s is the number of linearization points. Then, the original nonlinear model is linearized at each linearization point to obtain a set of linearized models, such as
d x ( t ) d t = f x i l i n + A i x x i l i n + B u ( t ) y ( t ) = C T x ( t ) , i = 0 , , s 1
where A i is the Jacobian matrix at the linearization point x i l i n of f(x), and then the weight function ω i ( x ) is constructed. The construction method [24] is as follows:
  • For each linearization point, calculate d i = | | x x i | | 2 , i = 0 , , s 1 ;
  • Calculate m = m i n i = 0 , , s 1 d i ;
  • Calculate ω ^ i = e β d i / m ;
  • Sum all ω ^ i , S ( x ) = i = 0 s 1 ω ^ i ( x ) ;
  • Let ω i ( x ) = ω ^ i ( x ) / S ( x ) .
The weighting function ω i ( x ) is parameterized by the normalized Euclidean distance d i (Equation (30)) and a scaling factor β = 25 , which governs the locality of linearized model dominance. The weighting coefficient ω i ( x ) dynamically adapts as a function of the current state vector x within the state-space domain. When x exhibits geometric proximity to a linearization point x i , the corresponding weight ω i ( x ) asymptotically converges toward unity.
d i = i = 1 n ( x i x i 1 ) 2 n
The obtained linearized models are weighted and summed to obtain the piecewise linearized model:
d x ( t ) d t = i = 0 s 1 ω i ( x ) ( f x i l i n + A i x x i l i n + B u ( t ) ) y ( t ) = C T x ( t ) , i = 0 , , s 1

3.2. Preliminary Linearization Point Selection

The selection of linearization points is the most critical step in the TPWL method. The reasonable selection of linearization points is conducive to the construction of the approximate model. Considering that there are many state vectors on the state trajectory of Equation (16), the key linearization points cannot be directly obtained by one selection, so the strategy of two-point selection is adopted. First, the linearization points are preliminarily selected according to simple rules, and then the follow-up work is carried out to select the final linearization points from the initially selected points.
During primary selection, first select the first point x 0 on the state track as the first primary linearization point, and then calculate the distance between the subsequent linearization points and the previous linearization point. If the distance is greater than the set value d, select it as the primary linearization point until the number of points meeting the requirements or all state vectors are used up. Finally, these points form the primary point set { x 00 l i n , , x 0 k l i n } and record the position information of each point in the state track to form the set { a 0 , , a k } , where k is the number of primary points, d the form of root mean square error (RMSE) is the same as Equation (30),
  • Set the threshold d > 0 and give the input u ( t ) ;
  • Select the initial state as the first candidate linearization point and make N = 1 ;
  • Let t = t 0 + Δ t ;
  • The nonlinear full model Equation (28) is simulated, and the state vector x ( t ) at time t is obtained;
  • For the current state x, calculate:
    δ = x x N 1
  • If δ < d , it indicates that the current state x is close enough to the candidate linearization point just selected, then let t = t + Δ t ;
  • If δ d , select x as the ( N + 1 )-th candidate linearization point, add the point to the primary point set { x 00 l i n , , x 0 k l i n } , record its corresponding position information a, and add the position information to the position information set { a 0 , , a k } ; then, let N = N + 1 and return to step 4;
  • When t t e , the selection is terminated, and the primary point set { x 00 l i n , , x 0 k l i n } and the location information set { a 0 , , a k } are saved.
The coarse selection phase employs a conventional distance-based criterion based on state distance. Its core advantage is that it is efficient in calculation and simple in implementation. It is suitable for the initial dimensionality reduction processing of large-scale nonlinear systems. The purpose is to select the dataset that can roughly represent the characteristics of the original nonlinear model on the state trajectory. Although this method has the risk of discarding a small part of key information and will be affected by the sensitivity of threshold d, it basically retains the data characteristics of the original model, reduces the amount of calculation, and reduces the relatively redundant solution process.
To mitigate potential omission of critical local dynamics and the sensitivity of threshold d while reducing the amount of calculation, we can consider introducing the method of dynamic threshold adjustment to dynamically adjust the threshold d according to the local curvature or gradient of the state trajectory. In addition to this method, we can also consider introducing an energy function, Lyapunov index, and other state points that have a significant impact on the stability of the system, or using reinforcement learning or active learning strategies to dynamically adjust the sampling position according to the current model error feedback. These methods need to be further studied.

3.3. Reduced-Order Model Construction

Proper Orthogonal Decomposition (POD) reduces the dimensionality of high-order models while preserving critical dynamic characteristics [25]. POD employs singular value decomposition (SVD) and is applicable to both linear and nonlinear systems [26].
For Equation (16), under a given input, the state x R n at sampled time instances can be represented as a state matrix X:
X = x ( t 1 ) x ( t 2 ) x ( t 3 ) x ( t N )
where X R n × N is termed the snapshot matrix, n is the number of state variables, and N is the number of sampling intervals ( N n ). Performing SVD on X yields [27]:
X = U Σ V T R n × N
where U R n × n (left singular vectors) and V R N × N (right singular vectors) are orthogonal matrices, and Σ = diag ( σ 1 , , σ n ) R n × N is a diagonal matrix of nonnegative singular values in descending order. Larger σ values indicate greater importance of the corresponding basis vectors in capturing system dynamics [28].
X = U Σ V T U k Σ k V k T , k n
Let x ( t ) U k z ( t ) , where z ( t ) R k . The reduced-order model becomes
z ˙ ( t ) = U k T f U k z ( t ) , u ( t )
where z ( t ) is the approximation of x ( t ) in the low-dimensional subspace spanned by the first k left singular vectors of X. While POD alone does not significantly reduce the evaluation time for EMPC, combining POD with TPWL achieves substantial computational savings.
When the simplified model is constructed by the POD-TPWL method, the projection matrix V is generated by the POD method, in which the snapshot matrix is composed of the initially selected state vector, and then for each local linearized model in Equation (29), projection reduction is performed to obtain the following model:
d z ( t ) d t = f i r + A i r z + B r u ( t ) y ( t ) = C r T z ( t ) , i = 0 , , s 1
where z = V T x , r is the number of columns in V, A i r = V T A i V , f i r = V T f x i lin A i x i lin , B r = V T B , C r = V T C . At this time, the order of each local linearization model has been reduced from n to R, and r n . Then, use the weight function to sum all the models in Equation (37) to obtain the model:
d z ( t ) d t = i = 0 s 1 ω i ( z ) [ f i r + A j r z + B r u ( t ) ] y ( t ) = C r T z ( t )

4. Point Selection Method Based on Global Maximum Error Control Method

Since the computational overhead of the TPWL surrogate model is very small, it will not bring much additional computational overhead to establish a surrogate model by using the selected linearization points and selecting new linearization points by running the surrogate model. The GMEC framework requires co-simulation of the original and surrogate models under identical inputs to quantify trajectory deviations, select the state point with the largest deviation as the new linearization point, update the simplified model, and repeat the process until the maximum deviation is less than the set threshold. At this time, all the linearization points constituting this POD-TPWL model are the final linearization points required. Considering that the state trajectory of the original model contains many state points, the analysis is confined to the initially selected linearization points { x 00 l i n , , x 0 k l i n } , thereby minimizing computational demands while retaining dominant dynamics. In this method, the global maximum error control is measured by RMSE, which is defined as follows:
ε R M S E = i = 1 n ε i 2 n
Taking the nonlinear model given in Equation (28) as an example, the point selection process based on the global maximum error control method is as follows:
  • Set the maximum error threshold α and input U ( t ) ;
  • By simulating the nonlinear model, the state information on all time steps is obtained, and these state vectors { x 0 , , x N } are stored, where N + 1 is the number of state vectors;
  • Select the initial state x 0 as the first linearization point x 0 l i n , and let i = 1;
  • The POD-TPWl method is used to establish a temporary model in the same form as Equation (38);
  • Take the same time step as the nonlinear full model, simulate the model, and obtain the approximate state vector { x ˜ 0 , , x ˜ N } ;
  • In { x ˜ 0 , , x ˜ N } and { x 0 , , x N } , K state points { x ˜ 00 , , x ˜ 0 k } and { x 0 0 , , x 0 k } with position information { a 0 , , a k } are selected, and then the error of these points is calculated:
    e j = | | x ˜ j x j | | R M S E , j = 0 , , k ;
  • Find the state x ˜ 0 that maximizes the error e j so that
    e m a x = m a x e j = e m = | | x ˜ m x m | | R M S E
    Record the maximum error e m a x and the position information of it;
  • If e m a x α , select the (i+1)-th linearization point x i l i n = x m , make i = i + 1 , and return to step 4);
  • If e m a x < α , the cycle ends, and the points in the linearization point set { x 0 l i n , x 1 l i n , , x i 1 l i n } are the final linearization points. The simplified model based on these points is the reduced-order linearization model that meets the requirements. The selection process of linearization points is shown in Figure 2.

5. Design of EMPC Controller Based on Reduced-Order Linearized Model

In the above algorithm, the maximum error control limit a is a parameter that needs to be manually given, and its value is related to the approximate accuracy and scale of the final TPWL surrogate model, so it needs to be set according to the actual application requirements.
Unlike existing methods, the proposed GMEC dynamically incorporates new linearization points through a global maximum error feedback mechanism, iteratively refining the TPWL model to ensure balanced accuracy and efficiency. In addition, the existing linearization point selection algorithms are either based on the geometric distance between the state points, the error estimation between the local linearization reduced order model and the original nonlinear model, or the local approximation effect of the linearization function. Existing approaches primarily focus on local approximation accuracy (e.g., geometric proximity or Jacobian linearization fidelity), whereas the proposed GMEC method explicitly enforces global error bounds through iterative refinement.
EMPC extends the receding horizon optimization framework of MPC by embedding economic objectives (e.g., energy cost minimization, operational profit maximization) directly into the optimal control problem. This dual focus enables EMPC to simultaneously regulate dynamic performance (e.g., tracking accuracy, stability margins) and enhance economic efficiency.
MPC solves a finite-horizon optimal control problem iteratively, leveraging system predictions to compute control actions while explicitly handling constraints. Its defining feature—the receding horizon mechanism—applies only the immediate control input and recomputes the sequence at each sampling instant, thereby achieving closed-loop robustness. Economic optimization aims to minimize (or maximize) economic indicators of the system, such as energy consumption, operational costs, and revenue.
EMPC embeds economic optimization objectives directly into the MPC optimization problem, allowing the controller to consider both dynamic performance (e.g., tracking accuracy, stability) and economic performance (e.g., operating costs, energy efficiency).
The design of the EMPC controller based on the reduced-order linearized model, as described by Equation (38), is formulated as follows:
u ( t | t k ) = min u ( t ) S ( Δ ) t k t k + N l U k z ( t ) , u ( t ) d t
z ˙ ( t ) = i = 0 s 1 ω i ( z ) f i r + A j r z + B r u ( t )
z ( t k ) = V T x ( t k )
u ( t ) U
The EMPC objective function in Equation (42) minimizes the economic cost l e defined in Equation (17), where N denotes the prediction horizon, S ( Δ ) is the set of piecewise-constant control policies with sampling interval Δ , and U encodes input constraints. By solving Equation (42), the optimal control input u ( t t k ) is obtained. The first element of the optimal control sequence is implemented, and the horizon is shifted forward at each sampling instant.

6. Experimental Simulation

6.1. Simulation Parameter Settings

The Trajectory Piecewise Linearization with Proper Orthogonal Decomposition (TPWL-POD) is applied to a wastewater treatment plant (WWTP) model. Based on the given input signals, the reduced-order basis and linearization points of the model are obtained, and the accuracy of the approximated model is compared with that of the original nonlinear model. Considering the influence of weather conditions on the model, this study focuses on evaluating control performance under sunny conditions, including effluent quality, operational costs, and computational efficiency.
The data files for sunny conditions are referenced from the BSM1 benchmark dataset, which is made publicly available by the International Water Association (IWA) [29]. These files contain the influent flow rate Q 0 and influent concentration Z 0 . Under sunny conditions, static simulations of the WWTP are conducted using the average values of Q 0 and Z 0 to determine the optimal steady state, which serves as the initial condition for the wastewater treatment process.
The simulation spans 14 days, with the final 7-day period utilized for performance evaluation. The sampling time is defined as Δ = 15 min.
In the economic control objective function (Equation (17)), the weighting coefficients ω E Q and ω O C I are set to 1 and 0.3, respectively. For all EMPC controller designs, the control horizon is fixed at 25. The constraints on operational inputs in all control designs are as follows:
0 [ m 3 · d 1 ] Q a 5 Q 0 , s t a b [ m 3 · d 1 ]
0 [ d 1 ] K L a 5 240 [ d 1 ]
where Q 0 , stab represents the average influent flow rate under dry weather conditions, which is 18,446 m3 · d−1.
The TPWL-POD framework initially selects 60 candidate linearization points. The reduced-order model (ROM) retains 30 dominant states via singular value truncation. Through preliminary simulations, the global maximum error threshold is set to 9 (RMSE), which balances accuracy and computational efficiency and determines the number of linearization points. A smaller threshold leads to more linearization points being selected. The threshold and reduced-order dimensionality are determined based on a trade-off between model accuracy and computational time. This process requires extensive simulations and empirical analysis.
The model’s accuracy increases as the threshold decreases and the reduced-order dimensionality increases. However, computational time also rises accordingly. Balancing model accuracy and computational efficiency is critical for establishing a reliable model. These parameters were carefully tuned to achieve an optimal compromise.

6.2. Model Validation

For both the original nonlinear model and the reduced-order linearized model, the state data generated under identical input signals during the first week are nearly identical. To illustrate this, this study selects four key state variables from the first reaction chamber for comparison: soluble nonbiodegradable organic matter ( S I ), active heterotrophic bacteria ( X B , H ), active autotrophic bacteria ( X B , A ), and ammonia nitrogen ( S N , H ). Figure 3 compares the temporal evolution of four critical states ( S I , X B , H , X B , A , S N , H ) between the original model and the GMEC-POD-TPWL model. The negligible deviations confirm the GMEC-POD-TPWL model’s fidelity in capturing dominant dynamics.

6.3. Model Comparison

To validate the superiority of the proposed Global Maximum Error-based Secondary Point Selection (GMEC-POD-TPWL) modeling method over other TPWL approaches, this study compares its accuracy with the TPWL-POD method from reference [13] under varying numbers of linearization points (2, 3, and 4). A comparative analysis is conducted, and the results are presented in Table 4, Figure 4 and Figure 5. The error between the reduced-order models and the original model is quantified using the RMSE, calculated as in Equation (39).
Figure 4 illustrates the RMSE trajectories of the TPWL-POD model compared with the original model over the entire 14-day simulation period, while Figure 5 shows the corresponding error trajectories for the GMEC-POD-TPWL model.
As demonstrated, the proposed GMEC-POD-TPWL model achieves error reductions of 13.90%, 20.69%, and 44.34% for 2, 3, and 4 linearization points, respectively, compared with the TPWL-POD method. These results highlight a significant enhancement in model accuracy, confirming the effectiveness of the GMEC-based secondary point selection strategy.
The data in Table 4 indicate that as the linearization point increases, the errors of both models gradually decrease, and under the same linearization point, the error of the GMEC-POD-TPWL model is smaller than that of the TPWL-POD model.

6.4. EMPC Simulation Performance Metrics Comparison

Under dry weather conditions, this study compares the EMPC control computation time, effluent quality (EQ), overall cost index (OCI), and economic cost index between the original model, the GMEC-POD-TPWL model, and the TPWL-POD model under varying numbers of linearization points. The results are summarized in Table 5 and illustrated in the figures below. Figure 6 displays the performance metric curves of the TPWL-POD model versus the original nonlinear model under different numbers of linearization points, while Figure 7 shows the corresponding curves for the GMEC-POD-TPWL model. As specified in Section 6.1, the comparison utilizes data from the last 7 days of the simulation period.
The experimental data demonstrate that both reduced-order models (TPWL-POD and GMEC-POD-TPWL) exhibit enhanced computational efficiency compared with the original nonlinear model. Specifically, increasing the number of linearization points improves model accuracy and control performance metrics for both approaches. The GMEC method ensures model accuracy through the implementation of a maximum error threshold, with its iterative process employing a maximum error prioritization strategy. Specifically, each iteration prioritizes the addition of linearization points that maximally reduce the peak approximation error in the simplified model, thereby guaranteeing progressive improvement in model fidelity. In contrast to conventional TPWL-POD approaches, which lack targeted error reduction mechanisms in their linearization point selection process and rely on increasing linearization point quantities to enhance accuracy—the GMEC-enhanced framework achieves superior model fidelity compared with conventional TPWL-POD implementations with equivalent numbers of linearization points. This accuracy advantage directly translates to enhanced EMPC control performance, as the refined model better preserves the dynamic characteristics of the original nonlinear system.
For the 4-linearization-point configuration, the GMEC-POD-TPWL model reduces computational time by 65.45% relative to the original nonlinear model (from 1.10 × 10 5 s to 3.85 × 10 4 s ), though this acceleration introduces performance trade-offs: effluent quality (EQ) decreases by 18.56% (from 4564.71 kg pollutant / day to 3850.27 kg pollutant / day ), while the overall cost index (OCI) and economic cost index increase by 13.19% and 15.88%, respectively. Compared with the TPWL-POD model [13], the proposed method achieves a 2.28% faster computation speed (from 3.85 × 10 4 s to 3.94 × 10 4 s ), coupled with a 44.34% reduction in model approximation error (from RMSE = 5.96 to 10.71 ). Furthermore, it demonstrates superior control performance, evidenced by an 11.40% lower effluent pollutant concentration and a 5.36% reduction in economic costs, despite a marginal 1.97% increase in OCI.
The experimental results demonstrate conclusively that the GMEC-POD-TPWL framework provides statistically significant improvements in model accuracy, effluent quality regulation, and economic cost optimization compared with existing TPWL-POD methodologies.

7. Conclusions

This study proposes a reduced-order linearization framework for the modified wastewater treatment plant (WWTP) process, integrating a two-stage linearization point selection strategy: coarse selection based on state trajectory spacing, and refinement via global maximum error control (GMEC). The designed EMPC system demonstrates significant computational efficiency improvements compared with the original nonlinear model, albeit with controlled performance trade-offs. Experimental analyses reveal a critical accuracy–efficiency trade-off: increasing linearization points from 2 to 4 enhances model fidelity and control performance, but incurs a rise in computational load. Notably, the GMEC-POD-TPWL framework outperforms conventional TPWL-POD methods, achieving faster computation and lower economic costs at equivalent linearization points. The limitations of the proposed method include its suboptimal EMPC control performance relative to the original nonlinear model and preliminary validation under simplified operational scenarios. Additionally, the maximum error threshold in the GMEC framework requires manual specification, which restricts the adaptability of model construction. Future research should prioritize balancing computational acceleration with control performance preservation, conducting comparative simulations under more conditions, and integrating auxiliary strategies to dynamically adjust the GMEC threshold, thereby further enhancing model accuracy and control efficacy.

Author Contributions

Conceptualization, J.Z. and J.L.; methodology, Z.W., J.Z. and J.L.; validation, J.Z. and J.L.; writing—original draft, Z.W. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by National Key Research and Development Program of China under Grant 2018YFB2003704.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ren, H.; Ma, R.; Huang, H. Technological Innovation in China’s Wastewater Treatment Sector. Front. Environ. Sci. Eng. 2024, 18, 1832–1840. [Google Scholar]
  2. Pan, Y.; Sun, R.; Yu, H. Advances in Exogenous Electron Donor-Driven Biological Denitrification Technology. Environ. Eng. 2024, 42, 1–12. [Google Scholar]
  3. Zhu, Y.; Yang, D.; Zhou, F.; Fu, P.; Yang, Q.; Lv, W.; Liu, B.; Wang, H. Current Status and Future of Hydrogen Production from Wastewater. Environ. Eng. 2024, 42, 13–28. [Google Scholar]
  4. Li, Y. Design of Fuzzy Adaptive PID Control System for Wastewater Treatment pH Value. Plast. Addit. 2024, 1, 58–61. [Google Scholar]
  5. Yuan, M.; Yu, G.; Liu, J.; Li, J. Intelligent Aeration Method for Wastewater Treatment Based on Perception-Decision-Evaluation. Ind. Water Treat. 2022, 42, 65–72. [Google Scholar]
  6. Wu, Y.; Wang, X.; Chen, N.; Yang, B.; Yan, T.; Huang, Q. Production Test of Intelligent Carbon Source Dosing Control in Typical Municipal Wastewater Treatment Plants. Environ. Eng. 2022, 40, 212–218+271. [Google Scholar]
  7. Lin, Y.; Wu, L.; Zheng, Y.; Yu, M.; Shen, D.; Ao, Y.; Li, X.; Yang, Y.; Zhou, Y. Optimal Scheduling of Multi-Pumping Stations in Sewage Systems Based on Model Predictive Control. China Water Wastewater 2023, 39, 49–54. [Google Scholar]
  8. Mojto, M.; Horváthová, M.; Kiš, K.; Furka, M.; Bakošová, M. Predictive Control of a Cascade of Biochemical Reactors. Acta Chim. Slov. 2021, 14, 51–59. [Google Scholar] [CrossRef]
  9. Zeng, J.; Liu, J. Economic Model Predictive Control of Wastewater Treatment Processes. Ind. Eng. Chem. Res. 2015, 54, 5710–5721. [Google Scholar] [CrossRef]
  10. Sorour, T.M.; Bahgat, F.M.L. Simulation Analysis of ASM/Takacs Models in the BSM1 Configuration. Environ. Technol. 2006, 27, 1163–1170. [Google Scholar] [CrossRef]
  11. Zhang, A.; Yin, X.; Liu, S.; Zeng, J.; Liu, J. Distributed Economic Model Predictive Control of Wastewater Treatment Plants. Chem. Eng. Res. Des. 2019, 141, 144–155. [Google Scholar] [CrossRef]
  12. Liu, Y. Research on Trajectory Piecewise Linearization Method for MEMS Multi-Domain Coupled Nonlinear Macromodeling. Ph.D. Thesis, Northwestern Polytechnical University, Xi’an, China, 2015. [Google Scholar]
  13. Zhang, A.; Liu, J. Economic MPC of Wastewater Treatment Plants Based on Model Reduction. Processes 2019, 7, 682. [Google Scholar] [CrossRef]
  14. Zhang, Z.; Kou, J.; Zhang, C.; Du, Z.; Liu, G. Rapid Calculation Method for Temperature Field of Oil-Immersed Transformer Windings Based on Proper Orthogonal Decomposition and Kriging Surrogate Model. Trans. Electr. Technol. 2025, 40, 2215–2225. [Google Scholar]
  15. Qin, W.; Xu, L.; Lu, D.; Liu, H. Proper Orthogonal Decomposition Analysis of n-Dodecane Spray Jets. J. Aerosp. Power 2021, 36, 1917–1923. [Google Scholar]
  16. Liu, Z. Proper Orthogonal Decomposition of Three-Dimensional Unsteady Flow at Axial Compressor Blade Tip. Mech. Res. Appl. 2024, 37, 13–17. [Google Scholar]
  17. Busch, J.; Elixmann, D.; Kühl, P.; Gerkens, C.; Schlöder, J.P.; Bock, H.G.; Marquardt, W. State Estimation for Large-Scale Wastewater Treatment Plants. Water Res. 2013, 47, 4774–4787. [Google Scholar] [CrossRef]
  18. Henze, M.; Grady, C.L., Jr.; Gujer, W.; Marais, G.V.R.; Matsuo, T. A General Model for Single-Sludge Wastewater Treatment Systems. Water Res. 1987, 21, 505–515. [Google Scholar] [CrossRef]
  19. Alex, J.; Benedetti, L.; Copp, J.; Gernaey, K.V.; Jeppsson, U.; Nopens, I.; Pons, M.N.; Steyer, J.P.; Vanrolleghem, P. Benchmark Simulation Model No. 1 (BSM1); Technical Report; Department of Industrial Electrical Engineering and Automation, Lund University: Lund, Sweden, 2008. [Google Scholar]
  20. Zeng, J.; Liu, J.; Zou, T.; Yuan, D. State Estimation of Wastewater Treatment Processes Using Distributed Extended Kalman Filters. In Proceedings of the 2016 IEEE 55th Conference on Decision and Control (CDC), Las Vegas, NV, USA, 12–14 December 2016; pp. 6721–6726. [Google Scholar]
  21. Vanrolleghem, P.A.; Jeppsson, U.; Carstensen, J.; Carlsson, B.; Olsson, G. Integration of Wastewater Treatment Plant Design and Operation-A Systematic Approach Using Cost Functions. Water Sci. Technol. 1996, 34, 159–171. [Google Scholar] [CrossRef]
  22. Rewienski, M.; White, J. A Trajectory Piecewise-Linear Approach to Model Order Reduction of Nonlinear Circuits and Micromachined Devices. In Proceedings of the IEEE/ACM International Conference on Computer-Aided Design, San Jose, CA, USA; 2001; pp. 252–257. [Google Scholar]
  23. Rewienski, M. A Trajectory Piecewise-Linear Approach to Model Order Reduction of Nonlinear Dynamical Systems. Ph.D. Thesis, Massachusetts Institute of Technology, Cambridge, MA, USA, 2003. [Google Scholar]
  24. Rewienski, M.; White, J. A Trajectory Piecewise-Linear Approach to Model Order Reduction and Fast Simulation of Nonlinear Circuits and Micromachined Devices. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 2003, 22, 155–170. [Google Scholar] [CrossRef]
  25. Wang, J.; Tian, S. Analysis of Wake Flow Field Around Side-by-Side Twin Cylinders Based on Proper Orthogonal Decomposition. Phys. Gases 2023, 8, 46–54. [Google Scholar]
  26. Li, Y.; Zhao, Y.; Song, X. Diagnostic Analysis of Moving Boundary Annular Gap Flow Field Based on Proper Orthogonal Decomposition. J. Hydraul. Eng. 2023, 53, 1490–1499. [Google Scholar]
  27. Antoulas, A.C. Approximation of Large-Scale Dynamical Systems: An Overview. IFAC Proc. Vol. 2004, 37, 19–28. [Google Scholar] [CrossRef]
  28. Chatterjee, A. An Introduction to the Proper Orthogonal Decomposition. Curr. Sci. 2000, 78, 808–817. [Google Scholar]
  29. International Water Association. Available online: http://www.benchmarkwwtp.org (accessed on 2 March 2025).
Figure 1. WWTP model.
Figure 1. WWTP model.
Mathematics 13 01674 g001
Figure 2. Point selection flow chart.
Figure 2. Point selection flow chart.
Mathematics 13 01674 g002
Figure 3. Trajectories of the states based on nonlinear model and GMEC-POD-TPWL model.
Figure 3. Trajectories of the states based on nonlinear model and GMEC-POD-TPWL model.
Mathematics 13 01674 g003
Figure 4. Comparison of model accuracy of TPWL-POD model with different number of linearization points.
Figure 4. Comparison of model accuracy of TPWL-POD model with different number of linearization points.
Mathematics 13 01674 g004
Figure 5. Comparison of model accuracy of GMEC-POD-TPWL model with different number of linearization points.
Figure 5. Comparison of model accuracy of GMEC-POD-TPWL model with different number of linearization points.
Mathematics 13 01674 g005
Figure 6. EMPC control performance index curves of TPWL-POD model and original nonlinear model under different linearization points.
Figure 6. EMPC control performance index curves of TPWL-POD model and original nonlinear model under different linearization points.
Mathematics 13 01674 g006
Figure 7. EMPC control performance index curves of GMEC-POD-TPWL model and original nonlinear model under different linearization points.
Figure 7. EMPC control performance index curves of GMEC-POD-TPWL model and original nonlinear model under different linearization points.
Mathematics 13 01674 g007
Table 1. WWTP model parameters.
Table 1. WWTP model parameters.
V 1 (Volume of Reactor 1)1000 m3
V 2 (Volume of Reactor 2)1000 m3
V 3 (Volume of Reactor 3)1333 m3
V 4 (Volume of Reactor 4)1333 m3
V 5 (Volume of Reactor 5)1333 m3
Q w (Underflow rate)385 m3/d
Q r (External recirculation rate)18,446 m3/d
V s (Volume of Separator)6000 m3
K L a 3 (Oxygen transfer coefficient in Reactor 3)240/d
K L a 4 (Oxygen transfer coefficient in Reactor 4)240/d
Table 2. Thirteen components of the modified BSM1 model.
Table 2. Thirteen components of the modified BSM1 model.
NotationDescriptionUnit
S I inert soluble organic mattergCOD/m3
S S readily biodegradable and soluble substrategCOD/m3
X I inert particulate organic mattergCOD/m3
X S slowly biodegradable and soluble substrategCOD/m3
X B , H biomass of active heterotrophsgCOD/m3
X B , A biomass of active autotrophsgCOD/m3
X P particulate generated from decay of organismsgCOD/m3
S O dissolved oxygengCOD/m3
S N O nitrite nitrogen and nitrategN/m3
S N H free and saline ammoniagN/m3
S N D biodegradable and soluble organic nitrogengN/m3
X N D particulate biodegradable organic nitrogengN/m3
S A L K alkalinitymol/L
Table 3. Factors that have a major impact on total operating costs.
Table 3. Factors that have a major impact on total operating costs.
NotationDefinitionUnit
SPsludge production kg · day 1
AEaeration energy kWh · day 1
PEpumping energy kWh · day 1
MEmixing energy kWh · day 1
Table 4. Comparison of RMSE of models with different linearization points.
Table 4. Comparison of RMSE of models with different linearization points.
Number of
Linearization Points
RMSE of
TPWL-POD Model
RMSE of GMEC-POD-TPWL Model
211.857410.2083
312.51109.9226
410.70565.9590
Table 5. Control performance in dry weather condition under EMPC based on different models.
Table 5. Control performance in dry weather condition under EMPC based on different models.
ModelNumber of Linearization PointsComputation Time (s)Effluent Quality (EQ) (kg Pollutant/Day)Overall Cost Index (OCI)Economic Cost Index (EQ + 0.3OCI)
Nonlinear Model 1.10 × 10 5 3850.272912,759.12407678.0101
TPWL-POD Model2 2.43 × 10 4 5851.506412,802.01009692.1094
3 3.36 × 10 4 5543.994013,803.00619684.8958
4 3.94 × 10 4 5152.191514,164.07999401.4154
GMEC-POD-TPWL Model2 2.19 × 10 4 5295.005212,799.36669134.8152
3 3.29 × 10 4 4965.664213,632.79219055.5018
4 3.85 × 10 4 4564.713014,442.52038897.4691
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, Z.; Zeng, J.; Liu, J. Economic Model Predictive Control for Wastewater Treatment Processes Based on Global Maximum Error POD-TPWL. Mathematics 2025, 13, 1674. https://doi.org/10.3390/math13101674

AMA Style

Wang Z, Zeng J, Liu J. Economic Model Predictive Control for Wastewater Treatment Processes Based on Global Maximum Error POD-TPWL. Mathematics. 2025; 13(10):1674. https://doi.org/10.3390/math13101674

Chicago/Turabian Style

Wang, Zhiyu, Jing Zeng, and Jinfeng Liu. 2025. "Economic Model Predictive Control for Wastewater Treatment Processes Based on Global Maximum Error POD-TPWL" Mathematics 13, no. 10: 1674. https://doi.org/10.3390/math13101674

APA Style

Wang, Z., Zeng, J., & Liu, J. (2025). Economic Model Predictive Control for Wastewater Treatment Processes Based on Global Maximum Error POD-TPWL. Mathematics, 13(10), 1674. https://doi.org/10.3390/math13101674

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop