Legendre Approximations for Solving Optimal Control Problems Governed by Ordinary Differential Equations

In this paper Legendre integral method is proposed to solve optimal control problems governed by higher order ordinary differential equations. Legendre approximat ion method reduced the problem to a constrained optimizat ion problem. Penalty partial quadratic interpolation method is presented to solve the resulting constrained optimization problem. Error estimates for the Legendre approximations are derived and a technique that gives an optimal approximat ion of the problems is introduced. Numerical results are included to confirm the efficiency and accuracy of the method.


Introduction
Spectral methods using expansion in orthogonal polynomials such as Chebyshev polynomials have proven successful in the numerical approximat ion of various boundary value problems; see for instance [12]. If these polynomials are used as basis functions, then the rate of decay of the expansion coefficients is determined by the smoothness properties of the function being expanded [17]. Th is choice of trial functions is responsible for the superior approximation properties of spectral methods when compared with fin ite difference and finite element methods [2]. For spectral and pseudospectral methods, explicit expressions for the expansion coefficients of the derivatives in terms o f the expansion coefficients of the solution are needed. Infinite-horizon Pontryagin's principle has been introduced early in [1]. The authors in [6] introduced a Chebyshev spectral procedure for solving optimal control prob lems.
In [3], the author obtained a general formu la when the basis functions are the Ultraspherical polynomials, wh ile Chebyshev and Legendre pseudospectral approximat ions are used to solve integral and integro-differential equations in [4] and [8], respectively.
It should be mentioned that the study of the existence and the structure of solutions of optimal control problems defined on fin ite intervals has recently been a rapid ly growing area of research. See, for examp le, [7,9,11,14] and the references mentioned therein. A variety of numerical methods for solving infinite horizon variational optimal control problem exists in [15] and [18]. Some kind of optimal control problems which are governed by ordinary differential equations are discussed in [5,16]. Linear quadratic optimal control problem is solved by using Legendre approximation [10]. The most common approach is to replace the unknowns of the problem by some appro ximation function and determine the unknowns by min imizing the resulting constrained optimizat ion problem. The time optimal boundary control of a one-dimensional vibrating system subject to a control constraint that prescribes an upper bound for the 2 L -norm of the image of the control function under a Volterra operator [13].
The proposed algorithm describes an alternative technique. The system dynamics can be approximated by transforming the boundary value problem for ord inary differential equations into integral formu las. Start with a Legendre spectral approximation for the highest-order derivative and generate approximations to the lowest-order derivatives through successive integrations. Therefore, the differential and integral exp ressions that arise in the system dynamics, the performance index and the initial (o r boundary) conditions (and even for general mult ipoint boundary conditions) are converted into algebraic equations with unknown coefficients. This algorith m is of the fin ite element type and results in static optimization problems with a relatively small number of variables. Th is means that the optimal control prob lem is reduced to a parameter static optimization problem, which consists of the minimization of an objective function, subject to a system of algebraic constraints that are linear in the state variables, irrespective of whether the dynamic system itself is linear or nonlinear. In such cases, the static optimization problem can be efficiently performed using the penalty partial quadratic interpolation (PPQI) technique [5]. We derived error estimation of this appro ximat ion, and introduced an algorith m that gives an optimal appro ximation of the integrals.
The paper is organized as follows: In section 2, we introduce mathematical formu lation of optimal control problem with linear terminal constraints. In section 3,a Legendre approximate solution is presented. In section 4, error bounds for Legendre method is explained. In section 5, some numerical examp les are given to clarify the proposed method and compared with other methods. Finally, in section 6 some remarks and conclusions of the work are presented.

