Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Let \(\varLambda = (-1,1),I = (0,T),T > 0\). We consider the following linear-quadratic optimal control problem for the control variable q under constraints:

$$\displaystyle{ \min _{q}\Big\{\frac{1} {2}\int _{0}^{T}\!\!\int _{ \varLambda }{(u(x,t) -\bar{ u}(x,t))}^{2}\mathrm{d}x\mathrm{d}t + \frac{\lambda } {2}\int _{0}^{T}\!\!\int _{ \varLambda }{q}^{2}(x,t)\mathrm{d}x\mathrm{d}t\Big\}, }$$
(1)

where λ and \(\bar{u}\) are given, u is governed by:

$$\displaystyle{ \begin{array}{rll} _{0}\partial _{t}^{\alpha }u(x,t) - \partial _{x}^{2}u(x,t)& = f(x,t) + q(x,t),&\forall (x,t) \in \varLambda \times I, \\ u(x,0)& = u_{0}(x), &\forall x \in \varLambda, \\ u(-1,t) = u(1,t)& = 0, &\forall t \in I, \end{array} }$$
(2)

with \(_{0}\partial _{t}^{\alpha }\) (0 < α < 1) denoting the left Caputo fractional derivative and q satisfying

$$\displaystyle{ \int _{0}^{T}\!\!\int _{ \varLambda }q(x,t)\mathrm{d}x\mathrm{d}t \geq 0. }$$
(3)

The optimal control problem (1)–(3) has been subject of many research in scientific and engineering computing. Although most research on control problems have been focused on partial differential equations of integer order, we are seeing a growing interest for research on using fractional partial differential equations, which are novel extensions of the traditional models. It has been found that the fractional order model can provide a more realistic description for some kind of complex systems in the fields covering control theory [16], viscoelastic materials [11, 13], anomalous diffusion [3, 5, 10], advection and dispersion of solutes in porous or fractured media [2], and etc. [6, 14, 19].

An approach for the numerical solution of the fractional optimal control problem (FOCP) was first proposed in [1], where the fractional variational principle and the Lagrange multiplier technique were used. Following this idea, Frederico and Torres [8, 9] formulated a Noether-type theorem in the general context and studied fractional conservation laws. In [17], a scheme using eigenfunctions expansion was derived for FOCP in a 2-dimensional distributed system. Also, by means of eigenfunction expansion approach, \(\mathrm{\ddot{O}}\) zdemir [18] investigated the control problem of a distributed system in cylindrical coordinates.

More recently, Mophou [15] applied the classical control theory to a fractional diffusion equation, involving a Riemann-Liouville fractional time derivative. The existence and uniqueness of the solution were established. Dorville et al. [7] extended the results of [15] to a boundary fractional optimal control with finite observation expressed in terms of the Riemann-Liouville integral of order α. However, none of the above work has studied the error estimates of the approaches.

In this paper we consider the optimal control problem associated to the time fractional diffusion equation (2) with Caputo fractional derivative. Differing from the approach based on the Gr\(\mathrm{\ddot{u}}\) nwald-Letnikov or eigenfunctions expansion, we construct a spectral approximation in both space and time directions based on the weak formulation introduced in [12]. We will see that the spectral method shows great advantages over low-order methods in approximating the optimal control problem with control integral constraints. Moreover, as compared to the unconstrained method considered in our previous work [20], the presence of the control constraints here leads to many additional difficulties, one of which is that the constrained problem requires some additional variational inequalities. The purpose of this work is to derive a priori error estimates for the space-time spectral approximation to the underlying problem, and propose an efficient algorithm to solve the discrete control problem.

The outline of the paper is as follows: In the next section we formulate the optimal control problem under consideration and derive the optimality conditions. Section 3 is devoted to the spectral discretization of the optimal problem. In Sect. 4, a priori error estimates for the control, state, and adjoint variables are provided. Finally we carry out, in Sect. 5, some numerical tests to verify the theoretical results.

2 Formulation of the Problem and Optimization

Let c be a generic positive constant. We use the expression \(A \lesssim B\) to mean that A ≤ cB, and use the expression AB to mean that \(A \lesssim B \lesssim A\).

Let Ω = Λ × I. For a domain \(\mathcal{O}\), which may be Λ, I or Ω, we use \({L}^{2}(\mathcal{O}),{H}^{s}(\mathcal{O})\), and \(H_{0}^{s}(\mathcal{O})\) to denote the usual Sobolev spaces, equipped with the norms \(\left \Vert \cdot \right \Vert _{0,\mathcal{O}}\) and \(\left \Vert \cdot \right \Vert _{s,\mathcal{O}}\) respectively. For the Sobolev space X with norm \(\left \Vert \cdot \right \Vert _{X}\), we define the space \({H}^{s}(I;X)\!:=\{ v\vert \left \Vert v(\cdot,t)\right \Vert _{X} \in {H}^{s}(I)\}\), endowed with the norm\(\left \Vert v\right \Vert _{{H}^{s}(I;X)}:= \left \Vert \left \Vert v(\cdot,t)\right \Vert _{X}\right \Vert _{s,I}\). Particularly, when X stands for H μ(Λ) or \(H_{0}^{\mu }(\varLambda )\), the norm of the space H s(I; X) will be denoted by \(\left \Vert \cdot \right \Vert _{\mu,s,\varOmega }\). Hereafter, in cases where no confusion would arise, the domain symbols I, Λ, Ω may be dropped from the notations.

We also introduce the state space \({B}^{s}(\varOmega ) =\!\! {H}^{s}(I,{L}^{2}(\varLambda )) \cap {L}^{2}(I,H_{0}^{1}(\varLambda )),\ \forall s > 0,\) equipped with the norm \(\left \Vert v\right \Vert _{{B}^{s}(\varOmega )} = {(\left \Vert v\right \Vert _{{H}^{s}(I,{L}^{2}(\varLambda ))}^{2} + \left \Vert v\right \Vert _{{L}^{2}(I,H_{0}^{1}(\varLambda ))}^{2})}^{1/2}\).

Now we consider the following weak formulation of the state equation (2): given q, f ∈ L 2(Ω), find \(u \in {B}^{ \frac{\alpha }{ 2} }(\varOmega )\), such that

$$\displaystyle{ \mathcal{A}(u,v) = (f + q,v)_{\varOmega } + \left (\frac{u_{0}(x){t}^{-\alpha }} {\varGamma (1-\alpha )},v\right )_{\varOmega },\ \ \ \forall v \in {B}^{ \frac{\alpha }{ 2} }(\varOmega ), }$$
(4)

where the bilinear form \(\mathcal{A}(\cdot,\cdot )\) is defined by

$$\displaystyle\begin{array}{rcl} \mathcal{A}(u,v):= \left (\ _{0}^{R}\partial _{ t}^{ \frac{\alpha }{ 2} }u,\ _{t}^{R}\partial _{T}^{ \frac{\alpha }{ 2} }v\right )_{\varOmega } + (\partial _{x}u,\partial _{x}v)_{\varOmega }.& & {}\\ \end{array}$$

Here, \(_{0}^{R}\partial _{t}^{ \frac{\alpha }{ 2} }\) and \(_{t}^{R}\partial _{T}^{ \frac{\alpha }{ 2} }\) respectively denote the left and right Riemann-Liouville fractional derivative of order \(\frac{\alpha }{2}\).

It has been proved [12] that the following continuity and coercivity hold

$$\displaystyle\begin{array}{rcl} \mathcal{A}(u,v) \lesssim \left \Vert u\right \Vert _{{B}^{ \frac{\alpha }{2} }(\varOmega )}\left \Vert v\right \Vert _{{B}^{ \frac{\alpha }{2} }(\varOmega )},\ \ \mathcal{A}(v,v) \gtrsim \left \Vert v\right \Vert _{{B}^{ \frac{\alpha }{2} }(\varOmega )}^{2},\ \ \forall u,v \in {B}^{ \frac{\alpha }{2} }(\varOmega ),& & {}\\ \end{array}$$

and the problem (4) is well-posed.

To formulate the problem we introduce the admissible set K associated to (3) as \(K:= \left \{q \in {L}^{2}(\varOmega ):\int _{\varOmega }q(x,t)\mathrm{d}x\mathrm{d}t \geq 0\right \}\), and define the cost functional:

$$\displaystyle\begin{array}{rcl} \mathcal{J} (q,u):= \frac{1} {2}\left \Vert u -\bar{ u}\right \Vert _{0,\varOmega }^{2} + \frac{\lambda } {2}\left \Vert q\right \Vert _{0,\varOmega }^{2},\ (q,u) \in K \times {B}^{ \frac{\alpha }{2} }(\varOmega ).& &{}\end{array}$$
(5)

Then the optimal control problem reads: find \(({q}^{{\ast}},u({q}^{{\ast}})) \in K \times {B}^{ \frac{\alpha }{ 2} }(\varOmega )\), such that

$$\displaystyle\begin{array}{rcl} \mathcal{J} ({q}^{{\ast}},u({q}^{{\ast}})) =\min _{ (q,u)\in K\times {B}^{ \frac{\alpha }{ 2} }(\varOmega )}\mathcal{J} (q,u)\ \ \text{subject to}\ (4).& &{}\end{array}$$
(6)

