Nasser Hassan Sweilam1, Tamer Mostafa Al-Ajami1, Ronald H W Hoppe2. 1. Department of Mathematics, Faculty of Science, Cairo University, Giza 12613, Egypt. 2. Institute of Mathematics, University of Augsburg, 86159 Augsburg, Germany ; Department of Mathematics, University of Houston, Houston, TX 77204-3008, USA.
Abstract
We present two different approaches for the numerical solution of fractional optimal control problems (FOCPs) based on a spectral method using Chebyshev polynomials. The fractional derivative is described in the Caputo sense. The first approach follows the paradigm "optimize first, then discretize" and relies on the approximation of the necessary optimality conditions in terms of the associated Hamiltonian. In the second approach, the state equation is discretized first using the Clenshaw and Curtis scheme for the numerical integration of nonsingular functions followed by the Rayleigh-Ritz method to evaluate both the state and control variables. Two illustrative examples are included to demonstrate the validity and applicability of the suggested approaches.
We present two different approaches for the numerical solution of fractional optimal control problems (FOCPs) based on a spectral method using Chebyshev polynomials. The fractional derivative is described in the Caputo sense. The first approach follows the paradigm "optimize first, then discretize" and relies on the approximation of the necessary optimality conditions in terms of the associated Hamiltonian. In the second approach, the state equation is discretized first using the Clenshaw and Curtis scheme for the numerical integration of nonsingular functions followed by the Rayleigh-Ritz method to evaluate both the state and control variables. Two illustrative examples are included to demonstrate the validity and applicability of the suggested approaches.
FOCP refers to the minimization of an objective functional subject to dynamical constraints on the state and the control which have fractional order models. Fractional order models are sometimes more appropriate than conventional integer order models to describe physical systems [1-4]. For example, it has been shown that materials with memory and hereditary effects and dynamical processes including gas diffusion and heat conduction in fractal porous media can be more adequately modeled by fractional order models [5]. Numerical methods for solving FOCPs have been suggested in [6-9].This paper presents two numerical methods for solving some types of FOCPs where fractional derivatives are introduced in the Caputo sense. These numerical methods rely on the spectral method where Chebyshev polynomials are used to approximate the unknown functions. Chebyshev polynomials are widely used in numerical computation [10, 11].For the first numerical method, we follow the approach “optimize first, then discretize” and derive the necessary optimality conditions in terms of the associated Hamiltonian. The necessary optimality conditions give rise to fractional boundary value problems that have left Caputo and right Riemann-Liouville fractional derivatives. We construct an approximation of the right Riemann-Liouville fractional derivatives and solve the fractional boundary value problems by the spectral method. The second method relies on the strategy “discretize first, then optimize.” The Clenshaw and Curtis scheme [12] is used for the discretization of the state equation and the objective functional. The Rayleigh-Ritz method provides the optimality conditions in the discrete regime.The paper is organized as follows: in Section 2, some basic notations and preliminaries as well as properties of the shifted Chebyshev polynomials are introduced. Section 3 contains the necessary optimality conditions of the FOCP model. Section 4 is devoted to the approximations of the fractional derivatives. In Section 5, we develop two numerical schemes and present two illustrative examples to demonstrate the validity and applicability of the suggested approaches. Finally, in Section 6, we provide a brief conclusion and some final remarks.
2. Basic Notations and Preliminaries
2.1. Fractional Derivatives and Integrals
Definition 1
Let x : [a, b] → ℝ be a function, let α > 0 be a real number, and let n = ⌈α⌉, where ⌈α⌉ denotes the smallest integer greater than or equal to α. The left (left RLFI) and right (right RLFI) Riemann-Liouville fractional integrals are defined byThe left (left RLFD) and right (right RLFD) Riemann-Liouville fractional derivatives are given according to
Moreover, the left (left CFD) and right (right CFD) Caputo fractional derivatives are defined by means of
The relation between the right RLFD and the right CFD is as follows [13]:
Further, it holds
where ℕ
0 = {0,1, 2,…}. We recall that, for α ∈ ℕ, the Caputo differential operator coincides with the usual differential operator of integer order. For more details on the fractional derivatives definitions and their properties, we refer the reader to [3, 8, 14, 15].
2.2. Shifted Chebyshev Polynomials
The well-known Chebyshev polynomials are defined on the interval [−1,1] and can be determined by the following recurrence formula [16]:
The analytic form of the Chebyshev polynomials T
(z) of degree n is as follows:
where ⌊n⌋ denotes the biggest integer less than or equal to n. The orthogonality condition reads
In order to use these polynomials on the interval [0, L], we use the so-called shifted Chebyshev polynomials by introducing the change of variable z = (2t/L) − 1. The shifted Chebyshev polynomials are defined according to
Their analytic form is given by
We note that (10) implies that T
*(0) = (−1), T
*(L) = 1. Further, it is easy to see that the orthogonality condition reads
with the weight function , h
= (b
/2)π, b
0 = 2, b
= 1, for k ≥ 1.A function y ∈ L
2([0, L]) can be expressed in terms of shifted Chebyshev polynomials as
where the coefficients c
are given by
3. Necessary Optimality Conditions
Let α ∈ (0,1) and let L, f : [a, +∞[×ℝ2 → ℝ be two differentiable functions. We consider the following FOCP [8]:
subject to the dynamical system
where M
1, M
2 ≠ 0, T, x
, and x
are fixed real numbers.
Theorem 2 (see [8])
If (x, u, T) is a minimizer of (14a)–(14c), then there exists an adjoint state λ for which the triple (x, u, λ) satisfies the optimality conditions
for all t ∈ [a, T], where the Hamiltonian H is defined by
Remark 3
Under some additional assumptions on the objective functional L and the right-hand side f, for example, convexity of L and linearity of f in x and u, the optimality conditions (15a)–(15c) are also sufficient.
4. Numerical Approximations
In this section, we provide numerical approximations of the left CFD and the right RLFD using Chebyshev polynomials. We choose the grid points to be the Chebyshev-Gauss-Lobatto points associated with the interval [0, L]; that is,Clenshaw and Curtis [12] introduced an approximation y
of the function y. We reformulate it to be used with respect to the shifted Chebyshev polynomials as follows:
Here, the summation symbol with double primes denotes a sum with both first and last terms halved.
4.1. Approximation of the Left CFD
In the sequel, some basic results for the approximation of the fractional derivative 0
D
y(t) are given.
Theorem 4 (see [17])
An approximation of the fractional derivative of order α in the Caputo sense of the function y at t
is given by
wherewhere s, r = 0,1,…, N, with θ
0 = θ
= 1/2, θ
= 1 for all i = 1,2,…, N − 1.An upper bound for the error in the approximation of the fractional derivative 0
D
of the function y is given as follows.
Theorem 5 (see [18])
Let 0
D
y
(t) be the approximation of the fractional derivative 0
D
of the function y as given by (19). Then, it holds that
where
4.2. Approximation of the Right RLFD
Let f be a sufficiently smooth function in [0, b] and let J(s; f) be defined as follows:
From (3) and (4), we deduce that
We approximate f(t), 0 ≤ t ≤ b, by a sum of shifted Chebyshev polynomials T
(2t/b − 1) according to
where t
= (b/2) − (b/2)cos(πj/N), j = 0,…, N, and obtain
Lemma 6
Let p
be the polynomial of degree N as given by (25). Then, there exists a polynomial F
of degree N − 1 such that
Proof
Let p
′(t) − p
′(s) be expanded in a Taylor series at t = s:
Then,
The assertion follows, if we choose
with an arbitrary constant A
0(s).In view of (27), we have
Moreover,
D
f(s) can be approximated by means of
We express F
(t) in (31) by a sum of Chebyshev polynomials and provide the recurrence relation satisfied by the Chebyshev coefficients. Differentiating both sides of (27) with respect to x yields
whence
To evaluate F
(s) in (31), we expand F
′(x) in terms of the shifted Chebyshev polynomials as
where the summation symbol with one prime denotes a sum with the first term halved. Integrating both sides of (35) gives
where b
= b
= 0. On the other hand, we have
By using the relation T
(u) + T
(u) = 2uT
(u) and (35), it follows that
where b
−1 = b
1. Let
Inserting F
(x) − F
(s) and (x − s)F
′(x) as given by (36) and (38) into (34) and taking (39) into account, we getThe Chebyshev coefficients c
of p
′(x) as given by (39) can be evaluated by integrating (39) and comparing it with (25):
with starting values c
= c
= 0, where a
are the Chebyshev coefficients of p
(x).
5. Numerical Results
In this section, we develop two algorithms (Algorithms A and B) for the numerical solution of FOCPs and apply them to two illustrative examples.
Example 1
We consider the following FOCP from [8]:
subject to the dynamical system
and the boundary conditions
The exact solution is given byAlgorithm A. The first algorithm for the solution of (42a)–(42c) follows the “optimize first, then discretize” approach. It is based on the necessary optimality conditions from Theorem 2 and implements the following steps.Step 1. Compute the HamiltonianStep 2. Derive the necessary optimality conditions from Theorem 2:
Use (45c) in (45a) and (45b) to obtainStep 3. By using Chebyshev expansion, get an approximate solution of the coupled system (46a), (46b) under the boundary conditions (42c).Step 3.1. In order to solve (46a) by the Chebyshev expansion method, use (18) to approximate λ. A collocation scheme is defined by substituting (18), (19), and (32) into (46a) and evaluating the results at the shifted Gauss-Lobatto nodes t
, s = 1,2,…, N − 1. This gives
s = 1,2,…, N − 1, where d
1 is defined in (20). The system (47) represents N − 1 algebraic equations which can be solved for the unknown coefficients λ(t
1), λ(t
2),…, λ(t
). Consequently, it remains to compute the two unknowns λ(t
0), λ(t
). This can be done by using any two points t
, t
∈]0,1[ which differ from the Gauss-Lobatto nodes and satisfy (46a). We end up with two equations in two unknowns:Step 3.2. In order to solve (46b) by the Chebyshev expansion method, we use (18) to approximate x. A collocation scheme is defined by substituting (18), (19), and the computed λ into (46b) and evaluating the results at the shifted Gauss-Lobatto nodes t
, s = 1,2,…, N − 1. This results in
where d
1 and d
are defined in (20). By using the boundary conditions, we have x(t
0) = 0 and x(t
) = 2/Γ(3 + α). The system (49) represents N − 1 algebraic equations which can be solved for the unknown coefficients x(t
1), x(t
2),…, x(t
).Figures 1, 2, 3, and 4 display the exact and approximate state x and the exact and approximate control u for α = 1/2 and N = 2,3.
Figure 1
Exact and approximate state.
Figure 2
Exact and approximate control.
Figure 3
Exact and approximate state.
Figure 4
Exact and approximate control.
Table 1 contains the maximum errors in the state x and in the control u for N = 2, N = 3, and N = 5.
Table 1
Maximum errors in the state x and in the control u for different values of N.
N = 2
N = 3
N = 5
Max. error in x
3.03292E − 2
3.4641E − 3
2.6415E − 4
Max. error in u
2.12592E − 1
4.1878E − 2
7.7493E − 3
Algorithm B. The second algorithm follows the “discretize first, then optimize” approach and proceeds according to the following steps.Step 1. Substitute (42b) into (42a) to obtainStep 2. Approximate x using the Clenshaw and Curtis formula (18) and approximate the Caputo fractional derivative 0
D
x and using (19). Then, (50) takes the form
where d
is defined as in (20) replacing t
by t.Step 3. Use t = (1/2)(η + 1) to transform (51) toStep 4. Use the Clenshaw and Curtis formula [12]
where
to approximate the integral (52) as a finite sum of shifted Chebyshev polynomials as follows:Step 5. According to the Rayleigh-Ritz method, the critical points of the objective functional (42a) are given by
which leads to a system of nonlinear algebraic equations. Solve this system by Newton's method to obtain x(t
1), x(t
2),…, x(t
) and use the boundary conditions to get x(t
0), x(t
). Then, the pair (x, u) which solves the FOCP has the formFigures 5, 6, 7, and 8 display the exact and approximate state x and the exact and approximate control u for α = 1/2 and N = m = 2,3.
Figure 5
Exact and approximate state.
Figure 6
Exact and approximate control.
Figure 7
Exact and approximate state.
Figure 8
Exact and approximate control.
Table 2 contains the maximum errors in the state x and in the control u for N = m = 2, N = m = 3, and N = m = 5.
Table 2
Maximum errors in the state x and in the control u for different values of N.
N = m = 2
N = m = 3
N = m = 5
Max. error in x
3.03292E − 2
3.4641E − 3
2.6416E − 4
Max. error in u
2.69495E − 1
4.8393E − 2
8.0532E − 3
A comparison of Tables 1 and 2 reveals that both algorithms yield comparable numerical results which are more accurate than those obtained by the algorithm used in [8].
Example 2
We consider the following linear-quadratic optimal control problem:
subject to the dynamical system
and the boundary conditions
The exact solution is given by
We note that, for Example 2, the optimality conditions stated in Theorem 2 are also sufficient (cf. Remark 3).Table 3 contains a comparison between the maximum error in the state x and in the control u for Algorithms A and B.
Table 3
Alg. A, N = 3
Alg. B, N = m = 3
max. error in x
7.6404E − 3
1.1943E − 2
max. error in u
7.6404E − 3
1.6339E − 1
Alg. A, N = 5
Alg. B, N = m = 5
max. error in x
7.8604E − 5
1.0304E − 4
max. error in u
7.8604E − 5
1.0600E − 3
As opposed to Example 1, in this case, Algorithm A performs substantially better than Algorithm B.
6. Conclusions
In this paper, we have presented two algorithms for the numerical solution of a wide class of fractional optimal control problems, one based on the “optimize first, then discretize” approach and the other one on the “discretize first, then optimize” strategy. In both algorithms, the solution is approximated by N-term truncated Chebyshev series. Numerical results for two illustrative examples show that the algorithms converge as the number of terms is increased and that the first algorithm is more accurate than the second one.