Colorado School of Mines CHEN403 Linear Open Loop Systems Linear Open Loop Systems................................................................................................................................ 1 Transfer Function for a Simple Process ....................................................................................................... 1 Example Transfer Function — Mercury Thermometer ......................................................................... 2 Desirability of Deviation Variables............................................................................................................ 3 Transfer Function for Process with Multiple Inputs and/or Multiple Outputs ............................ 3 Example Transfer Function — Stirred Tank Heater ............................................................................... 5 Transfer Function of Process in Series ......................................................................................................... 8 Poles & Zeros of a Transfer Function ............................................................................................................ 9 Example — Poles & Zeros of a Transfer Function............................................................................ 12 Transfer Function for a Simple Process f (t ) Dynamic Process Input y (t ) f (s) Output G(s) y(s) Consider the simple process with one input & one output. The describing n-th order ODE is: an dn y d n−1 y d2 y dy + a + ⋯ + a + a1 + a0 y = bf ( t ) n −1 2 n n −1 2 dt dt dt dt Let us assume we are using deviation variables, so y′ ( 0) = 0 , and we are starting at steady state, so: d n−1 y d2 y dy = ⋯ = = = 0. n −1 2 dt t =0 dt t =0 dt t =0 Taking the Laplace transform of this gives: an s n y ( s ) + an−1 s n−1 y ( s ) + ⋯ + a2 s 2 y ( s ) + a1 sy ( s ) + a0 y ( s ) = bf ( s ) y(s) f (s) = an s + an−1 s n Transfer Functions n −1 b ≡ G(s) + ⋯ + a2 s 2 + a1 s + a0 -1- December 21, 2008 Colorado School of Mines CHEN403 where G ( s ) is defined as the transfer function and the simple diagram is called the block diagram for the process. Example Transfer Function — Mercury Thermometer Make the following assumptions about the reading from a mercury thermometer: • • • • All resistance to heat transfer is in a thin film around the bulb — i.e., neglect thermal resistance of glass & mercury. All thermal capacity is in the mercury. Mercury always has uniform temperature. The glass wall does not expand or contract. The energy balance on thermometer will be: dE d ( E + K + P ) dU dH = ≈ ≈ = hA (Ta − T ) dt dt dt dt dT mCˆ p = hA (Ta − T ) for constant Cˆ p dt ˆ mC p dT = Ta − T hA dt dT τ − T = Ta dt where the time constant τ is: τ≡ mCˆ p hA At steady state: T * = Ta* so in terms of deviation variables: τ dT ′ − T ′ = Ta′ where T ′ ( 0) = 0 dt Taking the Laplace transform of this ODE gives: Transfer Functions -2- December 21, 2008 Colorado School of Mines CHEN403 ( τs + 1)T ′ = Ta′ so the transfer function is: G(s) = T′ 1 = Ta′ τs + 1 So, we would expect the heat transfer resistance around a thermometer to be a 1st order system. Desirability of Deviation Variables If we didn’t use deviation variables the Laplace transform of the ODE would be: τ dT + T = Ta ⇒ τ ( sT − T ( 0 ) ) + T = Ta dt ( τs + 1)T = Ta + τT (0) 1 τ Ta + T ( 0) τs + 1 τs + 1 1 τ = Ta + Ta* τs + 1 τs + 1 T= Now there are two inputs & two transfer functions: one for the driving function ( Ta ( t ) or Ta ( s ) ) and one for the initial condition ( Ta* ). Transfer Function for Process with Multiple Inputs and/or Multiple Outputs What if there are multiple inputs and/or multiple outputs? We would associate a transfer function with each pairing of an input & output. The block diagram for 2 inputs & 1 output is: f1 ( s ) G(s) f1 ( s ) G1 ( s ) f2 ( s ) G2 ( s ) y(s) f2 ( s ) + + y(s) The overall relationship for y ( s ) would be: Transfer Functions -3- December 21, 2008 Colorado School of Mines CHEN403 y ( s ) = G1 ( s ) ⋅ f1 ( s ) + G2 ( s ) ⋅ f2 ( s ) For n inputs and one output, then: y ( s ) = G1 ( s ) ⋅ f1 ( s ) + G2 ( s ) ⋅ f2 ( s ) + G3 ( s ) ⋅ f3 ( s ) + ⋯ + Gn ( s ) ⋅ fn ( s ) n y ( s ) = ∑ Gi ( s ) ⋅ fi ( s ) i =1 The block diagram for 2 inputs & 2 outputs is: f1 ( s ) G1,1 ( s ) + + y1 ( s ) G2,1 ( s ) f2 ( s ) G2,1 ( s ) G2,2 ( s ) + + y2 ( s ) The overall relationship for the y ( s ) functions would be: y1 ( s ) = G1,1 ( s ) ⋅ f1 ( s ) + G1,2 ( s ) ⋅ f2 ( s ) y2 ( s ) = G2,1 ( s ) ⋅ f1 ( s ) + G2,2 ( s ) ⋅ f2 ( s ) For n inputs and m outputs, then: yi ( s ) = Gi ,1 ( s ) ⋅ f1 ( s ) + Gi ,2 ( s ) ⋅ f2 ( s ) + Gi ,3 ( s ) ⋅ f3 ( s ) + ⋯ + Gi ,n ( s ) ⋅ fn ( s ) n yi ( s ) = ∑ Gi , j ( s ) ⋅ f j ( s ) for i = 1,2,3, … , m . j =1 or in matrix notation as: y ( s) = G(s ) f ( s ) Transfer Functions -4- December 21, 2008 Colorado School of Mines CHEN403 where y ( s ) is a column vector of length m , f ( s ) is a column vector of length n , and G ( s ) is a m × n rectangular matrix. G ( s ) is called the transfer function matrix. Example Transfer Function — Stirred Tank Heater F0, T0, ρ0 h, A, T, ρ Fs, Ts F1, T1, ρ1 The material balance on this system will be: d ( hρ ) dm = F0ρ0 − F1ρ1 ⇒ A = F0ρ0 − F1ρ dt dt assuming constant cross-sectional area, A . The energy balance is: dE = F0ρ0 Hˆ 0 − F1ρ1 Hˆ 1 + Q = F0ρ0 Hˆ 0 − F1ρHˆ + Q dt Remember, within the tank: dE d (U + K + P ) dU dH = ≈ ≈ dt dt dt dt So: ( ) ˆ dH d ρVH = = F0ρ0 Hˆ 0 − F1ρHˆ + Q dt dt If we assume that the enthalpy can be expressed as: Transfer Functions -5- December 21, 2008 Colorado School of Mines CHEN403 Hˆ = Cˆ p (T − Tref ) + Hˆ ref then with Hˆ ref = 0 & Tref = 0 : ( ) d ρVCˆ pT = F0ρ0Cˆ pT0 − F1ρCˆ pT + Q dt d Cˆ p ( ρVT ) = F0ρ0Cˆ pT0 − F1ρCˆ pT + Q dt d Q ( ρVT ) = F0ρ0T0 − F1ρT + ˆ dt Cp If we assume ρ ≈ constant , then: A dh = F0 − F1 dt and: ρA d Q ( hT ) = F0ρT0 − F1ρT + ˆ dt Cp F F d Q ( hT ) = 0 T0 − 1 T + ˆ dt A A ρAC p TA dh dT Q + hA = F0T0 − F1T + dt dt ρCˆ p Inserting the material balance: T ( F0 − F1 ) + hA hA dT Q = F0T0 − F1T + dt ρCˆ p dT Q = F0 (T0 − T ) + where h = h( t ) . dt ρCˆ p If we make the assumption that dh / dt = 0 then V = hA = constant & F0 = F1 , so: V dT Q = F0 (T0 − T ) + dt ρCˆ p If we are using steam for the heating medium, then we could relate the rate of heat added, Q , to the steam temperature, Ts , as: Transfer Functions -6- December 21, 2008 Colorado School of Mines CHEN403 Q = UA (Ts − T ) . So: V UA (Ts − T ) dT = F0 (T0 − T ) + dt ρCˆ p dT UA UA + F0 + ɶ T = F0T0 + Ts dt ρC p ρCˆ p F dT F0 UA UA Ts + + T = 0 T0 + dt V ρVCˆ p V ρVCˆ p dT 1 1 + + K T = T0 + KTs τF dt τF dT 1 + aT = T0 + KTs dt τF V where: 1 F0 UA 1 ≡ ,K≡ , and a ≡ + K . τF V τF ρVCˆ p At steady state: aT * = 1 * T0 + KTs* τF so: dT ′ 1 + aT ′ = T0′ + KTs′ dt τF where the deviation variables are defined as: T ′ ≡ T − T * , T0′ ≡ T0 − T0* , and Ts′ ≡ Ts − Ts* . Note that this equation shows how the stirred tank fluid temperature is affected by changes in the other temperatures. Transfer Functions -7- December 21, 2008 Colorado School of Mines CHEN403 In this Chapter we will convert this equation into one involving transfer functions. Taking the Laplace transform of the equation gives: sT ′ − T ′ ( 0) + aT ′ = 1 T0′ + KTs′ τF 1 T0′ + KTs′ τF 1 ( s + a )T ′ = T0′ + KTs′ τF 1 τF K T′ = T0′ + Ts′ s +a s +a sT ′ + aT ′ = This shows that we have two transfer functions: T ′ = G0 ( s )T0′ + Gs ( s )Ts′ where: G0 ( s ) ≡ 1/ τF K and Gs ( s ) ≡ s +a s +a A block diagram for the stirred tank heater can be drawn as follows. 1/ τF s+a T0′ ( s ) + + T ′( s ) K s+a Ts′ ( s ) Transfer Function of Process in Series y1(s) f(s) G1(s) y2(s) G2(s) Gn(s) yn(s) If there are a series of transfer functions, then: Transfer Functions -8- December 21, 2008 Colorado School of Mines CHEN403 yn ( s ) = Gn ( s ) yn−1 ( s ) = Gn ( s ) Gn−1 ( s ) yn−2 ( s ) = Gn ( s ) Gn−1 ( s ) ⋯ G1 ( s ) f ( s ) yn ( s ) f (s) n = ∏ Gi ( s ) i =1 Poles & Zeros of a Transfer Function According to definition of the transfer function: y(s) f (s) = G(s) where: G(s) = Q(s) P (s) and where Q ( s ) and P ( s ) are usually polynomials in s (time delays will introduce exponential terms, however). In general, the order of Q ( s ) will be less than that of P ( s ) . The roots of the numerator Q ( s ) are referred to as the zeros of the transfer function. At the zeros, G ( s ) becomes zero. The roots of the denominator P ( s ) are referred to as the poles of the transfer function. At the poles, G ( s ) becomes infinite. We can get a qualitative sense of the response of a system by knowing the poles. Let: f (s) = r (s) q(s) Since: G(s) = Q(s) P( s ) then: Transfer Functions -9- December 21, 2008 Colorado School of Mines CHEN403 y(s) = G(s)⋅ f (s) = Q(s) r (s) P (s) q(s) Let’s let the roots of P ( s ) be denoted as pi . Then, if P ( s ) is a polynomial of order n and there are N non-repeating roots and M repeating roots (each one repeating mi times), then: N M i =1 i =1 P ( s ) = ∏ ( s − pi ) ⋅ ∏ ( s − pi ) mi and: y(s) = Q(s) N r (s) M ∏(s − p ) ⋅∏(s − p ) i i =1 q(s) mi i i =1 When split into partial fractions, each of the factors in the denominator will lead to a separate term. Splitting up the factors of the transfer function (while leaving the denominator from the input function aside for now) gives: mi −1 N M C y(s) = ∑ i + ∑ i =1 s − pi i =1 ∑ D (s − p ) j ,i j i j =0 ( s − pi ) mi M mi −1 D j ,i Ci y(s) = ∑ + ∑ ∑ mi − j i =1 s − pi i =1 j =0 ( s − pi ) N + r* (s) q( s) . r* (s) + . q(s) Note that for the repeated root, the numerator can be a polynomial of order up to one less the order of denominator. Also, each repeated root can have a different order. The only requirement on the number of roots is that they have to add up to n , i.e.: M n = N + ∑ mi . i =1 When we invert the Laplace transforms, then: N C N L−1 ∑ i = ∑ C i exp ( pi t ) . i =1 s − pi i =1 Transfer Functions - 10 - December 21, 2008 Colorado School of Mines CHEN403 M mi −1 D j ,i L−1 ∑ ∑ mi − j i =1 j =0 ( s − pi ) M mi −1 D j ,i = ∑ ∑ L−1 mi − j i =1 j =0 s p − ( ) i M mi −1 D = ∑ exp ( pi t ) ∑ L−1 mij−,i j i =1 s j =0 mi −1 = ∑ exp ( pi t ) ∑ j =0 ( mi i =1 M mi −1 = ∑ exp ( pi t ) ∑ j =0 ( m i =1 i M ( m − j − 1)! L−1 i mi − j − j − 1 )! s . D j ,i t mi − j −1 − j − 1 )! D j ,i Note that the roots pi are important for the long-time characteristics of the solution. For the real non-repeating roots: • • • If pi < 0 , then exp ( pi t ) → 0 as t → ∞ . This exponential decay leads to a zero contribution from this pole. If pi > 0 , then exp ( pi t ) → ∞ as t → ∞ . This exponential growth leads to a explosive contribution from this pole. If pi = 0 , then exp ( pi t ) = 1 for all t . This constant term should not lead to any instability. For the complex non-repeating roots (which will occur as a complex conjugate pair), then pi can be expressed as α i ± βi i . These roots will give rise to terms of the form exp ( α i t ) sin ( βi t + φi ) . Now, the important term with regards to stability is the real portion of the root, α i : • • • If α i < 0 , then exp ( αi t ) sin ( βi t + φi ) → 0 as t → ∞ . This exponential decay leads to a zero contribution from this pole. If α i > 0 , then exp ( α i t ) sin ( βi t + φi ) → ∞ as t → ∞ . This exponential growth leads to a explosive contribution from this pole. If α i = 0 , then exp ( αi t ) sin ( βi t + φi ) = sin ( βi t + φi ) for all t . This term will lead to a stable oscillation. For the repeating roots, the situation is similar. The polynomial term will always grow towards infinity as t → ∞ , so the behavior of the exponential term will dictate the overall behavior. • If pi < 0 or α i < 0 , then the exponential term will go to zero as t → ∞ and the entire term will also go to zero. This exponential decay leads to a zero contribution from this pole. Transfer Functions - 11 - December 21, 2008 Colorado School of Mines CHEN403 • • If pi > 0 or α i > 0 , then the exponential term will grow to infinity as t → ∞ and the entire term will also grow to infinity. This exponential growth leads to an explosive contribution from this pole. If pi = 0 or α i = 0 , then the polynomial term will dictate the behavior for t → ∞ . This polynomial term will lead to an explosive contribution from this pole.. So, in general: • • • If α i < 0 , stable contribution from this pole. If α i > 0 , unstable contribution from this pole. If α i = 0 , stable contribution only if non-repeated root — unstable contribution if repeated root. Example — Poles & Zeros of a Transfer Function Given the transfer function: G(s) = Q(s) P (s) = Q(s) s + 3s + 5s 2 + 4s + 2 4 3 find the zeros & determine if stable. The following chart shows the characteristics of P ( s ) vs. s . Note that there are no real roots. Transfer Functions - 12 - December 21, 2008 Colorado School of Mines CHEN403 10 9 8 7 6 P (s ) 5 4 3 2 1 0 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 s Can factor P ( s ) to get: P ( s ) = s 4 + 3s3 + 5s 2 + 4s + 2 = ( s 2 + s + 1 )( s2 + 2s + 2) From this, we find that the roots are: r= −1 ± 1 − 4 ⋅ 1 ⋅ 1 1 3 i =− ± 2 2 2 r= −2 ± 22 − 4 ⋅ 1 ⋅ 2 = −1 ± i 2 Since the real portion of the roots are all negative, the system is stable. Transfer Functions - 13 - December 21, 2008