C.5. Numerical Determination of Optimal Trajectories

In the previously presented approach (variational approach to optimal control problems), the problems usually emerge as nonlinear, two-point boundary-value problems, which also typically cannot be solved analytically to obtain an optimal control law, or an optimal open-loop control. In this case, iterative numerical techniques may be used to determine open-loop optimal controls. In this subsection, we briefly present some candidate numerical approaches that can be used in order to compute optimal control laws, or optimal open-loop controls whenever this is not analytically possible. We present the general concepts of these numerical approaches and point toward suitable references for detailed presentations for the more interested reader.
The general problem addressed is given by the following system of equations:

˙x(t)=Hp=a(x(t),u(t),t),˙p(t)=Hx=[ax(x(t),u(t),t)]Tp(t)gx(x(t),u(t),t),0=Hu=[au(x(t),u(t),t)]Tp(t)+gu(x(t),u(t),t),x(t0)=x0,p(tf)=hx(x(tf)).

image (C.47)

It considers unbounded states/controls with tfimage, x(tf)image free. From the system of state/costate equations and boundary conditions, it is possible to obtain an explicit relationship between x(t)image and u(t)image, t[t0,tf]image dependent on x0image. Assuming u(t)=f(x(t),p(t),t)image and substituted in the state/costate equations, a set of 2nimage first-order ODEs (actually reduced ODEs can be obtained and considered with the boundary conditions x(t0)=x0image and p(tf)=hx(x(tf))image. If the boundary conditions are all known at t0image or tfimage, then the optimal control law x(t),p(t),t[t0,tf]image can be obtained by numerical integration and the optimal control history can be found by substitution in the previous relation.
The basic strategy in all of following three numerical approaches considered (steepest descent, variation of extremals, and quasilinearization) is to initially guess a solution so that one of the three set of equations (state/costate/Hamiltonian) is not satisfied. Then a solution is used to adjust the initial guess, i.e. make the next solution closer to satisfying all necessary conditions. Finally, the steps are repeated until the iterative procedure converges.
When the boundary values are split5 (for nonlinear equations), the above cannot be applied and the gradient projection is a more suitable approach.

C.5.1. Steepest Descent

For a function of multiple variables to have a relative minimum at a point, it is necessary that the gradient of the function is zero at this point, which in general yields a system of nonlinear differential equations. Suppose u(i)(t),t[t0,tf]image is known and used to solve

˙x(i)(t)=a(x(i)(t),u(i)(t),t),x(i)(t0)=x0,

image (C.48)

˙p(i)(t)=Hx(x(i)(t),u(i)(t),p(i)(t),t),p(i)(tf)=hx(x(i)(tf)).

image (C.49)

If u(i)(t)image satisfies hx(x(i)(tf))=0image, for t[t0,tf]image as well, then x(i)(t),u(i)(t),p(i)(t)image are extremal.
If the above are not satisfied, then

δJa=[hx(x(i)(tf))p(i)(tf)]Tδx(tf)+tft0{[˙p(i)(t)+Hx(x(i)(t)),u(i)(t)p(i)(t),t)]Tδx(t)+[Hu(x(i)(t)),u(i)(t)p(i)(t),t)]Tδu(t)+[a(x(i)(t),u(i)(t),t)˙x(i)(t)]Tδp(t)}dt,

image

where δx(t)=x(i+1)(t)x(i)(t)image, δu(t)=u(i+1)(t)u(i)(t)image and δp(t)=p(i+1)(t)p(i)(t)image.
If the necessary conditions are satisfied however, then

δJa=tft0[Hu(x(i)(t)),u(i)(t)p(i)(t),t)]Tδu(t)dt.

image

If the norm of δuimage, u(i+1)u(i)image is small, the sign of ΔJa=Ja(u(i+1))Ja(u(i))image will be determined by the sign of δJaimage. Then, if δu(t)=u(i+1)u(i)=τH(i)u(t),t[t0,tf]image with τ>0image,

δJa=τtft0[H(i)u(t)]T[H(i)u(t)]dt0,

image

and in this case the equality holds if and only if H(i)u(t)=0image, for all t[t0,tf]image.
The value of τimage is usually selected ad hoc, possibly as a value that effects a certain value of ΔJaimage or using a single variable search. The steepest descent algorithm can be found in detail in [137] and references therein.

C.5.2. Variation of Extremals

In the optimal control problem defined in the previous sections, the condition H(x(t),u(t),p(t))u=0image was used to obtain a set of differential equations of the form ˙x(t)=a(x(t),p(t),t)image and ˙p(t)=d(x(t),p(t),t)image (for a first-order system), where the admissible state/control values were not bounded. In order to proceed with a numerical computation of the optimal trajectory, the value of the initial p(0)(t0)image needs to be guessed and used for integrating and further obtaining every succeeding trajectory. For this purpose, Newton’s method [11] may be employed, which for the case of 2nimage differential equations would yield the matrix equation

p(i+1)(t0)=p(i)(t0)[Pp(p(i)(t0),tf)]1p(i)(tf),

image (C.50)

where the costate influence function matrix Ppimage is given by

Pp(p(i)(t0),t)=[p1(t)p1(t0)p1(t)p2(t0)...p1(t)pn(t0)............pn(t)p1(t0)pn(t)p2(t0)...pn(t)pn(t0)]p(i)(t0),

image (C.51)

which is appropriate only if the desired value of the final costate is zero, which in addition occurs if the term h(x(tf))image is missing from performance measure (C.3). If however, h(x(tf))image exists, then

p(i+1)(t0)=p(i)(t0){[[2hx2(x(tf))]Px(p(i)(t0),tf)Pp(p(i)(t0),tf)]i}1×[p(i)(tf)hx(x(tf))]i,

image (C.52)

where now the state influence function matrix is given by

Px(p(i)(t0),t)=[x1(t)p1(t0)x1(t)p2(t0)...x1(t)pn(t0)............xn(t)p1(t0)xn(t)p2(t0)...xn(t)pn(t0)]p(i)(t0),

image (C.53)

and the influence function matrices can be determined as in [137] (pp. 348–349). The appropriate initial conditions for influence matrices are

Px(p(i)(t0),t0)=x(t0)p(t0)p(i)(t0)=0,

image

Pp(p(i)(t0),t0)=P(t0)p(t0)p(i)(t0)=I.

image

A detailed description of the steps of the variation of extremals algorithm is provided also in [137] and references therein.

C.5.3. Quasilinearization

Consider a linear two-point boundary-value problem to be solved,

˙x(t)=a11(t)x(t)+a12(t)p(t)+e1(t),x(t0)=x0,

image (C.54)

˙p(t)=a21(t)x(t)+a22(t)p(t)+e2(t),p(tf)=pf,

image (C.55)

where a11,a12,a21,a22,e1,e2image are known functions and t0,tf,x0,pfimage are known constants.
For this system, a solution can be obtained by numerical integration and initial conditions x(t0)=x0,p(t0)=0image, while a particular solution to the nonhomogeneous system can be again obtained with numerical integration, with initial conditions xp(t0)=x0,pp(t0)=0image. Combining these two solutions, a third one may be obtained for the linear two-point boundary-value problem, in terms of the solution of a linear algebraic equation.
The quasilinearization approach is based on the linearization of the reduced state-costate equations, which in turn is based on the Taylor series expansion about the initial state-costate variables. To demonstrate this process, we assume one state and one costate variable and solve Hu=0image for u(t)image. Then we substitute in the state-costate equations to obtain ˙x(t)=a(x(t),p(t),t)image and ˙p(t)=d(x(t),p(t),t)image, where a,dimage are nonlinear functions, and x(0)(t),p(0)(t),t[t0,tf]image are known trajectories. The linearization using Taylor series expansion about x(0)(t),p(0)(t)image and some basic calculus yields

˙x(1)(t)=a11(t)x(t)(t)+a12(t)p(1)(t)+e1(t),

image (C.56)

˙p(1)(t)=a21(t)x(t)(t)+a22(t)p(2)(t)+e2(t),

image (C.57)

where

a11(t)=ax(x(0)(t),p(0)(t),t)a12(t)=ap(x(0)(t),p(0)(t),t),

image

a21(t)=dx(x(0)(t),p(0)(t),t)a22(t)=dp(x(0)(t),p(0)(t),t),

image

e1(t)=a(x(0)(t),p(0)(t),t)[ax(x(0)(t),p(0)(t),t)]x(0)(t)ap(x(0)(t),p(0)(t),t)p(0)(t),

image

e2(t)=d(x(0)(t),p(0)(t),t)[dx(x(0)(t),p(0)(t),t)]x(0)(t)dp(x(0)(t),p(0)(t),t)p(0)(t)

image

are all known functions.
Detailed implementation steps (in the form of pseudocode) of the quasilinearization approach can be found in [137]. Additional properties and aspects of its operation and behavior can be also found in [137] and references therein.
The three previous iterative methods regard in general unconstrained, nonlinear, two-point boundary-value problems. They solve problems (more accurately a sequence of partial problems that should converge to the analyzed problem), where one or more necessary conditions is/are initially violated, but eventually satisfied if the iterative process converges. Trying several different initial guesses, or if the iterative procedure converges to the same control and trajectory for a variety of initial guesses, there exists some assurance that a global minimum has been determined. A table summary of the features of these three approaches, such as the initial guess, storage requirements, required computations, is provided in [137].

C.5.4. Gradient Projection

Gradient projection methods, on the other hand, are iterative numerical procedures for finding extrema of function of several variables, which are required to satisfy various constraining relations.
Assume a convex function f(y)image defined in the region Rimage, which means that it satisfies

(1θ)f(y(0))+θf(y(1))f((1θ)y(0)+θy(1)),

image

for all 0θ1image, y(0),y(1)Rimage. Variables y1,y2,...ykimage are constrained by Limage linear inequalities of the form Kj=1njiyjvi0image (ni=[n1in2i...nki]Timage). If NL=[n1n2...nL]image are orthonormal vectors, defined as vL=[v1v2...vL]image and λ(y)=[λ1(y)λ2(y)...λL(y)]Timage, then the set of linear constraints can be expressed as nTiyviλi(y)0image, for i=1,2,...,Limage (NTLyvL=λ(y)0image) and points of the form λi(y)image will lie in a hyperplane Hiimage in the Kimage-dimensional space.
Suppose yimage is a point NTqyvq=0image (intersection of qimage linearly independent hyperplanes) and points wimage are such that NTqw=0image (intersection of qimage linearly independent hyperplanes, each of which contains the origin). Then Qimage (denoting the intersection defined above by NTqw=0image, which is a (Kq)image-dimensional subspace of EKimage, EKimage being the Kimage-dimensional Euclidean space) and Qimage (the intersection of hyperplanes H1,H2,....,Hqimage) are orthogonal differing only by vector vqimage. Then, the following two K×Kimage symmetric matrices can be defined as

˜Pq=Nq[NTqNq]1NTq,

image

Pq=INq[NTqNq]1]NTq=I˜Pq,

image

where the first is the projection matrix that takes any vector in EKimage into ˜Qimage and the second a projection matrix that takes any vector EKimage into Qimage. Thus, ˜Qimage is a qimage-dimensional subspace of EKimage spanned by n1,...,nLimage constituting the space Nqimage.
Assuming that fimage is convex with continuous second partial derivatives in a closed and bounded convex region Rimage of EKimage, and letting yimage be a boundary point of Rimage which lies on exactly qimage, 1qKimage hyperplanes that are assumed to be linearly independent with Qimage denoting the intersection of these hyperplanes, then point yimage is a constrained global minimum if and only if

Pq[fy(y)]=0and[NTqNq]1]NTq[fy(y)]0.

image (C.58)

If yimage is an interior point in Rimage, a necessary and sufficient condition is fy(y)=0image.
Exploiting the above, the optimal trajectories of a constrained optimal control problem can be determined using gradient projection. More specifically, it is desired to find an admissible control history uimage causing ˙x(t)=a(x(t),u(t))image, x(t0)=x0image to follow admissible ximage that minimizes the performance measure J=h(x(tf))+tft0g(x(t),u(t))dtimage, with t0=0image, tfimage specified, and constraints

Miui(t)Mi+,t[0,tf],i=1,2,...,m,

image (C.59)

Sixi(t)Si+,t[0,tf],i=1,2,...,n,

image (C.60)

xi(tj)=Tij,tjspecified,i=1,2,...,n.

image (C.61)

Approximating the state differential equations by the difference equations (which can be nonlinear) we obtain

x(t+Δt)x(t)+a(x(t),u(t))×Δt,t=0,Δt,2Δt,...,NΔt.

image

The latter can be written together with the discrete performance metric in the simpler form

x(k+1)=x(k)+a(x(k),u(k))Δt=aD(x(k),u(k)),

image (C.62)

JD=h(x(N))+ΔtN1k=0g(x(k),u(k)).

image (C.63)

Thus, it is required to find (Nn+Nm)image variables that minimize JDimage and satisfy the approximate state equations and constraints. If the state equations are nonlinear, then, they can be linearized about a nominal state-control history, followed by solving a sequence of linearized problems.
The state-control history is considered known,

(x(i)(0),x(i)(1),...x(i)(N);u(i)(0),u(i)(1),...,u(i)(N1)),

image

and an initial state-control history can be guessed in the form

x(i+1)(k+1)=A(k)x(i+1)(k)+B(k)u(i+1)(k)+c(u),

image (C.64)

where A,B,cimage are known time-varying matrices. Since x(0)=x0image is specified, x(i)(0)=x0image for all iimage, and thus in the general case

x(i+1)(k+1)=A(k)xH+c(k)+A(k)...A(1)B(0)u(i+1)(0)+....=xH(k+1)+Dk+10u(i+1)(0)+...+Dk+1ku(i+1)(k)=xH(k+1)+N1=0[Dk+1u(i+1)()],

image (C.65)

where

xk(k+1)=A(k)xH(k)+c(k),xH(0)=x0

image

and

Dk+1={A(k)A(k1)...A(+1)B(),k>B(),k=0,k<.

image

In this fashion, the entire discrete state history can be written in terms of the discrete control history, as X(i+1)=D0U(i+1)+X0image. If there are inequality constraints involving the states [S1S2...Sn]x(k)[S1+S2+...Sn+],k=0,1,...,Nimage, these can be expressed as linear constraints involving only control values

[S1S2...Sn]Dk0u(i+1)(0)+...+DkN1u(i+1)(N1)+xH(k)[S1+S2+...Sn+],k=0,1,...,N.

image

Consequently, the problem to be solved is to find the control values that satisfy the constraints

[M1M2...Mm]u(i+1)(k)[M1+M2+...Mm+],k=0,1,...,N,

image

[S1S2...Sn]Dk0u(i+1)(0)+...+DkN1u(i+1)(N1)+xH(k)[S1+S2+...Sn+],k=0,1,...,N,

image

[T1jT2j...Tnj]Dj0u(i+1)(0)+...+DjN1u(i+1)(N1)+xH(j),jspecified,

image

and minimize the function of Nmimage variables given by

JD=h(U(i+1))+ΔtN1k=0g(U(i+1)).

image

A summary of the gradient projection algorithm for determining optimal trajectories can be found in [137] and references therein.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset