Control Systems Engineering (Chapter 2. Modeling in the Frequency Domain) Prof. Kwang-Chun Ho kwangho@hansung.ac.kr Tel: 02-760-4253 Fax:02-760-4435
Overview Review on Laplace transform Learn about transfer function Electric network You will learn how to develop mathematical model Present mathematical representation where the input, output and system are different and separate Solving problems in group and individual 2
Introduction A differential equation An equation that involves the derivatives of a function as well as the function itself If partial derivatives are involved, the equation is called a partial differential equation If only ordinary derivatives are present, the equation is called an ordinary differential equation 3
Introduction Differential equations. How to obtain? Physical law of the process Differential equation using Electrical system (Kirchhoff s laws) 4
Introduction RLC circuit Using KVL and Ohm s law di() t 1 vr() t vl() t vc() t vt () L Rit () itdt () vt () dt C (Differential equation) 5
Introduction Differential equation describes the relationship between the input and output of a system n n1 m m1 d c t d c t d r t d r() t an 1 a0c t b 1 m bm 1 b 1 0r() t n n m m dt dt dt dt Here, c(t) is output and r(t) is input It is easier if we can see the input and the output clearly such as in block diagram below 6
Laplace Transform Review 7
Laplace Transform Review Partial-Fraction Expansion Let F(s) be a rational function which has n poles Then, F(s) can be represented as Fs Ns () K K K s p s p s p s p s p s p 1 2 n () 1 2 n 1 2 where the residues of X(s) is () K s p F s n n s p n If the rational function has n distinct poles, but pole is repeated r times Fs () r Ns () s p s p s p 1 2 1 2 r 2 2 r 1 s p1 s p1 2 n d d d K Kn s p s p s p n n 8
Laplace Transform Review Example 2.1: Given, find x(t) in causal system Solution: X () s L x() t X() s 7s 6 c1 c2 X() s s2 s3 s2 s3 7s 6 s 2s 3 14 6 216 c1 s2 X s 4, c2 s3 X s 3 s2 s3 23 32 4 3 4 3 X s x t L e e u t s2 s3 s2 s3 1 2 t 3 t, 4 3 9
Laplace Transform Review Example 2.2: Use Laplace transform to determine the output of a system y() t 5 y() t 6 y() t 2 x() t x() t when x() t u() t The initial conditions arey(0) 1, y(0) 2 Identify the forced and the natural responses Solution: Taking Laplace transform of both sides gives s s Y s sy y y (2s1) X( s) 2 x(0) 2 ( 5 6) ( ) (0) (0) 5 (0) 10
Laplace Transform Review Solving for Y(s), we get Y() s (2s1) X( s) 2 x(0) sy(0) y(0) 5 y(0) 2 2 s 5s6 s 5s6 Forced response : This term is zero if input is zero Substituting and the initial conditions gives Expanding in partial fraction expansion yields Natural response : This term is zero if all the initial conditions are zero 1 X() s, x(0) 1 s 1 s 7 Yf () s, Yn() s ss ( 2)( s3) ( s2)( s3) 1 1 1 y f t e e u t y t e e u t 6 2 3 2t 3t 2t 3t () (), n() 5 4 () 11
Transfer Functions Starting with the general differential equation n m dct () dct () d rt () drt () an a1 a0c() t bm b1 b0r() t n m dt dt dt dt Assuming zero initial conditions, and taking Laplace transform into the equation above, it becomes n ascs () ascs () acs () bsrs () bsrs () brs () n m 1 0 m 1 0 Now form the ratio of the output transform, Cs (), divided by the input transform, Rs (): 12
Transfer Functions It is called Transfer Function presenting by complex frequency s because it describes how the input is transferred to the output in a domain (Block diagram of a transfer function) Example 2.3: Find the transfer function represented by Solution: sc( s) 2C( s) R( s) dc( t) 2c( t) dt The transfer function G(s) is C( s) G( s) R( s) 1 s 2 r( t) 13
Transfer function You are going to apply transfer function in a type of mathematical modeling Electric network We are only going to apply transfer function to the mathematical modeling of electric circuits for passive networks (resistor, capacitor and inductor) We will look at a circuit and decide the input and the output We will use Kirchhoff s laws as our guiding principles Mesh analysis Nodal analysis 14
Electric Network: Transfer Functions Example 2.4: Find the transfer function relating the capacitor voltage, V () C s, to the input voltage, V() s, in figure 15
Electric Network: Transfer Functions Solution Determine the input and the output for the circuit For this circuit, the input is V() s and the output is V () s Next, we write a mesh equation using the impedance as we would use resistor values in a purely resistive circuit We obtain C 1 1 Ls R I() s V (), s VC () s I() s Cs Cs 1 Ls R VC () s Cs V () s Cs 16
Electric Network: Transfer Functions VC () s 1 1 1/ LC 2 V () s 1 CLs RCs 1 2 R CsLs R s s Cs L 1 LC We can also present our answer in block diagram 17
Electric Network: Transfer Functions Complex circuit via mesh analysis To solve a complex circuit, we will perform the following steps Replace passive elements values with their impedances Replace all sources and time variables with their Laplace transform Assume a transform current and a current direction in each mesh Write Kirchhoff s voltage law around each mesh Solve the simultaneous equations for the output Form the transfer function 18
Electric Network: Transfer Functions Example 2.5: Find the transfer function, I 2 ()/ s V() s Output I 2 (s) Input V(s) 19
Electric Network: Transfer Functions Solution: ( R Ls) I () s LsI () s V() s 1 1 2 1 LsI1() s Ls R2 I2() s 0 Cs To get the value of I 2 (s) and V(s), we can use Cramer s rule 20
Electric Network: Transfer Functions It is easier if we use Cramer s rule ( R Ls) V ( s) 1 Ls 0 LsV ( s) I 2( s) where ( R1 Ls) Ls 1 Ls Ls R2 Cs Forming the transfer function, G(s), yields I2( s) Ls G( s) V ( s) LCs 2 R1 R2 LCs R1R 2C Ls R1 2 (Block diagram) 21
Electric Network: Transfer Functions Find the transfer function, V ()/ s V() s C I 1 I 3 I 2 I 4 2 Use Nodal Analysis Method! At the node marked as V (), L s VL() s V() s VL() s VL() s VC() s I1 I2 I3 0 R1 Ls R2 At the node marked as V (), C s VC() s VL() s I3 I4 CsVC () s 0 R 22
Electric Network: Transfer Functions Rearranging as a matrix form, it becomes G1G2 1/ Ls G2 VL () s V() s G1 G2 G2 Cs VC () s 0 G 1/ R, G 1/ R where the conductances are Use Cramer s rule: V C () s G1G2 1/ Ls V( s) G1 G 0 G G Ls G Cs G 2 2 1 2 2 2 1/ 1 1 2 2 VC () s sg1g 2 / C V() s 2 GG 1 2L C G1G2s sg2 / LC LC 23
Electric Network: Transfer Functions Example 2.6: The circuit shown in Figure P2.35(a) is excited with the pulse shown in Figure P2.35(b) The Laplace transform can be used to calculate v () o t in two different ways: The exact method is performed by writing vin () t 3 ut () ut ( 0.005), from which we use the Laplace transform to obtain 0.005s 1 e Vin() s 3 s 24
Electric Network: Transfer Functions In the second approach, the pulse is approximated by an impulse input having the same area (energy) as the original input From Figure P2.35(b): vin ( t) 3V5msec ( t) 0.015 ( t) In this case, V ( in s ) 0.015 This approximation can be used as long as the width of the pulse of Figure P2.35(b) is much smaller than the circuit s smallest time constant (Here, RC 24F 8sec 5msec) (a) Assuming the capacitor is initially discharged, obtain an analytic expression for v () o t using both methods (b) Plot the results of both methods using any means available to you, and compare both outputs Solution: (a) Exact solution: 25
Electric Network: Transfer Functions From Figure (a), Applying partial fraction expansion to and taking the inverse Laplace transform yields 0.005s e 0.005s 1/8 1/8 1 e 3/8 1 Vo() s Vin() s 3 s1/8 s1/8 s ss1/8 V () o s 1 1 t t0.005 v t e u t e u t 8 8 o() 3 1 () 3 1 ( 0.005) [Approximated solution] For impulse input, 1/ 8 ( ) ( ) 1/ 8 V 0.015 0.001875 o s Vin s s1/8 s1/8 s(1/8) 1 t 8 v ( t) 0.001875 e u( t) o 26
Electric Network: Transfer Functions (b) The following M-File will simulate both inputs: %Specifies the transfer function syms s s = tf('s'); Both outputs are indistinguishable at this scale. However zooming closer to t=0 will show differences. G=(1/8)/(s+(1/8)); t=0:1e-4:10; for i=1:max(size(t)) if(i*1e-4 <= 5e-3) vinexact(i) = 3; else vinexact(i) = 0; end; end; %Simulate time response of dynamic %system to arbitrary inputs yexact = lsim(g,vinexact,t); yimpulse = 0.001875*exp(-(1/8)*t); plot(t,yexact,t,yimpulse) 27
Homework Assignment #2 28
Homework Assignment #2 29
Homework Assignment #2 30