lecture 5 basic dynamical systems
play

Lecture 5: Basic Dynamical Systems CS 344R/393R: Robotics - PDF document

Lecture 5: Basic Dynamical Systems CS 344R/393R: Robotics Benjamin Kuipers Dynamical Systems A dynamical system changes continuously (almost always) according to n x = F ( x ) where x A controller is defined to change the


  1. Lecture 5: Basic Dynamical Systems CS 344R/393R: Robotics Benjamin Kuipers Dynamical Systems • A dynamical system changes continuously (almost always) according to n ˙ x = F ( x ) where x � � • A controller is defined to change the coupled robot and environment into a desired dynamical system. ˙ x = F ( x , u ) ˙ x = F ( x , H i ( G ( x ))) y = G ( x ) ˙ x = � ( x ) u = H i ( y ) 1

  2. Two views of dynamic behavior • Time plot ( t,x ) • Phase portrait ( x,v ) Phase Portrait: ( x,v ) space • Shows the trajectory ( x ( t ), v ( t )) of the system – Stable attractor here 2

  3. Interesting Phase Portrait • The van der Pol equation has a limit cycle. x � µ (1 � x 2 ) ˙ ˙ ˙ x + x = 0 In One Dimension ˙ • Simple linear system x ˙ x = kx • Fixed point ˙ x x = 0 � x = 0 • Solution kt x ( t ) = x 0 e – Stable if k < 0 – Unstable if k > 0 3

  4. In Two Dimensions • Often, we have position and velocity: T v = ˙ x = ( x , v ) where x • If we model actions as forces, which cause acceleration, then we get: � ˙ � � ˙ � � � x x v ˙ x = � � � � � � � = � = � � � � ˙ ˙ ˙ v x forces � � � � � � The Damped Spring • The spring is defined by Hooke’s Law: F ma m x k x & & = = = � 1 • Include damping friction m x k x k x & & & = � 1 � 2 • Rearrange and redefine constants x b x cx 0 & & & + + = � � � � � � ˙ ˙ x x v ˙ x = � � � � � � � = � = � � � � ˙ ˙ ˙ � b ˙ v x x � cx � � � � � � 4

  5. The Linear Spring Model ˙ x + b ˙ ˙ x + cx = 0 c � 0 • Solutions are: 1 t + Be r r 2 t x ( t ) = Ae • Where r 1 , r 2 are roots of the characteristic 2 + b � + c = 0 equation � b 2 � 4 c 1 , r 2 = � b ± r 2 Qualitative Behaviors b 2 � 4 c c 1 , r 2 = � b ± r unstable stable 2 spiral • Re( r 1 ), Re( r 2 ) < 0 nodal nodal b means stable. • Re( r 1 ), Re( r 2 ) > 0 unstable means unstable. • b 2 - 4 c < 0 means complex roots, means oscillations. 5

  6. It’s the same in higher dimensions ˙ x = A x • The characteristic equation for generalizes to det( A � � I ) = 0 – This means that there is a vector v such that A v = � v • The solutions are called eigenvalues . � • The related vectors v are eigenvectors . Qualitative Behavior, Again • For a dynamical system to be stable: – The real parts of all eigenvalues must be negative. – All eigenvalues lie in the left half complex plane. • Terminology: – Underdamped = spiral (some complex eigenvalue) – Overdamped = nodal (all eigenvalues real) – Critically damped = the boundary between. 6

  7. Node Behavior Focus Behavior 7

  8. Saddle Behavior Spiral Behavior (stable attractor) 8

  9. Center Behavior (undamped oscillator) The Wall Follower ( x,y ) � 9

  10. The Wall Follower • Our robot model: � � � � ˙ x v cos � � � � � ˙ ˙ x = y = F ( x , u ) = v sin � � � � � � � � � ˙ � � � � � � u = ( v ω ) T y =( y θ ) T θ ≈ 0. • We set the control law u = ( v ω ) T = H i ( y ) e = ˙ ˙ ˙ e = ˙ ˙ ˙ e = y � y set so y and y The Wall Follower • Assume constant forward velocity v = v 0 – approximately parallel to the wall: θ ≈ 0. • Desired distance from wall defines error: e = ˙ ˙ ˙ e = ˙ ˙ ˙ e = y � y set so y and y • We set the control law u = ( v ω ) T = H i ( y ) – We want e to act like a “damped spring” e + k 1 ˙ ˙ ˙ e + k 2 e = 0 10

  11. The Wall Follower ˙ e + k 1 ˙ ˙ e + k 2 e = 0 • We want • For small values of θ ˙ ˙ e = y = v sin � v � � v cos � ˙ ˙ ˙ ˙ ˙ e = y = v � � � • Assume v=v 0 is constant. Solve for ω � � v 0 � � u = v � � � k 1 � � k 2 � = H i ( e , � ) � = � e � � � � v 0 � � – This makes the wall-follower a PD controller. Tuning the Wall Follower ˙ e + k 1 ˙ ˙ • The system is e + k 2 e = 0 2 � 4 k 2 = 0 • Critical damping requires k 1 k 4 k 2 1 = • Slightly underdamped performs better. – Set k 2 by experience. – Set k 1 a bit less than 4 k 2 11

  12. An Observer for Distance to Wall • Short sonar returns are reliable. – They are likely to be perpendicular reflections. Experiment with Alternatives • The wall follower is a PD control law. • A target seeker should probably be a PI control law, to adapt to motion. • Try different tuning values for parameters. – This is a simple model. – Unmodeled effects might be significant. 12

  13. Ziegler-Nichols Tuning • Open-loop response to a unit step increase. • d is deadtime. T is the process time constant. • K is the process gain. K d T Tuning the PID Controller • We have described it as: t � � k D ˙ u ( t ) = � k P e ( t ) � k I edt e ( t ) 0 • Another standard form is: � t � � + T D ˙ u ( t ) = � P e ( t ) + T I edt e ( t ) � � � � 0 • Ziegler-Nichols says: P = 1.5 � T T I = 2.5 � d T D = 0.4 � d K � d 13

  14. Ziegler-Nichols Closed Loop 1. Disable D and I action (pure P control). 2. Make a step change to the setpoint. 3. Repeat, adjusting controller gain until achieving a stable oscillation. • This gain is the “ultimate gain” K u . • The period is the “ultimate period” P u . Closed-Loop Z-N PID Tuning • A standard form of PID is: � t � � + T D ˙ u ( t ) = � P e ( t ) + T I edt e ( t ) � � � � 0 • For a PI controller: T I = P P = 0.45 � K u u 1.2 • For a PID controller: T I = P T D = P u u P = 0.6 � K u 2 8 14

  15. Summary of Concepts • Dynamical systems and phase portraits • Qualitative types of behavior – Stable vs unstable; nodal vs saddle vs spiral – Boundary values of parameters • Designing the wall-following control law • Tuning the PI, PD, or PID controller – Ziegler-Nichols tuning rules – For more, Google: controller tuning 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend