Abstract
The core of the Model Predictive Control (MPC) method in every step of the algorithm consists in solving a timedependent optimization problem on the prediction horizon of the MPC algorithm, and then to apply a portion of the optimal control over the application horizon to obtain the new state. To solve this problem efficiently, we propose a timeadaptive residual based aposteriori error control concept based on the optimality system of this optimal control problem. This approach not only delivers an adaptive time discretization of the prediction horizon, but also suggests an adaptive time discretization of the application horizon, whose length could be either adaptive or fixed. We apply this concept for systems governed by linear parabolic PDEs and present several numerical examples which demonstrate the performance and the robustness of our adaptive MPC control concept.
Similar content being viewed by others
1 Introduction
In this article we consider Model Predictive Control (MPC) for systems governed by linear parabolic PDEs. This approach is also known as moving horizon control or receding horizon control, where we refer to the (seminal) monographs [9, 18] for a comprehensive presentation of this method. The core of the method for every MPC step at time \(t_i\) consists in solving a parabolic PDE constrained optimization problem on the prediction horizon \([t_i,t_i+{\bar{T}}]\), where \({\bar{T}}>0\). To solve this problem efficiently we propose a timeadaptive residual based aposteriori error control concept for the elliptic spacetime reformulation of the optimality system of the PDE constrained optimization problem. The contribution of our paper and the novelty of our approach is twofold;

it delivers an adaptive time discretization of the prediction horizon \([t_i,t_i+{\bar{T}}]\) using residual based aposteriori error control concepts, and