The well-posedness of the state problem ensures the existence of a control-to-state mapping \(q\mapsto u = u(q)\) defined through (4). By means of this mapping we introduce the reduced cost functional \(J(q):= \mathcal{J} (q,u(q)),\ q \in {L}^{2}(\varOmega ).\) Then the optimal control problem (6) is equivalent to: find q  ∈ K, such that

$$\displaystyle{ J({q}^{{\ast}}) =\min _{ q\in K}J(q). }$$
(7)

The first order necessary optimality condition for (7) reads

$$\displaystyle{ J{^\prime}({q}^{{\ast}})(\delta q - {q}^{{\ast}}) \geq 0,\ \ \forall \delta q \in K, }$$
(8)

where J′(q )(⋅ ) is the gradient of J(q), defined through the G\(\mathrm{\hat{a}}\) teaux derivative. The convexity of the quadratic functional implies that (8) is also sufficient for optimality.

Lemma 1.

It holds

$$\displaystyle\begin{array}{rcl} J{^\prime}(q)(\delta q) = (\lambda q + z(q),\delta q)_{\varOmega },\ \ \forall \delta q \in {L}^{2}(\varOmega ),& &{}\end{array}$$
(9)

where z(q) = z is the solution of the following adjoint state equation

$$\displaystyle{ \begin{array}{rlll} _{t}\partial _{T}^{\alpha }z(x,t) - \partial _{x}^{2}z(x,t)& =&u(x,t) -\bar{ u}(x,t),&\forall (x,t) \in \varOmega, \\ z(x,T)& =&0, &\forall x \in \varLambda, \\ z(-1,t) = z(1,t)& =&0, &\forall t \in I,\end{array} }$$
(10)

with \(_{t}\partial _{T}^{\alpha }\) being the right Caputo fractional derivative of order α.

Proof.

The proof goes along the same lines as Theorem 3.1 in [20]. □ 

The weak form of (10) reads: find \(z \in {B}^{ \frac{\alpha }{ 2} }(\varOmega )\), such that

$$\displaystyle{ \mathcal{A}(\varphi,z) = (u -\bar{ u},\varphi )_{\varOmega },\ \ \ \forall \varphi \in {B}^{ \frac{\alpha }{ 2} }(\varOmega ). }$$
(11)

It can also be proved that (11) admits a unique solution for any given \(u \in {B}^{ \frac{\alpha }{ 2} }(\varOmega )\).

In what follows we will need the mapping \(q \rightarrow u(q) \rightarrow z(q)\), where for any given q, u(q) is defined by (4), and once u(q) is known z(q) is defined by (11).

Theorem 1.

Let \(({q}^{{\ast}},u({q}^{{\ast}}))\) be the solution of the optimal control problem (6) and z(q ) be the corresponding adjoint state. Then we have

$$\displaystyle{\lambda {q}^{{\ast}} =\max \{ 0,\overline{z({q}^{{\ast}})}\} - z({q}^{{\ast}})}$$

where \(\overline{z({q}^{{\ast}})} = \int _{\varOmega }z({q}^{{\ast}})/\int _{\varOmega }1\) .

Proof.

The proof is similar to Theorem 3.1 in [4]. □ 

3 Space-Time Spectral Discretization

We define the polynomial space \(P_{M}^{0}(\varLambda ):= P_{M}(\varLambda ) \cap H_{0}^{1}(\varLambda ),S_{L}:= P_{M}^{0}(\varLambda ) \otimes P_{N}(I)\), where P M denotes the space of all polynomials of degree less than or equal to M, L stands for the parameter pair (M, N).

Then we consider the spectral approximation to (4): find \(u_{L}(q) \in S_{L}\) such that

$$\displaystyle{ \mathcal{A}(u_{L}(q),v_{L}) = (f + q,v_{L})_{\varOmega } + \left (\frac{u_{0}(x){t}^{-\alpha }} {\varGamma (1-\alpha )},v_{L}\right )_{\varOmega },\ \ \forall v_{L} \in S_{L}. }$$
(12)

The following estimate, derived in [12], will be used in the analysis later on.

Lemma 2.

For any q ∈ L 2 (Ω), let u(q) be the solution of (4) , u L (q) be the solution of (12) . Suppose \(u \in {H}^{ \frac{\alpha }{ 2} }(I;{H}^{\mu }(\varLambda )) \cap {H}^{\gamma }(I;H_{0}^{1}(\varLambda ))\) , 0 < α < 1,γ > 1,μ ≥ 1, then we have

