MIT OpenCourseWare http://ocw.mit.edu 2.004 Dynamics and Control II Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Massachusetts Institute of Technology Department of Mechanical Engineering 2.004 Dynamics and Control II Spring Term 2008 Lecture 21 Reading: • Nise: Chapter 1 1 Cruise Control Example (continued from Lecture 1) From Lecture 1 the model for the car is: v (t) F d Fp (t) F p (t) v (t) v e lo c ity m a s s m Fd (t) B ( v is c o u s fr ic tio n ) where the propulsion force Fp (t) is proportional to the gas pedal depression θ: Fp (t) = Kθ(t) so that m dv + Bv = Ke θ(t) + Fd (t) dt F e n g in e q g a s p e d a l K e F p + d (t) + (t) m c a r m o d e l d v d t + B v = F V c a r s p e e d The “Open-Loop”Dynamic Response: Let’s examine how the car will respond to commands at the gas-pedal. Assume Fd (t) = 0, so that we can write the differential equation as m Ke v̇ + v = θ B B and compare this to the standard form for a first-order ODE: τ ẏ + y = f (t) where the time-constant τ = m/B, and the forcing function f (t) = 1 c D.Rowell 2008 copyright � 2–1 Ke θ(t). B Consider 1) The “coast-down” response from an initial speed v(0) = v0 with θ = 0. The homogeneous response is t B v(t) = v0 e− τ = v0 e− m t which has the form v v e lo c ity v ( t) o e 0 .8 v -2 e -4 e o 0 .6 v -1 e -3 = 0 = 0 = 0 = 0 .3 6 7 .1 3 5 .0 4 9 .0 1 8 9 3 8 3 o 0 .4 vo 0 .2 v o 0 0 t 3 t 2 t 4 t t (s e c s ) and after a period 4τ we have v < 0.02v0 . 2) The response to a “step” in the command θ(t). Assume that the car is at rest, that is v(0) = 0, and we ”step on the gas” so that θ(t) = θ. The differential equation is then m Ke v̇ + v = θ B B with v(0) = 0. (a) The steady-state (final) speed is vss = Ke θ B (found by letting all derivatives to be zero), and (b) the differential equation may be solved to give the dynamic response: t v(t) = vss (1 − e− τ ) = which is shown below: 2–2 B Ke θ (1 − e− m t ) B v (t) v s s A fte r 4 t th e r e s p o n s e is w ith in 2 % o f th e fin a l v a lu e . s te a d y -s ta te r e g io n tr a n s ie n t r e g io n 0 2 4 t t Closed-Loop Control Now design the controller. Assume we will use error-based control. In other words, given a desired speed for the car vd , and the measured car speed v(t), we define the error e(t) as the difference e(t) = vd (t) − v(t), and choose a control law that is based on e(t) θ(t) = Kc e(t) = Kc (vd (t) − v(t)) where Kc is the controller gain. Thus the control effort is proportional to the error, and the block diagram becomes: V d (t) + e rro r e (t) - F c o n tr o lle r K c q e n g in e K e F p + (t) d (t) + m c a r m o d e l d v d t fe e d b a c k p a th Note that the control law states: • if v < vd then e > 0 - depress gas pedal. • if v = vd then e = 0 - set θ = 0 (do nothing). • if v > vd then e < 0 - set θ < 0 (apply brakes). The new differential equation is m dv + Bv = Kc Ke (vd (t) − v) + Fd (t) dt and rearranging m dv + (B + Kc Ke )v = Kc Ke vd (t) + Fd (t) dt 2–3 + B v = F c a r s p e e d V which is the closed-loop differential equation. We can write this as m dv Kc Ke 1 +v = vd (t) + Fd (t) B + Kc Ke dt B + Kc Ke B + Kc Ke and compare with the standard first-order form τ ẏ + y = u(t) where τ = m/(B + Kc Ke ) is the closed-loop time-constant. The important thing to note is that feedback has modified the ODE. 3 Questions: Assume there are no external disturbance forces, that is Fd (t) ≡ 0 for now, (a) If we command the car to travel at a steady speed vd , what speed will it actually reach? To find the steady-state speed vss , set dv = 0 and solve for vss , giving dt vss = Kc Ke vd B + Kc Ke or vss < vd , for B > 0. Note that as we increase the controller gain so that Kc Ke � B then vss → vd . (b) How has the dynamic response affected by the feedback? Consider the first-order ODE dy τ + y = Ku(t). dt The response to a steady input u(t) = 1 with initial condition y(0) = 0 is t y(t) = K(1 − e− τ ) y y (t) s s = K a t t = 4 t , th e r e s p o n s e is a p p r o x . 0 . 9 8 y s s. s te a d y -s ta te tr a n s ie n t 0 4 t 2–4 t For the car under feedback control, this translates to a steady-state speed vss = Kc Ke vd B + Kc Ke which is a function of the controller gain Kc , and a closed-loop time constant τ that is m τ= B + Kc Ke which is also a function of Kc , and as Kc increases, τ decreases, meaning that the car responds more quickly to changes in the gas pedal. v vd t d e c re a s e s s te a d y -s ta te s p e e d a p p ro a c h e s v d. K c in c r e a s in g 0 t 4 The Effect of an External Disturbance Force Now consider the car on an incline under closed-loop control: F d v (t) v (t) Fp (t) ) F p(t q ) n ( g s i m = q ( b ) o n a n in c lin e ( a ) o n le v e l g r o u n d (a) On horizontal ground Fd = 0, and we showed: vss = Kc Ke vd B + Kc Ke (b) On the incline there is a constant disturbance force Fd = −mg sin φ acting down the incline, and from the closed-loop differential equation: m dv Kc Ke 1 +v = vd (t) + Fd (t) B + Kc Ke dt B + Kc Ke B + Kc Ke the steady-state speed will be vss = Kc Ke mg sin φ vd − , B + Kp Ke B + Kc Ke 2–5 but we note that as the controller gain Kp is increased the impact of the disturbance is reduced. Conclusion: Feedback control reduces the effect of external disturbances on the system behavior. 2–6