05_SEMD_Ch4TransferFunctions

05_SEMD_Ch4TransferFunctions - Transfer Functions...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Transfer Functions Definition of the transfer function: of the transfer function: • Convenient representation of a linear, dynamic model. Let G(s) denote the transfer function between an input, x, and an output, y. Then, by definition: x ( t ) input y ( t ) output in time domain → system → X (s) Y ( s ) Laplace domain The following terminology (from mathematics) is used: x y input response “cause” Y (s) a "ratio" of functions of s X (s) G (s) = Y ( s ) = L ⎡ y ( t )⎤ ⎣ ⎦ where: X ( s ) = L ⎡ x ( t )⎤ ⎣ ⎦ output forcing function Chapter 4 Chapter 4 • A transfer function (TF) relates one input and one output: transfer function (TF) relates one and one “effect” Development of Transfer Functions Recall the previous dynamic model, assuming constant liquid holdup and flow rates simplified dynamic energy balance holdup and flow rates, a simplified dynamic energy balance is: Example: Stirred Tank Heating System Feed temperature Ti and flow rate wi are disturbances to output T. Chapter 4 Chapter 4 V ρC dT (t ) = wC [Ti (t ) − T (t )] + Q (t ) dt (2-36) Suppose the process is at steady state: 0 = wC (Ti − T ) + Q (2) Subtract (2) from (2-36): Rate of heat “in”, Q, is the manipulated variable. Figure 2.3 Stirred-tank heating process with constant holdup, V. V ρC dT = wC ⎡(Ti − Ti ) − (T − T ) ⎤ + ( Q − Q ) ⎣ ⎦ dt (3) where the “deviation variables” are denoted by primes ( primes are not time derivatives !) T ′ = T − T , Ti′ = Ti − Ti , Q′ = Q − Q Take Laplace transform of (4): transform of (4): V ρ C ⎡ sT ′ ( s ) − T ′ ( 0 ) ⎤ = wC ⎡Ti′( s ) − T ′ ( s ) ⎤ − Q ′ ( s ) (5) ⎣ ⎦ ⎣ ⎦ Rearrange (5) to solve for two transfer functions of the process since there is only one output but two inputs: Chapter 4 Chapter 4 Then because the derivative of a variable (T) and the derivative of its deviation variable ( T ′ = T − T ) are the same: dT ′ (4) V ρC = wC ( Ti′ − T ′) + Q ′ dt ⎛K⎞′ ⎛ 1 ⎞′ T ′( s ) = ⎜ ⎟Q (s) + ⎜ ⎟ Ti ( s ) ⎝τ s +1⎠ ⎝τ s +1⎠ (6) T ′(s) = G1(s) Q ′(s) + G2 (s) Ti′(s) where K= 1 Vρ and τ = wC w Since at t < 0 we assume we are at the nominal steady state, the initial value of the output deviation variable is zero, e.g. T′(0) = 0. T ′(s)= G1(s)Q′(s) + G2 (s)Ti′(s) Conclusions about TFs : Note G1 (process TF) has gain K and time constant τ. G2 (disturbance TF) has gain=1 and time constant τ. gain = G(with s=0) for stable TFs. Both these are first order “processes” = ouput/input relationship. If there is no change in inlet temperature (Ti′= 0), then Ti′(s) = 0. System can be “forced” by a change in either Ti or Q Chapter 4 Chapter 4 G1 and G2 are transfer functions (TFs) and independent of the specific input functions of time, Q′(t) and Ti′(t). 1. Note that (6) shows that the effects of changes in both Q (6) bo and Ti are additive. This always occurs for linear, dynamic models (like TFs) because the Principle of Superposition is valid for linear ODEs valid for linear ODEs. 2. The TF model enables us to determine the output response to any change in an input any change in an input. 3. Use deviation variables to eliminate initial conditions for TF models. models. Example: Stirred Tank Heater Properties of Transfer Function Models K = 0.05 τ = 2.0 0.05 Q′ 2s + 1 No change in Ti′ 1. Steady-State Gain Step change in Q(t) : from 1500 cal/sec to 2000 cal/sec Q′( s ) = 500 → deviation step from 0 to 500 s T ′( s ) = 0.05 ⎛ 500 ⎞ 25 ⎜ ⎟= 2 s + 1 ⎝ s ⎠ s(2 s + 1) Use case 13, Table 3.1 13 What is T′(t) ? ⎯ T ′(t ) = 25[1 − e − t /τ ] ←⎯ T ′( s ) = Chapter 4 Chapter 4 T′ = 25 s(τ s + 1) The steady-state of a TF can be used to calculate the steadystate change in an output due to a steady-state change in the input For example suppose we know two steady states for an input. For example, suppose we know two steady states for an input/output = u and y = {u1,y1} , {u2,y2}. Then we can calculate the average steady-state gain, K, from: y2 − y1 u2 − u1 K= (4-38) For a linear system, K is a constant. But for a nonlinear system, K will depend on the operating conditions( u , y ) . T ′(t ) = 25[1 − e − t / 2 ] = T (t ) − T 2. Order of a TF Model Calculation of process gain ( K ) from the TF Model: Consider a general n-th order, linear ODE: general order linear ODE: If a TF model has a steady-state gain (it’s stable), then: an K = lim G ( s ) • This important result is a consequence of the Final Value th Fi Theorem (consider the case when input = unit step) • Note: Some TF models do not have a steady-state gain (e.g., integrating process in Ch. 5, because they are unstable TFs) integrating process in Ch. 5, because they are “unstable” TFs) Chapter 4 Chapter 4 s →0 dny dt n + an−1 bm−1 dy n−1 dt n−1 d m−1u dt m −1 + … a1 dy d mu + a0 y = bm m + dt dt + … + b1 du + b0u dt (4-39) Take Laplace Transform, assuming the initial conditions are all zero. Rearranging gives the TF: m ∑ bi si Y ( s ) i =0 = G (s) = U (s) n ∑ ai s i =0 i (4-40) Definition: 2nd order process The order of the TF is defined to be the order of the denominator polynomial. General 2nd order ODE: a Physical Realizability: For any physical system, n ≥ m in (4-38). The denominator is higher than or same order as the numerator. Otherwise, the system response to a step input will be an impulse. This can’t happen. Chapter 4 Chapter 4 Note: The order of the TF is equal to the order of the ODE. du + b0u and step change in u dt ⎡ as 2 + bs + 1⎤ ⋅ Y ( s) = KU ( s ) ⎣ ⎦ Laplace Transform: G(s) = Y (s) K both a and b > 0 for stability =2 U ( s ) as + bs + 1 2 roots Example of non-physical system: a0 y = b1 d2y dy + b + y = Ku 2 dt dt s1,2 = −b ± b 2 − 4a 2a b2 − 4ac > 0 (4-41) : real roots b2 − 4ac < 0 : complex roots Example: IMPORTANT properties of Transfer Functions properties of Transfer Functions Place sensor for temperature downstream from heated sensor for temperature downstream from heated tank (transport lag) B. Additive Rule Y = (G1 x U1 ) + (G2 x U2 ) Chapter 4 Chapter 4 A. Multiplicative Rule Y = (G2 x G1 ) U Distance L for plug flow, L Dead time θ = v v = fluid velocity U ′ = Q ′ = the input Tank: G1 = T ′( s ) K1 = U ′( s ) 1 + τ 1s Sensor: G2 = Ts′ ( s ) K 2e-θ s = , τ 2 << τ 1 , neglect → τ 2 ≈ 0 neglect T ′( s ) 1 + τ 2 s Overall transfer function: T′ T′ T′ KKe = ⋅ = G ⋅G = U′ T′ U′ 1+τ s −θs s s 1 2 2 1 1 Linearization of Nonlinear Models Required to derive transfer function, output = y(t), input = u(t). Good approximation “near” a steady-state operating point. Fig. 4.3 Schematic diagram of two liquid surge tanks in series. surge tanks in series Use 1st order Taylor series in y and u around steady state dy ⎛ dy ⎞ = f ( y, u ) and f ( y, u ) = ⎜ ⎟ and =0 dt ⎝ dt ⎠at steady-state conditions f ( y, u ) ≅ f ( y, u ) + ∂f ∂y ( y − y) + y ,u ∂f ∂u (u − u ) (4-61) (4-62) y ,u Chapter 4 Chapter 4 y,u The derivative wrt t of y and y’ are the same so that: dy ′ ∂f ∂f y′ + u′ = C y y ′ + Cu u′ where C y and Cu are constants. = dt ∂y s ∂u s (4-63) Chapter 4 Chapter 4 Fig. 4.4 Input-output model for two liquid surge tanks in series. Fig. 4.5 General procedure for developing transfer function models. Page 1 of 3 Linear vs. Nonlinear Tank Simulation: MATLAB ode45 (CHE 361) Here we simulate the dynamics of a linear and a nonlinear tank by using ode45 in MATLAB to solve the ODE for a step change in feed flow rate to each tank. Since the two tanks are independent, we can simply write one program file and one RHS file to evaluate the derivatives with respect to time for each tank : TwoTanks.m and RHS2Tanks.m respectively. See pgs 25-26 in SEMD3 for details of the models. dh1 (t ) dt q (t ) q (t ) K 1 = i1 − h1 (t ) = i1 − 1 h1 (t ) A ARv A A (2-57) for Tank 1, the Linear Tank dh2 (t ) dt q (t ) C =i 2 − v A A (2-61) for Tank 2, the Nonlinear Tank For both tanks, q (t ) K h2 (t ) =i 2 − 2 h2 (t ) A A A = 0.4 m 2 . m2 = 2 m3 /min. 0.08 and q1 min m 2.5 For Tank 2 : K 2 = 0.8 and q2 = 4 m3 /min. min Then= = 25 meters , both tanks have the same nominal steady state height (output). h1 h2 = For Tank 1 : K1 Contents of file TwoTanks.m % TwoTanks.m clear all, format compact global A K1 K2 q1ss q2ss deltaq A = 0.4; K1 = 0.08; K2 = 0.8; q1ss = 2; q2ss = 4; h2initial = [25 25]; deltaq = input('Enter step for inlet flows, cubic meters/min (1) : '); tstop = input('Enter simulation stop time in minutes (50) : '); tspan = [0:0.5:tstop]; % calculate values at increments of 0.5 [t,heights] = ode45(@RHS2Tanks,tspan,h2initial); h1 = heights(:,1); % h1 is first column in heights matrix h2 = heights(:,2); % h2 is second column in heights matrix figure plot(t,h1,'-b',t,h2,'r--','Linewidth',2) grid % puts a grid on plot to help read values xlabel('Time (min)'), ylabel('Height of Liquid (m)') title(['Step Responses of Two Tanks: delta q = ' num2str(deltaq) ' (m^3/min)']) legend('Linear Tank','Nonlinear Tank','Location','Best') %results = [t';heights']' % Prints out t,h1,h2 in columns Contents of file RHS2Tanks.m function dhdt = RHS2Tanks(t,heights) global A K1 K2 q1ss q2ss deltaq h1 = heights(1,:); h2 = heights(2,:); dhdt(1,1) = (q1ss+deltaq)/A - K1*h1/A; dhdt(2,1) = (q2ss+deltaq)/A - K2*sqrt(h2)/A; q1ss = qi1 and q2ss = qi 2 deltaq q= qi′2 for t ≥ 0 = i′1 = qi1 (t ) qi1 + qi′1 (t ) qi 2 (= qi 2 + qi′2 (t ) t) Page 2 of 3 >> TwoTanks Enter step for inlet flows, cubic meters/min (1) : 1 Enter simulation stop time in minutes (50) : 50 3 Step Responses of Two Tanks: delta q = 1 (m /min) Height of Liquid (m) 40 35 Linear Tank Nonlinear Tank 30 25 0 5 10 15 30 25 20 Time (min) 35 40 45 50 >> TwoTanks Enter step for inlet flows, cubic meters/min (1) : 0.1 Enter simulation stop time in minutes (50) : 50 >> Step Responses of Two Tanks: delta q = 0.1 (m3/min) 26.4 Height of Liquid (m) 26.2 Linear Tank Nonlinear Tank 26 25.8 25.6 25.4 25.2 25 0 5 10 15 20 25 30 Time (min) 35 40 45 50 For smaller changes in the input flow rate, the tank levels change less than for larger changes. The dynamic plots of the heights are much more similar. Thus the linearized model (the transfer function) of the nonlinear tank is a “good” model when the “process” remains near the nominal operating point. Page 3 of 3 The add-on toolbox “Simulink” can be used to simplify comparisons for positive or negative steps to the two tanks as shown below in the Simulink model block diagram and resultant plot. snltnk qi_Step Sum1 Level_upNL snltnk qss_NL Constant_levelNL snltnk Sum2 Level_downNL Mux PC_graph sltnk Sum3 Level_upL sltnk qss_Lin Constant_levelL sltnk Sum4 Level_downL Mux L_vs_NL_Tank.mdl = Simulink model to compare Linear versus Nonlinear Tank Responses. For the Linear tank, flow out is proportional to h. For the Nonlinear tank flow out is proportional to the square root of h. Responses of Linear and Nonlinear Tank Height to + or - Steps in qi h(m): Solid = Linear, Dashed = Nonlinear 40 35 30 25 20 15 10 0 10 20 30 Time (min) 40 50 ...
View Full Document

This note was uploaded on 03/01/2012 for the course CHE 361 taught by Professor Staff during the Winter '08 term at Oregon State.

Ask a homework question - tutors are online