# Optimal Control Based on the Polynomial Least Squares Method

Authors: Constantin Bota; Bogdan Cǎruntu; Mǎdǎlina Sofia Pașca; Marioara Lǎpǎdat
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

In this paper an approach for computing an optimal control law based on the Polynomial Least Squares Method (PLSM) is presented. The initial optimal control problem is reformulated as a variational problem whose corresponding Euler-Lagrange equation is solved by using PLSM. A couple of examples emphasize the accuracy of the method.


---

## Body

## 1. Introduction

Optimal control problems occur in many areas of science and engineering such as system mechanics, hydrodynamics, elasticity theory, geometrical optics, and aerospace engineering, and they are one of the several applications and extensions of the calculus of variations.The beginning of optimal control is represented by the Brachistochrone problem formulated by Galileo in 1683: A mass material point m moves without friction along a vertical curve joining the points(x0,y0) and (x1,y1). There is the question of finding such a curve for which the scroll time is minimal, curve called brachistochrone. Galileo’s attempts to resolve it were incorrect [1, 2]. The problem raised great interest at that time and solutions were proposed by many mathematicians like Bernoulli, Leibnitz, l’Hopital, and Newton [1]. These results were published by Euler in 1744, who concluded “nothing at all takes place in the universe in which some rule of maximum or minimum does not appear.” Euler also formulated the problem in general terms as the problem of finding the curve y(t) over the interval [a,b] (with y(a) and y(b) known) which minimizes:(1)J=∫abFt,yt,y′tdtfor some given function F(t,y(t),y′(t)), where y′=dy/dt.Euler presented a necessary condition of optimality for the curvey(t):(2)ddtFy′t,yt,y′t=Fyt,yt,y′twhere Fy′ and Fy represent the partial derivatives with respect to y′ and y, respectively.The solution techniques proposed initially had been of a geometric nature until 1755 when Lagrange described an analytical approach, based on perturbations or “variations" of the optimal curve and using his “undetermined multipliers," which led directly to Euler’s necessary condition, now known as the “Euler-Lagrange equation." Euler also adopted this approach and renamed the subject “the calculus of variations" [3].In the years to come, considerable efforts have been made to develop optimal control techniques. A classification of methods for solving optimal control problems is presented by Berkani et al. in [3]. Among the most used ones we mention the following.(i) The Dynamic Programming method, based on the principle of optimality, was first formulated by Bellman [4] and often used in the analysis and design of automatic control systems. Bellman’s partial differential equation and the boundary conditions included are necessary conditions for obtaining the minimum of the optimal control problem.(ii) The Pontryagin Minimum Principle [5] is built on defining the Hamiltonian function by introducing adjoint variables. The optimal control law is obtained by solving the canonical differential equations (the Hamilton equations) which are the necessary conditions of optimality according to the minimum principle [6]. The optimality conditions are in general not able to provide the exact optimum since the resulting two-point boundary value problem (Bellman partial differential equation) is not easy to be solved analytically and usually computational methods are employed [7–9].In this paper we apply the Polynomial Least Squares Method (PLSM) in order to compute approximate analytical polynomial solutions for a optimal control problems. This method was used by C. Bota and B. Căruntu in 2014 to compute approximate analytical solutions for the Brusselator system which is a fractional-order system of nonlinear differential equations [10]. In the following years the accuracy of the method is emphasized by its use in solving several types of differential equations [11–13].The optimal control problem approached in this paper is the computation of the optimal control lawu(t):[0,tf]⊂R→R which minimizes the performance index:(3)J=∫0tfFyt,ut,tdtwhere the state equation is(4)y′t=fyt,ut,tand the state variable y(t) satisfies the constraints y(0)=y0 and y(tf)=yf.We will assume that F is of classC1, so the solution of the optimal control problem exists and is unique for the given conditions. The state equation (4) may be linear or nonlinear but we also assume that u(t) can be explicitly obtained from (4) as a function of y(t). In this case solving the optimal control problem is equivalent to solving the variational problem of finding the minimum of functional:(5)J=∫0tfGt,yt,y′tdtwith(6)y0=y0,ytf=yfwhere the relation (5) is obtained from (3) by substituting the expression for u(t) as a function of y(t) (4).The necessary condition for the uniqueness of the solution to the problem (5)-(6) is that y(t) satisfies the conditions (6) and the Euler-Lagrange equation:(7)∂Gt,yt,y′t∂yt=ddt∂Gt,yt,y′t∂y′t.