suggests two possible strategies related to the choice \(\tau _i \le {\bar{T}}\) of the application horizon \([t_i,t_i+\tau _i]\subseteq [t_i,t_i+{{\bar{T}}}]\) for the current MPC step. The application horizon \(\tau _i\) might be constant or chosen adaptively. For both cases the interval \([t_i,t_i+\tau _i]\) is discretized adaptively using the aposteriori error control.
Our timeadaptive MPC algorithm works as follows, where the details of its formulation are given in Sect. 2.
Our adaptive concept is implemented with the first statement of the Forloop in Algorithm 1 and works as follows: in a first step, we rewrite the optimality conditions of the MPC optimization problem (1) as a second order in time and fourth order in space elliptic equation for the state variable, to which we then apply classical concepts from residual based aposteriori error control for the time variable. This allows to construct a time grid for the state which is related to the optimal state solution. The time grid will be also used to discretize the application horizon \([t_i,t_i+\tau _i]\) in the current MPC step. The choice of \(\tau _i\) might be done according to steps 59 in Algorithm 1. The idea is based on [8], and now is transferred for a mixed formulation, where the aposteriori error estimate is obtained from a semitime discrete mixed form. For the fast computation of the adaptive time grid we use a coarse spatial discretization, where we assume that the structure of the temporal grid is not sensitive against changes in the spatial resolution. This is verified heuristically by numerical examples in e.g. [2, 3]. In a second step the resulting time grid is used for the numerical solution of the MPC optimization problem (1). Once the adaptive grid is obtained, we address the optimization problem by solving the coupled optimality system directly using a monolithic approach (see e.g. [20, Section 3.7]). Finally, the state is updated on the application horizon \([t_i,t_i+\tau _i]\) through the solution of the parabolic equation (25) with the optimal control \(u^N\) (more precisely the feedback value \(\phi ^N\)).
Let us briefly comment on related literature. Since there is a vast amount of books and papers on MPC we here concentrate on contributions related to adaptivity in MPC. In [11, 14] the authors took advantage of the structure of the problem using Lyapunov functions and/or the turnpike property to construct adaptive grids for the MPC optimal control problem. The turnpike property (see e.g. [21]) is often a key tool to prove asymptotic stability of the MPC method and to find the minimal prediction horizon (see e.g. [5, 10, 13, 15]). Our ideas are related to [12], where a goaloriented adaptive approach for the MPC optimal control problem is proposed. This paper appeared while we were editing the first version of our manuscript. However, the aposteriori concepts proposed there differ from our approach which relies on residual based aposteriori error analysis for the elliptic spacetime reformulation of the optimality systems appearing in every step of the MPC algorithm. Our method uses an error indicator with regard to the optimal state within each MPC subproblem.
The outline of this paper is as follows. In Sect. 2, we present the optimal control problem within the MPC framework and recall the basic idea of the MPC method. Further, we state the optimality conditions for the MPC subproblem. In Sect. 3 we describe the reformulation of the optimality system to a second order in time and fourth order in space elliptic equation as well as a mixed variational form. Additionally, we derive an aposteriori error estimate for a semitime discrete form. In Sect. 4, we propose the novel timeadaptive scheme in MPC. Finally, numerical tests are discussed in Sect. 5 and conclusions are made in Sect. 6.
2 Optimal Control Setting within the MPC Framework
2.1 Preliminaries
Let \(\varOmega \subset {\mathbb {R}}^n, n \in \{1,2,3\}\) be an open and bounded domain with Lipschitz boundary \(\partial \varOmega .\) The Lebesgue space of square integrable functions is denoted by \(L^2(\varOmega )\) with inner product \((u,v)_{L^2(\varOmega )}:= \int _\varOmega uv dx\) and norm \(\Vert u\Vert _{L^2(\varOmega )}:=(\int _\varOmega u(x)^2 dx)^{1/2}\) for \(u,v \in L^2(\varOmega )\). Further, let \(H^k(\varOmega )\) be defined by
with \(k \in {\mathbb {N}}_0\) and equipped with the norm \(\Vert u\Vert _{H^{k}(\varOmega )} := (\sum _{\beta  \le k} \Vert D^\beta u \Vert _{L^2(\varOmega )}^2)^{1/2}\) and
We use the notation \(H^{1}(\varOmega )\) for the dual space of \(H_0^1(\varOmega )\) and denote \(\langle \cdot , \cdot \rangle _{H^{1}(\varOmega ),H_0^1(\varOmega )}\) as the duality pairing of \(H^{1}(\varOmega )\) with \(H_0^1(\varOmega )\). By \( \cdot _{H^1(\varOmega )}\) we denote the \(H^1\)seminorm given by \(u_{H^1(\varOmega )} = \Vert \nabla u \Vert _{L^2(\varOmega )}\) for \(u\in H_0^1(\varOmega )\). We recall that the Poincaré constant is given by the smallest number \(c_p>0\) such that the Poincaré inequality
is fulfilled. Thus, \(._{H^1(\varOmega )}\) is a norm on \(H_0^1(\varOmega )\) equivalent to the norm \(\Vert .\Vert _{H^1(\varOmega )}\). For a given Banach space X and a given time \(T>0\), we denote by \(L^2((0 ,T);X)\) the space of measurable square integrable abstract functions with norm \(\Vert u\Vert _{L^2((0 ,{T});X)} := (\int _{0 }^{T} \Vert u(t)\Vert _X^2 dt )^{1/2}\). We define
Note that for a given function g in spacetime, we use the short hand notation g(t) to indicate the time dependency and drop the space argument.
2.2 Model Predictive Control
In this section we specify our MPC setting of Algorithm 1. At time \(t_0\) we initialize our MPC algorithm and for convenience use a fixed length \({{\bar{T}}} > 0\) for the prediction horizon. At time instance \(t_i \ge t_0\) \((i\in {\mathbb {N}})\) this horizon is denoted by \([t_i,{{\bar{t}}}_i]\) with \({{\bar{t}}}_i := t_i+{{\bar{T}}}\). We denote with \(\tau _i\) the length of the application horizon at time instance \(t_i\), so that \([t_i,t_i+\tau _i] \subseteq [t_i,{{\bar{t}}}_i]\). The adaptive time grid at time instance \(t_i\) is denoted by \(\{t_i^j\}_{j=1}^{N}\), where we set \(t_i^1:=t_i\) and \(t_i^N:={{\bar{t}}}_i\). From here onwards we use \(t_i^N\) instead of \({{\bar{t}}}_i\) to denote the final time in the prediction horizon. We note that the value of \(\tau _i \) might be either constant or adaptive at each iteration due to our timeadaptive concept (see steps 59 in Algorithm 1).
The reduced cost functional over the domain \([t_i, t_i^N] \times \varOmega \), which is considered at the ith time instance of the MPC algorithm for \(i=0,1,2\dots ,\) is given by
where the function \(\ell \) in our applications is given by
Here \(y_d \in L^2((t_i,t_i^N);\varOmega )\) denotes the desired state and \(\alpha > 0\) the prescribed regularization parameter. To anticipate discussions we note that also other cost functionals could be considered. The governing dynamics for the state \(y\equiv y_{[u,t_i,y_i]}\) is given by the linear parabolic partial differential equation
where \(\nu > 0\) is a given constant, f is a given source term and \(y_i\) is the given initial state which is obtained from the preceding MPC step. The function u will act as the control. The weak form of (4) reads: for given \(f \in L^2((t_i,t_i^N);\varOmega )\), \(y_i \in L^2(\varOmega )\) and \(u\in L^2((t_i,t_i^N);\varOmega )\), find a state \(y \in W((t_i,t_i^N);H_0^1(\varOmega ))\) satisfying \(y(t_i) = y_i\) such that
holds for all \(v \in H_0^1(\varOmega )\) and almost everywhere in \((t_i,t_i^N]\). It is clear that (5) admits a unique weak solution, see e.g. [7, §7.1.2, Theorems 3 and 4]. It therefore is meaningful to consider the state y as a function of the control u, so that the cost functional in (2) in fact only depends on the control as independent variable.
Then, the openloop control problem in the \(i\)th optimization instance of the MPC method is given by
It forms the core of every MPC step. In the next section we develop a timeadaptive concept for its numerical approximation.
2.3 Optimal Control Problem
In this section, we investigate the distributed optimal control problem which we consider in each level of the MPC framework. To ease the notation here we will consider a general finite horizon [0, T] instead of \([t_i,t_i^N]\). It is clear that in the setting of the previous section the optimal control problem (6) admits a unique solution \(u\in L^2((0,T);L^2(\varOmega ))\). Moreover, there exists a unique adjoint state \(p\in W((0,T); H^1_0(\varOmega )),\) which together with u and the state \(y\in W((0,T); H^1_0(\varOmega ))\) satisfies the optimality system consisting of the state equation
the adjoint equation
and the optimality condition
Remark 1
We note that it is possible to consider control constraints, state constraints and control operators mapping abstract controls to feasible right hand sides in (6), see Sect. 3.5 for a discussion.
In the next section we rewrite the optimality system as an elliptic boundary value problem in spacetime and exploit its elliptic structure to provide adaptive concepts for its solution. For this purpose we need the following higher regularity results for the weak solutions of y of (7) and p of (8), respectively.
Lemma 1
(Higher regularity [7])

(i)
Let \(y_0 \in H_0^1(\varOmega )\) and let f, u, \(y_d \in L^2((0 ,T);\varOmega )\). Then, according to [7, §7.1.3. Theorem 5] the weak solution y of (4) and the weak solution p of (8) fulfill \(y,p \in L^2((0 ,T);H^2(\varOmega )) \cap L^\infty ((0 ,T);H_0^1(\varOmega ))\cap H^1((0 ,T);L^2(\varOmega ))\).