Setting Optimal Control Problems With Linear Terminal Constraints
Due to the global nature of the s mooth functions, spectral methods are usually global methods, i.e. the value o f a derivative at a certain point in space depends on the solution at all the other points in space, and not just the neighboring grid points. Due to this fact, spectral methods usually have a very high order of appro ximation. Spectral convergence meaning that the error is in fact decreasing exponentially as opposed to algebraically as for fin ite-difference methods.
Spectral methods usually give the exact derivative of a function; the only error is due to the truncation to a finite set of smooth functions/coefficients. On the other hand, spectral methods are geo metrically less flexib le than lo wer-order methods, and they are usually mo re comp licated to implement. Additionally, the spectral representation of the solution is difficult to co mbine with sharp gradients, e.g. problems involving shocks and discontinuities.
In the next section, optimal control problems with spectral methods are very adapted and efficient discretization schemes. Now, consider the problem of finding the control ( ) u t which minimizes the cost functional: , ,..., , , 0 1, 2,..., r n = and the linear initial constraints, and the terminal constraints, where the time T is assumed to be fixed, L and M are vector functions of dimension l and m , respectively, with , we have: Hence the optimal control problem beco mes: Minimize (2.6) and the linear initial and terminal constraints,

Legendre Approximations for OCP
Legendre approximat ions are adopted here to approximate the solution of the problem. We start with Legendre approximat ions for the highest-order derivative, ( ) n x , and generate approximations to the lowest-order derivatives x , through successive integrations of the highest-order derivative.
Suppose that [ ] where ( ), 0,1,..., i t i N Ψ = are some unknowns. By integration, and making use of the given conditions, we get Now we apply our Legendre integral appro ximation : where the constants r c , 0,1,.., 1 r n = − may be defined fro m the given conditions. Making use of the approximation for the control variable as ( ) ( ) The constrained optimizat ion problem is then takes the form: Minimize The problem (4.6)-(4.7) is solved by using penalty partial quadratic interpolation technique [5]. We therefore use: to decide whether the computed solution in close enough to the optimal solution.

Error Estimation
In this section, an estimation of the error bound of the Legendre integration method is presented in the flowing theorem.

Theorem (5.1)[8]
Let The following theorem gives the error bounds of the system dynamic.

Numerical Examples and Application
Now, we consider the following problems to show the effectiveness of our technique.

Example 1:
Among all p iecewise differentiable control variab les, find the optimal control ( ) t u which min imizes ( ) ( ) ( ) Subject to: The first step in solving this problem by the proposed method is to transform the time interval into t ∈[-1, 1]. At the end, this will lead to the following problem. Minimize Subject to: We approximate the inequality constraint by adding slack variables: Solving this problem (6.9)-(6.11) by using the proposed method by 9 th order Legendre, we find the optimal value is

Example (3)
Find a suitable control for min imization of the following optimal control problem[24]: Minimize with the boundary conditions: x = By apply the proposed method; the optimal values of state and control given in Table ( 2). Table (3) shows that the presented Legendre approximations are more efficiency than the method in [16]. 0.8 ( ) ( ) 4 ( ) 1.4 ( ) 0.14 ( ) x t x t u t x t x t = − + + −  , and 1 ( 1) 5 x − = − , 2 ( 1) 5 x − = − The optimal cost is * 29.37170568 J ≈ as given in [9]. Table (4) shows the state and control variables as computed by the proposed method. Table 5. Comparison with results in Ref. [11] Methods * J Ref. [11] 29.4081 Present method with N=10 29.2928 The major advantages of this method is that, we can deal directly with the highest-order derivatives in the d ifferential equation without transforming it to a system of first order, and that will reduce the number of the unknowns. The tables show that the suggested technique is quite reliab le. The methods produce an accurate solution at small nu mber of nodes. The co mparison of the maximu m absolute error resulting fro m the proposed method and those obtained by [5], [11] and [19] show favourable agreement and always it is more accurate than these treatments.

Conclusions
The basic idea of our present method is to transform the optimal control problems governed by ordinary differential equations to a constrained optimizat ion problem, by using Legendre approximat ion method. We solve the resulting constrained optimization problem since it is easier than solving the original problem. Here we used (PPQI) method, which may be more suitable in such case, where the number of constraints is increases. Finally, the method has been extended to the linear and nonlinear optimal control proble ms.