## 2. Approximate Solution for an Optimal Control Problem Using the Polynomial Least Squares Method

### 2.1. The Polynomial Least Squares Method

The Euler-Lagrange equation associated with the optimal problem (5)-(6) may have the expression:(8)y′′t=Fy′t,yt,twhere F may be linear or nonlinear. We associate with this equation the following operator:(9)Dyt=y′′t-Fy′t,yt,tIf we denote by y~(t) an approximate solution of (8), the error obtained by replacing the exact solution y(t) with the approximation y~(t) is given by the remainder:(10)Rt,y~t=Dy~t,t∈0,tf.Taking into account the boundary conditions (6), for ϵ∈R+, we will compute approximate polynomial solutions y~ of the problem (8), (6) on the interval [0,tf] as follows.Definition 1.
We call anϵ-approximate polynomial solution of the problem (8), (6) an approximate polynomial solution y~ satisfying the relations(11)Rt,y~<ϵ(12)y~0=y0,y~tf=yfWe call aweakϵ-approximate polynomial solution of the problem (8), (6) an approximate polynomial solution y~ satisfying the relation(13)∫0tfRt,y~dt≤ϵtogether with the initial conditions (6)Definition 2.
LetPm(t)=c0+c1t+c2t2+⋯+cmtm, ci∈R, i=0,1,…,m, be a sequence of polynomials satisfying the conditions Pm(0)=y0, Pm(tf)=yf.
We call the sequence of polynomialsPm(t) convergent to the solution of the problem (8), (6) if limm→∞D(Pm(t))=0.We observe that from the hypothesis of the initial problem (8), (6) it follows that there exists a sequence of polynomials Pm(t) which converges to the solution of the problem. We will compute a weak ϵ-approximate polynomial solution, in the sense of the Definition 1, of the type(14)y~t=∑k=0mdktkwhere d0,d1,…,dm are constants which are calculated using the following steps:(i)
By substituting the approximate solution (14) in (8) we obtain the remainder:(15)Rt,y~=y~′′t-Fy~′t,y~t,tWe remark that if we could findd0,d1,…,dm such that R(t,y~)=0,y~(0)=y0,y~(tf)=yf, then by substituting d0,d1,…,dm in (14) we would obtain the exact solution of the problem (8), (6). This is not generally possible, unless the exact solution is actually a polynomial(ii)
We attach to the problem (8), (6) the following functional:(16)Jd2,d3⋯,dm=∫0tfR2t,y~tdtwhered0,d1 are computed as functions of d2,d3⋯dm using the conditions (6).(iii)
We compute the valuesd20,d30,⋯dm0 as the values which give the minimum of the functional J and the values of d00 and d10 as functions of d20,d30,⋯dm0 using the conditions (6).(iv)
Using the constantsd20,d30,⋯dm0 previously determined we compute the polynomial(17)Mmt=∑k=0mdk0tkTheorem 3.
The sequence of polynomialsMm(t) from (17) satisfies the property(18)limt→∞∫0tfR2t,Mmtdt=0Moreover, if ∀ϵ>0,∃mo∈N,m>m0, it follows that Mm(t) is aweakϵ-approximate polynomial solution of the problem (8), (6)Proof.
Based on the way the polynomialsMm(t) are computed and taking into account the relations (15)-(17), the following inequalities are satisfied:(19)0≤∫0tfR2t,Mmtdt≤∫0tfR2t,Pmtdt,∀m∈N,where Pm(t) is the sequence of polynomials introduced in Definition 2.
It follows that(20)0≤limt→∞∫0tfR2t,Mmtdt≤limt→∞∫0tfR2t,Pmtdt=0.We obtain(21)limt→∞∫abR2t,Mmtdt=0.From this limit we obtain that ∀ϵ>0,∃mo∈N,m>m0 and it follows that Mm(t) is aweakϵ-approximate polynomial solution of the problem (8), (6).Remark 4.
In order to findϵ-approximate polynomial solutions of the problem (8), (6) by using the Polynomial Least Squares Method we will first determine weak approximate polynomial solutions, y~. If |R(t,y~)|<ϵ then y~ is also an ϵ-approximate polynomial solution of the problem.


### 2.2. Application of the Polynomial Least Squares Method for an Optimal Control Problem

We will find the approximate solution of the optimal control problem (3)-(4) using the following steps:(i)
We transform the optimal control problem (3)-(4) in a variational problem (5)-(6) as described in the introduction.(ii)
We attach to the variational problem (5)-(6) the corresponding Euler-Lagrange equation (7), (8).(iii)
We compute the approximate solutiony~(t) of the Euler-Lagrange equation using PLSM as described in the previous section. Thus y~(t) is an approximation of the state variable y(t) of the optimal control problem.(iv)
Finally we compute an approximationu~(t) of the optimal control law u(t) by means of the state equation (4).


## 2.1. The Polynomial Least Squares Method

The Euler-Lagrange equation associated with the optimal problem (5)-(6) may have the expression:(8)y′′t=Fy′t,yt,twhere F may be linear or nonlinear. We associate with this equation the following operator:(9)Dyt=y′′t-Fy′t,yt,tIf we denote by y~(t) an approximate solution of (8), the error obtained by replacing the exact solution y(t) with the approximation y~(t) is given by the remainder:(10)Rt,y~t=Dy~t,t∈0,tf.Taking into account the boundary conditions (6), for ϵ∈R+, we will compute approximate polynomial solutions y~ of the problem (8), (6) on the interval [0,tf] as follows.Definition 1.
We call anϵ-approximate polynomial solution of the problem (8), (6) an approximate polynomial solution y~ satisfying the relations(11)Rt,y~<ϵ(12)y~0=y0,y~tf=yfWe call aweakϵ-approximate polynomial solution of the problem (8), (6) an approximate polynomial solution y~ satisfying the relation(13)∫0tfRt,y~dt≤ϵtogether with the initial conditions (6)Definition 2.
LetPm(t)=c0+c1t+c2t2+⋯+cmtm, ci∈R, i=0,1,…,m, be a sequence of polynomials satisfying the conditions Pm(0)=y0, Pm(tf)=yf.
We call the sequence of polynomialsPm(t) convergent to the solution of the problem (8), (6) if limm→∞D(Pm(t))=0.We observe that from the hypothesis of the initial problem (8), (6) it follows that there exists a sequence of polynomials Pm(t) which converges to the solution of the problem. We will compute a weak ϵ-approximate polynomial solution, in the sense of the Definition 1, of the type(14)y~t=∑k=0mdktkwhere d0,d1,…,dm are constants which are calculated using the following steps:(i)
By substituting the approximate solution (14) in (8) we obtain the remainder:(15)Rt,y~=y~′′t-Fy~′t,y~t,tWe remark that if we could findd0,d1,…,dm such that R(t,y~)=0,y~(0)=y0,y~(tf)=yf, then by substituting d0,d1,…,dm in (14) we would obtain the exact solution of the problem (8), (6). This is not generally possible, unless the exact solution is actually a polynomial(ii)
We attach to the problem (8), (6) the following functional:(16)Jd2,d3⋯,dm=∫0tfR2t,y~tdtwhered0,d1 are computed as functions of d2,d3⋯dm using the conditions (6).(iii)
We compute the valuesd20,d30,⋯dm0 as the values which give the minimum of the functional J and the values of d00 and d10 as functions of d20,d30,⋯dm0 using the conditions (6).(iv)
Using the constantsd20,d30,⋯dm0 previously determined we compute the polynomial(17)Mmt=∑k=0mdk0tkTheorem 3.
The sequence of polynomialsMm(t) from (17) satisfies the property(18)limt→∞∫0tfR2t,Mmtdt=0Moreover, if ∀ϵ>0,∃mo∈N,m>m0, it follows that Mm(t) is aweakϵ-approximate polynomial solution of the problem (8), (6)Proof.
Based on the way the polynomialsMm(t) are computed and taking into account the relations (15)-(17), the following inequalities are satisfied:(19)0≤∫0tfR2t,Mmtdt≤∫0tfR2t,Pmtdt,∀m∈N,where Pm(t) is the sequence of polynomials introduced in Definition 2.
It follows that(20)0≤limt→∞∫0tfR2t,Mmtdt≤limt→∞∫0tfR2t,Pmtdt=0.We obtain(21)limt→∞∫abR2t,Mmtdt=0.From this limit we obtain that ∀ϵ>0,∃mo∈N,m>m0 and it follows that Mm(t) is aweakϵ-approximate polynomial solution of the problem (8), (6).Remark 4.
In order to findϵ-approximate polynomial solutions of the problem (8), (6) by using the Polynomial Least Squares Method we will first determine weak approximate polynomial solutions, y~. If |R(t,y~)|<ϵ then y~ is also an ϵ-approximate polynomial solution of the problem.


## 2.2. Application of the Polynomial Least Squares Method for an Optimal Control Problem

We will find the approximate solution of the optimal control problem (3)-(4) using the following steps:(i)
We transform the optimal control problem (3)-(4) in a variational problem (5)-(6) as described in the introduction.(ii)
We attach to the variational problem (5)-(6) the corresponding Euler-Lagrange equation (7), (8).(iii)
We compute the approximate solutiony~(t) of the Euler-Lagrange equation using PLSM as described in the previous section. Thus y~(t) is an approximation of the state variable y(t) of the optimal control problem.(iv)
Finally we compute an approximationu~(t) of the optimal control law u(t) by means of the state equation (4).


## 3. Applications

In this section we apply the Polynomial Least Squares Method in order to compute analytical approximate optimal control laws for three optimal control problems.


### 3.1. Application 1

We consider the following optimal control problem [3]:(22)minut∫012-yt2+u2tdtwhere the state equation is(23)y′t=ut-14ytand the boundary conditions are(24)y0=0,y1=2The exact solution of this problem is [3](25)yt=e-t-e-63e2-63et+63e2t+63e2+t+e1+2t32-1+e2In order to apply PLSM we follow the steps presented in the previous section:(i)
From the state equation (23) we obtain the optimal control law u(t) as a function of the state variable y(t):(26)ut=y′t+14ytReplacing this expression ofu(t) in the performance index (22) we transform the initial optimal control problem into the following variational problem:
(a)
Find the minimum of the functional(27)∫012-yt2+y′t+14yt2tdtsubject to the boundary conditions (24).(ii)
The corresponding Euler-Lagrange equation is(28)y′′t-yt+6332=0(iii)
We compute using PLSM an approximate analytical solution of the type(29)y~t=d0+d1·t+d2·t2+d3·t3+d4·t4+d5·t5+d6·t6+d7·t7+d8·t8+d9·t9.From the boundary conditions (24) we obtain d~0=0 and d1=2-d2-d3-d4-d5-d6-d7-d8-d9.The corresponding remainder (15) is (30)Rt=-6316-2·2·d2+6·d3·t+12·d4·t2+20·d5·t3+30·d6·t4+42·d7·t5+56·d8·t6+72·d9·t7+2·2-d2-d3-d4-d5-d6-d7-d8-d9·t+d2·t2+d3·t3+d4·t4+d5·t5+d6·t6+d7·t7+d8·t8+d9·t9.By minimizing the functional (16) J(d2,d3⋯,d9) (too large to be included here) we obtain the values for d2,d3⋯,d9. We compute the corresponding values of d0 and d1 using again the conditions (24) and we replace all these values in y~(t) to obtain our approximation: (31)y~t=2.6116294098342876·t+0.9843749991096482·t2+0.43527154661696676·t3+0.08203105649571096·t4+0.021762704663334236·t5+0.0027321111314777993·t6+0.0005146366961518619·t7+0.0000454584242327247·t8+0.000005327350329483319·t9.(iv)
Finally we can easily compute an approximation foru~(t) (also not included here because of its large size) by means of (26):(32)u~t=y~′t+14y~tTable1 presents the absolute errors (as differences in absolute value between the exact value and the approximate one) corresponding to our approximations of the state variable y~(t) and of the optimal control law u~(t) obtained by using PLSM.Table 1
Absolute errors of the approximations of the state variabley~(t) and the optimal control law u~(t) obtained by using PLSM for Application 1.
t y ~ ( t ) u ~ ( t ) 0 0 4.440892099 ⋅ 1 0 - 16 0.1 2.317035452 ⋅ 1 0 - 13 2.194910920 ⋅ 1 0 - 11 0.2 6.393774399 ⋅ 1 0 - 13 1.921662829 ⋅ 1 0 - 11 0.3 1.423638984 ⋅ 1 0 - 12 7.726264073 ⋅ 1 0 - 12 0.4 7.804867863 ⋅ 1 0 - 14 2.682920552 ⋅ 1 0 - 11 0.5 1.620037438 ⋅ 1 0 - 12 1.299405028 ⋅ 1 0 - 12 0.6 2.264854970 ⋅ 1 0 - 13 2.589484183 ⋅ 1 0 - 11 0.7 1.334266031 ⋅ 1 0 - 12 9.465761508 ⋅ 1 0 - 12 0.8 6.727951529 ⋅ 1 0 - 13 1.677147310 ⋅ 1 0 - 11 0.9 1.718625242 ⋅ 1 0 - 13 2.004618693 ⋅ 1 0 - 11 1.0 2.220446049 ⋅ 1 0 - 16 0Figures1 and 2 present the comparison between our results and previous ones computed in [3] by using the Variational Iteration Method (VIM). It can be easily observed that not only is our approximation more precise, but while the error function corresponding to the VIM approximations shows a sizeable increase with t, the error function corresponding to PLSM does not. Moreover, another advantage of PLSM is the fact that, evidently, the approximation has the simplest possible form, namely, a polynomial, and thus is very easy to use in any further computations. Finally, we mention the fact that by increasing the degree of the polynomial y~(t) we can obtain higher accuracy: for example, using a 10-th degree polynomial we obtain an overall error of 10-14.Figure 1
The absolute errors corresponding to the approximations of the state variabley~(t) in Application 1: approximate solution from [3] given by VIM (red curve) and approximate solution given by PLSM (blue curve).Figure 2
The absolute errors corresponding to the approximations of the optimal control lawu~(t) in Application 1: approximate solution from [3] given by VIM (red curve) and approximate solution given by PLSM (blue curve).


### 3.2. Application 2

Our second application is the optimal control problem:(33)minut∫011+y2tu2tdtwhere there state equation is(34)y′t=utand the boundary conditions are(35)y0=0,y1=0.5(i)
Replacing the expression ofu(t) from (34) in the performance index (33) we obtain the variational problem [6]:(36)minyt∫011+y2ty′2tdtwith the same boundary conditionsy(0)=0, y(1)=0.5.The exact solution of this problem is [6](37)yt=sinh⁡t·sinh-112We apply the same steps as in the previous application:(ii)
The corresponding nonlinear Euler Lagrange equation is(38)y′′t1+y2t-y′tyt=0(iii)
We compute using PLSM an approximate analytical solution of the type(39)y~t=d0+d1·t+d2·t2+d3·t3+d4·t4+d5·t5+d6·t6+d7·t7.From the boundary conditions (35) we obtain d~0=0 and d1=1/2-d2-d3-d4-d5-d6-d7.We compute again the corresponding reminder (15) and by minimizing the functional (16) J(d2,d3⋯,d7) we obtain the values for d2⋯d7. Using the conditions (35) and replacing all the values in y~, our approximation of the state variable is(40)y~=0.4812118250596084·t-5.310800720418878·10-10·t2+0.018571962082159076·t3-3.347040175284603·10-8·t4+0.00021510474426296038·t5-8.131321771683893·10-8·t6+1.2234286690670117·10-6·t7(iv)
Using the state equation (34) we compute an approximation for the optimal control law u~(t).In Figures3 and 4 we present the absolute errors corresponding to our approximations of the state variable y~(t) and of the optimal control law u~(t) for the problem (33)-(35) obtained by using PLSM.Figure 3
The absolute error corresponding to the approximation of the state variabley~(t) in Application 2: approximate solution given by PLSM.Figure 4
The absolute error corresponding to the approximation of the optimal control lawu~(t) in Application 2: approximate solution given by PLSM.


### 3.3. Application 3

