You are on page 1of 4

ECSE 6440

Optimal Control Homework Solution # 1

Jan 15, 2004

Due: Jan 26, 2004 (Monday) 1. (30%) A meteor is moving along the path (Earth is at the origin) y = x2 + 3x 6. A space station is at (x, y ) = (2, 2). Find the closest point of approach, (x, y ), and the distance from this point to the space station. Solution: This problem may be stated as: min J := (x 2)2 + (y 2)2
x,y

subject to y = x2 + 3x 6, x 0, y 0.

Form the Hamiltonian: H = J + f = (x 2)2 + (y 2)2 + 1 (x2 + 3x 6 y ) + lambdax + 3 y. First order condition: H x H y

= 0 2(x 2) + 21 x + 31 + 2 = 0 = 0 2(y 2) 1 + 3 = 0.

First assume the inequality constraints are not active, i.e., 2 = 3 = 0. Then x= which implies x = 3y + 8 4 6(y 2) = . 2(1 + 2(y 2)) 2y 3
2

4 31 , 1 = 2(y 2) 2(1 + 1

Substitute into the constraint equation y =2 +3x 6, we obtain y= 3y 8 2y 3 3 3y 8 6., 2y 3

which may be solved to give three candidate solutions: {8.22, 2.05, 0.92}, and the corresponding x: {1.68, 1.71, 4.53}. Take the positive solutions only, we therefore obtain (x , y ) = (1.71, 2.05). Since the inequality constraints are indeed inactive, this is the optimal solution, and the optimal cost is J = 0.087. (Run hw01 1.m for the numerical solution and plot.) 1

2. (30%) Consider the bilinear system x(i + 1) = Ax(i) + Dx(i)u(i) + bu(i) where x(i) Rn , u(i) R, with quadratic performance index
N 1

J = x(N )T Q(N )x(N ) +


i=0

x(i)T Qx(i) + ru(i)2

where Q(N ) 0, Q 0, r > 0. Find the optimal control, and the closed loop state and co-state equations. Dont worry about the solution of these equations. Solution: First form the Hamiltonian:
2 T Hi = x T i Qxi + rui + i+1 (Axi + Dxi ui + bui ).

Stationarity condition: Hi = 2rui b + (T i+1 Dxi + b) = 0, ui which may be solved to give 1 u i = T (Dxi + b). 2r i+1 The costate equation is given by i = with the boundary condition = 2QN xN . xN The TPBVP corresponding to the optimal trajectory is given by N = xi+1 = Axi i N Dxi T (Dxi + b) 2r i+1 DT i+1 T = 2Qxi + AT i+1 i+1 (Dxi + b) 2r = 2QN xN , x0 given. Hi xi
T

= 2Qxi + (AT + ui DT )i+1

3. (40%) Consider the following bilinear system: x(i + 1) = x(i)u(i) + 1 with the performance index J= and nal state constraint x(N ) = 0. 2 1 N 1 2 u 2 i=0 i

(a) (15%) Find the optimal control and the closed loop state and co-state equations. (b) (15%) Suppose that x(0) = 1 and N = 2. Use the result from part 3a to nd the optimal state and co-state sequences, the optimal control, and the optimal value of the performance index. (c) (10%) Convert the optimal control problem in part 3b into a static optimization and nd the optimal control sequence and the optimal value of the performance index. Solution: xi+1 = xi ui + 1, x0 = 1, x2 = 0. (a) Form the Hamiltonian u2 i + i+1 (xi ui + 1). 2 i Solve for the optimal control from H = ui + i+1 xi = 0: ui Hi = ui = i+1 xi . Costate equation: Hi = i = i+1 ui . xi TPBVP: xi+1 = i+1 x2 i + 1, x0 , xN given 2 i = xi i+1 . (b) For N = 2, x0 = 1, x2 = 0, we have x1 = 1 + 1 x2 = 2 x2 1+1 = l2 (1 1 )2 + 1 1 = x1 2 2. Use 1 and x1 equations to solve for x1 , we get x1 = 1 + 1 = x1 2 2+1 = And then solve for 1 : 1 = Substitute into x2 and simplify: x2 = 2 + 1 = 0. 2 (1 2 2) 3 2 2 . 1 2 2 1 . 1 2 2

Solve for 2 , we get two real solutions: {1.49, 0.52}. Compute J for each candidate 2 , we get J = {4.8, 0.67}. Therefore, the optimal 2 is 0.52, and 1 = 0.38, u0 = 0.38, u1 = 0.72. the optimal state trajectory is x0 = 1, x1 = 1.38, x2 = 0. (c) The equivalent static optimization problem is
u0 ,u1

1 2 min (u2 0 + u1 ) 2

subject to 0 = (u0 + 1)u1 + 1. For the Hamiltonian: 1 H = (u2 + u2 1 ) + ((u0 + 1)u1 + 1). 2 0 First order condition: u0 + u1 = 0 u1 + (u0 + 1) = 0. Solve u0 , u1 in terms of : u0 = u1 2 1 2 = . 1 2

Substitute into the constraint equation and solve for , we get the same two real roots as 2 in the previous part: {1.49, 0.52}. Now check the second order condition: 2H 1 = 2 1 u which is positive denite if and only if 1 2 > 0. Therefore, the optimal is 0.52. Substituting into u0 and u1 , we obtain the same solution as before.

You might also like