1. Introduction
Nowadays, modern industrial processes have become highly integrated with respect to material and energy flows, tightly constrained by high-quality product specifications, and subjected to increasingly strict safety and environmental regulations. These more rigorous operating circumstances have placed new constraints on the operating flexibility of industrial processes and made the performance requirements for process plants increasingly difficult to satisfy. The increased emphasis placed on safe and efficient plant operation dictates the need for continuous monitoring of the operation of a chemical plant and effective external intervention (control) to guarantee satisfaction of the operational objectives. In this light, it is natural that the subject of process control has become increasingly important in both the academic and industrial communities.
Maximizing profit has been and will always be the primary purpose of the optimal control and operation of processes. There are various modern techniques that integrate and seek to guarantee optimization and control simultaneously, and that allow industrial processes to be highly competitive, profitable, operationally safe and beneficial to the environment. Among the most representative techniques are Real-Time Optimization (RTO) and Dynamic Real-Time Optimization (D-RTO). The benefits of RTO are demonstrated by its successful implementation in a number of industrial applications leading to significant economic profits [
1]. RTO is suggested when significant changes occur in the operating conditions that closely affect the plant’s profit margin. In large plants, seasonal and day-to-night variations may be sufficient to justify RTO [
2]. Within process control, there have been several calls for the integration of MPC and the economic optimization of processes (e.g., refs. [
3,
4,
5]).
In the literature, two-stage MPC structures (refs. [
6,
7,
8]) have been investigated to take into account different slow and fast dynamical of processes using multilayer architectures. There also been also attempts to integrate RTO and nonlinear MPC in a single level [
9]. In this approach, the economic optimization and control problems are solved simultaneously in a single layer. In particular model-based predictive control techniques can be formulated to perform both functions by adding economic objective terms to be the standard MPC objective function [
9,
10]. The resulting problem involves solving a nonlinear optimization problem subject to dynamic and steady-state constraints. The implementation of the extended controller relies on extensive tuning of the weighting factors for stability and performance. Extensive simulations are needed to select appropriate values for the weighting factors [
10], unlike in linear MPC where robust tuning techniques are available. The one-layer approach could respond to changes in the plant’s optimal conditions faster than the two-layer approach. However, for large-scale and highly nonlinear processes, this technique may struggle due to computational limitations.
Nevertheless, there is an obvious need for model-based process operation strategies that support the dynamic nonlinear behavior of production plants. More recent techniques, such as dynamic trajectory optimization and nonlinear model predictive control (NMPC), are still subject to research, and, often, the size of the applicable process model is still a limiting factor. In ref. [
11], two economically oriented nonlinear MPC formulations were proposed for cyclic processes and the nominal stability of the closed-loop system was established via Lyapunov techniques. In [
12], the authors design a Lyapunov-based economic MPC that is capable of optimizing closed-loop performance with respect to general economic considerations for nonlinear systems. The design of this controller is based on uniting receding horizon control with explicit Lyapunov-based nonlinear controller design techniques and allows for an explicit characterization of the stability region of the closed-loop system; such a characterization may be conservative in certain applications and it may be possible for the controller to achieve closed-loop stability for initial conditions outside of the estimated stability region. The MPC schemes in [
12] optimize a cost function which is related directly to certain economic considerations and is not necessarily dependent on a steady stat unlike conventional MPC designs. The benefits of two-layer optimization are demonstrated by its successful implementation in a number of industrial applications, leading to significant economical profits. The RTO is recommended when significant changes occur in the operating conditions, strongly affecting the plant profitability. In large plants, seasonal and day-to-night variations may be sufficient to justify RTO. Additionally, the temporal decomposition is a solution for complex multi-scale processes to cope with the different dynamics of the state variables and disturbances. The sampling time and optimization horizon are larger in the upper layers dedicated to the slower process dynamics and disturbances. Thus, beyond the functional hierarchical decomposition carrying out specific tasks at different rates, a temporal decomposition with different time scales within one of the functional layers is recommended to achieve the optimal operation. Although the methods mentioned in our literature review have had varying degrees of success, satisfactory performance still remains an open problem to our knowledge. Here, we propose a technique that integrates methods of dynamic economic optimization and real-time control by including economic model predictive control and closed-loop predictive control, using a two-layer structure. We then analyze the stability of the closed-loop system by demonstrating that the deviation between the state of the closed-loop system and the time-varying trajectory provided by the upper layer is bounded, thus guaranteeing stability.
In recent years, cost minimization has become increasingly important in the control and operation of wastewater treatment plants (WWTP), which are non-productive processes subjected to very high economic penalties for specification discharges and very high operation costs, basically associated with the aeration system and pumping energy. These plants exhibit complex and nonlinear dynamics, making the control and optimization tasks difficult. In this type of processes, frequent and significant changes in the inputs affect the process behavior. In order to run a plant efficiently from the economic point of view, operational costs such as pumping energy, aeration energy and dosage of different chemicals should be minimized. At the same time, the discharges to the recipient should be kept at certain levels specified by law. Conflicting objectives arise naturally in one-layer model predictive control. Trade-offs performance and robustness or economic performance and sustainability. Specific domains where reconciling objectives is critical include chemical and energy systems [
13,
14]. This problem can be overcome by integrating dynamic economic optimization and a nonlinear closed-loop MPC approach for the optimization of the operation of WWTP, considering two-layer structure. The first layer allows for a pure economic index in the controller optimization problem, while the second layer uses a combination of the penalization of control error and the penalization of control efforts. In [
13], advanced control strategies are applied to a hierarchical control structure for dissolved oxygen control in a WWTP with a MIMO robust MPC and other advanced methods in the optimizing layer. Ref. [
14] presented a closed-loop model predictive control using invariant sets to give a simple solution to this type of control, ensuring stability and respecting non-symmetrical constraints. Ref. [
15] used a hierarchical structure of two PI layers for optimizing the operation of a nutrient removal WWTP. In [
16], a PI controller in the lower level follows an ammonia setpoint determined by GA optimization in the higher level. The method in [
17] proposes a unique approach that divides the control structure into three layers: the supervisory control layer, the optimizing control layer and, and the low-level control layer. The method utilizes MPC, extended Kalman filters, and greybox parameter estimation.
The prime aim of this paper is the integration of dynamic economics and NLCGPC, within a two-layer framework with guaranteed stability properties. The upper layer, consists of an economic NMPC that receives state feedback and time dependent economic information to economically compute optimal time-varying operating trajectories for the process. It does this by optimizing a quadratic economic cost function over a finite prediction horizon, using a first order approximation of a nonlinear economic function. The lower layer, uses a NLCGPC to compute feedback control actions that force the outputs of the process to track the trajectories received from the upper layer. Instead of the classical dual-mode MPC schemes, where the terminal control is obtained offline; here, the terminal control law is determined online by an unconstrained nonlinear generalized predictive control. The lower feedback control layer may utilize conventional MPC schemes or even classical control to compute feedback control actions that force the process state to track the time-varying operating trajectories computed by the upper layer Economic NMPC. We prove that the deviation between the state of the closed-loop system and the economically time-varying trajectory is bounded.
A wastewater treatment plant is selected as a case study to validate this. Specifications given in the Benchmark Simulation Protocol (BSM1) [
18] have been used, as they are widely accepted by the scientific community. Particularly, in this work, the model focuses on the N-Removal process.
The organization of the paper is as follows: the formulation of the problem is detailed in
Section 3. In
Section 4, the two-layer control framework is introduced. The proof of stability is given in
Section 5. The modeling of the process, together with the associated operational costs, are developed in
Section 6. The simulation results are also discussed and interpreted in
Section 6. Finally, in
Section 7, the general conclusions are drawn.
3. Problem Statement
Consider a continuous time nonlinear system represented in the state space by:
where
is the state vector,
is the manipulated input vector and
is the disturbance vector.
It is assumed that the inputs
are restricted to a non-empty convex set defined as
, that
is locally Lipschitz on
, and that the disturbance vector is bounded by
:
The objective of this paper is to solve a problem of economic optimization that provides a profile of time-varying set points for a nonlinear plant. More precisely, a hierarchical control in two layers is used, where the time-varying set points are generated in the upper layer by a economic NMPC, satisfying some restrictions; whereas in the lower layer, a NCLGPC is used, as described in [
9], in order to follow the references provided by the upper layer while also respecting constraints and rejecting the disturbances.
The trajectory vector is denoted as
, where
is a compact (closed and bounded) set, with the rate of change of
bounded by
:
The tracking error is defined as the deviation between the state trajectory
and the reference trajectory
as:
The dynamics of the error are then:
In what follows, we introduce the proposed two-layer control framework and prove the stability of the closed-loop system.
7. Simulations Settings
The economic NMPC algorithm uses the phenomenological model of the plant described in Equations (32)–(35) for predictions. The fmincon method of Matlab, based on sequential quadratic programming, uses each sampling time to obtain the optimal manipulated variables.
After some preliminary tests, the selected values to tune the economic NMPC for the upper layer are the control horizon , prediction horizon and the weight of the economic function is , while the tuning parameters of the optimizing controller for the lower layer are control horizon , prediction horizon , output weight and input weight .
Figure 3,
Figure 4 and
Figure 5 present the different profiles of perturbations of
used in this study. In this influent, we can observe strong variations in the flow and concentrations during dry weather.
The performance assessment is made at two levels. The first level concerns the control design. The second level measures the effect of the control strategy on plant performance.
8. Simulations Results
Several simulations are carried out to study the process behavior with the controller and their effect on process economics and removal efficiency. The performance indices provided by the BSM1 platform are used to evaluate the process performance, with the different controllers in the operating period under characteristic storm weather influent variations.
The evolution of the most relevant process variables along the operating horizon is presented in the following figures.
Figure 6a,b present the two outputs that are, respectively, the dissolved oxygen in the aerobic reactor and the nitrate in the anoxic reactor. From the
Figure 6, the ability of the controller to track the desired set point and disturbances rejection can be appreciated.
Figure 7a,b present the evolution of the concentrations
and
. Good tracking of the controller is observed in spite of the frequent changes of set point and the strong variations in the influent. It is observed that the concentrations SNH2 and SNtot are below the limits most of the simulation time.
The two manipulated variables are shown in
Figure 8, indicating that suitable control signals,
and
, drive the process to follow the set point, while satisfying the constraints imposed. Finally,
Figure 9 presents the evolution of the degree of freedom
C.
The criteria for evaluating the advantages of the implementation of the different architectures are the tradeoff between economic benefit, process performance, and complexity of the control structure. The performance evaluation criteria is the indicated in the BSM1 protocol for WWTPs.
In order to compare the economic efficiency of the proposed strategy developed in this paper, the performance of the plant with a two layer structure is compared with a one layer nonlinear economic closed-loop generalized predictive control described in
Section 6.4.2 (for more details about this controller, please see [
9]). The comparison is done in terms of the overall cost index (Equation (
40)), aeration energy (Equation (
37)), pumping energy (Equation (
36)) and effluent quality (Equation (
38)). To make a fair comparison, the same process disturbances as in
Figure 3,
Figure 4 and
Figure 5 were applied to each closed-loop system simulation. The details of the comparisons in stormy weather are shown in
Table 5.
Table 5 shows that the two-layer strategy improves the economic aspect by reducing the
index by
, the
by
and the
by
, which proves that the proposed two-layer controller is sufficient for good performance and, in addition, this control could be easily extended to other applications.