Transfer function and linearization Daniele Carnevale Dipartimento di Ing. Civile ed Ing. Informatica (DICII), University of Rome Tor Vergata Corso di Controlli Automatici, A.A. 24-25 Testo del corso: Fondamenti di Controlli Automatici, P. Bolzern, R. Scattolini, N. Schiavoni. / 3
Space state and transfer function Consider Single Input Single Output (SISO) Linear Time-invariant System (LTI) described by the differential equation (continuous time) ẋ = Ax + Bu, y = Cx + Du, () with x R n, u R, y R. The solution ϕ(t, x, u( )) := x(t) of () with initial condition x is x(t) = e A x + t the system output is then e A(t τ) Bu(τ)d τ, [proof: substitute in ()] (2) t y(t) = Ce A x }{{ + C e A(t τ) Bu(τ)d τ + Du(t). (3) } free response }{{} forced response The free response is characterized by system modes of the type e λ i t t h i /h i!, where λ i σ{a} C and h i n is the dimension of the largest Jordan block associated to λ i. The forced response contains the modes of the input and the output e α j t t q j /q j!. There might be higher order (t q j + ) polynomials in the response if α j = λ i for some i and j (resonance). 2 / 3
Laplace transform: the transfer function Applying Laplace transform to () yields L[x(t)](s) := x(s) = (si A) x + (si A) Bu(s) (4) L[y(t)](s) := y(s) = C(sI A) x + ( C(sI A) B + D ) u(s). (5) Definition (Transfer function) Assuming x =, then F DT (s) := y(s) u(s) = C(sI A) B + D = Γm i=(s z i), (6) (s pi) Γ n i= is the system transfer function and is a proper rational function (ratio of polynomials of s where m n n). Furthermore, if every pole (root of the denominator) p i of the FDT has non-positive real part (p i C ) then if u(t) = E cos(ωt + θ) it holds lim y(t) = ρ(ω)e cos(ωt + θ + ϕ(ω)), (7) t where ρ(ω) := F DT (jω) and ϕ(ω) := F DT (jω). 3 / 3
Transient response Transfer function The forced response, using inverse Laplace transform and residuals can be written as y(t) = L [C(sI A) x ](t) + L [F DT (s)u(s)](t) If p i C then [ = x = L i j = R i,j t j e p i t (j )! i j }{{} transient response lim t i j R i,j R i,j (s alpha i) j (s p + i) j i j + R i,j t j e α i t. (8) (j )! i j }{{} regime response R i,j t j e p i t (j )! } {{ } transient response =. What happen if p i C? Does exist an initial condition x such that y(t) = ρ(ω)e cos(ωt + θ + ϕ(ω)) for all t? ] 4 / 3
First order rational functions (not all of them are proper transfer functions) P (s) = s +, P 2(s) = s +, P 3 (s) =.s +, P 4(s) =.s +, P 5 (s) = s, P 6(s) = s + s +, P 7(s) = 2 s + s +. Bode Diagram 5 Magnitude (db) 5 Phase (deg) 36 27 8 9 P P 2 P 3 P 4 P 5 P 6 P 7 9 8 2 3 4 Frequency (rad/s) Figure: Bode plots - first order functions. 5 / 3
First order rational functions (not all of them are proper transfer functions) P = t f (, [ ] ) ; P2 = t f ( [ ], ) ; P3 = t f (, [. ] ) ; P4 = t f ([. ], [ ] ) ; P5 = t f (, [ ]); P6 = t f ( [ ], [ ] ) ; P7 = zpk ( [ ], [ ], 2 ) ; f i g u r e ( ) bode (P, P2, P3, P4, P5, P6, P7 ) ; legend ( P, P 2, P 3, P 4, P 5, P 6, P 7 ) s e t ( f i n d a l l ( gcf, t y p e, l i n e ), l i n e w i d t h, 3 ) hold on g r i d on 6 / 3
Step response: first order rational functions P (s) = s +, P 2(s) = s +, P 3 (s) =.s +, P 4(s) =.s +, P 5 (s) = s, P 6(s) = s + s +, P 7(s) = 2 s + s +. Step Response P 9 P 3 P 5 8 P 6 P 7 7 Amplitude 6 5 4 3 2 2 3 4 5 6 Time (seconds) Figure: Step response - first order functions. 7 / 3
Step response: first order rational functions P (s) = s +, P 2(s) = s +, P 3 (s) =.s +, P 4(s) =.s +, P 5 (s) = s, P 6(s) = s + s +, P 7(s) = 2 s + s +. P 8 P 3 6 4 2 y(t) 2 4 6 8 P 5 P 6 P 7 3 2 y(t) 2 3 P P 3 P 5 P 6 P 7.5.52.53.54.55.56.57.58 time [s].2.4.6.8.2.4.6.8 2 time [s] Figure: Input response : u(t) = 2 sin(t 2π 3). 8 / 3
First order rational functions (not all of them are proper transfer functions) n i = 3 ; omega = 2 p i n i ; mytime = :. : 2 ; u = 2 s i n ( omega mytime ) ; l i s t a C o l o r i = { r, b, g, k, c, y, m, r,... b, g, k, c, y, m, r :, b :, g :,... k :, c :, y :, m:, r., b., g., k., c.,... y., m., r o, b o, g o, k o, c o, y o, m o,... r x, b x, g x, k x, c x, y x, m x } ; myfontsize = 6 ; f i g u r e ( ) f o r i = : 7 i f ( i = 2 && i = 4) %not p r o p e r t r a n s f e r f u n c t i o n e v a l ( [ y = l s i m (P num2str ( i ), u, mytime ) ; ] ) ; p l o t ( mytime, y, c e l l 2 m a t ( l i s t a C o l o r i ( i ) ), LineWidth, 2 ) ; hold on y l i m ([ ] ) end end h old o f f l e g e n d ( P, P 3, P 5, P 6, P 7, L o c a t i o n, NorthWest ) x l a b e l ( time [ s ], F o n t S i z e, myfontsize, I n t e r p r e t e r, L atex ) y l a b e l ( y ( t ), F o n t S i z e, myfontsize, I n t e r p r e t e r, L a t e x ) h old on g r i d on 9 / 3
Second order rational functions ωn 2 P (s) = s 2 + 2ζω ns + ωn 2, P 2 (s) = + 2s s 2 + s +, P 2s 3(s) = s 2 + s +, Bode Diagram Bode Diagram 5 Magnitude (db) 5 Magnitude (db) 2 5 3 45 4 36 27 P 2 P 3 Phase (deg) 9 Phase (deg) 8 9 35 8 2 2 Frequency (rad/s) 9 2 2 Frequency (rad/s) Figure: Left: P (s) with ζ [, ]. Right: P 2 (s) and P 3 (s). / 3
Second order rational functions ωn 2 P (s) = s 2 + 2ζω ns + ωn 2, P 2 (s) = + 2s s 2 + s +, P 2s 3(s) = s 2, [Non-minum phase plant] + s + 2 2.8.6.5.4.2 y(t) y(t).5.8.6.4.5.2 5 5 time [s] 5 5 time [s] Figure: Step response of P (s) with ζ [, ]. Right: step response of P 2 (s) (RED) and P 3 (s) (BLUE). / 3
Transfer function Consider the nonlinear differential equation ẋ = f(x, u, d), where the system state is x R n with input u R p and disturbance d R q. Let (x e, u e, d e) be the equilibrium triple such that f(x e, u e, d e) =, then the linearization of the system dynamics around such point is x f(x, u, d) x x + (xe,u e,d e) A x + Bũ + M d, f(x, u, d) u where x = x x e, ũ = u u e and d = d d e. ũ + (xe,u e,d e) f(x, u, d) d d, (xe,u e,d e) (9) 2 / 3
: cart-pendulum Figure: Inverted pendulum with cart (Matlab). 3 / 3