# lec7 - MIT OpenCourseWare http/ocw.mit.edu 16.323...

This preview shows pages 1–7. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MIT OpenCourseWare http://ocw.mit.edu 16.323 Principles of Optimal Control Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms . 16.323 Lecture 7 Numerical Solution in Matlab 10-2 10-1 10 10 1 10 2 1 2 3 4 5 6 7 8 t f Comparison with b=0.1 Analytic Numerical Spr 2008 16.323 71 Simple Problem Performance t f J = ( u x ) 2 dt t with dynamics x = u and BC t = 0 , x = 1 , t f = 1 . So this is a fixed final time, free final state problem. Form Hamiltonian H = ( u x ) 2 + pu Necessary conditions become: x = u (7.25) p = 2( u x )( 1) (7.26) = 2( u x ) + p (7.27) with BC that p ( t f ) = 0 . Rearrange to get p = p (7.28) p ( t ) = c 1 e t (7.29) But now impose BC to get p ( t ) = (7.30) This implies that u = x is the optimal solution, and the closed-loop dynamics are x = x with solution x ( t ) = e t . Clearly this would be an unstable response on a longer timescale, but given the cost and the short time horizon, this control is the best you can do. June 18, 2008 Spr 2008 Simple Zermelos Problem 16.323 72 Consider ship that has to travel through a region of strong currents. The ship is assumed to have constant speed V but its heading can be varied. The current is assumed to be in the y direction with speed of w . The motion of the boat is then given by the dynamics x = V cos (7.31) y = V sin + w (7.32) The goal is to minimize time, the performance index is t f J = 1 dt = t f with BC x = y = 0 , x f = 1 , y f = 0 Final time is unspecified. Define costate p = [ p 1 p 2 ] T , and in this case the Hamiltonian is H = 1 + p 1 ( V cos ) + p 2 ( V sin + w ) Now use the necessary conditions to get ( p = H T ) x H p 1 = = 0 p 1 = c 1 (7.33) x H p 2 = y = 0 p 2 = c 2 (7.34) June 18, 2008 Spr 2008 16.323 73 Control input ( t ) is unconstrained, so have ( H u = 0) H = p 1 V sin + p 2 V cos = (7.35) u which gives the control law tan = p 2 = p 2 (7.36) p 1 p 1 Since p 1 and p 2 are constants, then ( t ) is also a constant. Optimal control is constant, so can integrate the state equations: x = V t cos (7.37) y = V t (sin + w ) (7.38) Now impose the BC to get x ( t f ) = 1 , y ( t f ) = 0 to get 1 w t f = V cos sin = V Rearrange to get V 2 w 2 cos = V which gives that 1 w t f = V 2 w 2 = arcsin V Does this make sense? June 18, 2008 Spr 2008 16.323 74 Numerical Solutions Most of the problems considered so far have been simple. Things get more complicated by the need to solve a two-point boundary value problem when the dynamics are nonlinear....
View Full Document

{[ snackBarMessage ]}

### Page1 / 25

lec7 - MIT OpenCourseWare http/ocw.mit.edu 16.323...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online