1 / 24 Systems Engineering/Process Control L4 Input-output models Laplace transform Transfer functions Block diagram algebra Reading: Systems Engineering and Process Control: 4.1 4.4
2 / 24 Laplace transform Powerful mathematical tool to study and solve linear differential equations Example: u Linear system y What is outputy(t) given a specific inputu(t)?
Example: CSTR q,c R,in c R c P c R,in c P CSTR q,c P,c R Constant volumev and flowq First order reaction R P Reaction rater R = r P = kc R Assume system is in equilibrium. How doesc P respond to unit step changes inc R,in? 3 / 24
4 / 24 Example: CSTR Mass balance: Second order state-space model: In+Prod=Out+Acc qc R,in +Vr R =qc R +V dc R dt Vr P =qc P +V dc P dt dc R q ) = ( dt V +k 1 c R + q V c R,in dc P =k 1 c R q dt V c P How to solve equations with Laplace transform?
5 / 24 Laplace transform Transforms a function f(t) to another function F(s). f(t) is a function of timet 0 F(s) is a function of the complex frequency s Definition: F(s)=L{f(t)}= 0 f(t)e st dt
6 / 24 Some common functions (signals) f f(t)= δ(t) Impulse f t f(t) = 1 Step (constant signal) f t f(t)=t Ramp f t f(t)=e at Exponential function t
7 / 24 The impulse function δ(t)=impulse at time 0 Also called Dirac function Infinitely high and infinitely thin, but with area 1 Example: dv dt = δ(t) Interpretation: Injection of a unit volume at time 0
8 / 24 Laplace transform of some common functions Impulse: Step: L{1}= L{δ(t)}= 0 0 δ(t)e st dt=1 [ e 1 e st st dt= s ] 0 = 1 s Exponential function: L{e at }= 0 [ e at e st e (s+a)t dt= (s+a) ] 0 = 1 s+a
9 / 24 Excerpt from collection of formulae p. 6: Laplace transform F(s) Time function f(t) 1 1 δ(t) Dirac function 2 3. 6 1 s 1 Step function 1 s 2 t Ramp function 1 s+a e at
10 / 24 Some properties of the Laplace transform Excerpt from collection of formulae p. 5: Laplace transform F(s) Time function f(t) 1 αf 1 (s)+βf 2 (s) αf 1 (t)+βf 2 (t) Linearity 8 sf(s) f(0) f (t) Derivation it-planet 12 1 s F(s) t 0 f(τ) dτ Integration it-planet
11 / 24 More useful properties Excerpt from collection of formulae p. 5: Laplace transform F(s) Time function f(t) { 3 e as f(t a) t a>0 F(s) 0 t a<0 Time delay 14 lim s 0 sf(s) limf(t) t End point theorem
12 / 24 Compute system response using Laplace transform 1. Laplace transform all terms in the differential equation Use collection of formulae 2. Solve for signaly(s) 3. Use inverse Laplace transform to findy(t) Divide into partial fractions first, if needed Use collection of formulae
Example 1 Solve ẏ= 3y with initial state y(0) = 5. 1. Laplace transform: sy(s) 5= 3Y(s) 2. Solve for Y(s): (s+3)y(s)=5 Y(s)= 5 s+3 3. Inverse Laplace (transform nbr. 6): y(t)=5e 3t 13 / 24
14 / 24 Example 2: CSTR Assumeq=V=k=1,c R (0)=c P (0)=0,c R,in =1(step fcn): 1. Laplace transform: ċ R = 2c R +c R,in ċ P =c R c P 2. Solve forc P (s): sc R (s)= 2C R (s)+c R,in (s) sc P (s)=c R (s) C P (s) C R (s)= 1 (s+2) C R,in(s) C P (s)= 1 s+1 C R(s)= 1 (s+1)(s+2) C R,in(s)= 1 (s+1)(s+2)s
15 / 24 Example 2: CSTR 3. Inverse Laplace (transform nbr. 24): c P (t)= 1 2 (1+e 2t 2e t) 0.6 0.5 0.4 cp 0.3 0.2 0.1 0 0 1 2 3 4 5 6 7 8 t
16 / 24 Transfer function u Linear system y Assume that all initial states are zero After Laplace transform, input-output relation can be written: Y(s)=G(s)U(s) G(s) is called the system transfer function
17 / 24 Poles and zeros Often transfer function is be written as: G(s)= Q(s) P(s), degq degp where Q(s) and P(s) are polynomials Zeros: roots toq(s)=0 Poles: roots to P(s) = 0 (characteristic equation) Can be drawn in singularity diagram/pole-zero-diagram Poles: x Zeros: o
18 / 24 Example: CSTR 1 Input-output model:c P (s)= (s+1)(s+2) C R,in(s) 1 Transfer function: G(s) = (s+1)(s+2) Zeros:1=0has no solutions Poles:(s+1)(s+2)=0has solutionss 1 = 1,s 2 = 2 Singularity diagram: 2 1 Im 0-1 -2-3 -2-1 0 1 Re
19 / 24 Connection state-space form transfer function Linear time invariant system on state-space form dx dt =Ax+Bu y=cx+du Assume all initial states are zero:x(0)=0 Laplace transform: sx(s)=ax(s)+bu(s) Y(s)=CX(s)+DU(s)
20 / 24 Connection state-space form transfer function Solve forx(s): (si A)X(s)=BU(s) Insert into equation for Y(s): X(s)=(sI A) 1 BU(s) Y(s)=C(sI A) 1 BU(s)+DU(s) ( ) = C(sI A) 1 B+D U(s) } {{ } G(s) Denominator tog(s) given bydet(si A) Poles tog(s) eigenvalues ofa
21 / 24 Comparison State-space model Input-output-model u(t) ẋ=ax+bu y=cx+du y(t) U(s) G(s) Y(s) System response: x(t)=e At x(0) + t 0 e A(t τ) Bu(τ)dτ y(t)=cx(t)+du(t) Stability: Decided by eigenvalues toa. System response: Y(s)=G(s)U(s) Stability: Decided by poles tog(s).
22 / 24 Block diagram computations with transfer functions Serial connection: U(s) G 1 (s) G 2 (s) Y(s) Y(s)=G 2 (s)g 1 (s)u(s) Parallel connection: U(s) G 1 (s) G 2 (s) Y(s) ( ) Σ Y(s) = G 1 (s)+g 2 (s) U(s)
23 / 24 Block diagram computations with transfer functions Feedback: U(s) Σ G 1 (s) Y(s) G 2 (s) ( Y(s) 1+G 1 (s)g 2 (s) ( Y(s)=G 1 (s) ) Y(s)= =G 1 (s)u(s) ) U(s) G 2 (s)y(s) G 1 (s) 1+G 1 G 2 (s) U(s)
24 / 24 Example U H 1 Σ E Y 1 V G 1 Σ G 2 Y H 2 Compute transfer function from U and V to Y. Solve fory: Y=G 2 (V+Y 1 ) Y 1 =G 1 E E=H 1 U H 2 Y Y= G 2G 1 H 1 G 2 U+ V 1+G 2 G 1 H 2 1+G 2 G 1 H 2