System Identification Based on Step Response and Impulse Response
Total Page:16
File Type:pdf, Size:1020Kb
System identification based on Step and Impulse response considering first and second order transfer function models These notes discuss system identification based on the step and impulse response. In the following we consider linear, time-invariant systems of first and second order, as they provide reasonable approximation for the description of the dominant behavior of most linear time-invariant systems. I. First order system A first order system is described in frequency domain by the transfer function k Gs()= t s +1 where the parameters k and t are the system gain (k ) and the time constant of the system (t ). The step response of this system, considering initial conditions equal with 0, is obtained as follows: a. the Laplace transform of the system input is 1 Us()= s b. using the relation Y(s)= H(s)Us() one obtains the Laplace transform of the output signal k 1 Ys()= t ss+1 c. we use partial fractions expansion and then inverse Laplace transform to obtain the system response in time domain AB Ys()=+ t ss+1 k k A=Y(s)(ttsk+1) 1 ==- and B=Y()ssk== s =- 1 s=0 t s s =- t s +1s=0 t t kkkk Ys()=-+=-+ tts++1sss1/ Inverse Laplace transform results in 1 -t t y(t)=-+kekut-1() ì0,0t < where ut-1() denotes the step function ut-1()= í . 1,0t≥ 2 Figure 1 shows the step response of a system with the transfer function Gs()= . 31s + 1 Step Response 2 1.8 1.6 System: sys1 Time (sec): 6 Amplitude: 1.73 1.4 System: sys1 1.2 Time (sec): 2 de Amplitude: 0.971 u t i l 1 mp A 0.8 0.6 0.4 0.2 0 0 2 4 6 8 10 12 14 16 18 Time (sec) 2 Figure 1. Step response of the system Gs()= 31s + The identification procedure, i.e. finding the values of the two parameters k,t describing the system dynamics, amounts to solving a system of two equations defined by two points on the system’s step response (t11,yt()) , (t22,yt()) . 1 ì -t 1t ïy(t1)=-+kekut-11() í 1 ï -t2 t îïy(t2)=-+kekut-12() Dividing the two equations, and considering that u-1(tt)=>1,0, one gets 1 y()tk- --()tt12 1 =e t y()tk2 - which means 11æöy()tk1 - ln ç÷= t2--t12èøy()tkt or æöæöy()tk- 1 . t =-(tt21)ç÷1/ln ç÷ èøèøy()tk2- 2 This equation gives the value of the time constant of the system if y(t2),y(t1),t12,,tk are known. In order to determine the value of k one notes that the steady state value of the step response is limy()tk= which can be easily measured from the step response graph. t®¥ Question 1: Use the graph in Fig. 1 and the relations given above to verify that the step response 2 presented in the figure is indeed the step response of a system described by Gs()= . 31s + Notes: a. Remember also the final value theorem limy(t)=limYs(), which means that the ts®¥®0 gain of the system at zero frequency, i.e. the DC gain, is k . a b. If the step input is not of amplitude 1, say Us()= where a denotes the s amplitude of the step input, then the step response of the system is 1 -t t y(t)=a(-+kekut-1()) . Then the steady state value of the system’s step response is limy()t= ak . In this case, in order to determine the value of the t®¥ system’s DC gain one needs to divide the measured steady state value by the amplitude of the step input. c. Let t =t then y(t)=k(1-ek-1)=*0.6321 thus the system’s time constant is the time moment when the system step response reaches approximately 63% of the steady state value. d. Let t = 5t then y(t)=k(1-ek-5)=*0.993 thus at t = 5t the system step response reaches more than 99% of the steady state value. k kq/t e. Gs()= can also be written as Gs()== where - p is the pole t s +1 s++1/t sp of the system. The impulse response of this system, considering initial conditions equal with 0, is 1 k -t y(t)= et ut() t -1 Measuring the value of the impulse response at positive time moments, say t1 and t2 , one can determine the time constant of the system using 1 yt() ()tt21- 1 = e t , yt()2 3 æöyt()1 thus t =-(tt21)/ln ç÷. èøyt()2 The time constant being known the system gain can be determined from 1 -t 3t k=t y(te3)/ for any t3 ³ 0 . k Looking at the system’s impulse response one sees that at t = 0 y(0) = . t Figure 2 shows the impulse response of the system described by the transfer function 2 Gs()= . 31s + Impulse Response 0.7 System: sys1 0.6 Time (sec): 0 Amplitude: 0.667 0.5 System: sys1 0.4 Time (sec): 2 de Amplitude: 0.343 u t i l mp A 0.3 System: sys1 Time (sec): 4 Amplitude: 0.176 0.2 0.1 0 0 2 4 6 8 10 12 14 16 18 Time (sec) 2 Figure 2. Impulse response of the system Gs()= . 31s + Question 2: Use the graph in Fig. 2 and the relations given above to verify that the impulse response 2 presented in the figure is indeed the impulse response of the system Gs()= . 31s + 4 II. Second order system (complex pole pair) A second order system with no finite zeros is described in frequency domain by the transfer function kw2kkww22 Hs()=0n=º00nn 2222 s+22as+wnss++zwwnnD()s The numerator is chosen to scale the transfer function so that the DC gain (which can be calculated by limHs()) is equal to k0 . s®0 The denominator is the Characteristic polynomial which can be written in several canonical forms, including 2 2 2 2 D(s) = s + 2as +w n = s + 2zwn s +w n . One may write 2 2 2 2 D(s) = s + 2as +w n = (s +a) + b where 2 2 2 b +a = w n . 2 2 Thus if a < w n , the polynomial D(s) describes a complex pair of poles at s = -a ± jb . Figure 3 shows the location of the two poles in the s-plane. The real part of the poles is -a and the imaginary part is jb. The norm of the vector from the origin to the pole is wn, which is known as the natural frequency. Figure 3. Location of the complex poles of a second order system in the s-plane Notice that the system dynamics is completely described by the triplets (k0,ab,) or (k0 ,zw,)n . To link the two forms of the characteristic polynomial we define the damping ratio as a z = , w n which defines it as 5 a z = cosq = -cosj = . w n For complex poles in the left-half plane one has 0 < z <1. If 0 > z > -1 then one has a complex pair in the right-half plane (e.g. unstable complex pair). Note that one may write 2 2 2 b = w n -a = w n 1-z . The impulse response of the system with transfer function kw2 Hs()= 0 n ()s2++ab22 is given by w 2 y(t)= kn e-at sinbtut(), 01b - which is plotted for 0 < z <1 in the figure. This is known as the underdamped case. The figure clearly shows the meaning in the time domain of the real part -a of the poles, which provides the exponential decay term. Having in mind the standard form for sinusoids sin 2p t , the period of the oscillation is given by T 2p T = . b The variable b is known as the oscillation frequency. Figure 4. Sketch of the impulse response of a second order system with complex poles If z = 0 then a = 0, b = w n and the poles are at s = ± jb on the imaginary axis. This is known as the undamped case. If z =1 then b = 0,a = w n and the poles are on the real axis, both at s = -a . In this overdamped case, the impulse response has the form te-at . If z > 1 then there are two real poles and we can split the quadratic factor 2 2 D(s) = s + 2as + w n into two real linear factors. 6 In order to determine the parameters of the system, one can simply determine the period 2p of oscillation T and subsequently use T = to determine b . b Then by measuring the values of the impulse response at two moments in time when sin1bt = one has 22 ww--aatt y(t)==knne12,y()tke. 10bb20 yt() a()tt- Dividing the two one gets 1 = e 21 and from here yt()2 æöyt()1 a=-lnç÷/()tt21. èøyt()2 2 w -at Knowing the values ab, and y(t)= kn et3 sin b one can also determine the 303b system DC gain k0 . The step response of this second order system is given by inverse transforming 1 k w2 Y(s)=H(s)U(s)==Hs() 0 n s ss[(2++ab)]22 to obtain a w y(t)=k(1-e--aatt[cosbt+sinbt])u(t)=k(1-+nesin(bqt))ut() 0bb--101 where the angle q = arctan b is shown in Figure 3.