lecture 5 first order transfer function models
play

Lecture 5 First Order Transfer Function Models Process Control - PowerPoint PPT Presentation

Lecture 5 First Order Transfer Function Models Process Control Prof. Kannan M. Moudgalya IIT Bombay Tuesday, 30 July 2013 1/38 Process Control First Order Models Outline 1. Thermal sensor as a first order system 2. Scilab demonstration of


  1. Lecture 5 First Order Transfer Function Models Process Control Prof. Kannan M. Moudgalya IIT Bombay Tuesday, 30 July 2013 1/38 Process Control First Order Models

  2. Outline 1. Thermal sensor as a first order system 2. Scilab demonstration of curve fitting 3. First order systems in series Scilab demonstration 2/38 Process Control First Order Models

  3. 1. Thermal sensor as a I order system 3/38 Process Control First Order Models

  4. Thermocouple to Measure Temperature ◮ Shaded: sensor T a ◮ Mass m and heat capacity C p ◮ Area available for heat transfer T ◮ Initially, sensor and ambient are at T ◮ All of a sudden, the ambient temperature goes to T a ◮ Model this: get T as a fn. of T a 4/38 Process Control First Order Models

  5. Model of temp. measurement system T a dT(t) mC p = hA(T a − T(t)) dt T ◮ Initially, sensor & ambient at T ◮ Ambient temperature goes to T a ◮ Subtract the steady state and express in deviational variables ◮ ∆T(s) = G(s)∆T a (s) 1 ◮ G(s) = τ s + 1. Gain? Why? ◮ where, τ = mC p hA ◮ What is the unit of τ ? 5/38 Process Control First Order Models

  6. A sample problem statement ◮ A thermometer at 30 ◦ C is suddenly immersed into boiling water ◮ Thermometer be modelled as a first order system with time constant of 0.5min ◮ Calculate the temperature profile as indicated by the thermometer. 6/38 Process Control First Order Models

  7. Solution to thermometer problem T a ◮ Y(s) = G(s)U(s) K T ◮ G(s) = 0 . 5s + 1, K = 1 ◮ U(s) = ambient temperature ◮ Y(s) = temperature indicated by the thermometer, deviational ◮ y(t) ↔ Y(s), u(t) ↔ U(s) ◮ Initial temperature = 30 ◦ C 1. y(t) = T(t), u(t) = T a (t). 2. y(t) = T(t) − 30, u(t) = T a (t). 3. y(t) = T(t), u(t) = T a (t) − 30. 4. y(t) = T(t) − 30, u(t) = T a (t) − 30. right 7/38 Process Control First Order Models

  8. Can also use appropriate variables 1 ◮ ∆T(s) = τ s + 1∆T a (s) ◮ ∆T(t) ↔ ∆T(s), ∆T a (t) ↔ ∆T a (s) ◮ τ = 0 . 5min 70 ◦ C ◮ ∆T a (t) = ◮ ∆T a (s) = 70 s ◮ ∆T(t) = 70 � 1 − e − t / 0 . 5 � ◮ T(t) = 30 + ∆T(t) 8/38 Process Control First Order Models

  9. 2. Scilab Demonstration of Curve Fitting 9/38 Process Control First Order Models

  10. Recall: Step response of a first order system Let the plant have a 1st order transfer function: K y(s) = τ s + 1u(s) Its step response is given by, � 1 − e − t /τ � y(t) = K 10/38 Process Control First Order Models

  11. Scilab code to plot step response of a first order system: 02-step.sce s = %s 1 tau = 0 . 5 ; 2 3 G = 1/( tau ∗ s +1) t = 1 : 0 . 1 : 5 ; 4 5 y = csim ( ’ step ’ , t ,G) ; p l o t 2 d ( t , y ) 6 11/38 Process Control First Order Models

  12. Step response of I order system in Scilab 12/38 Process Control First Order Models

  13. Curve Fitting ◮ Given model parameters τ and K, we can obtain step response ◮ Can we back-calculate? ◮ Given the step response, can we calculate τ and K? 13/38 Process Control First Order Models

  14. Identification of first order TF through step response ◮ Experimental data have noise ◮ Does it affect identification? ◮ Demonstrate with 2 . 5 G(s) = 0 . 75s + 1 with noise superimposed 14/38 Process Control First Order Models

  15. Data generation to simulate a noisy system: step-noise.sce I s = %s 1 tau = 0 . 7 5 ; 2 3 G = 2 . 5 / ( tau ∗ s +1) t = 0 : 0 . 0 1 : 5 ; 4 5 y = csim ( ’ step ’ , t ,G) ; p l o t 2 d ( t , y ) 6 x l a b e l ( ” t ” ) 7 y l a b e l ( ”y” ) 8 x t i t l e ( ”y ( t ) vs . t ” ) 9 15/38 Process Control First Order Models

  16. Data generation to simulate a noisy system: step-noise.sce II n o i s e = rand (1 , l e n g t h ( y ) , ’ normal 10 ’ ) ; y n o i s e = y + 0.25 ∗ n o i s e ; 11 / / p l o t 2 d ( t , y n o i s e ) 12 y 2 n o i s e = y + 0.025 y . ∗ n o i s e ∗ 13 ; p l o t 2 d ( t , y 2 n o i s e ) 14 16/38 Process Control First Order Models

  17. We will use noise corrupted y as the plant data 17/38 Process Control First Order Models

  18. Can we extract the model parameters by curve fitting using plant data? 18/38 Process Control First Order Models

  19. Curve fitting by optimisation ◮ Plant data: y = noise + output of the plant with G = 2 . 5 / (0 . 75s + 1) ◮ Fit this with the output y prediction from a plant with transfer function with G = K / ( τ s + 1) ◮ Get K and τ by minimising || y − y prediction || 2 ◮ What should we get for K and τ ? 19/38 Process Control First Order Models

  20. Scilab code to identify a first order transfer function: order 1.sce I exec ( ’ step − n o i s e . sce ’ ) ; 1 exec ( ’ c o s t f 1 . s c i ’ ) ; 2 3 y = y 2 n o i s e ; g l o b a l ( ’ y ’ , ’ t ’ ) ; 4 5 6 x0 = [3 2 ] ; [ f , xopt , gopt ] = optim ( c o s t f 1 , ’ b 7 ’ , [ 0 . 1 0 . 1 ] , [ 5 5 ] , x0 , ’ ar ’ ,500 ,500) 8 kp = xopt (1) ; 20/38 Process Control First Order Models

  21. Scilab code to identify a first order transfer function: order 1.sce II tau = xopt (2) ; 9 y p r e d i c t i o n = kp ( 1 − exp( − t ∗ 10 / tau ) ) ; format ( ’ v ’ ,6) ; 11 p l o t 2 d ( t , y ) 12 p l o t 2 d ( t , y p r e d i c t i o n ) 13 21/38 Process Control First Order Models

  22. Scilab code for objective function: costf 1.sci I f u n c t i o n [ f , g , i n d ] = c o s t f 1 ( x , 1 i n d ) 2 kp = x (1) ; tau = x (2) ; y p r e d i c t i o n = kp ( 1 − exp( − t ∗ 3 / tau ) ) ; f = ( norm ( y − y p r e d i c t i o n , 2 ) ) ˆ2; 4 5 g = numdiff ( func 1 , x ) ; e n d f u n c t i o n 6 7 22/38 Process Control First Order Models

  23. Scilab code for objective function: costf 1.sci II f u n c t i o n f = f u n c 1 ( x ) 8 9 kp = x (1) ; tau = x (2) ; y p r e d i c t i o n = kp ( 1 − exp( − t ∗ 10 / tau ) ) ; f = ( norm ( y − y p r e d i c t i o n , 2 ) ) ˆ2; 11 e n d f u n c t i o n 12 23/38 Process Control First Order Models

  24. 3. First order systems in series 24/38 Process Control First Order Models

  25. More realistic model of thermometer ◮ Modelled as a first order system ◮ A more realistic model: T a T T w ◮ The sheath is also modelled ◮ Its temperature is denoted as T w , T-wall ◮ Derive the second order relation between ∆T a (s) and ∆T(t) 25/38 Process Control First Order Models

  26. More realistic model of thermometer T a T T w ◮ Model of the sensor: dT ◮ mC p dt = h sw A sw (T w − T) ◮ Model of the wall: dT w ◮ m w C pw = dt h wa A wa (T a − T w ) − h sw A sw (T w − T) ◮ Derive the relation between T a and T ◮ Same procedure as before: deviational ◮ Order of the transfer function: second 26/38 Process Control First Order Models

  27. Model derivation method ◮ Laplace transform models are in deviational form ◮ For each equation, subtract the corresponding steady state ◮ Assume small deviation, if required ◮ Take Laplace transform of each equation and simplify ◮ Substitute the expression for T w into the other equation ◮ You will get T as a function of T a only ◮ The transfer function will be second order: denominator will be a second degree polynomial 27/38 Process Control First Order Models

  28. Will do it as an assignment 28/38 Process Control First Order Models

  29. Another second order example 29/38 Process Control First Order Models

  30. Recall: Model of Flow Control System Q i ( t ) h ( t ) Q ( t ) = x ( t ) h ( t ) ◮ Suppose that x is constant K 1 ◮ ∆h(s) = τ s + 1∆Q i (s) ◮ τ = A / x s , K 1 = 1 / x s , K 2 = h s / x s . ◮ ∆Q(s) = x s ∆h(s) 30/38 Process Control First Order Models

  31. Two tanks in series Q i (t) ◮ Let out flow rate of I tank = ∆Q 1 (s) h(t) ◮ ∆Q 1 (s) = G 1 (s)∆Q i (s) ◮ ∆Q(s) = G 2 (s)∆Q 1 (s) ◮ = h(t) G 2 (s)G 1 (s)∆Q i (s) Q(t) = x(t)h(t) How do you model this? 31/38 Process Control First Order Models

  32. Comparing response of first and second order systems ◮ Response of ◮ a first order system ◮ two first order systems in series are similar 32/38 Process Control First Order Models

  33. Scilab code to plot step response of a seond order system: step-2nd.sce s = %s 1 2 G 1 = 1/( s +1) 3 G 2 = 1/( s +2) 4 G = G 1 ∗ G 2 t = 1 : 0 . 1 : 1 0 ; 5 6 y = csim ( ’ step ’ , t ,G) ; p l o t 2 d ( t , y ) 7 x l a b e l ( ” t ” ) 8 y l a b e l ( ”y” ) 9 x t i t l e ( ”y ( t ) vs . t ” ) 10 33/38 Process Control First Order Models

  34. Step response of second order system 34/38 Process Control First Order Models

  35. Recall: step response of a first order system: 1 / (0 . 5s + 1) 35/38 Process Control First Order Models

  36. Can we interchange data and model? 36/38 Process Control First Order Models

  37. What is learnt today ◮ First order system ◮ Second order systems ◮ Examples ◮ Scilab demonstration 37/38 Process Control First Order Models

  38. Thanks 38/38 Process Control First Order Models

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend