# Solution to an Optimal Control Problem via Canonical Dual Method

Authors: Jinghao Zhu; Jiani Zhou
Journal: Journal of Control Science and Engineering
 (2009)

---

## Abstract

The analytic solution to an optimal control problem is investigated using the canonical dual method. By means of the Pontryagin principle and a transformation of the cost functional, the optimal control of a nonconvex problem is obtained. It turns out that the optimal control can be expressed by the costate via canonical dual variables. Some examples are illustrated.


---

## Body

## 1. Introduction

Consider the following optimal control problem (primal problem(𝒫) in short):(1)(𝒫)min∫0T[F(x)+P(u)]dt,(2)s.t.ẋ=A(t)x+B(t)u,x(0)=x0∈Rn,t∈[0,T],∥u∥≤1,
where F(·) is continuous on Rn, and P(·) is twice continuously differentiable in Rm. An admissible control, taking values on the unit ball D:={u∈Rm∣∥u∥≤1}, is integrable or piecewise continuous on [0,T]. In (2) we assume that A(t),B(t) are continuous matrix functions in C([0,T],Rn×n) and C([0,T],Rn×m), respectively. This problem often comes up as a main objective in general optimal control theory [1].By the classical control theory [2], we have the following Hamilton-Jacobi-Bellman function:(3)H(t,x,u,λ)=λ*(A(t)x+B(t)u)+F(x)+P(u).
The state and costate systems are(4)ẋ=Hλ(t,x,u,λ)=A(t)x+B(t)u,x(0)=x0,λ̇=-Hx(t,x,u,λ)=-A*λ-∇F(x),λ(T)=0.In general, it is difficult to obtain an analytic form of the optimal feedback control for the problem (1)-(2). It is well known that, in the case of unconstraint, if P(u) is a positive definite quadratic form and F(x) is a positive semidefinite quadratic form, then a perfect optimal feedback control is obtained by the solution of a Riccati matrix differential equation. The primal goal of this paper is to present an analytic solution to the optimal control problem (𝒫).We know from the Pontryagin principle [1] that if the control û is an optimal solution to the problem (𝒫), with x̂(·) and λ̂(·) denoting the state and costate corresponding to û(·), respectively, then û is an extremal control, that is, we have(5)x̂̇=Hλ(t,x̂,û,λ̂)=A(t)x̂+B(t)û,x̂(0)=x0,(6)λ̂̇=-Hx(t,x̂,û,λ̂)=-A*λ̂-∇F(x̂),λ̂(T)=0,(7)H(t,x̂(t),û(t),λ̂(t))=min∥u∥≤1H(t,x̂(t),u,λ̂(t)),a.e.t∈[0,T].By means of the Pontryagin principle and the dynamic programming theory, many numerical algorithms have been suggested to approximate the solution to the problem(𝒫) (see, [3–5]). This is due to the nonlinear integrand in the cost functional. It is even difficult for the case of P(u) being nonconvex on the unit ball D in Rm. We know that when P(u) is nonconvex on the unit ball D, sometimes the optimal control of the problem (𝒫) may exist. Let us see the following simple example for n=m=1:(8)(𝒫)min∫01[x-12u2]dt,s.t.ẋ=x+u,x(0)=0,t∈[0,T],|u|≤1.
In fact, it is easy to see that û(t)≡-1;t∈[0,T] is an optimal control.In this paper, we considerP(u) to be nonconvex. If the optimal control of the problem (𝒫) exists, we solve the problem (1) to find the optimal control which is an expression of the costate. We see that, with respect to u, the minimization in (7) is equivalent to the following global nonconvex optimization over a sphere:(9)min∥u∥≤1[P(u)+λ̂(t)*B(t)u],a.e.t∈[0,T],
when P(u) is a nonconvex quadratic function, the problem (9) can be solved completely by the canonical dual transformation [6–8]. In [9], the global concave optimization over a sphere is solved by use of a differential system with the canonical dual function. Because the Pontryagin principle is a necessary condition for a control to be optimal, it is not sufficient for obtaining an optimal control to solve only the optimization (9). In this paper, combing the method given in [6, 9] with the Pontryagin principle, we solve problem (1)-(2) which has nonconvex integrand on the control variable in the cost functional and present the optimal control expressed by the costate via canonical dual variables.