Our third application is the well-known linear quadratic regulator (LQR), more precisely the finite-horizon, continuous-time LQR. LQRs have a wide range of applications in engineering such as trajectory tracking and optimization in robotics, control system design for various types of vehicles, automatic voltage regulators in electrical generators, and optimal controls for various types of motors.The corresponding optimal control problem may be formulated as(41)J=12xtfTSxtf+12∫t0tfxTPx+2xTQu+uTRudt(42)x′t=Axt+But(43)xt0=x0,xtf=xf,t∈t0,tf.We consider the following particular case of the problem (41)-(43) corresponding to the values A=1, B=1, S=8, P=3, Q=0, R=1, and tf=1 [14, 15]:The performance index is(44)J=4·y21+12∫013·y2t+u2tdtthe state equation is(45)y′t=utand the boundary conditions are(46)y0=3+209e4-5,y1=8Approximate solutions for this problem were proposed in [14] using the Homotopy Analysis Method and in [15] using the Optimal Homotopy Analysis Method. The exact solution of the problem is(47)yt=e-2t5+45e2+72e4e4t+e2-40-45e2+27e41+e29e4-5The corresponding expression of the control is(48)ut=e-2t5+45e2+72e4e4t+3e240+45e2-27e41+e29e4-5Using the same steps presented in the previous examples we computed the following approximation of the state variable:(49)y~t=3.041119828603783-1.8976676950657474·t+6.08223965125759·t2-1.2651116099552036·t3+2.027411010322069·t4-0.2530087549866359·t5+0.2702720790557366·t6-0.02398312502575098·t70.01913989850290996·t8-0.0011806615481455588·t9+0.0007696532612724977·t10-0.00002286154490479068·t11+0.000022587123028528187·t12.In Figures5 and 6 we present the absolute errors corresponding to our approximations of the state variable y~(t) and of the optimal control law u~(t) for the problem (44)-(46) obtained by using PLSM.Figure 5
The absolute error corresponding to the approximation of the state variabley~(t) in Application 3: approximate solution given by PLSM.Figure 6
The absolute error corresponding to the approximation of the optimal control lawu~(t) in Application 3: approximate solution given by PLSM.The accuracy of our method is emphasized by a comparison with approximate solutions for Application 3 previously computed by means of other well-known methods. Table2 presents a comparison of the absolute errors corresponding to the approximations of the state variable y~(t) obtained by using the Homotopy Analysis Method (HAM [14]) and by using the Optimal Homotopy Analysis Method (OHAM [15]).Table 2
Comparison of the absolute errors corresponding to the approximations of the state variabley~(t) obtained by using HAM, OHAM, and PLSM for Application 3.
t y ~ ( t ) H A M y ~ ( t ) O H A M y ~ ( t ) P L S M 0 3.8034 ⋅ 1 0 - 4 2.2926 ⋅ 1 0 - 7 4.4409 ⋅ 1 0 - 16 0.2 3.7677 ⋅ 1 0 - 4 8.7067 ⋅ 1 0 - 7 1.7306 ⋅ 1 0 - 12 0.4 1.2227 ⋅ 1 0 - 4 3.1004 ⋅ 1 0 - 7 3.8681 ⋅ 1 0 - 12 0.6 1.5453 ⋅ 1 0 - 4 6.0923 ⋅ 1 0 - 8 9.6811 ⋅ 1 0 - 13 0.8 2.1309 ⋅ 1 0 - 4 7.4523 ⋅ 1 0 - 9 1.6227 ⋅ 1 0 - 12 1.0 0 3.7303 ⋅ 1 0 - 14 0


## 3.1. Application 1

