1 Introduction

In this paper we consider a class of linear parabolic convection-diffusion equations which model, e.g., the evolution of the temperature inside a room, which we want to keep inside a constrained range. The boundary control implements heaters in the room, where, due to physical restrictions on the heaters, we have to impose bilateral control constraints. The goals are to minimize the heating cost while keeping the state (i.e., the temperature) inside the desired state constraints. In order to gain regular Lagrange multipliers, we utilize a Lavrentiev regularization for the state constraints; see [24]. Then, a primal-dual active set strategy (PDASS) can be applied, which has a superlinear rate of convergence [15] and a mesh-independent property [16]. For the numerical solution of the equations we apply a Galerkin approximation combined with an implicit Euler scheme in time and, in order to speed-up the computation of optimal solutions, we build a reduced-order model based on proper orthogonal decomposition (POD); cf. [6, 13]. To have sufficiently accurate POD suboptimal solutions, we adapt the a-posteriori error analysis from [9]. Then, we are able to estimate the difference between the (unknown) optimal controls and their suboptimal POD approximations. For generating the POD basis, we need to solve the full system with arbitrary controls, this implies that the quality of the basis, which means how much the reduce order model solution captures the behavior of the full system one, depends on this initial choice for the controls. There are several techniques for improving the POD basis like, e.g., TR-POD [2], OS-POD [20] or adaptive strategies like in [1]. However, in this paper, we will only compare the quality of basis generated with arbitrary controls and with the idealized ones generated from the optimal finite element controls. Our motivation comes from the fact that we will utilize the proposed strategy within an economic model predictive control approach [10, Chapter 8], where the POD basis will be eventually updated during the closed-loop realization; cf. [22]. In contrast to [9] we consider economic costs, boundary controls, two-dimensional spatial domains and time- as well as space-dependent convection fields.

The paper is organized in the following way: in Sect. 2 we introduce our optimal control problem and how we deal with state and control constraints. The primal-dual active set strategy algorithm related to this problem is presented in Sect. 3. In Sect. 4 we briefly explain the POD method and the related a-posteriori error estimator is presented in Sect. 5. Numerical Tests are shown in Sect. 6. Finally, some conclusions are drawn in Sect. 7.

2 The Optimal Control Problem

2.1 The State Equation

Let \(\varOmega \subset \mathbb R^d\), d ∈{1, 2, 3}, be a bounded domain with Lipschitz-continuous boundary Γ = ∂Ω. We suppose that Γ is split into two disjoint subsets Γ c and Γ o, where at least Γ c has nonzero (Lebesgue) measure. Further, let H = L 2(Ω) and V = H 1(Ω) endowed with their usual inner products

$$\displaystyle \begin{aligned} {\langle \varphi,\psi \rangle}_H=\int_\varOmega \varphi\psi\,\mathrm d{\boldsymbol x}, \ quad {\langle \varphi,\psi \rangle}_V=\int_\varOmega \varphi\psi+\nabla \varphi \cdot \nabla \psi\,\mathrm d{\boldsymbol x}\end{aligned} $$

and their induced norms, respectively. For T > 0 we set Q = (0, T) × Ω, Σ c = (0, T) × Γ c and Σ o = (0, T) × Γ o. By L 2(0, T;V ) we denote the space of measurable functions from [0, T] to V , which are square integrable, i.e.,

$$\displaystyle \begin{aligned} \int_0^T{\|\varphi(t)\|}_V^2\,\mathrm dt<\infty. \end{aligned}$$

When t is fixed, the expression φ(t) stands for the function φ(t, ⋅) considered as a function in Ω only. The space W(0, T) is defined as

