An Efficient Pseudospectral Method for Solving a Class of Nonlinear Optimal Control Problems

and Applied Analysis 3 where d(t) is a set of continuous functions on [0, t f ] and S is a set which contains boundary points of state variable y(t). Also, y(t) ∈ R, u(t) ∈ R, and f(t, y(t)) ∈ R. According to discussions in [11], we can assume that d (t) = {D (t, u (t)) : u (t) ∈ U} , t ∈ [0, t f ] , (5) where U ⊂ R is a compact set and D(t, u(t)) = (D 1 (t, u(t)), D 2 (t, u(t)), . . . , D n (t, u(t))) T is a continuous function on [0, t f ] × U. Thus, OCP (4) can be rewritten in the form


Introduction
Optimal control problems (OCPs) have received considerable attention during the last four decades because of their applications.Such problems arise in many areas of science and engineering and play an important role in the modeling of real-life phenomena in other fields of science.The principal difficulty in studying OCPs via traditional and classical methods lies in their special nature.Obviously, most of OCPs cannot be solved by the well-known indirect methods [1,2].Therefore, it is highly desirable to design accurate direct numerical approaches to approximate the solutions of OCPs [3].Among all of the numerical techniques for solving smooth OCPs, orthogonal functions and polynomials have been applied in a huge size of research works.High accuracy and ease of applying these polynomials and functions for OCPs are two important advantages which have encouraged many authors to use them for different types of problems.For solving smooth OCPs, there exist a broad class of methods based on orthogonal polynomials which were presented by famous applied mathematics scientists such as [4,5].The fundamental idea of these methods is based upon pseudospectral (or spectral collocation) operational matrices of differentiation.However, Legendre spectral operational matrix of differentiation was used in [6] (for other applications of spectral operational matrices of differentiation see [7]).The best property of the spectral operational matrices of differentiation is the sparsity, while the pseudospectral ones are relatively filled matrices.Another computational approach for solving OCPs which is based on high order Gauss quadrature rules was presented in [8].However, high order of accuracy may be obtained by this method, but suitable preconditionings should be explored because of its ill-conditioning of the associated algebraic system.
In many real mathematical models, the controller should be restricted.In other words, the control functions of OCPs are bounded in many cases.According to the classical theory of optimal control [9], if the control functions are bounded and appear linearly in the cost functionals and dynamical systems, the resulting problem is a Bang-Bang OCP.In this case, the control functions are discontinuous.Therefore, we deal with a nonsmooth OCP.For dealing with such nonsmooth OCPs, some new numerical methods have been proposed in the literature such as [10,11].These approaches are based on finite difference methods (FDMs).Simplicity of the discretization by FDMs is usually easy to handle, but lower order of accuracy may make them unsuccessful.Therefore, we should look at high order numerical methods such as spectral or pseudospectral techniques.But, as it is mentioned in the literature, spectral schemes are the best tools just for the problems with smooth solutions and data.In other words, if we apply these methods for approximating nonsmooth functions we usually observe the Gibbs phenomena.The following example illustrates this fact.
Example 1 (see [9]).We consider the following OCP: ( Since the computational interval is [0, 2], we should change it into [−1, 1] by a simple transformation as follows: ( The optimal control of the above-mentioned problem is given in the following form: For approximating the control function of this problem, we use the classical spectral method [6].As it is depicted in Figures 1 and 2, the desired optimal control cannot be obtained in a good manner.From these Figures one can observe that not only the exact value of switching point (i.e.,  = 0.096) is not detected with a high accuracy, but also the obtained solutions have additional jumps in the boundary of domain.These are the disadvantages of the applying the classical spectral methods for solving nonsmooth problems.
To delete these mentioned disadvantages, a robust spectral method is presented in [12] for solving a class of nonsmooth OCPs that has some fundamental differences with the classical spectral techniques.First, the computational interval is partitioned into subintervals where the size of each subinterval is considered as an unknown parameter, and this enables us to compute the switching times more efficiently.Second, in contrast with the classical spectral schemes, the integral form of the dynamical system is considered.This equivalent form is found by integrating the differential dynamics and adding the initial conditions.Our fundamental goal of this paper is to extend a new idea which was introduced in [12] to approximate the control and state functions of the following nonsmooth OCP: where () is a set of continuous functions on [0,   ] and  is a set which contains boundary points of state variable ().Also, () ∈ R  , () ∈ R  , and (, ()) ∈ R. According to discussions in [11], we can assume that where  ⊂ R  is a compact set and (, ()) = ( 1 (, ()),  2 (, ()), . . .,   (, ()))  is a continuous function on [0,   ] × .Thus, OCP (4) can be rewritten in the form It should be noted that the dynamical system of ( 6) is nonlinear in terms of control ().For handling OCP (6) in a proper manner, we first linearize the nonlinear dynamical system by an interesting technique which is called linear combination property of intervals (LCPI).After this stage, the linearized dynamical system is transformed into a multidomain dynamical system via computational interval partitioning.Collocating these constraints at the Legendre Gauss Lobatto (LGL) points together with using the Legendre Gauss Lobatto quadrature rule for approximating the involved integrals enables us to transform the basic OCPs into the associated nonlinear programming problems (NLPs).
The paper is organized as follows.Section 2 is devoted to linearize the nonlinear dynamical system by using LCPI.In Section 3, we design our basic idea which is based on approximation of the associated control and state functions by piecewise constant and piecewise polynomials, respectively.It should be noted that Legendre Gauss Lobatto points are used for collocating the linearized dynamical system.In Section 4, we present a numerical example, demonstrating the efficiency of the suggested numerical algorithm.Concluding remarks are given in Section 5.
So by considering  +1 (  ) =  +1  , problem ( 19) is discretized to the following NLP: Here,   ,    ,  = 0, . . ., ,  = 1, . . ., , and parameters  1 , . . .,   ,   are unknown variables in the NLP.Note that  0  is known and  0  =  0 .In the above discretization procedure, the number of switching points, , is considered as a known parameter.So at first we should guess the number of switching points.This is the disadvantage of the proposed method.It should be noted that if the number of switching points, , is chosen correctly, then the resulting value of   is equal to its lower or upper bounds; furthermore,   changes in each switching point.

Numerical Example
We now apply the proposed idea for solving a nonlinear OCP governed by differential inclusion.This example was first introduced in [11].In the mentioned work, the authors used the simplest form of FDMs.One of the advantages of [11] is that we finally solve a Linear Programming (LP) problem.However, this method has other disadvantages such as needing higher values of approximations (i.e., ), and this leads to ill-conditioning of the associated discrete problem.Our presented ideas do not contains the difficulties of the classical spectral methods and FDMs for solving nonsmooth OCPs and also achieve superior results with respect to at least 3 other methods.These advantages confirm the efficiency of this modern spectral approximation.The following example is modeled using the mathematical software package MAPLE, and the corresponding nonlinear programming problem is solved using the command NLPSolve.It should be noted that if the NLP is univariate and unconstrained except for finite bounds, quadratic interpolation method may be used.If the problem is unconstrained and the gradient of the objective function is available, the preconditioned conjugate gradient (PCG) method may be used.Otherwise, the sequential quadratic programming (SQP) method can be used.According to the structure of our NLP, the SQP method is used.
Example 2. We consider the following nonlinear OCP governed by differential inclusion: According to discussions in [11], the above OCP can be rewritten in the following form: (30) In this problem, the control function appears nonlinearly, and we should linearize the initial dynamical system.According to the idea of LCPI, the above OCP can be reduced to a linear OCP which is Bang-Bang.Here, (, ()) = − tan((/ 8) 3 () + ).Thus, It should be noted that () ∈ [0, 1] is the new control function, which is called associated control.By considering this approximation for (, ()), the basic OCP is approximated by the following Bang-Bang OCP: According to our experiences in [11], we assume that the number of switching points is  = 3.Since by applying this assumption we reach to the exact results in which the new associated control () is switched between its lower and upper bounds, the numerical results related to the values of switching points and objective function for different values of  are provided in Table 1.Moreover, the associated control (), control (), and optimal state () are depicted in Figures 3, 4, and 5, respectively.Moreover, in Table 2 comparisons of the numerical results of the proposed method with respect to the methods of [6,10,13] are given.From  this table one can see the efficiency and applicability of the suggested method for solving nonlinear OCPs governed by differential inclusions.

Concluding Remarks
In this study, a robust numerical technique has been used for solving a class of optimal control problems (OCPs) governed by differential inclusions.The proposed idea includes linearizing the dynamical system in which the resulting problem is a Bang-Bang OCP.After obtaining this nonsmooth OCP, we use the general idea of [12] for dealing with such problems in the best manner.As observed in the numerical example, the proposed scheme has superior results with regard to at least 3 methods which confirm the applicability of the method.One of the disadvantages of our method is more sensitivity to initial guess in comparison with the classical spectral schemes.However, our idea is terminated successfully by considering an initial guess from the solution of the traditional spectral techniques, even for small values of .
Approximate optimal control history for N = 16

Table 1 :
Numerical results of Example 2.

Table 2 :
Comparisons of the methods in evaluating the objective function  * .