(ii)
Let \(y_0 \in H_0^1(\varOmega ) \cap H^3(\varOmega )\) and \(f,u, y_d \in L^2((0 ,T);H^2(\varOmega ))\cap H^1((0 ,T);L^2(\varOmega ))\). Further, let the compatibility assumption \((u+f)(0)+\nu \varDelta y_0 \in H_0^1(\varOmega )\) and \(y_d(T)\in H_0^1(\varOmega )\) hold true. Then according to [7, §7.1.3. Theorem 6] the weak solution y of (4) and the weak solution p of (8) fulfill \(y,p \in L^2((0 ,T);H^4(\varOmega ))\cap H^1((0 ,T);H^2(\varOmega ))\cap H^2((0 ,T);L^2(\varOmega ))\).
3 Reformulation of the Optimality System and Time Adaptivity
3.1 Reformulation of the Optimality System
Following along the lines of [8], we can reformulate the optimality system (7)–(8)–(9) as an elliptic equation of fourth order in space and second order in time involving only the state variable y. The adjoint state p as well as the control u are not present in this equation and will be computed by the coupled optimality system (7)–(8)–(9) afterwards. One can also reformulate the optimality system with respect to the adjoint p or the control u but in this work we are interested in an adaptive time grid for the state, compare also Sect. 3.5. To approximate the optimality conditions (7)–(8)–(9) we use an implicit Euler time integration and linear finite elements in space. This provides piecewise constant approximations with respect to time and piecewise linear and continuous approximations with respect to space of the state y, the adjoint state p and the control u.
In particular, the resulting elliptic equation is a twopoint boundary value problem in spacetime given by
We note that for \(\nu =1\) and \(f\equiv 0\) this setting coincides with the setting considered in [8]. Under higher regularity assumptions on the data, the following theorem shows that the optimal state y of (7)–(8)–(9) fulfills the elliptic equation (10) a.e. in spacetime.
Theorem 1
Let \((y,u) \in W((0 ,T);H_0^1(\varOmega ))\times L^2((0 ,T);\varOmega )\) with associated adjoint \(p\in W((0 ,T);H_0^1(\varOmega ))\) denote the unique weak solution to (7)–(8)–(9). Further, let the assumptions of Lemma 1(ii) be fulfilled. Then, y satisfies (10) a.e. in spacetime.
Proof
The proof follows along the lines of the proof of [8, Theorem 2.7] and uses differentiation and insertion of the equations (7)–(8)–(9). \(\square \)
Let us homogenize (10). For this, let g be a function which fulfills the boundary conditions as well as initial and end time conditions of (10) and is sufficiently smooth. For example, g may be taken as the weak solution of (10) with zero right hand side and the same boundary conditions and the same initial condition. Let y satisfy (10). We define \({\tilde{y}}:=yg\) and arrive at
where
Now, let us derive a weak formulation of (11). For this purpose we introduce the function space
where
It is equipped with the norm
We introduce the following symmetric bilinear form
and linear form
where \({\tilde{y}}_d\) is defined in (12).
Definition 1
(Weak formulation) The weak formulation of Eq. (11) is given by: find \({\tilde{y}} \in H_0^{2,1}((0 ,T);\varOmega ),\) which satisfies
Existence of a solution to (13) and its relation to a solution to (10) is shown in the following theorem.
Theorem 2
Let y denote a solution to (10) and let g be a function which fulfills the boundary, initial and end time conditions in (10) and is sufficiently smooth. Then, \({\tilde{y}}=yg\) is a solution to (13). On the other hand, if \({\tilde{y}}\) is a solution to (13) and the assumptions of Lemma 1(ii) are fulfilled, then \(y={\tilde{y}}+g\) satisfies (10) a.e. in spacetime.
Proof
Assume y is a solution to (10). By Green’s formula and integration by parts it is straight forward to prove that \({\tilde{y}}=yg\) satisfies (13). The other direction follows vice versa. \(\square \)
In order to show equivalence of the optimal control problem (6) over (0, T) to the weak formulation of (10) it remains to prove uniqueness of a solution.
Theorem 3
The solution y to (13) is unique.
Proof
The proof follows along the lines of the proof of [8, Theorem 2.6] and uses LaxMilgram Lemma (see e.g. [7, §6.2.1, Theorem 1]). \(\square \)
3.2 Mixed Formulation
In order to use piecewise linear, continuous finite elements for discretization and avoid the construction of finite element subspaces in \(H^2(\varOmega )\), we introduce an auxiliary variable \({\tilde{w}}:=\nu \varDelta {\tilde{y}}\). This allows to write (11) as a coupled system in \({\tilde{y}}\) and \({\tilde{w}}\) as
We introduce the function spaces \(Y:=\{v \in H^1((0 ,T);H_0^1(\varOmega )): v(0 ) = 0 \text { in } \varOmega \}\), \(W:=L^2((0 ,T);H_0^1(\varOmega ))\) and the product space \(X:=Y\times W\). We note that the function space W is different from \(W((0,T);H_0^1(\varOmega )).\) Let us define the following bilinear form
and linear form
Definition 2
The weak formulation of the mixed formulation (14) is given by: find \(({\tilde{y}},{\tilde{w}}) \in X,\) which satisfies
By analogy with Theorems 2 and 3 it can be shown that the mixed variational form (15) admits at most one solution and that the pair \(({\tilde{y}},{\tilde{w}})\) with \({\tilde{y}}\) denoting the unique solution to (11) and \({\tilde{w}}:=\nu \varDelta {\tilde{y}}\) is a solution to the mixed variational form (15). This means that the unique solution to (11) defines the solution to the mixed variational form (15).
Note that
holds. For this reason, we define an energy norm associated with the bilinear form \(A_M\) by
3.3 APosteriori Error Estimate for the SemiTime Discrete Mixed Form
Let us now consider a semitime discretization of (15) with respect to \({\tilde{y}}\) while the variable \({\tilde{w}}\) is kept continuous. We introduce a time grid \(0={\tilde{\tau }}_0< {\tilde{\tau }}_1< \dots < {\tilde{\tau }}_m = T\) with \(m \in {\mathbb {N}}\), time step sizes \(\varDelta {\tilde{\tau }}_i = {\tilde{\tau }}_i  {\tilde{\tau }}_{i1}\) and time intervals \(I_i = ({\tilde{\tau }}_{i1},{\tilde{\tau }}_i]\) for \(i=1,\dots ,m\). The time discrete space \(V^k\) is defined by
where \({\mathbb {P}}_1\) denotes the space of linear polynomials. We set \(Y^{k}:=V^k \cap Y\).
Definition 3
(Semitime discrete mixed form) The semitime discrete mixed variational form reads as: find \(({\tilde{y}}^k,{\tilde{w}}^k) \in Y^k \times W\) such that
With arguments similar to those used for (15) we may show that problem (16) admits a unique solution.
Let us now derive a residual based error estimate for the semitime discrete mixed form (16). We associate with \(({\tilde{y}}^k,{\tilde{w}}^k)\) the residuals \(R_1^k \in Y^*\) and \(R_2^k \in W^*\) by
and
Next, we derive \(L^2\)representations of \(R_1^k\) and \(R_2^k\) by elementwise integration by parts
and
The residual \(R_1^k\) fulfills the Galerkin orthogonality
and it further holds true
Moreover, for \(({\tilde{y}},{\tilde{w}})\in Y \times W\) and \(({\tilde{y}}^k,{\tilde{w}}^k)\in Y^k \times W\) it holds for all \((v_1,v_2) \in Y^k \times W\):
Further, the residual equation holds true for all \((v_1,v_2) \in Y \times W\):
where the last equality follows from (20). We are now in the position to derive a temporal residual based aposteriori error estimate for the semitime discrete mixed variational formulation (16).
Theorem 4
Let \(({\tilde{y}},{\tilde{w}}) \in X\) denote the solution to (15) and let \(({\tilde{y}}^k,{\tilde{w}}^k) \in Y^k\times W\) denote the solution to (16). Then, the following residual based aposteriori error estimate holds true:
with a constant \(C>0\) and
Proof
We combine (19) together with (21). Let for \(v_1 \in Y\) be \(I_Y^k v_1\) the approximation to \(v_1\) from \(Y^k\). Then, it is
where we use the notation \(r_{1,int}^k:= {\tilde{y}}_d + ({\tilde{y}}^k)_{tt} + \nu \varDelta {\tilde{w}}^k \frac{1}{\alpha } {\tilde{y}}^k\). Note that the last summands vanish since \((v_1I_Y^k v_1)({\tilde{\tau }}_i) = 0\) for \(i=0,\dots ,m\). We can estimate using CauchySchwarz
Next, using standard interpolation properties (see e.g. [1, Theorem 1.7]), we arrive at
where \({\tilde{I}}_i\) denotes the set of intervals which share a vertex with \(I_i\). We recall that \( . _{H^1}\) denotes the \(H^1\)seminorm. Together with the CauchySchwarz inequality for sums, we arrive at
where we use Hölder’s inequality in the last step. We note that
In (24) we choose \(v_1:= {\tilde{y}}{\tilde{y}}^k\) and \(v_2 := {\tilde{w}}{\tilde{w}}^k\) and denote \(e:=({\tilde{y}}{\tilde{y}}^k,{\tilde{w}}{\tilde{w}}^k)\), which leads to
By the definition of the energy norm \( \cdot \), it follows that \(A_M(e,e) \ge e^2\), which yields the aposteriori error estimate
\(\square \)
Remark 2
(Adaptive cycle) In order to construct an adaptive time grid, we follow the standard
solve \(\rightarrow \) estimate \(\rightarrow \) mark \(\rightarrow \) refine
cycle. In practice, we solve (16) using rectangular spacetime finite elements. Then, the error in each time interval is estimated using (22). The intervals with the largest errors are marked using the Dörfler marking strategy [6]. For refinement, we perform a bisection of the marked intervals. We iterate this loop until the time grid has a prescribed number of e.g. N time instances.
Remark 3
(Heuristic assumption) Note that we derived an error estimate (22) for a time discrete formulation in y whereas w is kept continuous. In practice, we solve a fully spacetime discrete mixed variational formulation, but still use the error estimate for the semitime discrete form to construct an adaptive time grid. For this, we assume that the temporal discretization of \(y^k\) is insensitive with respect to the spatial discretization. In fact, numerical studies in [2, 3] show that temporal and spatial discretization decouple for the considered problem settings. In addition, we also assume that a temporal discretization of \(w^k\) does not strongly influence the error estimate. Of course, these heuristic assumptions might not hold in general. For this reason, we will in future research derive aposteriori error estimates for a fully spacetime discrete mixed variational form.
With the help of (22), we are able to refine the time grid by means of the residual of the system (14). This property will constitute the major building block for the timeadaptive approach in the MPC framework as discussed in the next Sects. 4 and 5.
3.4 State Equation with Depletion Term
Let us now consider an optimal control problem of the form (6), where an additional depletion term in the state equation appears as
with \(\mu > 0\). The reformulation of the associated optimality system into an elliptic equation and an associated mixed formulation, respectively, follows along the lines of Sects. 3.1 and 3.2. In particular, the mixed formulation reads as
Let us define the bilinear form
and the linear form
where \({\tilde{y}}_d:= \frac{1}{\alpha } y_d  f_t  \nu \varDelta f  \mu f + g_{tt}  \nu ^2 \varDelta ^2 g  2 \nu \mu \varDelta g  (\frac{1}{\alpha } + \mu ^2) g\).
Definition 4
The weak formulation of the mixed formulation (26) is given by: find \(({\tilde{y}},{\tilde{w}}) \in X\), which satisfies
The semitime discrete mixed variational formulation then reads as
With similar arguments as in the previous sections, one can show existence of a unique solution of the involved equations provided sufficient regularity of the data.
In analogy to Theorem 4 we can derive a temporal residual based aposteriori error estimate for (28).
Theorem 5
Let \(({\tilde{y}},{\tilde{w}}) \in X\) denote the solution to (27) and let \(({\tilde{y}}^k,{\tilde{w}}^k) \in Y^k\times W\) denote the solution to (28). Further, let \(\mu \le \nu /c_p^2\), where \(c_p\) denotes the Poincaré constant. Then, the following residual based aposteriori error estimate holds true:
with a constant \(C>0\) and
Proof
The proof follows along the lines of the proof of Theorem 4. Note that it holds
Using Green’s formula, the definition of \({\tilde{w}}\) and Young’s inequality, we can estimate the second summand in (31) by
With the choice \(\delta := \displaystyle \frac{1+2\alpha \mu ^2}{8 \alpha \mu ^2}\), it holds that \( 4\delta \mu ^2 + \frac{1}{\alpha } + \mu ^2 \ge 0\) and \( \frac{1}{4\delta } + 1 \ge 0\).
Using the Poincaré inequality, we can estimate the last term in (31) by
with Poincaré constant \(c_p\). If \(\mu \le \nu / c_p^2\), then \(\displaystyle \int _\varOmega \nu \nabla y(T)^2  \mu y(T)^2 dx \ge 0\). Thus, for \(\mu \le \nu / c_p^2\) it holds that
With this, the aposteriori error estimate follows in analogy to Theorem 4. \(\square \)
3.5 Control Constraints, Abstract Controls and State Constraints
The case of partially supported controls and control constraints can be treated by switching to an elliptic system for the adjoint state p. In particular, we can consider linear and bounded control operators \(B: U \rightarrow L^2((0,T);H^{1}(\varOmega ))\) mapping controls to feasible right hand sides, where U denotes a real Hilbert space, and control constraints \(u \in U_{\text {ad}} \subseteq U\) with \(U_{\text {ad}}\) describes a convex, bounded and closed set of admissible controls. Under the corresponding regularity assumptions similar to those in Lemma 1, the associated optimality system can be reformulated into an elliptic equation of the form
with \(B^*\) denoting the dual operator to B and \({\mathbb {P}}_{U_{\text {ad}}}\) denoting the projection operator onto the admissible control space. An aposteriori error estimate can be derived analogously, see [3] for more details. Using a regularization of the projection operator, it is also possible to derive an elliptic equation for the state, see [17].
Further, we note that the procedure above can be extended to the treatment of state constraints by e.g. adapting the approach of [16]. This is to consider the reduction to the elliptic spacetime formulation for the state obeying state constraints. However, for the proof of concept we, in the present work, avoid the incorporation of additional constraints and other practical relevant control operators.
4 Time Adaptivity in MPC
In this section, we propose the use of a timeadaptive technique within MPC. In the classical application of MPC algorithms the length of the application horizon is fixed a priori and the prediction horizon is discretized equidistantly. This might not be ideal in practice. The choice of the length of the application horizon in each level of MPC is known to be a difficult issue. If one chooses a (too) long application horizon, a delayed reaction to possible disturbances might be the consequence. If one chooses a (too) small application horizon, the progress in the time domain is possibly (unnecessary) slow and many openloop subproblems need to be solved leading to high computational efforts. We also refer to e.g. [19] for a study of stability conditions related to the length of the application horizon.
The adaptive time grid, computed using (29) within the prediction horizon, can provide a possible choice for the application horizon length, in fact it locates the time grid points according to the temporal dynamics of the optimal state.
In this work, we here would like to answer the following questions:
(i) How to choose a time discretization for the prediction horizon \([t_i,t_i+{{\bar{T}}}]\) in each level i of the MPC?
(ii) How to choose efficiently the time discretization and length for the application horizon \([t_i, t_i+ \tau _i]\) in each level i of the MPC to implement the feedback control?
We aim at computing the temporal discretization to identify the important dynamical structures according to the optimization goal. We propose an adaptive strategy which avoids unnecessary small uniform temporal discretizations and realize an efficient implementation. The proposed approach will lead to adaptive time discretizations which are related to the optimal state for each of the MPC subproblems.
The idea of adaptivity leads to different combinations using the error estimate (29). Here, we will deal with an adaptive grid in each subinterval for a fixed prediction horizon where the time discretization is computed on the fly. For a different adaptive concept based on goaloriented adaptivity, see the recent work [12].
Therefore, for a given prediction interval \([t_i,t_i^{N}]\) at each MPC iteration i, we make use of the aposteriori error estimation (29) for the state to compute an adaptive time grid within the current time horizon. Note that \(t_0 := 0\) is the initial time.
We consider the use of adaptive application horizons (flag\(=1\) in Algorithm 1) and compare it with the use of fixed application horizons (flag\(=2\) in Algorithm 1). The schemes are visualized in Figs. 1 and 2, respectively. The numerical performances of these approaches will be discussed in Sect. 5.
For a given number of degrees of freedom N the algorithm distributes the time instances within the prediction horizon \([t_i,t_i^N]\) according to the error estimation (29), where we assume that all prediction horizons have the same length \(t_i^{N}t_i = {\bar{T}}\). The resulting adaptive time grid at each time instance \(t_i\) is related to the optimal state of the corresponding openloop subproblem of the current MPC step. Again, we assume that the heuristic assumptions of Remark 3 hold true which enables an efficient computation. The approach is summarized in Algorithm 1 in Sect. 1.
Remark 4
(Warm start) In order to make computations even more efficient, the information of the previous MPC iteration can be used as a warm start for the next MPC iteration. In particular, after a coarsening step of the previous adaptive time grid, this grid can be used as an initial adaptive time grid for the next prediction horizon. Furthermore, to improve the inner openloop solver in each iteration one can use as initial control the one computed at the previous step.
Remark 5
(Efficiency under perturbations) This approach allows to compute a suitable adaptive temporal grid for every iteration of the MPC method. The grid will, in general, not result to be equidistant. This approach is particular sensitive to perturbations on the system. Specifically, we will consider in Sect. 5 perturbations of the initial condition and right hand side of the state equation (7) when applying the model predictive feedback value. This leads to a perturbed initial state for the next MPC iteration level. For this perturbed initial state we solve the elliptic system using the error indicator (30). Thus, the perturbations of the system enter the error indicator (30) through the perturbed state. It follows from the structure of the estimator that it is not able to distinguish whether a perturbation of the system drives the state y away or closer to the desired state \(y_d\).
Remark 6
(Discretization of the application horizon) Once \(\tau _i\) is computed, independently from the choice of the flag in Algorithm 1, we take advantage of the adaptive grid already computed for the prediction horizon. Then, we take those adaptive time points within the application horizon as time discretization of the application horizon.
5 Numerical Example
In the following tests, we investigate numerically the timeadaptive MPC algorithm proposed in Sect. 4. In all numerical examples, the considered spatial domain is the open interval \(\varOmega = (0,1)\). In order to solve the mixed form (26), we introduce a partitioning of the spacetime domain into regular rectangles and use \({\mathbb {Q}}_1\) spacetime finite elements for discretization, where \({\mathbb {Q}}_1\) is the space of polynomials of separate degree up to 1. We solve the equation with a direct solver using a coarse spatial resolution. We further note that in our implementations, we do not perform a homogenization of the elliptic system, but we solve a mixed formulation of (10) such that in the error indicator (23) the pair \(({\tilde{y}},{\tilde{w}})\) denotes the solution to (10) and \({\tilde{y}}_d\) denotes the righthand side in (10). Analogously, we proceed for the system with the depletion term. For the solution of the MPC openloop subproblems, we use an implicit Euler scheme for the temporal discretization and piecewise linear and continuous finite elements for the spatial discretization for the state, adjoint state and control. This results in piecewise constant approximations with respect to time for the state y, the adjoint state p and the control u within the MPC openloop subproblems. The optimal control problem is solved with a direct solver addressing the coupled optimality system for all time instances at once (monolithic approach, see e.g. [20, Section 3.7]), where we take as fine spatial resolution an equidistant discretization with \(\varDelta x = 1/100\). All coding is done in Matlab R2020b.
5.1 Test 1: Solution with a Layer at \(t=0.5\)
In this numerical test, we consider the optimal control of (4) and the cost wants to track a timedependent reference trajectory. In this example the control horizon will be [0, 1], since the quality of our results will not be different if dealing with a larger control horizon. The goal is to well approximate the layer at time \(t=0.5\), afterwards the solution is smooth. The setting for this test example is taken from [8, Example 5.2], with the following choices: \(\nu = 1\) in (4) and \(\alpha = 1\) in (3). The example is built such that the exact optimal solution (y, u) to (6) over [0, 1] is given by
The initial condition is \(y_\circ (x) = \sin (\pi x) \text {atan}(1/(2\varepsilon ))\). The functions f and \(y_d\) are chosen accordingly as
For small values of \(\varepsilon \) (we use \(\varepsilon = 10^{3}\)), the state y develops a very steep gradient at \(t = 0.5\), which can be seen in the left panel of Fig. 4.
We compare the adaptive Algorithm 1 with a standard equidistant MPC approach. To start with, we first consider the choice flag\(=1\), i.e. the length of the application horizon is chosen adaptively with \(P=2\). In Fig. 3, we show tracking costs for different choices of the prediction horizon length \({\bar{T}}\) and number N of time points in each prediction horizon. For large enough N, the tracking costs become \(\Vert yy_d\Vert _{L^2((0,T);\varOmega )}\approx 5.2\), where we observe that using the adaptive approach, this value is already reached with a small number N of time points for either of the choices for \({\bar{T}}\). For an exemplary visualization, we plot the tracking term over time for the choices \(N=9\) and \({\bar{T}} \in \{0.2,0.3\}\) in Fig. 3 (middle, right).
Further, for the choices flag\(=1\) with \(P=2\) and \({\bar{T}}=0.2,N=9\), the numerical state solutions of the controlled problem with the different MPC approaches are shown in the middle and right panel of Fig. 4. We can see that the standard MPC algorithm with equidistant time grids fails whereas using Algorithm 1 it is possible to capture the layer at \(t=0.5\) and the solution complies much better with the true openloop state solution over [0, 1].
Let us now provide more details about the temporal grids we obtained with the proposed adaptive scheme with the choices flag\(=1,P=2,{\bar{T}}=0.2,N=9\). The adaptive grid with a coarse and a fine spatial resolution is shown in the middle and right panel of Fig. 5. We observe that for this setting, the time adaptivity is very insensitive with respect to the spatial resolution, compare Remark 3. We note that the time discretization in Fig. 5 (middle) displays the adaptive time intervals where the MPC feedback value is applied.
Examples of adaptive prediction horizons are shown in the top panels of Fig. 6. As a comparison, the uniform time horizons of the same lengths are shown in the bottom panels of Fig. 6 using the same number of degrees of freedom in each interval. It is clear that the aposteriori error estimate (22) leads to a time grid associated with the openloop optimal state which benefits the accuracy of the control problem.
Moreover, we provide an error analysis for the computation of the approximate solutions using an adaptive and an equidistant approach, for different choices of degrees of freedom in time and prediction horizons. For this, we compute the error between the analytical optimal state solution to (6) on the finite time domain \([0,T]=[0,1]\) and its numerical approximation using the different MPC approaches measured in the \(L^2((0,T);\varOmega )\)norm, compare Fig. 7 (left). We fixed the prediction horizon \({\bar{T}}\) and modified the choice of the instances in each sub interval using the equidistant and adaptive method. As one can see, with this approach we need a small prediction horizon and a large number of time instances to obtain an error of order \(10^{1}\) with an equidistant grid whereas the adaptive method provides a more flexible approach for our choices of \({\bar{T}}\in \{0.1,0.2,0.3\}\). Depending on whether the layer at \(t=0.5\) is a time discretization point or not, the approximation quality can differ strongly leading to the illustrated zigzag behavior in the equidistant scheme. Since the exact location of the layer is usually not known apriorily, an equidistant time grid approach is easy to fail.
In Fig. 7 (right) we compare the computational time in seconds of the standard MPC algorithm using Algorithm 1 with the choices flag\(=1\) and \(P=2\) including the computational time needed to create the adaptive time discretization within each MPC iteration. Clearly, to obtain a more accurate solution is computationally more expensive but we also want to remark that the minimum error with the equidistant grid is 0.0872 computed in 25.87s whereas, with the adaptive approach, to get an error of 0.0216 we needed 16.06s. This shows that our method is more accurate and also more efficient computationally without any apriori knowledge of the control problem.
Further, we provide results for the choice flag\(=2\) in Algorithm 1, i.e. the length of the application horizon is chosen to be fixed, whereas its time discretization is either adaptive or equidistant. We show in Fig. 8 the tracking term values for different choices for fixed application horizon lengths. In these settings, we make similar observations as for the results shown in Fig. 3.
5.2 Test 2: State Equation with Depletion Term and Random Disturbances
In this numerical test, we consider an optimal control problem where the state dynamics are governed by (25) with \(\mu > 0\). Let us note that the Poincaré constant \(c_p\) and the first eigenvalue \(\lambda _1\) of the LaplaceDirichlet operator are related by \(\lambda _1 = 1/c_p^2\) (see, e.g., [4, Proposition 8.4.3]). For the considered domain \(\varOmega = (0,1)\), the first eigenvalue \(\lambda _1\) of the LaplaceDirichlet operator is given by \(\lambda _1 = \pi ^2\) (see, e.g., [4, Proposition 8.5.2]). Then, since Theorem 5 is applicable if \(\mu \le \nu / c_p^2\), for this setting it requires \(\mu \le \nu \cdot \pi ^2\). In this example, we set \(\nu =0.1\) and \(\mu = 5\). Thus, we consider an unstable case which goes beyond the assumptions of Theorem 5. Nevertheless, we will see that the numerical tests under this configuration still provide satisfactory results, very similar to a stable case with \(\mu \le \nu \pi ^2\) as required in Theorem 5. The initial condition for the state is chosen as \(y_\circ (x) \equiv 0\) and the source term in the state equation is set to \(f(t,x)\equiv 0\). The regularization parameter in the cost is chosen as \(\alpha = 10^{3}\) and the desired state is given by
which is a stationary state and shown in Fig. 9 (left). Thus, the goal of the optimal control problem is to steer the state y, which fulfills (25) in a weak sense, as close as possible to the desired state \(y_d\) and keep it there (for an infinite amount of time). In Fig. 9 (middle) we show the controlled state solution using Algorithm 1 with the choices flag=1, \(N=20, {\bar{T}}=0.5, {P=2}\) and plot the adaptive time grid for the first prediction horizon [0, 0.5] in Fig. 9 (right).
For a cheap computation of the adaptive time grid, we solve (26) with a coarse spatial resolution of \(\varDelta x = 1/4\), compare Remark 3. We observe a fine temporal discretization toward \(t=0\), where the initial state must be steered from \(y_\circ (x)=0\) as close as possible to the desired state.
In realistic scenarios, however, often disturbances enter the system, see Fig. 10 for a schematic presentation. In particular, we focus on disturbances that happen at random time points \(\{\omega _\kappa \}_{\kappa =1}^K\) in the source term f and current state \(y_i\) of random magnitudes \(\{(\chi _\kappa ,\psi _\kappa )\}_{\kappa =1}^K\) leading to a disturbed initial value \(y_{i+1}=y^N(t_{i+1})\) for the next MPC loop. In particular, if \(\omega _\kappa \in (t_i,t_i + \tau _i]\), i.e. if the current simulation window contains one of the random time instances, we consider the following disturbed state equation for implementing the model predictive feedback value:
where \(f_{dist}(t,x) \equiv  \chi _\kappa \) in \((t_i,t_i + \tau _i] \times \varOmega \) and \(y_{dist} (x) =  \psi _\kappa \sin (\pi x)\) in \(\varOmega \). In this example, we generate the random numbers once and run all tests for these values in order to make the experiments comparable. We consider \(K=4\) random time points \(\omega _1 = 3.51, \omega _2 = 4.73, \omega _3 = 5.85, \omega _4 = 8.30\) and values \(\chi _1 = 75.85, \chi _2 = 380.44, \chi _3 = 567.82, \chi _4 = 753.72\) and \(\psi _1 = 6.78, \psi _2 = 7.57, \psi _3 = 7.43, \psi _4 = 3.92\). In Fig. 11 (left) we show the decay of the tracking costs for an increasing number of time instances N per prediction horizon for three examples of prediction horizon lengths (\({\bar{T}}=0.2, 0.3, 0.4\)) comparing the adaptive approach of Algorithm 1 with flag\(=1\) and \(P=2\) respectively \(P=4\) with the standard uniform approach. In this example, we exemplarily run the MPC loop until \(t_i=10\) for some \(i \in {\mathbb {N}}\), i.e. we cover a time domain of [0, 10]. We observe in this setting that the adaptive approach delivers smaller tracking term values than the equidistant approach. The greatest benefit of the adaptive approach is achieved when a small number of degrees of freedom in a comparatively large prediction horizon is considered, where the adaptive approach distributes the time discretization points according to the optimal state dynamics indicated through the error estimate (29). Note that fixing N and \({\bar{T}}\) can lead to different lengths of the application horizon \((t_i,t_i+\tau _i]\) in which the feedback value is applied in Algorithm 1, and thus different number of degrees of freedom for the whole considered time domain [0, 10]. Moreover, we note that choosing \(P=2\) in Algorithm 1 leads to smaller tracking values than choosing \(P=4\).
The fact that in these settings the timeadaptive MPC approach leads to a closer tracking of the desired state than an equidistant approach with the same respective choices for P, N and \({\bar{T}}\) comes with the price of higher control costs, compare Fig. 12. The behavior of the adaptive control costs with increasing number N shown in Fig. 12 (left) is difficult to explain due to the nonlinear relation between the perturbations and N and \({\bar{T}}\).
Finally, we provide some results using a fixed application horizon length in Fig. 13, i.e. we choose flag\(=2\) in Algorithm 1. In the presented plots, both adaptive and uniform time discretizations of the prediction and application horizon lead to similar tracking costs. In the setting with \(N=15,{\bar{T}}=0.3\), we observe that using the adaptive discretization, we detect the disturbance earlier in time.
6 Conclusions and Outlook
In this work we have proposed an approach to include timeadaptive discretization in the MPC framework. Our approach is fully flexible and relies on a reformulation of the optimal control problem into a second order in time and fourth order in space equation. Our approach does not require further assumptions on the control problem. The use of aposteriori error estimates to generate the time grid in the MPC method is the important novelty of our work. Numerical tests have shown the efficiency of the method for both accuracy and computational time. We also want to remark that our approach is particularly suitable when a layer is shown in the solution or the disturbances happen. Other experiments with mild temporal variations did not always show a clear difference between equidistant and adaptive grid. The aposteriori error indicator delivers an appropriate adaptive time grid even providing a coarse spatial resolution.
In the future, we plan to derive an aposteriori error estimator for a fully spacetime discrete form and to use that indicator for a fully adaptive and automatic MPC scheme, where the idea is to avoid an apriori choice of the prediction horizon and/or the number of degrees of freedom in each subiteration. Another goal is to extend these results to nonlinear control problems and as soon as we increase the dimension of the problem to make use of efficient model reduction techniques, such as POD, to decrease the computational time.
Data Availability
Not applicable.
References
Ainsworth, M., Oden, J.T.: A Posteriori Error Estimation in Finite Element Analysis. Wiley, New York (2000)
Alla, A., Gräßle, C., Hinze, M.: A residual based snapshot location strategy for POD in distributed optimal control of linear parabolic equations. IFACPapersOnLine 49(8), 13–18 (2016)
Alla, A., Gräßle, C., Hinze, M.: A posteriori snapshot location for POD in optimal control of linear parabolic equations. ESAIM Math. Model. Numer. Anal. 52(5), 1847–1873 (2018)
Attouch, H., Buttazzo, G., Michaille, G.: Variational Analysis in Sobolev and BV Spaces: Applications to PDEs and Optimization, 2nd edn. SIAM (2014)
Breiten, T., Pfeiffer, L.: On the turnpike property and the recedinghorizon method for linearquadratic optimal control problems. SIAM J. Control. Optim. 58(2), 1077–1102 (2020)
Dörfler, W.: A convergent adaptive algorithm for Poisson’s equation. SIAM J. Numer. Anal. 33(3), 1106–1124 (1996)
Evans, L.C.: Partial Differential Equations, 2nd edn. American Mathematical Society, New York (2010)
Gong, W., Hinze, M., Zhou, Z.: Spacetime finite element approximation of parabolic optimal control problems. J. Numer. Math. 20(2), 111–146 (2012)
Grüne, L., Pannek, J.: Nonlinear Model Predictive Control. Springer, New York (2017)
Grüne, L., Pannek, J., Seehafer, M., Worthmann, K.: Analysis of unconstrained nonlinear MPC schemes with varying control horizon. Technical report. Universität Bayreuth (2009)
Grüne, L., Schaller, M., Schiela, A.: Sensitivity analysis of optimal control for a class of parabolic PDEs motivated by model predictive control. SIAM J. Control. Optim. 57(4), 2753–2774 (2019)
Grüne, L., Schaller, M., Schiela, A.: Efficient MPC for parabolic PDEs with goal oriented error estimation. arXiv preprint https://arxiv.org/abs/2007.14446 (2020)
Grüne, L., Schaller, M., Schiela, A.: Exponential sensitivity and turnpike analysis for linear quadratic optimal control of general evolution equations. J. Differ. Equ. 268(12), 7311–7341 (2020)
Krener, A.J.: Adaptive horizon model predictive control. IFACPapersOnLine 51(13), 31–36 (2018)
Kunisch, K., Pfeiffer, L.: The effect of the terminal penalty in receding horizon control for a class of stabilization problems. In: COCV, ESAIM (2019)
Liu, W., Gong, W., Yan, N.: A new finite element approximation of a stateconstrained optimal control problem. J. Comp. Math. 27(1), 97–114 (2009)
Neitzel, I., Prüfert, U., Slawig, T.: A smooth regularization of the projection formula for constrained parabolic optimal control problems. Numer. Func. Anal. Opt. 32(12), 1283–1315 (2011)
Rawlings, J.B., Mayne, D.Q., Diehl, M.M.: Model Predictive Control: Theory, Computation, and Design, 2nd edn. Nob Hill (2017)
Reble, M., Allgöwer, F.: Unconstrained model predictive control and suboptimality estimates for nonlinear continuoustime systems. Automatica 48(8), 1812–1817 (2012)
Tröltzsch, F.: Optimale Steuerung partieller DifferentialgleichungenTheorie, Verfahren und Anwendungen, 2 edn. Vieweg+Teubner Verlag (2009) (in German)
Zaslavski, A.: Turnpike Properties in the Calculus of Variations and Optimal Control. Springer, New York (2006)
Funding
Open Access funding enabled and organized by Projekt DEAL. Alessandro Alla was supported by the CNPq research grant 3008414/20191. Michael Hinze gratefully acknowledges funding of the BMBF collaborative research project PASIROM under grant no. 05M18GUA.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
No conflict of interest.
Code Availability
The Matlab source code of the implementations used to compute the presented results can be provided any time upon reasonable request.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Alla, A., Gräßle, C. & Hinze, M. Time Adaptivity in Model Predictive Control. J Sci Comput 90, 12 (2022). https://doi.org/10.1007/s10915021016470
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10915021016470