We consider the following optimal control problem [3]:(22)minut∫012-yt2+u2tdtwhere the state equation is(23)y′t=ut-14ytand the boundary conditions are(24)y0=0,y1=2The exact solution of this problem is [3](25)yt=e-t-e-63e2-63et+63e2t+63e2+t+e1+2t32-1+e2In order to apply PLSM we follow the steps presented in the previous section:(i)
From the state equation (23) we obtain the optimal control law u(t) as a function of the state variable y(t):(26)ut=y′t+14ytReplacing this expression ofu(t) in the performance index (22) we transform the initial optimal control problem into the following variational problem:
(a)
Find the minimum of the functional(27)∫012-yt2+y′t+14yt2tdtsubject to the boundary conditions (24).(ii)
The corresponding Euler-Lagrange equation is(28)y′′t-yt+6332=0(iii)
We compute using PLSM an approximate analytical solution of the type(29)y~t=d0+d1·t+d2·t2+d3·t3+d4·t4+d5·t5+d6·t6+d7·t7+d8·t8+d9·t9.From the boundary conditions (24) we obtain d~0=0 and d1=2-d2-d3-d4-d5-d6-d7-d8-d9.The corresponding remainder (15) is (30)Rt=-6316-2·2·d2+6·d3·t+12·d4·t2+20·d5·t3+30·d6·t4+42·d7·t5+56·d8·t6+72·d9·t7+2·2-d2-d3-d4-d5-d6-d7-d8-d9·t+d2·t2+d3·t3+d4·t4+d5·t5+d6·t6+d7·t7+d8·t8+d9·t9.By minimizing the functional (16) J(d2,d3⋯,d9) (too large to be included here) we obtain the values for d2,d3⋯,d9. We compute the corresponding values of d0 and d1 using again the conditions (24) and we replace all these values in y~(t) to obtain our approximation: (31)y~t=2.6116294098342876·t+0.9843749991096482·t2+0.43527154661696676·t3+0.08203105649571096·t4+0.021762704663334236·t5+0.0027321111314777993·t6+0.0005146366961518619·t7+0.0000454584242327247·t8+0.000005327350329483319·t9.(iv)
Finally we can easily compute an approximation foru~(t) (also not included here because of its large size) by means of (26):(32)u~t=y~′t+14y~tTable1 presents the absolute errors (as differences in absolute value between the exact value and the approximate one) corresponding to our approximations of the state variable y~(t) and of the optimal control law u~(t) obtained by using PLSM.Table 1
Absolute errors of the approximations of the state variabley~(t) and the optimal control law u~(t) obtained by using PLSM for Application 1.
t y ~ ( t ) u ~ ( t ) 0 0 4.440892099 ⋅ 1 0 - 16 0.1 2.317035452 ⋅ 1 0 - 13 2.194910920 ⋅ 1 0 - 11 0.2 6.393774399 ⋅ 1 0 - 13 1.921662829 ⋅ 1 0 - 11 0.3 1.423638984 ⋅ 1 0 - 12 7.726264073 ⋅ 1 0 - 12 0.4 7.804867863 ⋅ 1 0 - 14 2.682920552 ⋅ 1 0 - 11 0.5 1.620037438 ⋅ 1 0 - 12 1.299405028 ⋅ 1 0 - 12 0.6 2.264854970 ⋅ 1 0 - 13 2.589484183 ⋅ 1 0 - 11 0.7 1.334266031 ⋅ 1 0 - 12 9.465761508 ⋅ 1 0 - 12 0.8 6.727951529 ⋅ 1 0 - 13 1.677147310 ⋅ 1 0 - 11 0.9 1.718625242 ⋅ 1 0 - 13 2.004618693 ⋅ 1 0 - 11 1.0 2.220446049 ⋅ 1 0 - 16 0Figures1 and 2 present the comparison between our results and previous ones computed in [3] by using the Variational Iteration Method (VIM). It can be easily observed that not only is our approximation more precise, but while the error function corresponding to the VIM approximations shows a sizeable increase with t, the error function corresponding to PLSM does not. Moreover, another advantage of PLSM is the fact that, evidently, the approximation has the simplest possible form, namely, a polynomial, and thus is very easy to use in any further computations. Finally, we mention the fact that by increasing the degree of the polynomial y~(t) we can obtain higher accuracy: for example, using a 10-th degree polynomial we obtain an overall error of 10-14.Figure 1
The absolute errors corresponding to the approximations of the state variabley~(t) in Application 1: approximate solution from [3] given by VIM (red curve) and approximate solution given by PLSM (blue curve).Figure 2
The absolute errors corresponding to the approximations of the optimal control lawu~(t) in Application 1: approximate solution from [3] given by VIM (red curve) and approximate solution given by PLSM (blue curve).


## 3.2. Application 2

Our second application is the optimal control problem:(33)minut∫011+y2tu2tdtwhere there state equation is(34)y′t=utand the boundary conditions are(35)y0=0,y1=0.5(i)
Replacing the expression ofu(t) from (34) in the performance index (33) we obtain the variational problem [6]:(36)minyt∫011+y2ty′2tdtwith the same boundary conditionsy(0)=0, y(1)=0.5.The exact solution of this problem is [6](37)yt=sinh⁡t·sinh-112We apply the same steps as in the previous application:(ii)
The corresponding nonlinear Euler Lagrange equation is(38)y′′t1+y2t-y′tyt=0(iii)
We compute using PLSM an approximate analytical solution of the type(39)y~t=d0+d1·t+d2·t2+d3·t3+d4·t4+d5·t5+d6·t6+d7·t7.From the boundary conditions (35) we obtain d~0=0 and d1=1/2-d2-d3-d4-d5-d6-d7.We compute again the corresponding reminder (15) and by minimizing the functional (16) J(d2,d3⋯,d7) we obtain the values for d2⋯d7. Using the conditions (35) and replacing all the values in y~, our approximation of the state variable is(40)y~=0.4812118250596084·t-5.310800720418878·10-10·t2+0.018571962082159076·t3-3.347040175284603·10-8·t4+0.00021510474426296038·t5-8.131321771683893·10-8·t6+1.2234286690670117·10-6·t7(iv)
Using the state equation (34) we compute an approximation for the optimal control law u~(t).In Figures3 and 4 we present the absolute errors corresponding to our approximations of the state variable y~(t) and of the optimal control law u~(t) for the problem (33)-(35) obtained by using PLSM.Figure 3
The absolute error corresponding to the approximation of the state variabley~(t) in Application 2: approximate solution given by PLSM.Figure 4
The absolute error corresponding to the approximation of the optimal control lawu~(t) in Application 2: approximate solution given by PLSM.


## 3.3. Application 3

Our third application is the well-known linear quadratic regulator (LQR), more precisely the finite-horizon, continuous-time LQR. LQRs have a wide range of applications in engineering such as trajectory tracking and optimization in robotics, control system design for various types of vehicles, automatic voltage regulators in electrical generators, and optimal controls for various types of motors.The corresponding optimal control problem may be formulated as(41)J=12xtfTSxtf+12∫t0tfxTPx+2xTQu+uTRudt(42)x′t=Axt+But(43)xt0=x0,xtf=xf,t∈t0,tf.We consider the following particular case of the problem (41)-(43) corresponding to the values A=1, B=1, S=8, P=3, Q=0, R=1, and tf=1 [14, 15]:The performance index is(44)J=4·y21+12∫013·y2t+u2tdtthe state equation is(45)y′t=utand the boundary conditions are(46)y0=3+209e4-5,y1=8Approximate solutions for this problem were proposed in [14] using the Homotopy Analysis Method and in [15] using the Optimal Homotopy Analysis Method. The exact solution of the problem is(47)yt=e-2t5+45e2+72e4e4t+e2-40-45e2+27e41+e29e4-5The corresponding expression of the control is(48)ut=e-2t5+45e2+72e4e4t+3e240+45e2-27e41+e29e4-5Using the same steps presented in the previous examples we computed the following approximation of the state variable:(49)y~t=3.041119828603783-1.8976676950657474·t+6.08223965125759·t2-1.2651116099552036·t3+2.027411010322069·t4-0.2530087549866359·t5+0.2702720790557366·t6-0.02398312502575098·t70.01913989850290996·t8-0.0011806615481455588·t9+0.0007696532612724977·t10-0.00002286154490479068·t11+0.000022587123028528187·t12.In Figures5 and 6 we present the absolute errors corresponding to our approximations of the state variable y~(t) and of the optimal control law u~(t) for the problem (44)-(46) obtained by using PLSM.Figure 5
The absolute error corresponding to the approximation of the state variabley~(t) in Application 3: approximate solution given by PLSM.Figure 6
The absolute error corresponding to the approximation of the optimal control lawu~(t) in Application 3: approximate solution given by PLSM.The accuracy of our method is emphasized by a comparison with approximate solutions for Application 3 previously computed by means of other well-known methods. Table2 presents a comparison of the absolute errors corresponding to the approximations of the state variable y~(t) obtained by using the Homotopy Analysis Method (HAM [14]) and by using the Optimal Homotopy Analysis Method (OHAM [15]).Table 2
Comparison of the absolute errors corresponding to the approximations of the state variabley~(t) obtained by using HAM, OHAM, and PLSM for Application 3.
t y ~ ( t ) H A M y ~ ( t ) O H A M y ~ ( t ) P L S M 0 3.8034 ⋅ 1 0 - 4 2.2926 ⋅ 1 0 - 7 4.4409 ⋅ 1 0 - 16 0.2 3.7677 ⋅ 1 0 - 4 8.7067 ⋅ 1 0 - 7 1.7306 ⋅ 1 0 - 12 0.4 1.2227 ⋅ 1 0 - 4 3.1004 ⋅ 1 0 - 7 3.8681 ⋅ 1 0 - 12 0.6 1.5453 ⋅ 1 0 - 4 6.0923 ⋅ 1 0 - 8 9.6811 ⋅ 1 0 - 13 0.8 2.1309 ⋅ 1 0 - 4 7.4523 ⋅ 1 0 - 9 1.6227 ⋅ 1 0 - 12 1.0 0 3.7303 ⋅ 1 0 - 14 0


## 4. Conclusion

In this paper the application of the Polynomial Least Squares Method to optimal control problems is presented.In order to apply PLSM the optimal problem is transformed to a variational problem by substituting in the performance index the expression of the control variable given by the state equation. PLSM is able to find accurate approximations of the state variable by computing approximate analytical polynomial solutions of the Euler-Lagrange equation corresponding to the variational problem. The optimal control law is then computed by using the state equation.The numerical examples included clearly illustrate the accuracy of the method by means of a comparison with solutions previously computed by other methods.



---

*Source: 9454160-2018-10-28.xml*