$$\displaystyle \begin{aligned} W(0,T)=\big\{\varphi\in L^2(0,T;V)\,\big|\,\varphi_t\in L^2(0,T;V')\big\},\end{aligned} $$

where V denotes the dual of V . The space W(0, T) is a Hilbert space supplied with the common inner product; cf. [7, pp. 472–479]. For \(m\in \mathbb N\) let \(b_i :{\varGamma _{\textsf c}}\to \mathbb R\), 1 ≤ i ≤ m, denote given control shape functions. For \({\mathcal U}=L^2(0,T;\mathbb R^m)\) the set of admissible controls \(u=(u_i)_{1\le i\le m}\in {\mathcal U}\) is given as

$$\displaystyle \begin{aligned} {\mathcal U_{\textsf{ad}}}=\big\{u\in{\mathcal U}\,\big|\,{u_{{\textsf a}i}}\le u_i(t)\le{u_{{\textsf b}i}}\text{ for }i=1,\ldots,m\text{ and a.e. in }[0,T]\big\},\end{aligned} $$

where u a = (u ai)1≤im, \({u_{\textsf b}}=({u_{{\textsf b}i}})_{1\le i\le m}\in \mathbb R^m\) are lower and upper bounds, respectively, and ‘a.e.’ stands for ‘almost everywhere’. Throughout the paper we identify the dual \({\mathcal U}'\) with \({\mathcal U}\). Then, for any control \(u\in {\mathcal U_{\textsf {ad}}}\) the state y is governed by the following state equation

(1)

We suppose the following hypotheses for the data in (1).

Assumption 2.1

We assume that γ o ≥ 0, \({\boldsymbol v}\in L^\infty (0,T;L^\infty (\varOmega ;\mathbb R^d))\) with d ∈{1, 2, 3}, y out ∈ L 2(0, T), y  H and b 1, …, b m ∈ L (Γ c).

To write (1) in weak form we introduce the nonsymmetric, time-dependent bilinear form \(a(t;\cdot \,,\cdot ):V\times V\to \mathbb R\)

$$\displaystyle \begin{aligned} a(t;\varphi,\psi)=\int_\varOmega\nabla\varphi\cdot\nabla\psi+\big({\boldsymbol v}(t)\cdot\nabla\varphi\big)\psi{\,\mathrm d{\boldsymbol x}}+\int_{\varGamma_{\textsf c}}\varphi\psi{\,\mathrm d{\boldsymbol s}}+{\gamma_{\textsf{o}}}\int_{\varGamma_{\textsf{o}}}\varphi\psi{\,\mathrm d{\boldsymbol s}}\end{aligned} $$

for φ, ψ ∈ V and the time-dependent linear functional \(\mathcal F(t):V\to V'\)

$$\displaystyle \begin{aligned} {\langle\mathcal F(t),\varphi\rangle}_{V',V}={\gamma_{\textsf{o}}}{y_{\textsf{out}}}(t)\int_{\varGamma_{\textsf{o}}}\varphi{\,\mathrm d{\boldsymbol s}}\ quad \text{for }\varphi\in V, \end{aligned}$$

where \(\langle \cdot \,,\cdot \rangle _{V',V}\) stands for the dual pairing between V and its dual space V. Moreover, the linear operator \(\mathcal B:\mathbb R^m\to V'\) is defined as

$$\displaystyle \begin{aligned} {\langle\mathcal Bu,\varphi\rangle}_{V',V}=\sum_{i=1}^m u_i\int_{\varGamma_{\textsf c}} b_i\varphi{\,\mathrm d{\boldsymbol s}}\ quad \text{for all }\varphi\in V \end{aligned}$$

for given \(u=(u_i)_{1\le i\le m}\in \mathbb R^m\). Now, the state variable y ∈ W(0, T) is called a weak solution to (1) if

(2)

is satisfied.

Lemma 2.1

Let Assumption 2.1 hold. Then:

  1. 1)

    For almost all t ∈ [0, T] the bilinear form satisfies

    $$\displaystyle \begin{aligned} \big|a(t;\varphi,\psi)\big|&\le\alpha\,{\|\varphi\|}_V{\|\psi\|}_V&&\forall\varphi,\psi\in V,\\ a(t;\varphi,\varphi)&\ge\alpha_1\,{\|\varphi\|}_V^2-\alpha_2\,{\|\varphi\|}_H^2&&\forall\varphi\in V \end{aligned} $$

    with constants α, α 1 > 0 and α 2 ≥ 0.

  2. 2)

    We have \(\mathcal F\in L^2(0,T;V')\) , and the linear operator \(\mathcal B\) is bounded.

Proof

The claims follow by standard arguments; cf. [7] and [5], for instance.

Theorem 2.1

Suppose that Assumption 2.1 is satisfied. Then, (2) possesses a unique solution y  W(0, T) for every \(u\in {\mathcal U_{\textsf {ad}}}\) satisfying the a-priori estimate

$$\displaystyle \begin{aligned} {\|y\|}_{W(0,T)}\le c_y\big({\|y_\circ\|}_H+{\|{y_{\textsf{out}}}\|}_{L^2(0,T)}+{\|u\|}_{\mathcal U}\big) \end{aligned} $$
(3)

for a constant c y > 0 which is independent of y , y out and u.

Proof

Existence of a unique solution to (2) follows directly from Lemma 2.1 and [7, pp. 512–520]. Moreover, the a-priori bound is shown in [25, Theorem 3.19].

Remark 2.1

We split the solution to (2) in one part, which depends on the fixed initial condition y and the right-hand side \(\mathcal F\), and another part depending linearly on the control variable. Let \(\hat y\in W(0,T)\) be the unique solution to the problem

$$\displaystyle \begin{aligned} \frac{\mathrm d}{\mathrm dt}\,{\langle \hat y(t),\varphi\rangle}_H+a(t;\hat y(t),\varphi)&={\langle\mathcal F(t),\varphi\rangle}_{V',V}&&\forall\varphi\in V\text{ a.e. in }(0,T],\\ \hat y(0)&=y_\circ&& \text{in }H. \end{aligned} $$

We define the subspace

$$\displaystyle \begin{aligned} W_0(0,T)=\big\{ \varphi \in W(0,T) \, \big| \, \varphi(0)=0 \text{ in } H \big\} \end{aligned}$$

endowed with the topology of W(0, T). Let us now introduce the linear solution operator \(\mathcal S:{\mathcal U} \to W_0(0,T)\): for \(u\in {\mathcal U}\) the function \(y=\mathcal Su\in W_0(0,T)\) is the unique solution to

$$\displaystyle \begin{aligned} \frac{\mathrm d}{\mathrm dt}\,{\langle y(t),\varphi\rangle}_H+a(t;y(t),\varphi)={\langle \mathcal B(u(t)),\varphi\rangle}_{V',V}\ quad \forall\varphi\in V\text{ a.e. in }(0,T]. \end{aligned}$$

From y ∈ W 0(0, T) it follows that y(0) = 0 in H. The boundedness of \(\mathcal S\) follows from (3). Now, the solution to (2) can be expressed as \(y=\hat y+\mathcal Su\). ♢

2.2 The State-Constrained Optimization Problem

We set \({\mathcal W}=L^2(0,T;H)\). Throughout the paper we identify the space L 2(0, T;H) with L 2(Q) and the dual \({\mathcal W}'\) with \({\mathcal W}\). Let y ∈ W(0, T) be given and \(\mathcal E:W(0,T)\to {\mathcal W}\) the canonical linear and bounded embedding operator. We deal with pointwise state constraints of the following type

$$\displaystyle \begin{aligned} {y_{\textsf a}}(t,{\boldsymbol x})\le\mathcal Ey(t,{\boldsymbol x})\le{y_{\textsf b}}(t,{\boldsymbol x})\ quad \text{a.e. in }Q, \end{aligned} $$
(4)

where \({y_{\textsf a}},{y_{\textsf b}}\in {\mathcal W}\) are given lower and upper bounds, respectively. To gain regular Lagrange multipliers we utilize a Lavrentiev regularization. Let ε > 0 be a chosen regularization parameter and \(w\in {\mathcal W}\) an additional (virtual) control. Then, (4) is replaced by the mixed control-state constraints

$$\displaystyle \begin{aligned} {y_{\textsf a}}(t,{\boldsymbol x})\le\mathcal Ey(t,{\boldsymbol x})+\varepsilon w(t,{\boldsymbol x})\le{y_{\textsf b}}(t,{\boldsymbol x})\ quad \text{a.e. in }Q. \end{aligned}$$

We introduce the Hilbert space

$$\displaystyle \begin{aligned} \mathcal X=W(0,T)\times{\mathcal U}\times{\mathcal W} \end{aligned}$$

endowed with the common product topology. The set of admissible solutions is given by

$$\displaystyle \begin{aligned} {\mathcal X_{\textsf{ad}}^\varepsilon}=\big\{x=(y,u,w)\in{\mathcal X}\,\big|\,y=\hat y+\mathcal Su,~{y_{\textsf a}}\le\mathcal Ey+\varepsilon w\le{y_{\textsf b}}\text{ and }u\in{\mathcal U_{\textsf{ad}}}\big\}. \end{aligned}$$

The quadratic cost functional \(J:{\mathcal X}\to \mathbb R\) is given by

$$\displaystyle \begin{aligned} J(x)&=\frac{\sigma_Q}{2}\int_0^T{\|y(t)-y_Q(t)\|}_H^2\,\mathrm dt+\frac{\sigma_T}{2}\,{\|y(T)-y_T\|}_H^2\\ &\ quad +\frac{\sigma}{2}\sum_{i=1}^m{\|u_i\|}_{L^2(0,T)}^2+\frac{\sigma_w}{2}\,{\|w\|}_{\mathcal W}^2\qquad \text{for }x=(y,u,w)\in{\mathcal X}. \end{aligned} $$

Assumption 2.2

Let the desired states satisfy y Q ∈ L 2(0, T;H) and y T ∈ H. Furthermore, ε > 0, σ Q, σ T ≥ 0, and σ, σ w > 0.

The optimal control problem is given by

$$\displaystyle \begin{aligned} \min J(x)\ quad \text{subject to (s.t.)}\ quad x\in{\mathcal X_{\textsf{ad}}^\varepsilon}.\end{aligned} $$
(P ε)

Remark 2.2

Following [19] one can consider the generalized problem

$$\displaystyle \begin{aligned} \begin{aligned} \min&\frac{\sigma_Q}{2}\int_0^T{\|y(t)-y_Q(t)\|}_H^2\,\mathrm dt+\frac{\sigma_T}{2}\,{\|y(T)-y_T\|}_H^2\\ &+\frac{\sigma}{2}\sum_{i=1}^m{\|u_i\|}_{L^2(0,T)}^2+\frac{f(\varepsilon)}{2}\,{\|w\|}_{\mathcal W}^2\vspace{3pt} \end{aligned} \end{aligned} $$
(5a)

subject to the modified state equations

(5b)

and to the inequality constraints

$$\displaystyle \begin{aligned} \begin{aligned} {u_{{\textsf a}i}}&\le u_i(t)\le{u_{{\textsf b}i}}&&\text{a.e. in }[0,T]\text{ for }i=1,\ldots,m,\\ {y_{\textsf a}}(t,{\boldsymbol x})&\le\mathcal Ey(t,{\boldsymbol x})+h(\varepsilon) w(t,{\boldsymbol x})\le{y_{\textsf b}}(t,{\boldsymbol x})&&\text{a.e. in }Q, \end{aligned} \end{aligned} $$
(5c)

where f, g and h are chosen nonnegative functions defined for ε ≥ 0. In [19] convergence of a solution \(\bar x^\varepsilon =(\bar y^\varepsilon ,\bar u^\varepsilon ,\bar w^\varepsilon )\in {\mathcal X}\) is proved for ε → 0 in the case of an elliptic state equation and unilateral state constraints. In our future work we will study the application of the arguments in [19] to our parabolic setting and to bilateral state constraints. ♢

Problem ( P ε ) can be formulated as pure control constrained problem. We set \({\hat y_{\textsf a}}={y_{\textsf a}}-\mathcal E\hat y\in {\mathcal W}\) and \({\hat y_{\textsf b}}={y_{\textsf b}}-\mathcal E\hat y\in {\mathcal W}\). Then, (4) can be formulated equivalently in the control variables u and w as follows:

$$\displaystyle \begin{aligned} {\hat y_{\textsf a}}(t,{\boldsymbol x})\le(\mathcal E\mathcal Su)(t,{\boldsymbol x})+\varepsilon w(t,{\boldsymbol x})\le{\hat y_{\textsf b}}(t,{\boldsymbol x})\ quad \text{a.e. in }Q.\end{aligned} $$

We define \({\mathcal Z}={\mathcal U}\times {\mathcal W}\) and introduce the bounded and linear mapping

$$\displaystyle \begin{aligned} \mathcal T_\varepsilon:{\mathcal Z}\to{\mathcal Z},\ quad z=(u,w)\mapsto\mathcal T_\varepsilon(z)=\left( \begin{array}{c} u\\ \mathcal E\mathcal Su+\varepsilon w \end{array} \right)=\left( \begin{array}{cc} \mathcal I_{\mathcal U}&0\\ \mathcal E\mathcal S&\varepsilon\mathcal I_{\mathcal W} \end{array} \right)\left( \begin{array}{c} u\\ w \end{array} \right),\end{aligned} $$
(6)

where \(\mathcal I_{\mathcal U}:{\mathcal U}\to {\mathcal U}\) and \(\mathcal I_{\mathcal W}:{\mathcal W}\to {\mathcal W}\) stand for the identity operators in \({\mathcal U}\) and \({\mathcal W}\), respectively. Notice that \(\mathcal T_\varepsilon \) is invertible and \(\mathcal T_\varepsilon ^{-1}\) is explicitly given as

$$\displaystyle \begin{aligned} \mathcal T_\varepsilon^{-1}(\mathfrak u,\mathfrak w)=\left( \begin{array}{cc} \mathcal I_{\mathcal U}&0\\ -\varepsilon^{-1}\mathcal E\mathcal S&\varepsilon^{-1}\mathcal I_{\mathcal W} \end{array} \right)\left( \begin{array}{c} \mathfrak u\\ \mathfrak w \end{array} \right)=\bigg(\mathfrak u,\frac{1}{\varepsilon}\left(\mathfrak w-\mathcal E\mathcal S \mathfrak u\right)\bigg)\end{aligned} $$
(7)

for all \(\mathfrak z=(\mathfrak u,\mathfrak w)\in {\mathcal Z}\). With \({z_{\textsf a}}=({u_{\textsf a}},{\hat y_{\textsf a}})\), \({z_{\textsf b}}=({u_{\textsf b}},{\hat y_{\textsf b}})\in {\mathcal Z}\) we define the closed, bounded, convex set of admissible controls as

$$\displaystyle \begin{aligned} {\mathcal Z_{\textsf{ad}}^\varepsilon}=\big\{z=(u,w)\in{\mathcal Z}\,\big|\,{z_{\textsf a}}\le\mathcal T_\varepsilon(z)\le{z_{\textsf b}}\big\}\end{aligned} $$

which depends—through \(\mathcal T_\varepsilon \)—from the regularization parameter ε. Let \(\hat y_Q=y_Q-\hat y\in L^2(0,T;H)\) and \(\hat y_T=y_T-\hat y(T)\in H\). Then, we introduce the reduced cost functional

$$\displaystyle \begin{aligned} \hat J(z)&=J(\hat y+\mathcal Su,u,w)\\ &=\frac{\sigma_Q}{2}\int_0^T{\|(\mathcal Su)(t)-\hat y_Q(t)\|}_H^2\,\mathrm dt+\frac{\sigma_T}{2}\,{\|(\mathcal Su)(T)-\hat y_T\|}_H^2\\ &\ quad +\frac{\sigma}{2}\sum_{i=1}^m{\|u_i\|}_{L^2(0,T)}^2+\frac{\sigma_w}{2}\,{\|w\|}_{\mathcal W}^2\qquad \text{for }z=(u,w)\in{\mathcal Z}.\end{aligned} $$

Now ( P ε ) is equivalent to the following reduced problem

$$\displaystyle \begin{aligned} \min\hat J(z)\ quad \text{s.t.}\ quad z\in{\mathcal Z_{\textsf{ad}}^\varepsilon}. \end{aligned} $$
(P ̂ ε)

Supposing Assumptions 2.1, 2.2 and applying standard arguments [21] one can prove that there exists a unique optimal solution \(\bar z=(\bar u,\bar w)\in {\mathcal Z_{\textsf {ad}}^\varepsilon }\) to ( P̂ε ). The uniqueness follows from the strict convexity properties of the reduced cost functional on \({\mathcal Z_{\textsf {ad}}^\varepsilon }\). Throughout this paper, a bar indicates optimality.

2.3 First-Order Optimality Conditions

First-order sufficient optimality conditions are formulated in the next theorem. The proof follows from Theorem 2.4 in [11].

Theorem 2.2

Let Assumptions 2.1 and 2.2 hold. Suppose that the feasible set \({\mathcal Z_{\textsf {ad}}^\varepsilon }\) is nonempty and that \(\bar z=(\bar u,\bar w)\in {\mathcal Z_{\textsf {ad}}^\varepsilon }\) is the solution to ( P̂ε ) with associated optimal state \(\bar y=\hat y+\mathcal S\bar u\) . Then, there exist unique Lagrange multipliers \(\bar p\in W(0,T)\) and \(\bar \beta \in {\mathcal W}\), \(\bar \mu =(\bar \mu _i)_{1\le i\le m}\in {\mathcal U}\) satisfying the dual equations

$$\displaystyle \begin{aligned} \begin{aligned} -\frac{\mathrm d}{\mathrm dt}\,{\langle \bar p(t),\varphi\rangle}_H+a(t;\varphi,\bar p(t))+{\langle\bar\beta(t),\varphi\rangle}_H&=\sigma_Q\,{\langle(y_Q-\bar y)(t),\varphi\rangle}_H\hspace{1mm}\forall\varphi\in V,\\ \bar p(T)&=\sigma_T\big(y_T-\bar y(T)\big)\hspace{8.5mm}\mathit{\text{in }}H \end{aligned} \end{aligned} $$
(8)

a.e. in [0, T] and the optimality system

$$\displaystyle \begin{aligned} \begin{aligned} \sigma\bar u_i-\int_{\varGamma_{\textsf c}} b_i\bar p{\,\mathrm d{\boldsymbol s}}+\bar\mu_i&=0&&\mathit{\text{in }}L^2(0,T)\mathit{\text{ for }}i=1,\ldots,m,\\ \sigma_w \bar w+\varepsilon\bar\beta&=0&&\mathit{\text{in }}{\mathcal W}.\vspace{-3pt} \end{aligned} \end{aligned} $$
(9)

Moreover,

$$\displaystyle \begin{aligned} \bar\beta&=\max\big\{0,\bar\beta+\eta(\bar y+\varepsilon\bar w-{y_{\textsf b}})\big\}+\min\big\{0,\bar\beta+\eta(\bar y+\varepsilon\bar w-{y_{\textsf a}})\big\}, \end{aligned} $$
(10a)
$$\displaystyle \begin{aligned} \bar\mu_i&=\max\big\{0,\bar\mu_i+\eta_i(\bar u_i-{u_{{\textsf b}i}})\big\}+\min\big\{0,\bar\mu_i+\eta_i(\bar u_i-{u_{{\textsf a}i}})\big\}\end{aligned} $$
(10b)

for i = 1, …, m and for arbitrarily chosen η, η 1, …, η m > 0, where the max- and min-operations are interpreted componentwise in the pointwise everywhere sense.

Remark 2.3

Analogous to Remark 2.1 we split the adjoint variable p into one part depending on the fixed desired states and into two other parts, which depend linearly on the control variable and on the multiplier β. Recall that \(\hat y_Q\) as well as \(\hat y_T\) are defined in Sect. 2.2. Let \(\hat p\in W(0,T)\) denote the unique solution to the adjoint equation

$$\displaystyle \begin{aligned} -\frac{\mathrm d}{\mathrm dt}\,{\langle \hat p(t),\varphi\rangle}_H+a(t;\varphi,\hat p(t))&=\sigma_Q\,{\langle\hat y_Q(t),\varphi\rangle}_H&&\forall\varphi\in V\text{ a.e. in }[0,T),\\ \hat p(T)&=\sigma_T\hat y_T&&\text{in }H.\end{aligned} $$

Further, we define the linear, bounded operators \(\mathcal A_1:{\mathcal U}\to W(0,T)\) and \(\mathcal A_2:{\mathcal W}\to W(0,T)\) as follows: for given \(u\in {\mathcal U}\) the function \(p=\mathcal A_1u\) is the unique solution to

$$\displaystyle \begin{aligned} -\frac{\mathrm d}{\mathrm dt}\,{\langle p(t),\varphi\rangle}_H+a(t;\varphi,p(t))&=-\sigma_Q\,{\langle (\mathcal Su)(t),\varphi\rangle}_H&&\forall\varphi\in V\text{ a.e. in }[0,T),\\ p(T)&=-\sigma_T(\mathcal Su)(T)&&\text{in }H\end{aligned} $$

and for given \(\beta \in {\mathcal W}\) the function \(p=\mathcal A_2\beta \) uniquely solves

$$\displaystyle \begin{aligned} -\frac{\mathrm d}{\mathrm dt}\,{\langle p(t),\varphi\rangle}_H+a(\varphi,p(t))&=-{\langle\beta(t),\varphi\rangle}_H&&\forall\varphi\in V\text{ a.e. in }[0,T),\\ p(T)&=0&&\text{in }H.\end{aligned} $$

In particular, the solution \(\bar p\) to (8) is given by \(\bar p=\hat p+\mathcal A_1\bar u+\mathcal A_2\bar \beta \). ♢

It follows from Theorem 2.2 that the first-order conditions for ( P̂ε ) can be equivalently written as the nonsmooth nonlinear system

$$\displaystyle \begin{aligned} &\sigma\bar u_i-{\gamma_{\textsf c}}\int_{\varGamma_{\textsf c}} b_i\bar p{\,\mathrm d{\boldsymbol s}}+\bar\mu_i=0,\ quad i=1,\ldots,m, \end{aligned} $$
(11a)
$$\displaystyle \begin{aligned} &\sigma_w \bar w+\varepsilon\bar\beta=0, \end{aligned} $$
(11b)
$$\displaystyle \begin{aligned} &\bar\mu_i=\max\big\{0,\bar\mu_i+\eta_i(\bar u_i-{u_{{\textsf b}i}})\big\}+\min\big\{0,\bar\mu_i+\eta_i(\bar u_i-{u_{{\textsf a}i}})\big\}, \end{aligned} $$
(11c)
$$\displaystyle \begin{aligned} &\bar\beta=\max\big\{0,\bar\beta+\eta(\bar y+\varepsilon\bar w-{y_{\textsf b}})\big\}+\min\big\{0,\bar\beta+\eta(\bar y+\varepsilon\bar w-{y_{\textsf a}})\big\} \end{aligned} $$
(11d)

with the unknowns \(\bar u\), \(\bar w\), \(\bar \beta \) and \(\bar \mu \).

Remark 2.4

Optimality system (11) can also be expressed as a variational inequality; cf. [17, 25]. Since the admissible set \({\mathcal Z_{\textsf {ad}}^\varepsilon }\) is convex and the strictly convex reduced objective \(\hat J\) is Fréchet-differentiable, first-order sufficient optimality conditions for ( P̂ε ) are given as

$$\displaystyle \begin{aligned} {\langle\nabla\hat J(\bar z),z-\bar z\rangle}_{\mathcal Z}\ge0\ quad \forall z\in{\mathcal Z_{\textsf{ad}}^\varepsilon}, \end{aligned} $$
(12)

where the gradient \(\nabla \hat J\) of \(\hat J\) at a given \(z=(u,w)\in {\mathcal Z_{\textsf {ad}}^\varepsilon }\) is

$$\displaystyle \begin{aligned} \nabla\hat J(z)=\left( \begin{array}{c} \big(\sigma u_i-{\langle b_i,p(\cdot)\rangle}_{L^2({\varGamma_{\textsf c}})}\big)_{1\le i\le m}\\ \sigma_ww \end{array} \right) \end{aligned} $$
(13)

with \(p=\hat p+\mathcal A_1u\). ♢

3 The Primal-Dual Active Set Strategy (PDASS)

To solve ( P̂ε ) we utilize a semismooth Newton method which can be interpreted as a primal-dual active set strategy; cf. [15, 18, 27]. For more details we refer to [9, 11]. Suppose that \(z^k=(u^k,w^k)\in {\mathcal Z}\) is a current iterate for \(k\in \mathbb N_0\). Then, we set \(y^0=\hat y+\mathcal Su^0\), \(p^0=\hat p+\mathcal A_1u^0-\sigma _w\mathcal A_2w^0/\varepsilon \),

$$\displaystyle \begin{aligned} y^k&=\hat y+\mathcal Su^k, &\beta^k&=-\frac{\sigma_w}{\varepsilon}\,w^k,\\ p^k&=\hat p+\mathcal A_1u^k+\mathcal A_2\beta^k,&\mu_i^k&=\int_{\varGamma_{\textsf c}} b_ip^k{\,\mathrm d{\boldsymbol s}}-\sigma u_i^k\text{ for }i=1,\ldots,m.& \end{aligned} $$

Now we define the associated active sets

$$\displaystyle \begin{aligned} \begin{aligned} {\mathcal A_{{\textsf a}i}^{\mathcal U}}(z^k)&=\big\{t\in[0,T]\,\big|\,\mu_i^k+\sigma(u_i^k-{u_{{\textsf a}i}})<0\text{ a.e.}\big\},\ quad i=1,\ldots,m,\\ {\mathcal A_{{\textsf b}i}^{\mathcal U}}(z^k)&=\big\{t\in[0,T]\,\big|\,\mu_i^k+\sigma(u_i^k-{u_{{\textsf b}i}})>0\text{ a.e.}\big\},\ quad i=1,\ldots,m,\\ {\mathcal A_{\textsf a}^{\mathcal W}}(z^k)&=\bigg\{(t,{\boldsymbol x})\in Q\,\big|\,\beta^k+\frac{\sigma_w}{\varepsilon^2}\big(y^k+\varepsilon w^k-{y_{\textsf a}}\big)<0\text{ a.e.}\bigg\},\\ {\mathcal A_{\textsf b}^{\mathcal W}}(z^k)&=\bigg\{(t,{\boldsymbol x})\in Q\,\big|\,\beta^k+\frac{\sigma_w}{\varepsilon^2}\big(y^k+\varepsilon w^k-{y_{\textsf b}}\big)>0\text{ a.e.}\bigg\}.\vspace{-2pt} \end{aligned} \end{aligned} $$
(14a)

The associated inactive sets are defined as

$$\displaystyle \begin{aligned} \begin{aligned} {\mathcal I_i^{\mathcal U}}(z^k)&=[0,T]\setminus\big({\mathcal A_{{\textsf a}i}^{\mathcal U}}(z^k)\cup{\mathcal A_{{\textsf b}i}^{\mathcal U}}(z^k)\big)\ quad \text{for }i=1,\ldots,m,\\ {\mathcal I^{\mathcal W}}(z^k)&=Q\setminus\big({\mathcal A_{\textsf a}^{\mathcal W}}(z^k)\cup{\mathcal A_{\textsf b}^{\mathcal W}}(z^k)\big).\vspace{-2pt} \end{aligned} \end{aligned} $$
(14b)

Now it turns out that the new state y k+1 and the new adjoint p k+1 are given by the two coupled problems

$$\displaystyle \begin{aligned} &\frac{\mathrm d}{\mathrm dt} {\langle y^{k+1}(t),\varphi \rangle}_H+a(y^{k+1}(t),\varphi)-\sum_{i=1}^m\chi_{{\mathcal I_i^{\mathcal U}}(z^k)}(t)\frac{1}{\sigma}\int_{\varGamma_{\textsf c}} b_ip^{k+1}(t)\mathrm d\boldsymbol{\tilde s}\,\int_{\varGamma_{\textsf c}} b_i\varphi{\,\mathrm d{\boldsymbol s}}\\ &\ quad ={\langle\mathcal F(t),\varphi\rangle}_{V',V}+\sum_{i=1}^m\big(\chi_{{\mathcal A_{{\textsf a}i}^{\mathcal U}}(z^k)}(t){u_{{\textsf a}i}}(t)+\chi_{{\mathcal A_{{\textsf b}i}^{\mathcal U}}(z^k)}(t){u_{{\textsf b}i}}(t)\big)\int_{\varGamma_{\textsf c}} b_i\varphi{\,\mathrm d{\boldsymbol s}}\\ &\hspace{60mm}\forall\varphi\in V\text{ a.e. in }(0,T],\\ &y^{k+1}(0)=y_\circ.\end{aligned} $$

and

$$\displaystyle \begin{aligned} &-\frac{\mathrm d}{\mathrm dt}\,{\langle p^{k+1}(t),\varphi\rangle}_H+a(t;\varphi,p^{k+1}(t))+\sigma_Q\,{\langle y^{k+1}(t),\varphi\rangle}_H&\\ &\ quad \qquad +\frac{\sigma_w}{\varepsilon^2}\,\left\langle y^{k+1}(t)\big(\chi_{{\mathcal A_{\textsf a}^{\mathcal W}}(z^k)}(t)+\chi_{{\mathcal A_{\textsf b}^{\mathcal W}}(z^k)}(t)\big),\varphi\right\rangle_H\\ &\qquad =\sigma_Q\,{\langle y_Q(t),\varphi\rangle}_H+\frac{\sigma_w}{\varepsilon^2}\,\left\langle{y_{\textsf a}}(t)\chi_{{\mathcal A_{\textsf a}^{\mathcal W}}(z^k)}(t)+{y_{\textsf b}}(t)\chi_{{\mathcal A_{\textsf b}^{\mathcal W}}(z^k)}(t),\varphi\right\rangle_H ,\\ &\hspace{60mm}\forall\varphi\in V\text{ a.e. in }[0,T),\\ &\ quad p^{k+1}(T)=\sigma_T\big(y_T-y^{k+1}(T)\big), \end{aligned} $$

respectively, which can be expressed as

$$\displaystyle \begin{aligned} \left( \begin{array}{cc} \mathcal A_{11}^k&\mathcal A_{12}^k\\ {} \mathcal A_{21}^k&\mathcal A_{22}^k \end{array} \right)\left( \begin{array}{c} y^{k+1}\\ {} p^{k+1} \end{array} \right)=\left( \begin{array}{c} \mathcal Q_1(z^k;y_\circ,{u_{\textsf a}},{u_{\textsf b}},b_i,\sigma,{\gamma_{\textsf c}},{y_{\textsf{out}}})\\ {} \mathcal Q_2(z^k;{y_{\textsf a}},{y_{\textsf b}},y_Q,y_T,\varepsilon,\sigma_w) \end{array} \right). \end{aligned} $$
(15)

We have \(\mathcal A_{11}^{\,\,k}=\mathcal A+\tilde {\mathcal A}_{11}^{\,\,k}\) and \(\mathcal A_{22}^{\,\,k}=\mathcal A^{\,\,\star }+\tilde {\mathcal A}_{22}^{\,\,k}\), where the k-independent operator \(\mathcal A:W(0,T)\to L^2(0,T,V')\) is defined as

$$\displaystyle \begin{aligned} {\langle\mathcal Ay,\varphi\rangle}_{L^2(0,T;V'),L^2(0,T;V)}=\int_0^T{\langle y_t(t),\varphi(t)\rangle}_{V',V}+a(t;y(t),\varphi(t))\,\mathrm dt \end{aligned}$$

for y ∈ W(0, T) and φ ∈ L 2(0, T;V ). The new control variable z k+1 = (u k+1, w k+1) is given by the linear system

$$\displaystyle \begin{aligned} \begin{aligned} \int_{\varGamma_{\textsf c}} b_ip^{k+1}{\,\mathrm d{\boldsymbol s}}-\sigma u_i^{k+1}&=0 &&\text{in }{\mathcal I_i^{\mathcal U}}(z^k),&&i=1,\ldots,m,\\ u_i^{k+1}&={u_{{\textsf a}i}}&&\text{in }{\mathcal A_{{\textsf a}i}^{\mathcal U}}(z^k),&&i=1,\ldots,m,\\ u_i^{k+1}&={u_{{\textsf b}i}}&&\text{in }{\mathcal A_{{\textsf b}i}^{\mathcal U}}(z^k),&&i=1,\ldots,m,\\ w^{k+1}&=0&&\text{in }{\mathcal I^{\mathcal W}}(z^k),\\ y^{k+1}+\varepsilon\,w^{k+1}&={y_{\textsf a}}&&\text{in }{\mathcal A_{\textsf a}^{\mathcal W}}(z^k),\\ y^{k+1}+\varepsilon\,w^{k+1}&={y_{\textsf b}}&&\text{in }{\mathcal A_{\textsf b}^{\mathcal W}}(z^k). \end{aligned} \end{aligned} $$
(16)

We resume the previous strategy in Algorithm 1.

Algorithm 1 PDASS method for ( P̂ε )

1: Choose starting value \(z^0=(u^0,w^0)\in {\mathcal Z}\); set k = 0 and flag = false;

2: Determine \(y^0=\hat y+\mathcal Su^0\) and \(p^0=\hat p+\mathcal A_1u^0-\sigma _w\mathcal A_2w^0/\varepsilon \);

3: repeat

4:  Get \({\mathcal A_{{\textsf a}i}^{\mathcal U}}(z^k)\), \({\mathcal A_{{\textsf b}i}^{\mathcal U}}(z^k)\), \({\mathcal I_i^{\mathcal U}}(z^k)\), i = 1, …, m, and \({\mathcal A_{\textsf a}^{\mathcal W}}(z^k)\), \({\mathcal A_{\textsf b}^{\mathcal W}}(z^k)\), \({\mathcal I^{\mathcal W}}(z^k)\) from (14);

5:  Compute the solution (y k+1, p k+1) by solving (15);

6:  Compute \(z^{k+1}=(u^{k+1},w^{k+1})\in {\mathcal Z}\) from (16);

7:  Set k = k + 1;

8:  if \(\mathcal A_{{\textsf a}1}^{\mathcal U}(z^k)=\mathcal A_{{\textsf a}1}^{\mathcal U}(z^{k-1})\) and … and \(\mathcal A_{{\textsf a}m}^{\mathcal U}(z^k)=\mathcal A_{{\textsf a}m}^{\mathcal U}(z^{k-1})\) then

9:     if \(\mathcal A_{{\textsf b}1}^{\mathcal U}(z^k)=\mathcal A_{{\textsf b}1}^{\mathcal U}(z^{k-1})\) and … and \(\mathcal A_{{\textsf b}m}^{\mathcal U}(z^k)=\mathcal A_{{\textsf b}m}^{\mathcal U}(z^{k-1})\) then

10:        if \({\mathcal A_{\textsf a}^{\mathcal W}}(z^k)={\mathcal A_{\textsf a}^{\mathcal W}}(z^k)\) and \({\mathcal A_{\textsf b}^{\mathcal W}}(z^k)={\mathcal A_{\textsf b}^{\mathcal W}}(z^{k-1})\) then

11:           flag = true;

12:        end if

13:     end if

14:  end if

15: until flag = true;

Remark 3.1

Algorithm 1 has to be discretized for their numerical realizations. In our tests carried out in Sect. 6 we utilize the implicit Euler method for the time integration. For the spatial approximation we apply a finite element Galerkin scheme with piecewise linear finite elements on a triangular mesh. ♢

4 Proper Orthogonal Decomposition

For properly chosen admissible controls \(z=(u,w)\in {\mathcal Z_{\textsf {ad}}^\varepsilon }\) we set \(y=\hat y + \mathcal S u\) and \(p=\hat p+\mathcal A_1 u-\frac {\sigma _w}{\varepsilon }\mathcal A_2 w\). Then, we introduce the linear subspace

$$\displaystyle \begin{aligned} \mathcal V= \mathrm{span}\,\big\{y(t),p(t)\,\big|\,t\in [0,T]\big\}\subset V \end{aligned} $$
(17)

with \(\textsf d=\dim \mathcal V\geq 1\). We call the set \(\mathcal V\) the snapshots subspace. Let \(\{ \psi _i \}_{i=1}^{\textsf d}\) denote an orthonormal basis for \(\mathcal V\), then each snapshot can be expressed as

$$\displaystyle \begin{aligned} y(t)=\sum_{i=1}^{\textsf d} {\langle y(t),\psi_i\rangle}_V\,\psi_i\ quad \text{and }\ quad p(t)=\sum_{i=1}^{\textsf d} {\langle p(t),\psi_i\rangle}_V\,\psi_i\ quad \text{a.e. in }[0,T] \end{aligned} $$
(18)

The method of proper orthogonal decomposition (POD) consist in choosing an orthonormal basis \(\{ \psi _i \}_{i=1}^{\textsf d}\) in \(\mathcal V\) such that for every \(\ell \in \mathbb N\) with  ≤d the mean square error between the snapshots y, p and their corresponding -th partial sum of (18) is minimized:

$$\displaystyle \begin{aligned} \begin{aligned} &\min \int_0^T\Big\| y(t) - \sum_{i=1}^\ell {\langle y(t),\psi_i\rangle}_V\,\psi_i\Big\|{}_V^2+\Big\| p(t) - \sum_{i=1}^\ell {\langle p(t),\psi_i\rangle}_V\,\psi_i\Big\|{}_V^2 \,\mathrm dt \\ &\text{ s.t. } \{\psi_i\}_{i=1}^{\ell}\subset V \text{ and } {\langle\psi_i,\psi_j\rangle}_V=\delta_{ij}\text{ for }1\leq i,j\leq \ell, \end{aligned} \end{aligned} $$
(19)

where δ ij is the Kronecker delta.

Definition 4.1

A solution \(\{ \psi _i \}_{i=1}^{\ell }\) to (19) is called a POD basis of rank . We define the subspace spanned by the first POD basis functions as V  = span {ψ 1, …, ψ }.

Using a Lagrangian framework, the solution to (19) is characterized by the following optimality conditions (cf. [6, 13]):

$$\displaystyle \begin{aligned} \mathcal R \psi = \lambda \psi, \end{aligned} $$
(20)

where the operator \(\mathcal R:V\to V\) given by

$$\displaystyle \begin{aligned} \mathcal R \psi=\int_0^T{\langle y(t),\psi\rangle}_V\,y(t)+{\langle p(t),\psi\rangle}_V\,p(t)\,\, \mathrm dt\ quad \text{for } \psi\in V \end{aligned}$$

is compact, nonnegative and self-adjoint operator. Thus, there exist an orthonormal basis \(\{\psi _i\}_{i\in \mathbb N}\) for V and an associated sequence \(\{\lambda _i\}_{i\in \mathbb N}\) of nonnegative real numbers so that

$$\displaystyle \begin{aligned} \mathcal R \psi_i= \lambda_i \psi_i, \hspace{1em} \lambda_1\geq\dots\geq\lambda_{\mathsf{d}}>0 \ quad \text{ and }\ quad \lambda_i=0, \hspace{1em} \text{for } i>d. \end{aligned} $$
(21)

Moreover \(\mathcal V= \text{span} \{\psi _i\}_{i=1}^{\textsf d}\). It can be also proved, see [6], that we have the following error formula for the POD basis \(\{\psi _i\}_{i=1}^\ell \) of rank :

$$\displaystyle \begin{aligned} \int_0^T\Big\| y(t) - \sum_{i=1}^\ell {\langle y(t),\psi_i\rangle}_V\,\psi_i\Big\|{}_V^2+\Big\| p(t) - \sum_{i=1}^\ell {\langle p(t),\psi_i\rangle}_V\,\psi_i\Big\|{}_V^2 \,\mathrm dt= \sum_{i=\ell+1}^{\textsf d} \lambda_i.\end{aligned} $$

Remark 4.1

For the numerical realization, the Hilbert space V has to be discretized by, e.g., piecewise finite elements and the integral over [0, T] has to be replaced by a trapezoidal approximation; see [13]. ♢

If a POD basis \(\{\psi _i\}_{i=1}^\ell \) of rank is computed, we can derive a reduced-order model for (2): for any \(u\in {\mathcal U}\) the function \(y^\ell =\mathcal S^\ell u\in W(0,T)\) is given by

$$\displaystyle \begin{aligned} \frac{\mathrm d}{\mathrm dt} {\langle y^\ell(t),\psi \rangle}_H+a(t;y^\ell(t),\psi)={\langle \mathcal B(u(t)),\psi\rangle}_{V',V}\ quad \forall\psi\in V^\ell \text{ a.e. in }(0,T].\end{aligned} $$
(22)

For any \(u\in {\mathcal U_{\textsf {ad}}}\) the POD approximation y for the state solution is \(y^\ell =\hat y+\mathcal S^\ell u\). Analogously a reduced-order model can be derived for the adjoint equation; see, e.g.,[13]. The POD Galerkin approximation of ( P̂ε ) is given by

$$\displaystyle \begin{aligned} \min\hat J^\ell(z)=J(\hat y+\mathcal S^\ell u,z)\ quad \text{s.t.}\ quad z\in{\mathcal Z_{\textsf{ad}}^{\varepsilon,\ell}}, \end{aligned} $$
(P ̂ ℓ)

where the set of admissible controls is

$$\displaystyle \begin{aligned} {\mathcal Z_{\textsf{ad}}^{\varepsilon,\ell}}=\big\{z=(u,w)\in \mathcal Z\,\big|\,u\in{\mathcal U_{\textsf{ad}}}\text{ and } {\hat y_{\textsf a}} \leq (\mathcal E\mathcal S^\ell u)(t,{\boldsymbol x})+\varepsilon w(t,{\boldsymbol x})\leq {\hat y_{\textsf b}}\}.\end{aligned} $$

5 A-Posteriori Error Analysis

In this section we present an a-posteriori error estimate which is based on a perturbation argument [8] and has been already utilized in [26]. As done in [9], this estimate can be generalized for the mixed control-state constraints case. As first, suppose that Assumptions 2.1 and 2.2 hold. Recall that the linear, invertible operator \(\mathcal T_\varepsilon \) has been introduced in (6). In particular, z = (u, w) belongs to \({\mathcal Z_{\textsf {ad}}^\varepsilon }\) if \(\mathfrak z=(\mathfrak u,\mathfrak w)=\mathcal T(z)\in {\mathfrak Z_{\textsf {ad}}}\) holds with the closed, bounded and convex subset

$$\displaystyle \begin{aligned} {\mathfrak Z_{\textsf{ad}}}=\big\{\mathfrak z=(\mathfrak u,\mathfrak w)\in{\mathcal Z}\,\big|\,{u_{\textsf a}}\le\mathfrak u\le{u_{\textsf b}}\text{ in }{\mathcal U}\text{ and }{\hat y_{\textsf a}}\le\mathfrak w\le{\hat y_{\textsf b}}\text{ in }{\mathcal W}\big\}\subset{\mathcal Z}. \end{aligned}$$

Note that—compared to the definition of the admissible set \({\mathcal Z_{\textsf {ad}}^\varepsilon }\)—the set \({\mathfrak Z_{\textsf {ad}}}\) does not depend on the solution operator \(\mathcal S\) and on the regularization parameter ε. Now, we consider instead of ( P̂ε ) the following optimal control problem

$$\displaystyle \begin{aligned} \min \hat J\big(\mathcal T_\varepsilon^{-1}\mathfrak z\big)\ quad \text{s.t.}\ quad \mathfrak z=(\mathfrak u,\mathfrak w)\in{\mathfrak Z_{\textsf{ad}}}. \end{aligned} $$
(P ̂ ε)

If \(\bar z=(\bar u,\bar w)\) solves ( P̂ε ), then \(\bar {\mathfrak z}=\mathcal T_\varepsilon (\bar z)\) is the solution to ( P̂ε ). Conversely, if \(\bar {\mathfrak z}\) solves ( P̂ε ), then \(\bar z=\mathcal T_\varepsilon ^{-1}(\bar {\mathfrak z})\) is the solution to ( P̂ε ). According to [9] we have the following result:

Theorem 5.1

Suppose that Assumptions 2.1 and 2.2 hold. Let \(\bar z=(\bar u,\bar w)\) be the optimal solution to ( P̂ε ).

  1. 1)

    \(\bar {\mathfrak z}=\mathcal T_\varepsilon (\bar z)\) is the solution to ( P̂ε ).

  2. 2)

    Suppose that a point \(\mathfrak z^{\textsf {ap}}=(\mathfrak u^{\textsf {ap}},\mathfrak w^{\textsf {ap}})\in {\mathfrak Z_{\textsf {ad}}}\) is computed. We set \(z^{\textsf {ap}}=\mathcal T^{-1}_\varepsilon (\mathfrak z^{\textsf {ap}})\) , i.e., z ap = (u ap, w ap) fulfills \(u^{\textsf {ap}}=\mathfrak u^{\textsf {ap}}\) and \(w^{\textsf {ap}}=\varepsilon ^{-1}\,(\mathfrak w^{\textsf {ap}}-\mathcal E\mathcal S\mathfrak u^{\textsf {ap}})\) . Then, there exists a perturbation \(\zeta =(\zeta ^u,\zeta ^w)\in {\mathcal Z}\) , which is independent of \(\bar z\) , so that

    $$\displaystyle \begin{aligned} {\|\bar z-z^{\textsf{ap}}\|}_{\mathcal Z}\le\frac{1}{\sigma_z}\,{\|\mathcal T_\varepsilon^{\,\,\star}\zeta\|}_{\mathcal Z}\ quad \mathit{\text{with }}\sigma_z=\min\{\sigma,\sigma_w\}>0. \end{aligned} $$
    (23)

    where \(\mathcal T_\varepsilon ^\star \) denotes the adjoint of the operator \(\mathcal T_\varepsilon \) ; cf.(7).

Proof

Since \(\mathcal T_\varepsilon \) has a bounded inverse, part 1) follows. The second claim can be shown by adapting the proof of Proposition 1 in [9].

Remark 5.1

  1. 1)

    The perturbation ζ can be computed following [9, Section 1.5].

  2. 2)

    In our numerical realization the approximate solution z ap is given by the POD suboptimal solution \(\bar z^\ell =(\bar u^\ell ,\bar w^\ell )\in {\mathcal Z_{\textsf {ad}}^{\varepsilon ,\ell }}\) to ( P̂ ). Thus, we proceed as in [12, 26] and utilize (23) as an a-posteriori error estimate in the following manner: We set

    $$\displaystyle \begin{aligned} \mathfrak z^{\textsf{ap}}=(\mathfrak u^{\textsf{ap}},\mathfrak w^{\textsf{ap}})\in{\mathcal Z}\ quad \text{with}\ quad \mathfrak u^{\textsf{ap}}=\bar u^\ell\text{ and }\mathfrak w^{\textsf{ap}}=\varepsilon\bar w^\ell+\mathcal E\mathcal S^{\,\,\ell}\bar u^\ell. \end{aligned} $$
    (24)

    From \(\bar z^\ell \in {\mathcal Z_{\textsf {ad}}^{\varepsilon ,\ell }}\) we infer that \(\mathfrak z^{\textsf {ap}}\in {\mathfrak Z_{\textsf {ad}}}\). It follows from (7) and (24) that

    $$\displaystyle \begin{aligned} z^{\textsf{ap}}&=\mathcal T_\varepsilon^{-1}(\mathfrak z^{\textsf{ap}})=\Big(\mathfrak u^{\textsf{ap}},\varepsilon^{-1}\,\big(\mathfrak w^{\textsf{ap}}-\mathcal E\mathcal S\mathfrak u^{\textsf{ap}}\big)\Big)\\ &=\Big(\bar u^\ell,\bar w^\ell+\varepsilon^{-1}\mathcal E\big(\mathcal S^{\,\,\ell}-\mathcal S\big)\bar u^\ell\Big) \end{aligned} $$

    fulfills (23). Moreover, we found that

    $$\displaystyle \begin{aligned} \bar z-z^{\textsf{ap}}=\bar z-\bar z^\ell+\left(0,\varepsilon^{-1}\mathcal E\big(\mathcal S-\mathcal S^{\,\,\ell}\big)\bar u^\ell\right). \end{aligned}$$

    Consequently, (23) is not only an a-posteriori error estimate for \(\bar z-\bar z^\ell \), but also for \(\varepsilon ^{-1}\mathcal E(\mathcal S-\mathcal S^{\,\,\ell })\bar u^\ell \). ♢

6 Numerical Tests

All the tests in this section have been made on a Notebook Lenovo ThinkPad T450s with Intel Core i7-5600U CPU @ 2.60 GHz and 12 GB RAM. The codes are written in C language and we use the tools of PETSc, [3, 4], and SLEPc, [14, 23], for our numerical computations. In the tests we apply a discrete variant of Algorithm 1. For solving the linear system in step 5 of Algorithm 1, we use GMRES with an incomplete LU factorization as preconditioner. For all tests, T = 1 is chosen, and the domain Ω will be the unit square (0, 1) × (0, 1), where we supposed to have four ‘heaters’, which we call controls for simplicity, placed as shown in Fig. 1, with the following shape functions:

We choose the physical parameter γ o = 0.03 and as initial condition \(y_\circ (x)=|\sin {}(2\pi x_1)\cos {}(2\pi x_2)|\) for x = (x 1, x 2) ∈ Ω, as shown in Fig. 1. The velocity field is chosen as v(t, x) = (v 1(t, x), v 2(t, x)) for all t ∈ [0, T], with:

$$\displaystyle \begin{aligned} \begin{array}{l} v_1(t,x)= \left\{ \begin{array}{ll} -1.6 & \mbox{ if } t<0.5,~x\in\mathcal V_{\mathcal F_1}, \\ -0.6 & \mbox{ if } t\geq 0.5,~x\in\mathcal V_{\mathcal F_2}, \\ 0 & \mbox{ otherwise } \end{array} \right. \ quad v_2(t,x)= \left\{ \begin{array}{ll} 0.5 & \mbox{ if } t<0.5,~x\in\mathcal V_{\mathcal F_1}, \\ 1.5 & \mbox{ if } t\geq 0.5,~x\in\mathcal V_{\mathcal F_2}, \\ 0 & \mbox{ otherwise } \end{array} \right. \end{array} \end{aligned}$$

and

$$\displaystyle \begin{aligned} \begin{aligned} \mathcal V_{\mathcal F_1}=&\big\{x=(x_1,x_2)\,\big|\,12x_2+4x_1\geq 3, 12 x_2+4x_1\leq 13\big\},\\ \mathcal V_{\mathcal F_2}=&\big\{x=(x_1,x_2)\,\big|\,x_1+x_2\geq 0.5,x_1+x_2\leq 1.5\big\}. \end{aligned} \end{aligned}$$

By these choices, this test represents the following scenario: the boundary controls are heaters and the velocity field, which is both space and time dependent, models the air flow in the room, which clearly changes in time. We also suppose that we have an outside temperature y out(t) = −1 for t ∈ [0, 0.5) and y out(t) = 1 for t ∈ [0.5, T]. We fix as target \(y_Q(t,x)=\min (2.0+t,3.0) \) and y T(x) = y Q(T, x), as state constraints \({y_{\textsf a}}(t)=0.5+\min (2t,2.0)\) and y b = 3.0. The time dependent lower constraints y a(t) is chosen to gradually rise the temperature in time, in order to save heating. Moreover, we choose the control constraints u ai = 0 and u bi = 7 for i = 1, …, 4. We build the POD basis in two different ways: the first POD basis (POD-M1) is built using the FE snapshots generated solving the state equation with the controls u i(t) = 3.5 for t ∈ [0, T] and i = 1, …, m. The second POD basis (POD-M2) is constructed using the FE optimal control related to the considered test. We expect that the second basis will produce better results, since it contains information regarding the optimal solution. For the implicit Euler method we choose the equidistant time step Δt = 0.01. The spatial discretization is carried out by piecewise linear finite elements (FE) on a triangular mesh with N x = 625 nodes.

Fig. 1
figure 1

Spatial domain Ω with the four boundary controls and the velocity fields (grey); initial condition y (x). (a) t < 0.5. (b) t ≥ 0.5. (c) y (x)

6.1 Test 1: Economic Optimal Control

The cost functional weights are σ T = σ Q = 0 and σ w = σ = 1. This choice is motivated by economic optimal control: we do not want to reach a target, but we focus our attention only on respecting the state constraints, keeping the controls as small as possible. For more information on economic optimal control we refer to [10, Chapter 8], for instance. In this test, as first, we study the behaviour of the PDASS for different values of ε. We will then analyse how this regularization parameter influences the POD approximation and the tightness of the error estimator. Finally, we will compare the POD-M1 and POD-M2 approximation for a fixed value of ε. As can be seen from Fig. 2 and as expected, when ε decreases the minimum temperature in the room gets progressively close to the lower constraints y a(t) at each time instance, while the average temperature and the maximum one remain for more time inside the constraints’ range. The gradual decay of the temperature at the last time steps is due to the terminal condition for the dual variable p: from (8), since in this test σ T = 0 holds, we have that p(T) = 0. Therefore, the computation of the optimal control, which is affected by this condition, lead to the previously noticed phenomena.

Fig. 2
figure 2

Test 1: Temperature behaviour at each time-step for different ε. (a) ε = 1. (b) ε = 0.1. (c) ε = 0.01. (d) ε = 0.001

As reported in Table 1, the number of PDASS iterations increases when ε decreases: when ε is small, the virtual control w is big in the active points, thus the algorithm employs more iterations to minimize the cost functional, where u and w have the same weights, respecting also the control constraints. It can be shown that \(\varepsilon w=\left ({y_{\textsf a}}-y\right )\chi _{{\mathcal A_{\textsf a}^{\mathcal W}}(z)}+\left ({y_{\textsf b}}-y\right )\chi _{{\mathcal A_{\textsf b}^{\mathcal W}}(z)}\) holds, hence, the L 2-norm of εw can be used to measure how much the constraints are violated during all the evolution of the solution. As can be seen from Table 1, this value confirms what we already stated commenting Fig. 1. In Table 2, the relative errors between the solution computed with the POD-M2 approximation and the FE one are reported for the same number of basis and for different ε. In the last column, we have listed the values of the a-posteriori estimate for the difference ∥u FE − u POD∥, which is defined as

$$\displaystyle \begin{aligned} {\| u^{\text{FE}}-u^{\text{POD}} \|{}^2}= \sum_{i=1}^m{\|u_i^{\text{FE}}-u_i^{\text{POD}}\|}^2_{L^2(0,T)}. \end{aligned}$$
Table 1 Test 1: results for the FE discretization for different ε
Table 2 Test 1: results for the POD-M2 discretization for different ε and same number of basis

We also need to clarify how we have computed the relative errors:

$$\displaystyle \begin{aligned} \begin{aligned} \text{rel-err}(T)=& \|y^{\text{FE}}(T)-y^{\text{POD}}(T)\|{}_H/\|y^{\text{FE}}(T)\|{}_H, \\ \text{rel-err}=& \|y^{\text{FE}}-y^{\text{POD}}\|{}_{L^2(0,T;H)}/\|y^{\text{FE}}\|{}_{L^2(0,T;H)}, \\ \text{rel-err(Act.S.)}= & \left| \mathcal{A}^{\text{FE}}\cup\mathcal{A}^{\text{POD}}-\mathcal{A}^{\text{FE}}\cap \mathcal{A}^{\text{POD}}\right|\big /\left(N_xN_t\right), \end{aligned} \end{aligned}$$

where \(\mathcal A^{FE}=\left ({\mathcal A_{\textsf a}^{\mathcal W}}\cup {\mathcal A_{\textsf b}^{\mathcal W}}\right )(z^{FE})\) and N t is the number of time steps. The rel-err(Act.S.) in particular points out how much the active sets of state constraints related to the optimal solution computed with the reduced order model are far to the one computed in the FE discretization. As one can see, the POD approximation gets worse as ε decreases. For example, for ε = 0.001 the optimal control computed with the reduced order model is completely far from the one computed with the full order discretization. This is justified from the fact that there are more dynamics to approximate for smaller ε, since the number of iterations of the PDASS algorithm is greater. If we want to obtain, for example, an approximation error less than 0.01 in the case of POD-M2 we have to take at least 4 basis for ε = 1, 9 for ε = 0.1, 28 for ε = 0.01 and 58 for ε = 0.001. In addition, since in Theorem 5.1 w ap depends on ε −1 and therefore also the error estimator, we have that its tightness depends on the regularization parameter. The previous statement is confirmed by the data reported in Table 2: the greater is ε the tighter is the error estimator. For example, for ε = 1 we have that it is only 1.3 times greater than the true error, instead it is 5.67 times the true one for ε = 0.01. From now to the end of the subsection, ε is fixed to 0.01. In Table 3 we present some results for Algorithm 1 for the FE and POD approximations using the two different strategies to build the POD bases. The norm of εw and also the cost functional gets closer to their values computed through the FE discretization as soon as the number of basis increases. Moreover, the PDASS algorithm applied to the reduced system converges almost in the same iterations’ number of the full one. Even if we are able to solve the reduced linear system of Algorithm 1 around 80–100 times faster than the full one, the total algorithm speed-up is approximatively 4. This is due to the fact that we have to compute the active sets for the state constraints at each algorithm’s iteration and this means that the reduced algorithm has to project into the FE discretization the approximated POD solution, compute the active sets, which costs O(NN t), and project back into the POD subspace those sets. To better compare POD-M1 and POD-M2 approaches, we also report the relative errors between the solution computed with the full and the reduced systems in Table 4. From this table, as expected, we can notice that the POD basis generated with the optimal solution performs better than the other basis: when the algorithm is getting closer to the optimal control, the information brought by the optimal snapshots is more helpful than the one brought by snapshots generated with an arbitrary control, which is usually far from the optimal one. This is also clear in Fig. 3, where we plot the differences between the optimal controls computed solving the full system and the reduced ones for 20 POD basis: the controls computed with POD-M2 are closer to the FE optimal controls than the ones obtained using the POD-M1 reduced system. This explains why we need an a-posteriori error estimator for the POD basis: we can estimate the quality of our basis and we can decide to consider a greater number of basis or to generate new basis from a different initial control. In Fig. 4, we show the comparison between the true error ∥u FE − u POD∥ and the a-posteriori error estimator. Due to the previous discussion on the quality of the POD approximation, we can notice that as expected it is tighter for POD-M2 than for POD-M1 and it becomes for both approximations tighter and smaller as soon as the number of POD basis increases, although with some oscillation.

Table 3 Test 1: results for the FE and POD discretizations for ε = 0.01
Table 4 Test 1: error values for the POD suboptimal solutions
Fig. 3
figure 3

Test 1: |u FE(t) − u POD(t)| with  = 20 basis functions. (a) POD-M1. (b) POD-M2

Fig. 4
figure 4

Test 1: comparison between ∥u FE − u POD∥ and its a-posteriori error estimate. (a) POD-M1. (b) POD-M2

6.2 Test 2: Cost of Tracking Type

For the second test, we fix ε = 0.1 and we use the same data of Test 1, except for the cost functional weights which are chosen in the following way: σ T = σ Q = 1 and σ = 0.01. Regarding σ w, we split the section in two parts: as first we study the model’s behaviour when its value decreases, then we investigate the case σ w = 0. Regarding this last condition, we want to point out that in the continuous model the terms connected to σ w in the cost functional, adjoint equation and in the error estimator are zero: this means that w is not uniquely defined, since the only condition that w has to satisfy is \({y_{\textsf a}}(t,{\boldsymbol x})\le \mathcal Ey(t,{\boldsymbol x})+\varepsilon w(t,{\boldsymbol x})\le {y_{\textsf b}}(t,{\boldsymbol x})\) a.e. in Q, which clearly has no unique solution for fixed values of y a, y b, ε and y. By the way, due to the fact that σ w = 0, we can observe that w is not more influencing the computation of the optimal control in the PDASS algorithm, so our optimal control will respect the control constraints and be the minimum of the reduced cost functional \(\hat J\), but the solution may not be in the state constraints’ range. From Table 5 we can noticed that the smaller σ w is the more the algorithm focuses on reaching the target and the less on respecting the state constraints. In addition, when σ w decreases the conditions for the PDASS algorithm are less restrictive, therefore it uses less iteration to compute the solution. As showed in Table 6, also the POD-M2 approximation becomes better when σ w gets smaller, but there is a worsening in the a-posteriori estimation: this is connected to the term \(\sigma _z^{-1}\) in (23), which makes the estimation increasing. For σ w = 0 instead, we have a simplified error estimator, which produces better results compared to the case σ w > 0 really small. As in Test 1, in Tables 7 and 8 we report the results of the finite elements solution (FE) and the reduced order ones (POD-M1,POD-M2) for σ w = 0, with different choices of basis’ number. As can be observed from Table 7, for this choice of parameters we have an improve of the speed-up gained in solving the reduced system, because in this context we do not have to compute the active sets for the state constraints. Therefore, we can have a speed-up for the algorithm similar to the one we get for solving the reduced linear system at each PDASS algorithm’s step. In addition, the case σ w = 0.0001 (or smaller) is equal to σ w = 0, which is not surprising, since this means that already for this value of σ w, we are almost ignoring the state constraints, due also to the choice on ε, but the advantage of taking σ w = 0 is to have a tighter error estimator and a greater speed-up. As last, in this test it is confirmed that the number of POD basis functions needed to approximate the full order model really depends on the choice of the controls used for building the snapshots: we can see that for 4 basis, we can not capture in a good way the FE behaviour with POD-M1 basis, but with 10 basis we get results similar to POD-M2. The optimal trajectories at time T = 1.0 are reported in Fig. 5: we can notice that the FE and the POD-M2 ones are similar already for 7 basis, which is not the case for POD-M1.

Fig. 5
figure 5

Test 2: optimal trajectories at time t = 1.0. (a) FE. (b) POD-M1-7Basis. (c) POD-M2-7Basis

Table 5 Test 2: results for the FE discretization for different σ w
Table 6 Test 2: results for the POD-M2 discretization for different σ w and same number of basis
Table 7 Test 2: results for the FE and POD discretizations
Table 8 Test 2: error values for the POD suboptimal solutions

7 Conclusions

With efficient building operation in mind, we have studied an optimal control problem of a parabolic convection-diffusion equations, with a time-dependent advection field, bilateral constraints for the boundary controls and pointwise state constraints, which have been treated with a Lavrentiev regularization. For solving this optimal control problem we have applied the primal-dual active set strategy presented in [15], which has a super-linear rate of convergence. In order to speed-up the computational time of the algorithm, we have employed the POD method and utilized the a-posteriori error estimator in [9]. In the numerical test section, we have also shown how the variation of the regularization parameter ε and of the cost functional weight σ w influences the behaviour of the solution and of the POD approximation. In addition, concerning the speed-up due to the POD method, we have noticed that this is reduced because of the computation of the state constraints’ active sets, therefore it will be interesting in future work to treat the state constraints with other methods, e.g. the augmented Lagrangian algorithm. As shown in [22], the PDASS and its POD version can be combined with MPC, in order to face long-time horizon problems, which can be really costly to solve directly with the PDASS.