## 2. Global Optimization over a Sphere

In this section we present a differential flow to deal with the global optimization, which is used to find the optimal control expressed by the costate in the next section. Here we use the method in our another paper (see [9]).In what follows we consider the functionP(x) to be twice continuously differentiable and nonconvex on the unit ball in Rm. Define the set(10)G={ρ>0∣[∇2P(x)+ρI]>0,x*x≤1}.
Since P(x) is nonconvex and ∇2P(x) is bounded on D:={x∈Rmx*x≤1}, G is an open interval (ρ̅,+∞) for the nonnegative real number ρ̅ depending on P(x). Let ρ*∈G and x̃∈{x*x≤1} satisfy the following KKT equation:(11)∇P(x̃)+ρ*x̃=0.
We focus on the flow x̂(ρ) defined near ρ* by the following backward differential equation:(12)dx̂dρ+[∇2P(x̂)+ρI]-1x̂=0,ρ∈(ρ*-δ,ρ*],(13)x̂(ρ*)=x̃.
The flow x̂(ρ) can be extended to wherever ρ∈G∩(0,ρ*] [10]. The dual function [6] with respect to a given flow x̂(ρ) is defined as(14)Pd(ρ)=P(x̂(ρ))+ρ2x̂*(ρ)x̂(ρ)-ρ2.
We have(15)(dx̂(ρ)dρ)*[∇2P(x̂(ρ))+ρI]dx̂(ρ)dρ=-12d[x̂*(ρ)x̂(ρ)]dρ=-d2Pd(ρ̂)dρ2≥0.
Consequently(16)d2Pd(ρ)dρ2≤0.It means thatdPd(ρ)/dρ decreases when ρ increases in G. If, for a ρ̂∈G, dPd(ρ̂)/dρ≤0, then dPd(ρ)/dρ≤0 for ρ∈G∩[ρ̂,∞). Therefore,(17)Pd(ρ̂)≥Pd(ρ),
as long as ρ≥ρ̂.Theorem 1.
If the flowx̂(ρ),ρ∈G∩(0,ρ*], defined by (11)–(13), passes through a boundary point of the ball D={x∈Rm∥x∥≤1} at ρ̂∈G, that is,
(18)[x̂(ρ̂)]*x̂(ρ̂)=1,ρ̂∈G∩(0,ρ*],
then x̂ is a global minimizer of P(x) over the ball D. Further one has
(19)minDP(x)=P(x̂)=Pd(ρ̂)=maxρ≥ρ̂Pd(ρ).Proof.
Sinceρ̂∈G, ρ̂>0. For each x∈D and whenever ρ≥ρ̂ we have
(20)P(x)≥P(x)+ρ2[x*x-1]≥infD[P(x)+ρ2[x*x-1]]=Pd(ρ).
By (17), (18), we have
(21)P(x)≥maxρ≥ρ̂Pd(ρ)=Pd(ρ̂)=P(x̂(ρ̂))+ρ2[(x̂(ρ̂))*x̂(ρ̂)-1]=P(x̂(ρ̂)).
Thus
(22)minDP(x)=maxρ≥ρ̂Pd(ρ).
This concludes the proof of Theorem 1.To illustrate the canonical dual method, let us present several examples as follows.Example 2.
Let us consider the following one-dimensional concave minimization problem:(23)p*=minP(x)=-112x4-x2+x,s.t.x2≤1.
We have
(24)P′(x)=-13x3-2x+1,P′′(x)=-x2-2<0,∀x2≤1.
By choosing ρ*=10, we solve the following equation in {x2<1}:
(25)-13x3-2x+1+10x=0
to get a solution x̃=-0.1251. Next we solve the following boundary value problem of the ordinary differential equation:
(26)dx(ρ)dρ=x(ρ)x2(ρ)+2-ρ,x(ρ*)=-0.1251,ρ≤10.
To find a parameter such that
(27)x2(ρ)=1,
we get
(28)ρ̂=103,
which satisfies
(29)P′′(x)+ρ̂=P′′(x)+103>0,∀x2≤1.
Let x(10/3) be denoted by x̂. To find the value of x̂, we compute the solution of the following algebra equation:
(30)-13x3-2x+1+103x=0,x2=1
and get x̂=-1. It follows from Theorem 1 that x̂=-1 is the global minimizer of P(x) over [-1,1].Example 3.
We now consider the nonconvex minimization problem:(31)p*=minP(x)=13x3+2x,s.t.x2≤1.
By choosing ρ*=72, we solve the following equation in {x2<1}:
(32)x2+2+72x=0
to get a solution x̃=-2/(4+32). Next we solve the following boundary value problem of the ordinary differential equation:
(33)ẋ=-x2x+t,t≤72,x(72)=-24+32.
To find a parameter such that
(34)x2(ρ)=1,
we get
(35)ρ̂=3,
which satisfies
(36)P′′(x)+ρ̂=P′′(x)+3=2x+3>0,∀x2≤1.
Let x(3) be denoted by x̂. To find the value of x̂, we compute the solution of the following algebra equation:
(37)x2+2+3x=0,x2=1
and get  x̂=-1. It follows from Theorem 1 that x̂=-1 is the global minimizer of P(x) over [-1,1].Example 4.
Given a symmetric matrixG∈Rm×m and a nonzero vector f∈Rm, let P(x)=(1/2)x*Gx-f*x be a nonconvex quadratic function. Consider the following global optimization problem over a sphere:
(38)minP(x):=12x*Gx-f*x,s.t.x*x≤1.
Suppose that G has p≤m distinct eigenvalues a1<a2<⋯<ap. Since P(x)=(1/2)x*Gx-f*x is nonconvex, a1<0. Let us choose a large ρ*>-a1 such that
(39)0<∥(G+ρ*I)-1f∥<1.
By solving the boundary value problem of ordinary differential equation
(40)dxdρ=-(G+ρI)-1x,(ρ*)=(G+ρ*I)-1f,ρ≤ρ*,
we get the unique solution
(41)x(ρ)=(G+ρI)-1f,ρ≤ρ*.
Since G is symmetric, there exists an orthogonal matrix R such that RGR*=D:=(aiδij) (a diagonal matrix) and correspondingly Rf=g:=(gi) (a vector). By (41), we have
(42)x*(ρ)x(ρ)=f*(G+ρI)-2f=∑i=1pgi2(ai+ρ)2.
Since f*(G+ρ*I)-2f<1 and
(43)limρ>-a1,ρ→-a1∑i=1pgi2(ai+ρ)2=+∞,
there exists ρ̂∈(-a1,ρ*) uniquely such that
(44)x*(ρ̂)x(ρ̂)=f*(G+ρ̂I)-2f=∑i=1pgi2(ai+ρ̂)2=1.
By Theorem 1, we see that x(ρ̂)=(G+ρ̂I)-1f is a global minimizer of the problem.