$$\displaystyle{ \begin{array}{rl} \left \Vert u(q) - u_{L}(q)\right \Vert _{{B}^{ \frac{\alpha }{2} }(\varOmega )} \lesssim &{N}^{ \frac{\alpha }{ 2} -\gamma }\left \Vert u\right \Vert _{0,\gamma } + {N}^{-\gamma }\left \Vert u\right \Vert _{1,\gamma } + {N}^{ \frac{\alpha }{2} -\gamma }{M}^{-\mu }\left \Vert u\right \Vert _{\mu,\gamma } \\ & + {M}^{-\mu }\left \Vert u\right \Vert _{\mu, \frac{\alpha }{ 2} } + {M}^{1-\mu }\left \Vert u\right \Vert _{\mu,0}. \end{array} }$$
(13)

Similar to the continuous case, we introduce the semidiscrete reduced cost functional \(J_{L}: {L}^{2}(\varOmega ) \rightarrow \mathbb{R}:\)

$$\displaystyle\begin{array}{rcl} J_{L}(q):= \mathcal{J} (q,u_{L}(q)),\ q \in {L}^{2}(\varOmega ),& &{}\end{array}$$
(14)

where u L (q) is given by (12). Then we consider the following auxiliary optimal problem: find q  ∈ K, such that

$$\displaystyle{ J_{L}({q}^{{\ast}}) =\min _{ q\in K}J_{L}(q). }$$
(15)

The solution q of above problem fulfills the first order optimality condition

$$\displaystyle{ J{^\prime}_{L}({q}^{{\ast}})(\delta q - {q}^{{\ast}}) \geq 0,\ \ \ \forall \delta q \in K, }$$
(16)

where

$$\displaystyle{ J{^\prime}_{L}(q)(\phi ) = (\lambda q + z_{L}(q),\phi )_{\varOmega },\ \forall q,\phi \in K, }$$
(17)

with \(z_{L}(q) \in S_{L}\) being the solution of the semidiscrete adjoint problem:

$$\displaystyle{ \mathcal{A}(\varphi _{L},z_{L}(q)) = (u_{L}(q) -\bar{ u},\varphi _{L})_{\varOmega },\ \ \ \forall \varphi _{L} \in S_{L}. }$$
(18)

Now we consider the approximation of the control space to obtain the fully discrete optimal control problem. To this end, we introduce the finite dimensional subspace for the control variable: \(K_{L} = K \cap (P_{M}(\varLambda ) \otimes P_{N}(I))\). Then the full discrete optimal control problem reads: find \(q_{L}^{{\ast}}\in K_{L}\), such that

$$\displaystyle{ J_{L}(q_{L}^{{\ast}}) =\min _{ q_{L}\in K_{L}}J_{L}(q_{L}), }$$
(19)

where J L (⋅ ) is defined in (14). The unique solution of (19), \(q_{L}^{{\ast}}\), satisfies:

$$\displaystyle{ J_{L}{^\prime}(q_{L}^{{\ast}})(\delta q - q_{ L}^{{\ast}}) \geq 0,\ \ \forall \delta q \in K_{ L}. }$$
(20)

Remark 1.

Although the polynomial degree used to approximate the control variable may be different from those for the discretization of the state variable, we choose to use the same degree pair (M, N) for simplification of the notation.

4 A Priori Error Estimates

In order to carry out an error analysis for the spectral approximation (19), we first recall two results to be used in what follows.

Lemma 3 ([20]).

For all p,q ∈ L 2 (Ω), we have

$$\displaystyle{ J_{L}{^\prime}(p)(p - q) - J_{L}{^\prime}(q)(p - q) \geq \lambda \left \Vert p - q\right \Vert _{0,\varOmega }^{2}. }$$
(21)

Lemma 4 ([20]).

Let q ∈ L 2 (Ω) be a given control. Suppose \(z(q) \in {B}^{ \frac{\alpha }{ 2} }(\varOmega )\) is the continuous adjoint state determined by (11) and z L (q) is the solution of (18) . Then

$$\displaystyle{ \left \Vert z(q) - z_{L}(q)\right \Vert _{{B}^{ \frac{\alpha }{2} }(\varOmega )} \lesssim \left \Vert u(q) - u_{L}(q)\right \Vert _{0,\varOmega } +\inf _{\forall \varphi _{L}\in S_{L}}\left \Vert z(q) -\varphi _{L}\right \Vert _{{B}^{ \frac{\alpha }{2} }(\varOmega )}. }$$
(22)

We are now in a position to derive one of the main results of this paper.

Lemma 5.

Let q ∈ K be the solution of the continuous optimization problem  (7), \(q_{L}^{{\ast}}\in K_{L}\) be the solution of its discrete counterpart (19) . Suppose \({q}^{{\ast}}\in {L}^{2}(I;{H}^{\mu }(\varLambda )) \cap {H}^{\gamma }(I;{L}^{2}(\varLambda ))\) , γ > 1,μ ≥ 1, then it holds

$$\displaystyle{ \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega } \leq {N}^{-\gamma }\left \Vert {q}^{{\ast}}\right \Vert _{ 0,\gamma } + {M}^{-\mu }\left \Vert {q}^{{\ast}}\right \Vert _{ \mu,0} + \left \Vert z({q}^{{\ast}}) - z_{ L}({q}^{{\ast}})\right \Vert _{ 0,\varOmega }. }$$
(23)

Proof.

It follows from (21), (8) and (20) that for any p L  ∈ K L ,

$$\displaystyle\begin{array}{rcl} & & \lambda \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2} \\ & \leq & J_{L}{^\prime}({q}^{{\ast}})({q}^{{\ast}}- q_{ L}^{{\ast}}) - J_{ L}{^\prime}(q_{L}^{{\ast}})({q}^{{\ast}}- q_{ L}^{{\ast}}) \\ & =& J_{L}{^\prime}({q}^{{\ast}})({q}^{{\ast}}- q_{ L}^{{\ast}}) - J{^\prime}({q}^{{\ast}})({q}^{{\ast}}- q_{ L}^{{\ast}}) + J{^\prime}({q}^{{\ast}})({q}^{{\ast}}- q_{ L}^{{\ast}}) - J_{ L}{^\prime}(q_{L}^{{\ast}})({q}^{{\ast}}- q_{ L}^{{\ast}}) \\ & \leq & J_{L}{^\prime}({q}^{{\ast}})({q}^{{\ast}}- q_{ L}^{{\ast}}) - J{^\prime}({q}^{{\ast}})({q}^{{\ast}}- q_{ L}^{{\ast}}) - J_{ L}{^\prime}(q_{L}^{{\ast}})({q}^{{\ast}}- p_{ L}) \\ & =& (z_{L}({q}^{{\ast}}) - z({q}^{{\ast}}),{q}^{{\ast}}- q_{ L}^{{\ast}})_{\varOmega } + (z_{ L}(q_{L}^{{\ast}}) +\lambda q_{ L}^{{\ast}},p_{ L} - {q}^{{\ast}})_{\varOmega } \\ & \leq & c(\delta )\left \Vert z_{L}({q}^{{\ast}}) - z({q}^{{\ast}})\right \Vert _{ 0,\varOmega }^{2} +\delta \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2} + (z_{ L}(q_{L}^{{\ast}}) +\lambda q_{ L}^{{\ast}},p_{ L} - {q}^{{\ast}})_{\varOmega }, {}\end{array}$$
(24)

where δ is an arbitrary small positive number, c(δ) is a constant dependent on δ. Furthermore, for the last term in the above estimate, we have

$$\displaystyle\begin{array}{rcl} & & (z_{L}(q_{L}^{{\ast}}) +\lambda q_{ L}^{{\ast}},p_{ L} - {q}^{{\ast}})_{\varOmega } \\ & =& (z({q}^{{\ast}}) +\lambda {q}^{{\ast}},p_{ L} - {q}^{{\ast}})_{\varOmega } + (\lambda q_{ L}^{{\ast}}-\lambda {q}^{{\ast}},p_{ L} - {q}^{{\ast}})_{\varOmega } \\ & & +(z_{L}(q_{L}^{{\ast}}) - z_{ L}({q}^{{\ast}}),p_{ L} - {q}^{{\ast}})_{\varOmega } + (z_{ L}({q}^{{\ast}}) - z({q}^{{\ast}}),p_{ L} - {q}^{{\ast}})_{\varOmega } \\ & \leq & (z({q}^{{\ast}}) +\lambda {q}^{{\ast}},p_{ L} - {q}^{{\ast}})_{\varOmega } +\lambda \delta \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2} + (\lambda +2)C(\delta )\left \Vert p_{ L} - {q}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2} \\ & & +\delta \left \Vert z_{L}(q_{L}^{{\ast}}) - z_{ L}({q}^{{\ast}})\right \Vert _{ 0,\varOmega }^{2} +\delta \left \Vert z_{ L}({q}^{{\ast}}) - z({q}^{{\ast}})\right \Vert _{ 0,\varOmega }^{2}. {}\end{array}$$
(25)

Notice that \(z_{L}(q_{L}^{{\ast}}) - z_{L}({q}^{{\ast}})\) solves

$$\displaystyle{ \mathcal{A}(\varphi _{L},z_{L}(q_{L}^{{\ast}}) - z_{ L}({q}^{{\ast}})) = (u_{ L}(q_{L}^{{\ast}}) - u_{ L}({q}^{{\ast}}),\varphi _{ L})_{\varOmega },\ \ \forall \varphi _{L} \in S_{L}, }$$
(26)

and \(u_{L}(q_{L}^{{\ast}}) - u_{L}({q}^{{\ast}})\) satisfies

$$\displaystyle{ \mathcal{A}(u_{L}(q_{L}^{{\ast}}) - u_{ L}({q}^{{\ast}}),v_{ L}) = (q_{L}^{{\ast}}- {q}^{{\ast}},v_{ L})_{\varOmega },\ \ \forall v_{L} \in S_{L}. }$$
(27)

Thus taking \(\varphi _{L} = z_{L}(q_{L}^{{\ast}}) - z_{L}({q}^{{\ast}})\) in (26) and \(v_{L} = u_{L}(q_{L}^{{\ast}}) - u_{L}({q}^{{\ast}})\) in (27) gives

$$\displaystyle\begin{array}{rcl} \left \Vert z_{L}(q_{L}^{{\ast}}) - z_{ L}({q}^{{\ast}})\right \Vert _{{ B}^{ \frac{\alpha }{ 2} }(\varOmega )} \leq c_{1}\left \Vert u_{L}(q_{L}^{{\ast}}) - u_{ L}({q}^{{\ast}})\right \Vert _{{ B}^{ \frac{\alpha }{ 2} }(\varOmega )} \leq c_{1}\left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega }.& &{}\end{array}$$
(28)

Then plugging (25) and (28) into (24) yields

$$\displaystyle\begin{array}{rcl} \lambda \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2}\!\!& \leq & (z({q}^{{\ast}}) +\lambda {q}^{{\ast}},p_{ L} - {q}^{{\ast}})_{\varOmega } + c_{ 2}\delta \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2} + (\lambda +2)c(\delta )\left \Vert p_{ L} - {q}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2} {}\\ & & +\left (\delta +c(\delta )\right )\left \Vert z_{L}({q}^{{\ast}}) - z({q}^{{\ast}})\right \Vert _{ 0,\varOmega }^{2}, {}\\ \end{array}$$

where \(c_{2} = 1 +\lambda +c_{1}\). Now by taking \(\delta = \frac{\lambda } {2c_{ 2}}\), we obtain, \(\forall p_{L} \in K_{L}\),

$$\displaystyle\begin{array}{rcl} \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2}\!\! \lesssim (z({q}^{{\ast}}) +\lambda {q}^{{\ast}},p_{ L} - {q}^{{\ast}})_{\varOmega } + \left \Vert p_{ L} - {q}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2} + \left \Vert z_{ L}({q}^{{\ast}}) - z({q}^{{\ast}})\right \Vert _{ 0,\varOmega }^{2}.& &{}\end{array}$$
(29)

Let Π N and Π M be the standard L 2-orthogonal projectors defined in I and Λ, respectively. Then, it holds

$$\displaystyle{({q}^{{\ast}}-\varPi _{ N}\varPi _{M}{q}^{{\ast}},r_{ L})_{\varOmega } = 0,\ \ \ \forall r_{L} \in P_{M}(\varLambda ) \otimes P_{N}(I),}$$

and in particular

$$\displaystyle{({q}^{{\ast}}-\varPi _{ N}\varPi _{M}{q}^{{\ast}},1)_{\varOmega } = 0,}$$

that is

$$\displaystyle{\int _{\varOmega }\varPi _{N}\varPi _{M}{q}^{{\ast}}\mathrm{d}x\mathrm{d}t =\int _{\varOmega }{q}^{{\ast}}\mathrm{d}x\mathrm{d}t \geq 0.}$$

This means \(\varPi _{N}\varPi _{M}{q}^{{\ast}}\in K_{L}\). Thus by taking \(p_{L} =\varPi _{N}\varPi _{M}{q}^{{\ast}}\) in (29), we get

$$\displaystyle\begin{array}{rcl} & & \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega }^{2} \\ & \lesssim & (z({q}^{{\ast}}) +\lambda {q}^{{\ast}},\varPi _{ N}\varPi _{M}{q}^{{\ast}}- {q}^{{\ast}})_{\varOmega } + {N}^{-2\gamma }\left \Vert {q}^{{\ast}}\right \Vert _{ \gamma,0}^{2} + {M}^{-2\mu }\left \Vert {q}^{{\ast}}\right \Vert _{ 0,\mu }^{2} + \left \Vert z_{ L}({q}^{{\ast}}) - z({q}^{{\ast}})\right \Vert _{ 0,\varOmega }^{2}.{}\end{array}$$
(30)

Next, it follows from Theorem 1 that

$$\displaystyle{z({q}^{{\ast}}) +\lambda {q}^{{\ast}} =\max \{ 0,\overline{z({q}^{{\ast}})}\} = \mathit{const},}$$

and hence

$$\displaystyle{ (z({q}^{{\ast}}) +\lambda {q}^{{\ast}},\varPi _{ N}\varPi _{M}{q}^{{\ast}}- {q}^{{\ast}})_{\varOmega } = 0. }$$
(31)

Finally, (23) results from (30) and (31). □ 

Using the above Lemmas and following the same lines as the proof of Theorem 4.1 in [20], we obtain the main result concerning the approximation errors.

Theorem 2.

Suppose q and \(q_{L}^{{\ast}}\) are respectively the solutions of the continuous optimization problem (7) and its discrete counterpart (19),u(q ) and \(u_{L}(q_{L}^{{\ast}})\) are the state solutions of (4) and (12) associated to q and \(q_{L}^{{\ast}}\) respectively, and z(q ) and \(z_{L}(q_{L}^{{\ast}})\) are the associated solutions of (11) and (18) respectively. If  \({q}^{{\ast}}\in {L}^{2}(I;{H}^{\mu }(\varLambda )) \cap {H}^{\gamma }(I;{L}^{2}(\varLambda ))\) and \(u({q}^{{\ast}}),z({q}^{{\ast}}) \in {H}^{ \frac{\alpha }{ 2} }(I;{H}^{\mu }(\varLambda )) \cap {H}^{\gamma }(I;H_{0}^{1}(\varLambda ))\) , 0 < α < 1,γ > 1 and μ ≥ 1, then the following estimate holds:

$$\displaystyle\begin{array}{rcl} & & \left \Vert {q}^{{\ast}}- q_{ L}^{{\ast}}\right \Vert _{ 0,\varOmega } + \left \Vert u({q}^{{\ast}}) - u_{ L}(q_{L}^{{\ast}})\right \Vert _{{ B}^{ \frac{\alpha }{ 2} }(\varOmega )} + \left \Vert z({q}^{{\ast}}) - z_{ L}(q_{L}^{{\ast}})\right \Vert _{{ B}^{ \frac{\alpha }{ 2} }(\varOmega )} {}\\ & \lesssim & {N}^{-\gamma }\left \Vert {q}^{{\ast}}\right \Vert _{ 0,\gamma } + {M}^{-\mu }\left \Vert {q}^{{\ast}}\right \Vert _{ \mu,0} + {N}^{ \frac{\alpha }{ 2} -\gamma }(\left \Vert u({q}^{{\ast}})\right \Vert _{0,\gamma } + \left \Vert z({q}^{{\ast}})\right \Vert _{0,\gamma }) {}\\ & & +{N}^{-\gamma }(\left \Vert u({q}^{{\ast}})\right \Vert _{ 1,\gamma } + \left \Vert z({q}^{{\ast}})\right \Vert _{ 1,\gamma }) + {N}^{ \frac{\alpha }{ 2} -\gamma }{M}^{-\mu }(\left \Vert u({q}^{{\ast}})\right \Vert _{\mu,\gamma } + \left \Vert z({q}^{{\ast}})\right \Vert _{\mu,\gamma }) {}\\ & & +{M}^{-\mu }(\left \Vert z({q}^{{\ast}})\right \Vert _{\mu, \frac{\alpha }{2} } + \left \Vert u({q}^{{\ast}})\right \Vert _{\mu, \frac{\alpha }{2} }) + {M}^{1-\mu }(\left \Vert u({q}^{{\ast}})\right \Vert _{\mu,0} + \left \Vert z({q}^{{\ast}})\right \Vert _{\mu,0}). {}\\ \end{array}$$

5 Optimization Algorithm and Numerical Results

