Robot Control (4th) (A Basic Study of Dynamics & Control) Autumn semester School of Robotics BICAR(Biologically-inspired Control and Robot) Lab. Prof. Woosung Yang 1 Outline 1. Introduction of Control System 2. Basic Study of Electric Circuits • Example: Control unit used in mechatronics • Components of Electric Circuits • Circuit Equations 3. Basic Study of Dynamics • Mass, Force and Acceleration • Dynamic Equation 4. Basic Study of Mathematics • Differential Equation • Linear Calculation 5. Understanding of Feedback System Bio-inspired Control & Robot (BICAR) Lab. 2 1. Introduction of Control System (1st or 2nd order systems) (1st or 2nd order systems) ◆ ◆ ◆ The control action is independent of the output. The ability to perform accurately is determined by the calibration. Not usually troubled with problems of instability. ◆ ◆ ◆ ◆ ◆ ◆ ◆ The control action is somehow dependent on the output. Increased accuracy Tendency toward oscillation or instability Reduced sensitivity of the ratio of output to input to variations in system parameters and other characteristics Reduced effects of nonlinearities Reduced effects of external disturbances or noise Increased bandwidth Bio-inspired Control & Robot (BICAR) Lab. 3 1. Introduction of Control System ◆ ◆ ◆ Requires the identification of all possible disturbances and their direct measurement Any changes in the parameters of a process cannot be compensated Requires a good model of the process ◆ Feedback Control ◆ Does not require knowledge or measurement of disturbances Not very sensitive to changes in process parameters or to errors in the process model Bio-inspired Control & Robot (BICAR) Lab. 4 1. Introduction of Control System ◆ ◆ ◆ ◆ ◆ ◆ ◆ Establish the control goals Control System Design Process Identify the variables to be controlled Write the specifications Establish the system configuration Obtain a model for the process, the actuator, and the sensor Describe a controller and select key parameters to be adjusted Optimize the parameters and analyze the performance Bio-inspired Control & Robot (BICAR) Lab. 5 1. Introduction of Control System Basic Representations (Models) ◆ ◆ ◆ ◆ Mathematical models; differential equations, difference equations, and/or other mathematical relations, e.g., Laplace- and z-transforms Block diagrams Signal flow graphs Bond graphs A Dynamic System Its instantaneous behavior is dependent on its past history, so that the behavior of the system at time t > t0 can be determined given (1) the forcing function (that is, the input), and (2) the state of the system at t = t0. Bio-inspired Control & Robot (BICAR) Lab. 6 1. Basic Study of Electric Circuits ▪ Example: Control unit 스위치 저항 코일 캐패시터 확장커넥터 전원 직류모터/엔코더 통신포트 Bio-inspired Control & Robot (BICAR) Lab. 7 2. Basic Study of Electric Circuits ▪ Components of electric circuits - Active(IC, Transistor, Power, etc.) or Passive(Resistor, Inductor, Conductor, etc.) ▪ R, L, C vR = Ri Controlling current/voltage Transfer voltage to current 1 vC = ∫ idt C d vL = L i dt Charge the electricity Cutoff DC currents Pass AC currents Stabilizing currents Cutoff noise (AC currents) Pass DC currents Bio-inspired Control & Robot (BICAR) Lab. 8 2. Basic Study of Electric Circuits ▪ Circuit equation → RLC circuit Kirchhoff’ law d 1 Ri + L i + ∫ idt = v dt C Bio-inspired Control & Robot (BICAR) Lab. 9 3. Basic Study of Dynamics ▪ Newton's first law: Inertia law “The first law states that if the net force (the vector sum of all forces acting on an object) is zero, then the velocity of the object is constant” F =0 d v=0 dt Consequently, An object that is at rest will stay at rest unless an external force acts upon it. An object that is in motion will not change its velocity unless an external force acts upon it. Bio-inspired Control & Robot (BICAR) Lab. 10 3. Basic Study of Dynamics ▪ Newton's second law: Acceleration law “The second law states that the net force on an object is equal to the rate of change (that is, the derivative) of its linear momentum p in an inertial reference frame”: d d F = p= (mv ) = ma dt dt Bio-inspired Control & Robot (BICAR) Lab. 11 3. Basic Study of Dynamics ▪ Newton's third law: Action-reaction law “The third law states that all forces exist in pairs”: if one object A exerts a force FA on a second object B, then B simultaneously exerts a force FB on A, and the two forces are equal and opposite: FA = −FB Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) 12 d 1 i+ ∫ idt = v dt C v = 100cos(2π × 120t) Ri + L R = 100, L = 1mH , C = 10F kx mx + cx + kx = F mx m = 10kg , c = 10 N sec/ m, k = 5 N / m cx F Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) 13 The natural response of a system is when there is no input to the system forcing the variable to change but it is just changing naturally. The forced response of a system is when there is an input to the system forcing it to change. A first-order system with no forcing input has a differential equation of the form dx a1 + a0 x = 0 dt and this has the solution x = e − a0t / a1 When there is a forcing function the differential equation is of the form dx a1 + a0 x = b0 y dt ( and the solution is x = steady-state value 1 − e − a0t / a1 ) The time constant is the time the output takes to rise to 0.63 of its steady-state value and is (a1 / a0 ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) 14 A second-order system with no forcing input has a differential equation of the form d 2x dx m 2 + c + kx = 0 dt dt The natural angular frequency is given by n 2 = k / m and the damping constant by 2 = c 2 / 4mk . The system is over-damped when we have >1 and the general solution for x n is x n = Ae s1t + Be s2t with s = −n n 2 − 1 When =1 the system is critically damped and xn = ( At + B ) e −nt and with <1 the system is under-damped and xn = e −nt ( P cos t + Q sin t ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) 15 When we have a forcing input F the second-order differential equation becomes d 2x dx m 2 + c + kx = F dt dt and for the over-damped system F x = Ae s1t + Be s2t + k for the critically damped system F x = ( At + B ) e −nt + k and for the under-damped system x = e −nt ( P cos t + Q sin t ) + F k Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) 16 The rise time 𝒕𝒓 is the time taken for the response 𝒙 to rise from 0 to the steady-state value 𝒙𝒔𝒔 and is a measure of how fast a system responds to the input and is given by 𝝎𝒕𝒓 = 𝟏Τ𝟐 𝝅. The peak time 𝒕𝒑 is the time taken for the response to rise from 0 to the first peak value and is given by 𝝎𝒕𝒑 = 𝝅. The overshoot is the maximum amount by which the response overshoots the steady-state value and is − overshoot = xss exp 1− 2 The subsidence ratio or decrement is the amplitude of the second overshoot divided by that of the first overshoot and is −2 subsidence ratio = exp 1− 2 The settling time 𝒕𝒔 is the time taken for the response to fall within and remain within some specified percentage, e.g. 2%, of the steady-state value, this being given by ts = 4 n Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems 17 ▪ 4.1 First-order systems - Consider a first-order system with y(t) as the input to the system and x(t) the output and which has a forcing input b0y and can be described as the following a1 dx + a0 x = b0 y dt where a1, a0 and b0 are constants. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems 18 ▪ 4.1.1 Natural Response - The input y(t) can make many forms. - Consider first the situation when the input is 0. - This system shows natural response. dx a1 + a0 x = 0 dt Using the technique called separation of variables. a dx = − 0 dt x a1 Integrating this between the initial value of x=1 at t=0, i.e. a unit step input, and x at t gives a0 ln x = − t a1 Bio-inspired Control & Robot (BICAR) Lab. 3. Basic Study of Mathematics (D.E.) – 1st order systems so we have 19 x = e − a0t / a1 Assume the differential eq. would have a solution x=Aest(A and s are constants.). Differentiating this, dx/dt=sAest and so when these values are substituted in the differential eq. we obtain a1sAe st + a0 Ae st = 0 and so a1s+a0=0 and s=-a0/a1. x = Ae− a0t / a1 This is termed the natural response since there is no forcing function. We can determine the value of the cons. A given some initial (boundary) condition. Thus if x=1 when t=0 then A=1. x = e − a0t / a1 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems 20 ▪ 4.1.2 Response with a forcing input - Consider the differential eq. when there is a forcing function, i.e. a1 dx + a0 x = b0 y dt Consider the solution to this eq. to be made up of two parts, i.e. x = u + v. One part represents the transient part of the solution and the other the steady-state part. Substituting this into the differential eq. gives d (u + v ) a1 + a0 (u + v ) = b0 y dt Rearranging this gives du dv a + a u + a + a v 1 0 1 0 = b0 y dt dt dv du + a0 v = b0 y then we must have a1 If we let, a1 + a0 u = 0 dt dt Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems 21 Two differential equations, one of which contains a forcing function and one which is just the natural response equation. The solution of the natural response eq. u = Ae− a0t / a1 - The other differential eq. contains y This solution depends on the form of the input y. 1) Step input y (const. and > 0), y = k. → The solution v = A. (A is const.) 2) Input y = a+bt+ct2+⋯(a, b and c are const.), → Assume that the output v = A+Bt+Ct2 3) For a sinusoidal signal → The output response, v = Acosωt + Bsinωt Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems 22 - Assume there is a step input at a time of t=0 with the size of the step being k. - Then v=A. Differentiating a const. gives 0. If so a0A=b0k, then v=(b0/a0)k. Hence, (y=u+v) y = Ae − a0t / a1 b0 + k a0 We can determine the value of the constant A given some initial (boundary) conditions. Thus if the output y=0 when t=0 then. b0 0 = A+ k a0 Thus A=-(b0/a0)k. The solution then becomes. ( b0 x = k 1 − e −a0t / a1 a0 ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems 23 When t ⟶ ∞ the exponential term tends to 0. The exponential term thus gives that part of the response which is the transient solution. The steady-state response is the value of x when t ⟶ ∞ and , so is (b0/a0)k. Thus the eq. can be written as. x = steady − state value (1 − e − a0t / a1 ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 24 • Response of a first order circuit complete response= transient response + steady-state response • In general, the response at steady state the response that dies out complete response= natural response + forced response • Natural response: the general solution of the differential equation representing the first order circuit when the input is set to zero. -For a first-order circuit, natural response: K depends on the init. cond., e.g., capacitor voltage at Ke− ( t −t0 ) • Forced response: a particular solution of the differential equation t = t0 . representing the first order circuit. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 25 • Solving the first order differential equation to a Const. Input d v(t ) Voc v(t ) + = dt Rt C Rt C R R d i (t ) + t i (t ) = t I sc dt L L d x(t ) x(t ) + =K dt x(t ) = x() + [ x(0) − x()]e −t • Time constant: how fast the exponential decays x() − x(0) Time constant: = d x(t ) dt t =0 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) • RC circuit d v(t ) Voc v(t ) + = dt Rt C Rt C v(t ) = Voc + (v(0) − Voc )e−t ( Rt C ) = Rt C 26 • RL circuit R R d i (t ) + t i (t ) = t I sc dt L L i (t ) = I sc + (i (0) − I sc )e−( Rt L = Rt L )t forced response natural response Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 27 • Example 4.1: Find the capacitor voltage after the switch opens. What is the value of the capacitor voltage 50ms after the switch opens? d v(t ) Voc v(t ) + = dt Rt C Rt C v(t ) = Voc + (v(0) − Voc )e −t ( Rt C ) v(0) = 2V, Rt = 10k and Voc = 8V v(t ) = 8 − 6e − t / 20 V let t =50. Then v(50) = 8 − e −50/ 20 = 7.51V v(t ) = 8 − 6e −t 20 V Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 28 • Example 4.2: Find the capacitor voltage after the switch opens. What is the value of the capacitor voltage 50ms after the switch opens? d v(t ) Voc d v(t ) + = Rt C v(t ) + v(t ) = Voc dt Rt C Rt C dt v(t ) = 8 − 6e −t 20 V Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 29 • Example 4.3: Find the inductor current after the switch closes. How long will it take for the inductor current to reach 2mA? Rt Rt d i (t ) + i (t ) = I sc dt L L i (t ) = 4 − 4e−t 5 mA Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 30 • The case when the input is a time varying function. d v(t ) Voc v(t ) + = dt Rt C Rt C R R d i (t ) + t i (t ) = t I sc dt L L d v(t ) vs (t ) v(t ) + = dt Rt C Rt C R R d i (t ) + t i (t ) = t is (t ) dt L L dx(t ) + ax(t ) = y (t ) dt • Integrating factor method: multiply e at to the D.E. dx(t ) + ax(t ) = y (t ) dt x(t ) = e − at y (t )e at dt + Ke − at = x f (t ) + xn (t ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 31 • The case when the input is a time varying function. d v(t ) Voc v(t ) + = dt Rt C Rt C R R d i (t ) + t i (t ) = t I sc dt L L d v(t ) vs (t ) v(t ) + = dt Rt C Rt C R R d i (t ) + t i (t ) = t is (t ) dt L L dx(t ) + ax(t ) = y (t ) dt • Integrating factor method: multiply e at to the D.E. dx(t ) + ax(t ) = y (t ) dt at d e d x ( ) ( ) dx at at at at at e + ae x = e y → e + x = e y ( ) dt dt dt x(t ) = e − at y (t )e at dt + Ke − at = x f (t ) + xn (t ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 32 • The case when the input is a time varying function. d v(t ) Voc v(t ) + = dt Rt C Rt C R R d i (t ) + t i (t ) = t I sc dt L L d v(t ) vs (t ) v(t ) + = dt Rt C Rt C R R d i (t ) + t i (t ) = t is (t ) dt L L dx(t ) + ax(t ) = y (t ) dt • Integrating factor method: multiply e at to the D.E. d at at dx(t ) e x = e y ( ) + ax(t ) = y (t ) dt dt at d e d x ( ) ( ) dx at at at at at e + ae x = e y → e + x = e y ( ) dt dt dt x(t ) = e − at y (t )e at dt + Ke − at = x f (t ) + xn (t ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 33 • Forced response to a forcing function, first-order circuit Forcing Function, y (t ) Forced Response, x f (t ) Constant, y (t ) = M x f (t ) = N , constant Exponential y (t ) = Me− bt x f (t ) = Ne − bt Sinusoid y (t ) = M sin(t + ) x f (t ) = A sin t + B cos t Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 34 • Example 4.4: Find the current for t 0 when vs (t ) = 10e−2t u (t ) V. Assume the circuit is in steady state at t = 0−. vs di R di + i= + 4i = 10e −2t , i (0) = 2A dt L L dt i (t ) = (−3e −4t + 5e −2t ) A, t 0. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) • Example 4.5: Find the response 35 v(t ) for t 0 when v(0) = 0 and is (t ) = (10sin 2t )u (t ) A. C di 1 dv v + i = is 0.5 + = 10 sin 2t , v(0) = 0V dt R dt 4 160 160 −t 2 40 v(t ) = e + sin 2t − cos 2t V. 17 17 17 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems 36 ▪ 4.1.3 The time constant - For a first-order system subject to a step input of size k. x= ( b0 k 1 − e −a0t / a1 a0 or ) ( x = steady − state value 1 − e − a0t / a1 ) When t=(a1/a0), then e-1=0.37. x = steady − state value (1 − 0.37 ) In this time the output has risen to 0.63 of its steady-state value. This time is called the “time constant” τ. = a1 a0 In a time of 2(a1/a0)=2τ, e-2=0.14 and so x = steady − state value (1 − 0.14) In this time the output has risen to 0.86 of its steady-state value. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems - In terms of the time const. τ, we can write the eq. describing the response of a first-order system as ( x = steady − state value 1 − e −t / The time const. τ is (a1/a0), thus we can write our general form. 37 ) dx a1 + a0 x = b0 y dt as b dx +x= 0 y dt a0 But b0/a0 is the factor by which the input y is multiplied to give the steady-state value. We can term it the “steady-state gain”. Thus we denote this by Gss . Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 1st order systems 38 dx + x = Gss y dt - v0 of a first-order system varies with time when subject to a step input of 5V. τ is the time taken for the output to change from 0 to 0.63 of its final steady-state value. In this case this time is about 3s. The steady-state output is 10V. Thus Gss is (steady-state output/input)=10/5=2. The differential eq. for a first-order system can be written as. dx + x = Gss y dt Thus, for this system, we have 3 dvo + vo = 2vi dt Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 39 ▪ 4.2 Second-order systems d 2x dx m 2 + c + kx = F dt dt where m is the mass, c the damping const. and k the spring const. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 40 ▪ 4.2.1 Natural response - Consider a mass on the end of a spring with no damping without being force. The output of the 2nd-order system is a continuous oscillation(simple harmonic motion). Thus, suppose we describe this oscillation by the eq. x = A sin nt where x is the displ. at a time t, A the ampl. and ωn the angular freq. of the free undamped oscillations. Differentiating this gives dx = n A cos nt dt Differentiating a second time gives d 2x 2 2 = − A sin t = − n n nx 2 dt This can be reorganized to give the differential eq. d 2x 2 + nx =0 2 dt Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 41 If considering a restoring force of kx and thus d 2x m 2 = −kx dt This can be written as. d 2x k + x=0 2 dt m Thus, comparing the two differential eqs., we must have n2 = k m and x = Asinωnt is the solution to the differential eq. - Now consider when we gave damping. The motion of the mass is then described by 2 d x dx m 2 + c + kx = 0 dt dt Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 42 To solve this eq. xn=Aest. ⇒ dx/dt = Asest and dx/dt=As2est Then, mAs2e st + cAsest + kAest = 0 ms 2 + cs + k = 0 Thus xn=Aest can only be a solution provided the above eq. equals 0. This eq. is called the “auxiliary equation”. By using the formula for the roots of a quadratic eq. Thus 2 2 s= − c c − 4mk c k c =− − 2m 2m 2 m m c k c2 k − =− 2m m 4mk m But ωn2=k/m and so, if we let ζ2=c2/4mk. s = − n n 2 − 1 (ζ is termed the damping factor) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 43 1. Over-damped - ζ>1: two different real roots s1 and s2 s1 = − n + n 2 − 1 s2 = − n − n 2 − 1 xn = Ae s1t + Be s2t 2. Critically-damped - ζ=1: two equal roots s1=s2=-ωn xn = ( At + B )e −nt Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 44 3. Under-damped - ζ<1: two complex roots involving the square root of (-1) s = − n n 2 − 1 = − n n − 1 1 − 2 s = − n jn 1 − 2 if we let = n 1 − 2 then we can write s=-ζωn ± jω and so the two roots are s1 = −n + j , s2 = −n − j the solution is ( xn = Ae(−n + j )t + Be(−n − j )t = e −nt Ae jt + Be− jt ) e jt = cos t + j sin t , e − jt = cos t − j sin t xn = e −nt ( A cos t + jA sin t + B cos t − jB sin t ) = e −nt ( A + B ) cos t + j ( A − B )sin t xn = e − nt (P cos t + Q sin t ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 45 ▪ 4.2.2 Response with a forcing input - With an input F the differential eq. becomes d 2x dx m 2 + c + kx = F dt dt Let x = xn+xf m if we let d 2 (xn + x f ) dt 2 +c d (xn + x f ) dt + k (xn + x f ) = F d 2 xn dx m 2 + c n + kxn = 0 dt dt then we must have m d 2xf dt 2 +c dx f dt + kx f = F Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 46 To solve the forcing eq., m d 2xf dt 2 +c dx f dt + kx f = F we need to consider a particular form of input signal. Thus for a step input of size F at t=0, xf=A. (A is const.) Here dxf/dt=0 and d2xf/dt2=0 Thus, when these are substituted in the differential eq., 0 + 0 + kA = F and so A = F/k and xf=F/k. The complete solution is F st s t x = Ae 1 + Be 2 + for the critically damped system x = ( At + B )e for the under-damped system x=e −n t −n t k F + k F (P cos t + Q sin t ) + k Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 47 When t ⟶ ∞, the above eq. all lead to the solution x=F/k. This is the steady-state condition. Thus a 2nd-order differential eq. in the form d 2x dx a2 2 + a1 + a0 x = b0 y dt dt has a natural frequency given by n2 = a0 a2 and a damping factor given by a12 = 4a2 a0 2 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 48 ▪ 4.2.3 Examples of 2nd–order systems - Consider a series RLC circuit with R=100Ω, L=2.0H, C=20μF이다. and a step input V, the current i in the circuit is given by d 2i R di 1 V + + i = dt 2 L dt LC LC Comparing the eq. with the general 2nd-order differential eq. of d 2x dx a2 2 + a1 + a0 x = b0 y dt dt then the natural angular frequency is given by n2 = 1 1 = LC 2.0 20 10−6 and so ωn = 158Hz. Comparison with the general 2nd-order eq. also gives 2 2 2 −6 ( ) R / L R C 100 20 10 2= = = 4 (1 / LC ) 4 L 4 2.0 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 49 Thus ζ = 0.16. Since ζ < 1, the system is under-damped. The damped oscillation frequency ω is = n 1 − 2 = 158 1 − 0.162 = 156Hz the sol. will be of the same form as x=e and so −n t F (P cos t + Q sin t ) + k i = e −0.16158 t (P cos 156t + Q sin 156t ) + V Since i=0 when t=0, then 0=1(P+0)+V. Thus P=-V. Since di/dt = 0 when t=0, then differentiating the above eq. and equating it to 0 gives di = e −nt (P sin t − Q cos t ) − n e −nt (P cos t + Q cos t ) dt Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 50 Thus 0=1(0-ωQ)-ζωn(P+0) and so Q= n P V 0.16 158V =− n =− −0.16V 156 Thus the sol. of the differential eq. is i = V − Ve −25.3t (cos 156t + 0.16 sin 156t ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 51 • A second order differential equation d 2x dx a2 2 + a1 + a0 x = f (t ), ai are constants and f (t ) is specified dt dt • The complete response: x(t ) = xn (t ) + x f (t ) natural response forced response • Natural response: the response when f (t ) = 0. • Forced response: the response w.r.t. the forcing function. • Natural response: exponential xn (t ) = Ae Background: The exponential is the only function that is proportional to all of its derivatives and integrals. st Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 52 • Natural response of the differential equation satisfies d 2 xn dxn a2 + a + a0 xn = 0 1 2 dt dt st • Substituting xn (t ) = Ae → a2 As 2 e st + a1 Ase st + a0 Ae st = 0 → (a2 s 2 + a1s + a0 ) Ae st = 0 → (a2 s + a1s + a0 ) xn = 0 2 → excluding trivial solution xn = 0 → (a2 s 2 + a1s + a0 ) = 0 Alternatively, using operator dn s = n dt n Characteristic equation The characteristic equation is derived from the governing differential equation for a circuit by setting all independent sources to zeros value and assuming an exponential solution Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 53 • Natural response of the differential equation satisfies d 2 xn dxn a2 + a + a0 xn = 0 1 2 dt dt 2 • Roots to the characteristic equation a2 s + a1s + a0 = 0 s1 = − a1 + a12 − 4a2 a0 2a2 , s2 = − a1 − a12 − 4a2 a0 2a2 • When there are two distinct roots, the natural response is of the form xn (t ) = A1e s1t + A2e s2t , A1 and A2 are unknowns. The roots of the characteristic equation contain all the information necessary for determining the character of the natural response. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) ▪ Example 4.6: Find the natural response of 54 i2 di1 mesh1: − vs + 8i1 + 2 + 4(i1 − i2 ) = 0 dt di mesh 2 : − 4(i1 − i2 ) + 1 1 = 0 dt Using the operators, (12 + 2 s )i1 − 4i2 = vs −4i1 + (4 + s )i2 = 0 i2 = 2vs s 2 + 10 s + 16 ( s 2 + 10 s + 16)i2 = 2vs The roots of the characteristic eq. are s1 = −2 and s2 = −8 xn (t ) = A1e−2t + A2e−8t Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 55 • A circuit containing one capacitor and one inductor is represented by d 2 x(t ) dx(t ) 2 + 2 + 0 x (t ) = f (t ) 2 dt dt : damping coefficient, 0 : resonant frequency • Homogeneous differential equation: differential equation with f (t ) = 0 • Parallel RLC circuit is chosen just for illustration - You should be able to derive similar results for any circuits with two energy storage elements Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 56 • Differential equation for unforced parallel RLC circuit: - KCL at Node v: - VI relation for the inductor: d 2 v 1 dv 1 C 2 + + v=0 dt R dt L - Characteristic equation: 2 1 1 s + s+ =0 RC LC • Roots of the characteristic equation: 12 1 1 1 s1 = − + − 2 RC 2 RC LC 2 • When 12 1 1 1 , s2 = − − − 2 RC 2 RC LC 2 s1 s2 , vn (t ) = A1e s1t + A2e s2t Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 57 • Three cases for the roots of the characteristic equation: 12 1 2 1 1 s1 = − + − 2 RC 2 RC LC 12 1 2 1 1 , s2 = − − − 2 RC 2 RC LC 1 1 2 s1 = − + − , s2 = − − − , where = , 0 = 2 RC LC 2 2 0 2 Case 2 0 Condition Overdamped Two real and distinct roots, Critically damped A real root with multiplicity 2, 2 02 s1 = − + 2 − 02 , s2 = − − 2 − 02 s1 = s2 = − Underdamped 2 = 02 Two complex roots, 2 02 s1 = − + jd , s2 = − − jd , where d = 02 − 2 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 58 • Natural response unforced parallel RLC circuit given initial conditions - DE: d 2 v 1 dv 1 C 2 + + v=0 dt R dt L - Characteristic equation: s2 + 1 1 s+ =0 RC LC • Overdamped case with initial conditions vn (0) = v(0) and i(0). • Two relations: v(t ) = vn (t ) = A1e s1t + A2e s2t vn (t ) = A1e s1t + A2e s2t → t = 0 → vn (0) = A1 + A2 KCL at the top node: v(0) dv v(t ) dv(t ) + i (0) + C =0 + i (t ) + C =0→t =0→ R dt t =0 R dt v(0) i (0) dvn − = s1 A1 + s2 A2 → s1 A1 + s2 A2 = − RC C dt t =0 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 59 • Example 4.7: Find the natural response of v(t) when R = 2 / 3, L = 1H, C = 1/ 2F, v(0) = 10V, i(0) = 2A. vn (t ) = (−14e−t + 24e−2t )V. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 60 • Parallel RCL circuit • Critically damped case: double root for the characteristic equation s1 = s2 • Recall: 12 1 1 1 s1 , s2 = − − 2 RC 2 RC LC 2 s1 = − + 2 − 02 , s2 = − − 2 − 02 , where = • Natural response: 1 1 , 02 = 2RC LC vn (t ) = ( A1t + A2 )e s1t Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 61 • Example 4.8: Find the natural response for a parallel RCL circuit with R = 1, L = 1H, C = 1/ 4F, v(0) = 5V, i(0) = −6A. vn (t ) = e −2t (14t + 5)V. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 62 • Parallel RCL circuit • Underdamped case: two complex roots for the characteristic equation 12 • Recall: 1 2 1 1 s1 , s2 = − − 2 RC 2 RC LC s1 = − + 2 − 02 , s2 = − − 2 − 02 , where = 1 1 , 02 = 2RC LC when 2 02 , s1,2 = − j 02 − 2 define d = 02 − 2 s1,2 = − jd d : damped resonant frequency Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 63 • Underdamped case: two complex roots for the characteristic equation • Natural response: s1t s2 t 2 2 vn (t ) = A1e + A2e s1,2 = − j 0 − = − jd • For underdamped case, Euler identity: e jt = cos t j sin t vn (t ) = A1e s1t + A2e s2t = A1e − t e jd t + A2 e − t e − jd t = e − t ( A1e jd t + A2 e − jd t ) = e − t ( B1 cos d t + B2 sin d t ), where B1 = A1 + A2 , B2 = j ( A1 − A2 ) • Natural response of underdamped case: vn (t ) = e− t ( B1 cos d t + B2 sin d t ) Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 64 • Finding the coefficients in terms of initial conditions v(0), i (0) : vn (t ) = e− t ( B1 cos d t + B2 sin d t ) At t = 0, vn (0) = B1 dvn (0) = d B2 − B1 dt B1 = vn (0) vn (0) = v(0), v(t ) dv(t ) i (t ) + +C =0 R dt dv (0) v(0) i (0) n =− − dt RC C B2 = 1 d ( B1 − v(0) i (0) − ) RC C 2 • Period of damped oscillation: Td = sec d 1 • Frequency in Hertz: f d = Hz Td i (t ) + v(t ) dv(t ) +C =0 R dt Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 65 • Example 4.9: Find the natural response of the parallel RLC circuit when R = 25 / 3, L = 0.1H, C = 1mF, v(0) = 10V, i(0) = −0.6A. vn (t ) = 10e−60t cos80t V Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 66 • Forced response: a solution to the differential equation without any arbitrary constants. 2 d x dx • Differential equation: + a1 + a0 x = f (t ) 2 dt dt d 2xf dx f • Forced response xf : + a1 + a0 x f = f (t ) 2 dt dt • Forcing functions and their associated assumed solution Forcing Function Assumed Solution K A Kt At + B Kt 2 At 2 + Bt + C K sin t A sin t + B cos t Ke− t Ae− t Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 67 • Example 4.10: Find the forced response for the inductor current i f when is (t ) = 8e−2t A, R = 6, L = 7H, C = 1/ 42F. I relation (I source after t = 0) v dv KCL(top node): is = + i + C , R dt di dv d 2i v=L =L 2 dt dt dt i f (t ) = −12e −2t A. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 68 • Example 4.11: Find the forced response for the inductor current i fwhen is (t ) = I 0 A, R = 6, L = 7H, C = 1/ 42F. is d 2i 1 di 1 d 2i di 2+ + i= 2 + 7 + 6i = 6 I 0 dt RC dt LC LC dt dt i f (t ) = I 0 . Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 69 • Special case: when the forcing function is of the same form as on the components of the natural response. d 2i di −6 t + 7 + 6 i = 6 i , i ( t ) = 3 e . s s 2 dt dt • Example: −t −6 t - in (t ) = A1e + A2 e - Try with i f (t ) = De −6t - Try with i f (t ) = Bte −6t 0 = 18e −6t B=− 18 18 , i f = − te −6t 5 5 In general, if the forcing function is of the same form as one of the p components of the natural response xn1 , try x f (t ) = Bt xn1. - Use the lowest power p that is not duplicated in the natural response. Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 70 • Example: series RLC circuit d 2v dv LC 2 + RC + v = vs dt dt R = 5, L = 1H, C = 1/ 6F, 2e − t dv vs (t ) = V, v(0) = 10V, (0) = −2V/s. 3 dt • d 2v dv 2 Characteristic equation: + 5 + 6 v = 6 v s + 5s + 6 = 0 s 2 dt dt Natural response: vn = A1e −2t + A2 e −3t 2 Forced response: v f = Be − t e − t ( B − 5B + 6 B ) = 6 e − t B = 2 3 Complete response: v = vv + v f = A1e −2t + A2 e −3t + 2e − t • • • • Applying initial conditions: v(0) = 10 10 = A1 + A2 + 2 dv dt = −2 (t = 0) −2 A1 − 3 A2 − 2 = −2 v = 24e −2t − 16e −3t + 2e − t V Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – review(C.S.) 71 • Example 4.12 : series RLC circuit dvs d 2v dv + 7 + 10 v = + 6vs 2 dt dt dt v(0) = 6V, i (0)=1A dv (0) = −4V/s ( KCL) dt • Characteristic equation: • • • • Natural response: Forced response: Complete response: Applying initial conditions: v(0) = 6 6 = A1 + A2 − 9 dv dt = −4 −2 A1 − 5 A2 + 27 = −4 v = 44 −2t 1 −5t e − e + 9e −3t V 3 3 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 72 ▪ 3.5 Performance measures for 2nd-order systems - The response of under-damped 2nd-order system to a step input - The rise time tr: the time taken for the response x to rise from 0 to xss, This is the time for the oscillating response to complete a ¼ of a cycle, i.e. ½π. Thus 1 2 t r = tr is specified as the time taken for the response to rise from 10% to 90%. - The peak time tp: the time taken for the response to rise from 0 to the first peak value. This is the time for the oscillating response to complete one half cycle, i.e. π. Thus t p = Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems - - 73 The overshoot is max. amount by which the response overshoots the s-s value (often written as a percentage of the s-s value). For the under-damped oscillations, x = e −nt (P cos t + Q sin t ) + steady − state value Since x=0 when t=0, then 0=1(P +0) + xss. And so P=-xss. The overshoot occurs at ωt=π and thus x = e −n / ( −(− xss ) + 0 ) + xss The overshoot is the difference between the output at that time and the s-s value. Hence ( ) overshoot = xss e −n / Since = n 1 − 2 ,then − n overshoot = xss exp 1− 2 n − = x exp ss 1− 2 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 74 Expressed as a percentage of xss − percentage overshoot = exp 1− 2 - 100% The subsidence ratio or decrement: how fast oscillation decay. This is the amp. of the 2nd overshoot divided by that of the 1st overshoot (1st overshoot: ωt=π, 2nd overshoot: ωt=3π). − first overshoot = xss exp 1− 2 − 3 second overshoot = xss exp 1− 2 and so second overshoot subsidence ratio = = exp first overshoot − 2 1 − 2 Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems - 75 The settling time ts: the time taken for the oscillations to die away. The response to fall within and remain within some specified percentage, e.g. 2% (amp. of the oscillation < 2% of xss). x = e −nt (P cos t + Q sin t ) + steady − state value as derived earlier, P=-xss. The amp. of the oscillation is (x-xss) when x is a max. value (The max. value → ωt is kπ, cosωt=-1 and sinωt=0). tss is when the max. amp. is 2% of xss, i.e. 0.02xss. Thus 0.02 xss = e −nts (xss 1 + 0) Taking logarithms gives ln 0.02=-ζωnts and since ln 0.02=-3.9 or approximately -4, then ts = 4 n Bio-inspired Control & Robot (BICAR) Lab. 4. Basic Study of Mathematics (D.E.) – 2nd order systems 76 If the percentage is 5%, the eq. becomes ts = 3 n The period time is 1/f, where f is the frequency. Since ω=2πf, then the time to complete on cycle is 2π/f. settling time number of oscillations = periodic time and thus for a ts defined for 2% of the s-s value. 4 / n number of oscillations = 2 / Since = n (1 − 2 ) , then 2n 1 − 2 2 number of oscillations = = n 1 2 −1 Bio-inspired Control & Robot (BICAR) Lab. 77 Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 78 • Transient and Steady State Response Analysis In general, the input signals into a system are not known, and it would be difficult to express them analytically in a form suitable for system analysis. It is a frequent practice to apply a reference input into the system and to study its response in the time domain. The type of reference input applied does depend on the purpose of the system: for example, if the system may be subjected to sudden disturbances, a step reference input may be best; if the system is used to follow a gradually changing situation, a ramp input may be better. Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 79 • Feedback System (Closed-loop Control System) Bio-inspired Control & Robot (BICAR) Lab. 80 5. Understanding of Feedback System Response of First Order Systems A first order system has an associate differential equation of the form ay + y = u, y(0) = 0. Y (s) = 1 U ( s ). as + 1 For transient response analysis, it is customary to use a reference unit step function u(t) for which 1 1a 1 1 1 = = − . U ( s) = . Y (s) = (as + 1) s ( s + 1 a) s s s + 1 a s On taking the inverse Laplace transform, we obtain y (t ) = 1 − e−t / a , (t 0). the time constant of the system Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 81 −1 Notice that when t = a, then y (t ) = y (a) = 1 − e = 0.63. The response is in two parts, 1) the transient part e−t a , approaches 0 as t → . 2) the steady-state part 1 eventually (when t = ) the output is 1 (that is equal to the input). Bio-inspired Control & Robot (BICAR) Lab. 82 5. Understanding of Feedback System The Final Value Theorem If all poles of sY(s) are in the left half of s-plane, then lim y (t ) = lim sY ( s ). t → s →0 The Initial Value Theorem It is always possible to determine the initial value of the time function f(t) from its Laplace transform. + For any Laplace transform pair, lim sF ( s) = f (0 ). s→ In contrast with the Final Value Theorem, the Initial Value Theorem can be applied to any function F(s). Homework #1 Prove the final and initial value theorems. Bio-inspired Control & Robot (BICAR) Lab. 83 5. Understanding of Feedback System If the derivatives of the input are involved in the differential equation of the system, ay + y = bu + u (bs + 1) (s + z) Y (s) = U (s) = K U ( s ), (as + 1) ( s + p) When U(s) = 1/s, K1 K2 Y ( s) = − , s s+ p where where K= K1 = K b 1 1 ,z = , p = . a b a z z− p , K2 = K . p p y (t ) = K1 − K 2e− pt . With the assumption that z > p > 0, this response is shown as follows: Bio-inspired Control & Robot (BICAR) Lab. 84 5. Understanding of Feedback System Response of Second Order Systems Applying Newton’s law, we find d2y dy M 2 = − − ky + u (t ), dt dt where k = spring constant, = damping coefficient, y is the distance of the system from its position of equilibrium, and it is assumed that y (0) = y (0) = 0. d2y dy u (t ) = M 2 + + ky dt dt On taking Laplace transforms, we obtain Y ( s) = 1 K U ( s ) = U ( s), 2 2 Ms + s + k s + a1s + a2 where K = 1 k , a1 = , a2 = . M M M Bio-inspired Control & Robot (BICAR) Lab. 85 5. Understanding of Feedback System Applying a unit step input, we obtain K Y (s) = , s( s + p1 )( s + p2 ) where p1 , p2 : the poles of the transfer function G ( s) = a1 (a12 − 4a2 ) p1 , p2 = . 2 K s 2 + a1s + a2 the zeros of the denominator of G(s) Case 1. a12 4a2 (overdamped system) p1 , p2 are real and unequal. K K2 K3 Y ( s) = 1 + + , s s + p1 s + p2 Y ( s) = 2 Case 2. a1 = 4a2 2 Case 3. 4a2 a1 (critically damped system) (underdamped system) p1 , p2 are real and equal. p1 = p2 = a1 = p( say) 2 are complex conjugate p1 , p2 having the form p1 , p2 = i , where = a1 1 , = (4a2 − a12 ) . 2 2 K K1 K2 K3 K1 K2 K3 Y ( s ) = + + , = + + , s s + p1 s + p2 s( s + p)2 s s + p ( s + p)2 Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 86 The system error e(t) = y(t) - u(t) The performance index 0 0 0 e 2 (t )dt , integral of error squared (IES) | e(t ) | dt , integral of absolute error (IAE) t | e(t ) | dt , integral of time multiplied absolute error criterion (ITAE) Having chosen an appropriate performance index, the system which minimizes the integral is called optimal. The objective of modern control theory is to design a system so that it is optimal with respect to a performance index. Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System Steady State Error 87 ess Depends on both the transfer function of the system and on the reference input. R(t) the reference input, c(t) the output, A(s) an open loop transfer function. We define the error function e(t ) = r (t ) − c(t ). Hence ess = lim e(t ). t → Since E(s) = R(s) – A(s)E(s), it follows that and by the final value theorem E (s) = R( s) 1 + A( s ) sR( s) . s →0 1 + A( s ) ess = lim sE ( s) = lim s →0 Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 88 (1) Step input, r(t) = ku(t) (k is a constant) sk s k = . s →0 1 + A( s ) 1 + lim A( s ) ess = lim The position error constant K p s →0 If k and ess are specified, the value of the transfer function at s = 0 is determined. (2) Ramp input, r(t) = ktu(t) k k k k R( s ) = 2 → ess = lim , ess = , Kv = , s →0 s (1 + A( s )) s Kv ess K v = lim sA( s ) s →0 (3) Parabolic input, r (t ) = R( s) = The velocity error constant. 1 2 kt u (t ) 2 k k k , e = , K = , ss a 3 s Ka ess K a = lim s 2 A( s ) s →0 The acceleration error constant. Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 89 Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 90 Homework #2 Solve the below problem. Find the error coefficient for the system having the open loop transfer function 8 A( s ) = . s (4s + 2) K p , Kv , Ka ? Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 91 A( s) G ( s) = 1 + A( s) B( s) Bio-inspired Control & Robot (BICAR) Lab. 92 5. Understanding of Feedback System Example a first order system A( s) = K , B( s) = c as + 1 (a constant) G(s) = K K a = . as + Kc + 1 s + Kc + 1 a We take the inverse Laplace transform, that is, obtain the impulse response of the system, where (1) c = 0 (response of the open loop system) g (t ) = K −t a e , a (2) c 0 K − g (t ) = e a where Kc +1 t a = t K − = e , a a . Kc + 1 a and are respectively the time-constants of the open loop and the closed loop systems. Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 93 A( s) B( s) G ( s) = . 1 + A( s) B( s) (1) The on-off controller if e(t) > 0 then q(t) = Q1 and if e(t) < 0 then q(t) = Q2 , where q(t) is the output signal from the controller and Q1 and Q2 are some constants. Bio-inspired Control & Robot (BICAR) Lab. 94 5. Understanding of Feedback System (2) Proportional Controller q(t ) = K p e(t ), where K p is a constant, called the gain of the controller. B( s ) = (3) Integral Controller Q( s) = K p. E ( s) t q(t ) = K e(t )dt , B( s) = K s . 0 (4) Derivative Controller q(t ) = K de , B( s) = Ks. dt (5) Proportional-plus-derivative (PD) Controller q (t ) = K p e(t ) + K1 K de , B (t ) = K p (1 + 1 s ). dt Kp (6) Proportional-plus-integral (PI) Controller t q(t ) = K p e(t ) + K1 e(t )dt , 0 t de + K K1 K p 2 e(t ) dt , 0 dt B( s ) = K p (1 + ). s K K K (7) Proportional-plus-derivative-plus-integral (PDI) B ( s ) = K p (1 + 1 s + 2 p ). Kp s Controller q (t ) = K p e(t ) + K1 Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 95 • Properties of a PID control - Proportional feedback control reduces the error response to disturbances, but results in nonzero steady-state error to constant inputs. - A term proportional to the integral of the error eliminates the steady-state error to constant inputs - A term proportional to the derivative of the error improve the dynamic response (anticipatory term). Structure of PID control: B ( s ) = k P + kI + kD s s kI k p : proportional term, : integral term, k D : derivative term s Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 96 • Proportional Control (P) u = k pe , U (s) E (s) = Bcl ( s ) = k p - For 2nd order plant G( s ) = A , 2 s + a1 s + a2 Closed-loop characteristic equation: 1 + kpG( s ) = 0 s 2 + a1 s + a2 + k p A = 0 a1 Note: = a + k A , = n 2 p 2n - The system with proportional control usually has a steady-state error in respose to a constant reference input or to a constant disturbance input. Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 97 • Proportional plus Integral Control (PI) t u ( t ) =k pe(t)+k I e ( τ )dτ U (s) E(s) t0 =Bcl ( s ) =k p + kI s - Integral term raises the type to Type 1. - The system can reject completely constant bias disturbances. Ex. PI control in a speed control Effects of PI control on the steady-state error to a step disturbance: A Y= (U + W ) s +1 R −Y PI control: U = k p ( R − Y ) + kI s Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 98 • Example: Speed control Effects of PI control on the steady-state error to a step disturbance: A Y= (U + W ) s +1 R −Y PI control: U = k p ( R − Y ) + k I s k ( s + 1) Y = A k p + I ( R − Y ) + AW s ( s + ( Ak + 1) s + Ak ) Y = A ( k s + k ) R + sAW 2 p I p I - Characteristic equation: s 2 + ( Ak p + 1) s + Ak I = 0 → n = Ak I / , = ( Ak p + 1) / 2n → May result in an unsatisfactory lightly damped response. Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System - For 2nd order plant G ( s ) = Characteristic equation: 1 + 99 A , 2 s + a1s + a2 k p s + kI s A =0 2 s + a1s + a2 s 3 + a1s 2 + a2 s + Ak p s + Ak I = s 3 + a1s 2 + (a2 + Ak p )s + Ak I = 0 → Controller parameters can be used to set only two of the coefficients. Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 100 • Proportional-Integral-Derivative Control (PID) de(t ) dt kI kP s + kI + kD s 2 U (s) transfer function: Bcl ( s ) = = kP + + kD s = E (s) s s t u (t ) = k P e(t ) + k I e( )d + k D B term in feedback B term in forward path ▶ With derivative in the feedback, the reference is not differentiated: can avoid undesirable response to sudden change Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 101 • Example: speed control with the second order plant - For 2nd order plant G ( s ) = A , 2 s + a1s + a2 Characteristic equation: 1 + (k p + kI A + kD s) 2 =0 s s + a1s + a2 s 3 + a1s 2 + a2 s + A(k p s + k I + k D s 2 ) = 0 → s 3 + (a1 + Ak D ) s 2 + (a2 + Ak p ) s + Ak I = 0 → Controller parameters can be used to set all coefficients. → The roots can be uniquely, and in theory, arbitrarily determined. Bio-inspired Control & Robot (BICAR) Lab. 102 5. Understanding of Feedback System • PID Control of Motor Speed (( L s + R )( J a a m s + b) + K t K e m = K tVa + K wW ) Plant Parameters: see textbook. Controller parameters: k p = 3, k I = 15 sec −1 , k D = 0.3 sec Step disturbance Step reference Bio-inspired Control & Robot (BICAR) Lab. 5. Understanding of Feedback System 103 Homework #3 Solve the below problem. Design a controller for a plant having the transfer function A( s) = 1 s( s + 2) so that the resulting closed loop system has a zero steady state error to a reference ramp input. What kind of controller are you going to build? Explain your reason for choosing that controller. Bio-inspired Control & Robot (BICAR) Lab.