## 3. Find an Analytic Solution to the OptimalControl Problem

In this section, we considerA(t),B(t) in problem (1)-(2) to be constant matrices, F(x)=c*x and(45)P(u)=12u*Gu-b*u,wherec∈Rn×1,b∈Rm×1, and G(∈Rm×m) is a symmetric matrix. Suppose that G has p≤m distinct eigenvalues a1<a2<⋯<ap and a1<0. Moreover, we need the following  basic assumption:*()rank(B*,b)>rank(B*).We consider the following optimal control problem:(46)(𝒫)minJ(u)=∫0T[c*x+12u*Gu-b*u]dt,(47)s.t.ẋ=Ax+Bu,x(0)=x0,t∈[0,T],∥u∥≤1.To solve the above problem, we define the functionϕ(t,x)=ψ*(t)x, where ψ(t) is the solution to the following Cauchy boundary value problem of the ordinary differential equation:(48)ψ̇(t)=-A*ψ(t)+c,(49)ψ(T)=0.
By comparing (48)-(49) with (6) in terms of this special problem (46)-(47), we see that(50)ψ(t)=-λ(t),a.e.t∈[0,T].Noting thatψ(T)=0 and x(0)=x0, we have(51)J(u)=∫0T[c*x+12u*Gu-b*u]dt=∫0T[(ψ̇(t)+A*ψ(t))*x+12u*Gu-b*u]dt=∫0T[ψ̇*(t)x+ψ(t)*Ax+12u*Gu-b*u]dt=∫0T[12ψ̇*(t)x+ψ(t)*(Ax+Bu)-ψ(t)*Bu+12u*Gu-b*u]dt=∫0T[12ψ̇*(t)x(t)+ψ(t)*ẋ(t)-ψ(t)*Bu+12u*Gu-b*u]dt=∫0T[ϕ̇(t,x(t))-ψ(t)*Bu+12u*Gu-b*u]dt=ϕ(T,x(T))-ϕ(0,x(0))+∫0T[12u*Gu-b*u-ψ(t)*Bu]dt=-ϕ(0,x(0))+∫0T[12u*Gu-b*u-ψ(t)*Bu]dt.
Thus,(52)minJ(u)=-ϕ(0,x(0))+min∫0T[12u*Gu-b*u-ψ(t)*Bu]dt.Consequently, we deduce that, for almost everyt in [0,T], the optimal control is(53)û(t)=argminu*u≤1[12u*Gu-b*u-ψ(t)*Bu].
By the relation between ψ(t) and the costate in (50), for given t∈[0,T], we need to solve the following nonconvex optimization:(54)min12u*Gu-(b-B*λ(t))*u,s.t.u*u≤1.
It follows from the basic assumption (*) that b-BTλ(t)≠0 for each t∈[0,T]. By Example 4 and (53), for almost every t in [0,T], we have(55)û(t)=(G+ρtI)-1[b-B*λ(t)],
with the dual variable ρt>-a1 satisfying(56)(b-B*λ(t))*(G+ρtI)-2(b-B*λ(t))=1.
We define the function ρ(λ) with respect to λ by the following equation:(57)(b-B*λ)*(G+ρ(λ)I)-2(b-B*λ)=1,ρ(λ)>-a1
and obtain an analytic solution to the optimal control problem via a costate expression(58)û=(G+ρ(λ)I)-1(b-B*λ).On the other hand, by the solution of the Cauchy boundary value problem of the ordinary differential equation (48)-(49), we have(59)λ(t)=-ψ(t)=eA*T∫0T-te-A*te-A*sdsc=eA*(T-t)[∫0T-te-A*sds]c.Example 5.
Consider the following optimal control problem:(60)(𝒫)min∫01[x-12u2]dts.t.ẋ=x+u,x(0)=0,t∈[0,1],|u|≤1.
This is a simple case of (46),(47). We have G=-1,c=1,b=0,A=1,B=1,T=1. By (59), we have
(61)λ(t)=e1-t∫01-te-sds=e1-t-1≠0(t≠1).
To find an analytic solution of the optimal control problem, we solve the equation
(62)(ρ-1)-2λ2(t)=1,ρ>1
to get
(63)ρ=1+|λ(t)|=1+[e1-t-1].
By (58), we obtain an analytic solution of the optimal control problem which can be expressed as
(64)û(t)=(ρ-1)-1[-λ(t)]=(e1-t-1)-1[1-e1-t]=-1,(t≠1).


## 4. Concluding Remarks

In this paper, a new approach to optimal control problems has been investigated using the canonical dual method. Some nonlinear and nonconvex problems can be solved by global optimizations, and therefore, the differential flow defined by the KKT equation (see (11)) can produce an analytic solution of the optimal control problem. Meanwhile, by means of the canonical dual function, an optimality condition is proved (see Theorem 1). The global optimization problem is solved by a backward differential equation with an equality condition (see (12), (18)). More research needs to be done for the development of applicable canonical dual theory.



---

*Source: 202094-2009-10-18.xml*