Closed Form Solution to an Optimal Control Problem by Orthogonal Polynomial Expansion

: In this study the use of orthogonal polynomials for obtaining a close form solution to optimal control problems with a weighed quadratic cost function, is proposed. The method consists of using the Orthogonal Polynomials for the expansion of the state variables and the control signal. This expansion results in a set of linear equations, from which the closed form solution is obtained. A numerical example is provided to demonstrate the applicability and effectiveness of the proposed method.


INTRODUCTION
The goal of an optimal controller is the determination of the control signal such that a specified performance criterion is optimized, while at the same time specific physical constraints are satisfied.Many different methods have been introduced to solve such a problem for a system with given state equations.The most popular is the Riccati method for quadratic cost functions however this method results in a set of usually complicated differential equations which must be solved recursively [1].In the last few decades orthogonal functions have been extensively used in obtaining an approximate solution of problems described by differential equations [2][3][4] .The approach, also known as the spectral method [5] , is based on converting the differential equations into an integral equation through integration.The state and/or control involved in the equation are approximated by finite terms of orthogonal series and using an operational matrix of integration to eliminate the integral operations.The form of the operational matrix of integration depends on the particular choice of the orthogonal functions like Walsh functions [6] , blockpulse functions [7] , Laguerre series [8] , Jacobi series [9][10] , Fourier series [11] , Bessel series [12] , Taylor series [13] , shifted Legendry [14] , Chebyshev polynomials [15] and Hermit polynomials [16] and Wavelet functions [17] .In this study apart from the shifted Legendry Polynomials, new set of Orthogonal Polynomials are considered based on the requirement of the problem.This method proves to be fairly precise from simulation results and may be expanded to a vast range of cost functions.
Since only linear systems are considered in this study, the state space equations and the cost function are considered in the following formats: In which A and B are constant matrices.And the cost function: In which Q is a positive definite matrix and r and k are constant values.t f is the final time and specified.
As it can be seen in Eq. 2 the finite horizon cost function consists of the weighting function t k for the state vector.In the presented method here, X(t) and u(t) are expanded based on orthogonal polynomials .The main reason for the use of such an expansion is that it results in the simplification of the cost function J, this is due to the fact that the integral of the multiplication of non-identical orthogonal terms is zero.One reasonable approach is expansion based on shifted Legendry polynomials, however because of the presence of the term t k in J new weighed orthogonal polynomials must be obtained in order to be useful for solving such a problem.
Solving optimal control problems by the use of orthogonal polynomials: In the presented method, ) t ( u and X(t) must be expanded based on orthogonal polynomials in order to solve the optimal control problem.However due to the presence of the term t k in J, X(t) may not be presented by the shifted Legendry Polynomials.In order to solve this problem, weighed orthogonal polynomials with the weighting function t k , are defined which will be represented with . Then X(t) is expanded based on these new orthogonal polynomials . Some of the characteristics of orthogonal functions are recapitulated next.

Orthogonal polynomials:
The definition of orthogonal polynomials ) t ( n ψ and some of their features are presented below: In which W(t) is the weight function.The expansion of an arbitrary function [ f region is as follows: In which: One property of orthogonal polynomials is [19] : Now for a weight function 1 ) t ( W = , we have the shifted Legendre polynomials: (8)   In which: Now for a weight function k t ) t ( W = , we define the polynomials (12)   In which: The integral expansion of the weighed orthogonal polynomials (16)   The method for obtaining D is explained in the appendix.
It is worth noting that when dealing with functions and their derivatives, the property mentioned in Eq. 16 is of major importance.
Obtaining orthogonal polynomials: Different methods may be used to obtain orthogonal polynomials, namely, most commonly, the Graham-Schmidt method [18] .However this method is computationally cumbersome for large sets and may produce inaccurate results.Here, another method is introduced which is based on the properties of orthogonal polynomials, for W(t) = t k .The presented method is computationally effective and precise compared to the Graham Schmidt method due to the fact that approximations in numerical integration needed for the Graham Schmidt method are not required for the presented method.It is assumed that: Hence: (18)   In which: Now because Y is real symmetrical and positive definite it can be transformed to the form below by the cholesky method: Now based on the definition of orthogonal polynomials, we can assume that: In which I is an (n+1)×(n+1) identity matrix.This would mean that: So we can now obtain S and finally ϕ = ST.
Formulation of an optimal control problem using weighed orthogonal polynomials: Now the optimal control problem described by Eq. 1 and 2 is formulized by the use of the orthogonal polynomials.First ) t ( xi • will be expanded based on the set In which: Where, m is the order of the system.It must be noted that E is unknown and will be obtained later on.And u(t) the control signal will be expanded based on the set {P i (t)} up to degree n: In which: Note that each of the functions P i (t) may be expanded based on the set {ϕ i (t)} or vice versa in Eq. 24.Therefore we have: In which c is a (n+1)×(n+1) square matrix.Substituting into Eq.25 we have: β is also unknown and will be obtained later on.Now by the use of Eq. 16, 23 and 27 we can write: In which: where, x i0 in Eq. 29 is the initial condition for the state variable x i (t).By replacing Eq. 23, 27 and 28 in to the state Eq. 1 we have: Therefore the following equation holds for all values of t: And the matrix I may be defined as: By replacing the expansions for u and X as formulated in Eq. 31 and 32 respectively, in the expression for J in Eq. 2 we have: By the use of the properties of orthogonal functions For minimizing J with the restriction in Eq. 32 or 30 we can use the Lagrange coefficients and minimize the following expression instead: In which λ is the Lagrange coefficient and: must be minimized, which is done by solving the following equations: After performing the above differentiations and simplification [19] , the following important equations are obtained: And the set of linear equations are finally obtained: In which ⊗ is the symbol of Kronecker multiplication and by Vec(matrix) we mean placing the columns of the matrix in consecutive order in one vector.
The unknown variables i λ , i β and ij e in 37 are of first order and hence are easily obtainable from solving the linear set of Eq. in 43.By solving the set of linear Eq. in 43 the coefficients ij e and i β which were used in the expansions represented in Eq. 25 and 28 are obtained.Therefore we have now obtained the following solution to our original problem: A numerical example: In this research the result formulated in Eq. 43 is applied and compared with the result of the classical Riccati method for a specific system with the following specifications: And we wish to minimize the cost function: The problem is solved for 0 k = and 3 k = , with n = 9.The results are shown in Fig. 1 and 2 respectively.
For t f = 5, k = 0 and n = 9 the following solutions are obtained:

CONCLUSION
In this study we have presented an alternative method for obtaining an analytical approximate solution to optimal control problems with time variant weight in the cost function.The presented method makes use of the properties of orthogonal polynomials and transforms the problem into a linear set of equations.The results of the presented method proved to be accurate by comparison with that of the classical riccati method.
J takes the simpler form of:

Fig. 1 :
Fig.1: Depicted numerical results for k = 0, n = 9 of both the presented method and that of the Riccati method