We carry out in this section a series of numerical experiments and present some results to validate the obtained error estimates. We first propose below a projection gradient optimization algorithm to solve the optimization problems. Projection gradient optimization algorithm Choose an initial control \(q_{L}^{(0)}\), and set k = 0.

  1. (a)

    Solve problems

    $$\displaystyle\begin{array}{rcl} \mathcal{A}\left (u_{L}\big(q_{L}^{(k)}\big),v_{ L}\right )& =& \left (f + q_{L}^{(k)},v_{ L}\right )_{\varOmega } + \left (\frac{u_{0}(x){t}^{-\alpha }} {\varGamma (1-\alpha )},v_{L}\right )_{\varOmega },\forall v_{L} \in S_{L}, {}\end{array}$$
    (32)
    $$\displaystyle\begin{array}{rcl} \mathcal{A}\left (\varphi _{L},z_{L}\big(q_{L}^{(k)}\big)\right )& =& \left (u_{ L}\big(q_{L}^{(k)}\big) -\bar{ u},\varphi _{ L}\right )_{\varOmega },\forall \varphi _{L} \in S_{L}. {}\end{array}$$
    (33)

    Let \(d_{L}^{(k)} = z_{L}(q_{L}^{(k)}) +\lambda q_{L}^{(k)}\);

  2. (b)

    Solve problems

    $$\displaystyle\begin{array}{rcl} \mathcal{A}(\tilde{u}_{L}^{(k)},v_{ L})& =& (d_{L}^{(k)},v_{ L})_{\varOmega },\forall v_{L} \in S_{L}, {}\end{array}$$
    (34)
    $$\displaystyle\begin{array}{rcl} \mathcal{A}(\varphi _{L},\tilde{z}_{L}^{(k)})& =& (\tilde{u}_{ L}^{(k)},\varphi _{ L})_{\varOmega },\forall \varphi _{L} \in S_{L}, {}\end{array}$$
    (35)

    and set \(\tilde{d}_{L}^{(k)} =\tilde{ z}_{L}^{(k)} +\lambda d_{L}^{(k)}\), \(\rho _{k} = \frac{(d_{L}^{(k)},d_{ L}^{(k)})_{\varOmega }} {(\tilde{d}_{L}^{(k)},d_{L}^{(k)})_{\varOmega }}\);

  3. (c)

    Update: \(q_{L}^{(k+\frac{1} {2} )} = q_{L}^{(k)} -\rho _{k}d_{L}^{(k)}\), \(q_{L}^{(k+1)} = -\min \left \{0,\overline{q_{L}^{(k+\frac{1} {2} )}}\right \} + q_{L}^{(k+\frac{1} {2} )}\);

  4. (d)

    If \(\left \Vert d_{L}^{(k)}\right \Vert \leq \) tolerance, then take \(q_{L}^{{\ast}} = q_{L}^{(k+1)}\) and solve problems (12) and (18) to get \(u_{L}(q_{L}^{{\ast}})\) and \(z_{L}(q_{L}^{{\ast}})\);

Else, set \(k = k + 1\), repeat (a)–(d).

Numerical results Let T = 1 and consider problem (6) with the exact solutions:

$$\displaystyle{u({q}^{{\ast}}) =\sin \pi x\cos \pi t,\ z({q}^{{\ast}}) =\sin \pi x\sin \pi (1 - t),\ \lambda {q}^{{\ast}} =\max \{ 0,\overline{z({q}^{{\ast}})}\} - z({q}^{{\ast}}).}$$

In the first test, we investigate the impact of the initial guess on the convergence of the projection gradient optimization algorithm. We start by considering \({q}^{(0)} = 15{q}^{{\ast}}\). In Fig. 1a, we present the convergence history of the gradient of the objective function as a function of the iteration number with \(M = 20,N = 20,\alpha = 0.5,\lambda = 1\). We see that the iterative method converges within eight iterations. We then take q (0) to be constant c with c = 0 or 10, and repeat the same computation as the previous test. The result is given in Fig. 1b. These results seem to tell that the initial guess has no significant effects on the convergence of the projection gradient iterative algorithm.

Fig. 1
figure 1

Convergence history of the gradient of the objective function. (a) \({q}^{(0)} = 15{q}^{{\ast}}\). (b) q (0) = c

Fig. 2
figure 2

Impact of λ on the convergence rate of the gradient of the cost functional

We then study the effect of the regularization parameter λ on the convergence rate of the optimization algorithm. In Fig. 2 we plot the convergence history versus the iteration number with \(M = N = 18,\alpha = 0.5\), and q (0) = 0 for several values of λ ranging from 0 to 1. It is observed that the algorithm has better convergence property for λ = 1. The convergence slows down as λ decreases. In particular, the algorithm fails to converge with λ = 0.

In what follows we fix q (0) = 0 and λ = 1 to investigate the error behavior of the numerical solution. In Fig. 3 we plot the errors as functions of the polynomial degrees M with \(\alpha = 0.4,N = 20\). As expected, the errors show an exponential decay. The errors versus N with M = 20 are shown in Fig. 4. The error curves indicate that the convergence in time is also exponential.

Fig. 3
figure 3

Errors of q, u and z versus M with \(N = 20,\alpha = 0.4\)

Fig. 4
figure 4

Errors of q, u and z versus N with \(M = 20,\alpha = 0.1\)

6 Concluding Remarks

We have presented an efficient optimization algorithm for the fractional control problem based on the spectral approximation. A priori error estimates for the numerical solution are derived. Some numerical experiments have been carried out to confirm the theoretical results. However there are many important issues needed to be addressed. For example, we can consider more complicated control problems and constraint sets. Besides, although our analysis and algorithm are designed for the optimization of the distributed control problem, we hope that they are generalizable to a greater variety of situations such as minimization problems associated to boundary conditions, diffusion coefficient, and so on.