System Modeling and Identification Lecture 4 Dr.-Ing. Erwin Sitompul President University http://zitompul.wordpress.com President University Erwin Sitompul SMI 4/1 Chapter 2 Linearization Interacting Tank-in-Series System Linearize the the interacting tank-in-series system for the operating point resulted by the parameter values as given in Homework 2. For qi, use the last digit of your Student ID. For example: Kartika qi= 8 liters/s. Submit the mdl-file and the screenshots of the MatlabSimulink file + scope. qi h1 v1 President University q1 a1 Erwin Sitompul h2 v2 a2 SMI 4/2 Chapter 2 Linearization Interacting Tank-in-Series System The model of the system is: h1 qi A1 A1 h2 a1 2 g ( h1 h 2 ) A2 a1 f1 ( h1 , h2 , q i ) 2 g ( h1 h 2 ) a2 A2 2 gh 2 f 2 ( h1 , h2 , q i ) y1 h1 g 1 ( h1 , h2 , q i ) y 2 h2 g 2 ( h1 , h2 , q i ) As can be seen from the result of Homework 2, the steady state parameter values, which are taken to be the operating point, are: h1,0 0.638 m h 2 ,0 0.319 m q i ,0 5 10 3 m 3 President University s Erwin Sitompul SMI 4/3 Chapter 2 Linearization Interacting Tank-in-Series System The linearization around the operating point (h1,0, h2,0, qi,0) is performed as follows: f1 h h1 ,0 1 h 2 ,0 q i,0 f1 h h1 ,0 2 h 2 ,0 q i,0 f1 q h1 ,0 i h 2 ,0 q i,0 1 a1 2g 2 A1 ( h1,0 h 2 ,0 ) 1 a1 2g 2 A1 ( h1,0 h 2 ,0 ) 1 A1 1 0.25 President University 1 2 10 2 0.25 1 2 10 2 3 3 0.25 2 9.8 (0.638 0.319) 2 9.8 (0.638 0.319) 0 .0 3 1 3 5 0 .0 3 1 3 5 4 Erwin Sitompul SMI 4/4 Chapter 2 Linearization Interacting Tank-in-Series System f 2 h h1 ,0 1 h 2 ,0 q i,0 f 2 h h1 ,0 2 h 2 ,0 q i,0 1 a1 2g 2 A2 ( h1,0 h 2 ,0 ) 2 1 a1 2g 2 A2 ( h1,0 h2 ,0 ) 1 2 10 2 0.1 3 1 2 10 3 (0.638 0.319) 0.1 1 a2 2g 2 A2 h2 ,0 2 9.8 (0.638 0.319) 2 9.8 1 2 10 2 0.1 3 0 .0 7 8 3 8 2 9.8 0.319 0 .1 5 6 7 7 f 2 q h1 ,0 i h 2 ,0 q i,0 0 President University Erwin Sitompul SMI 4/5 Chapter 2 Linearization Interacting Tank-in-Series System h (t ) A h (t ) B qi (t ) f1 h (t ) h 1 1 h 2 ( t ) f 2 h1 h (t ) 1 h 2 ( t ) f1 f1 h 2 h1 ( t ) q1 q (t ) i f 2 h2 ( t ) f 2 h2 q 1 0.03135 0.07838 President University 0.03135 h1 ( t ) 4 qi (t ) 0.15677 h 2 ( t ) 0 Erwin Sitompul SMI 4/6 Chapter 2 Linearization Interacting Tank-in-Series System y (t ) C h (t ) D qi (t ) g1 h h1 ( t ) 1 h ( t ) 2 g 2 h1 h1 ( t ) 1 h2 ( t ) 0 President University g1 g1 h 2 h1 ( t ) q1 g 2 h2 ( t ) g 2 h2 q1 q (t ) i 0 h1 ( t ) 0 qi (t ) 1 h2 ( t ) 0 Erwin Sitompul SMI 4/7 Chapter 2 Linearization Interacting Tank-in-Series System President University Erwin Sitompul SMI 4/8 Chapter 2 Linearization Interacting Tank-in-Series System q i q i,0 h1 h1,0 h 2 h 2,0 : : : : h1 , h2 , h1 , h2 , President University original model original model linearized model linearized model Erwin Sitompul SMI 4/9 Chapter 2 Linearization Interacting Tank-in-Series System q i q i,0 5 .5 liters s : : : : h1 , h2 , h1 , h2 , President University original model original model linearized model linearized model Erwin Sitompul SMI 4/10 Chapter 2 Linearization Interacting Tank-in-Series System q i q i,0 7 .5 liters s : : : : h1 , h2 , h1 , h2 , President University original model original model linearized model linearized model Erwin Sitompul SMI 4/11 Chapter 3 Analysis of Process Models State Space Process Models Consider a continuous-time MIMO system with m input variables and r output variables. The relation between input and output variables can be expressed as: d x (t ) f x ( t ), u ( t ) dt y ( t ) g x ( t ), u ( t ) x ( t ) : vector of state space variables u ( t ) : vector of input variables y ( t ) : vector of output variables President University Erwin Sitompul SMI 4/12 Chapter 3 State Space Process Models Solution of State Space Equations Consider the state space equations: d x (t ) A x ( t ) B u ( t ), dt y (t ) C x (t ) x (0) x 0 Taking the Laplace Transform yields: s X ( s ) x 0 A X ( s ) BU ( s ) X (s) (s I A) 1 Y (s) C (s I A) President University 1 x 0 (s I A) BU (s) 1 x (0) ( s I A ) B U ( s ) 1 Erwin Sitompul SMI 4/13 Chapter 3 State Space Process Models Solution of State Space Equations After the inverse Laplace transformation, t x (t ) e At x (0) e A ( t ) B u ( ) d 0 t y (t ) C e At x (0) C e A ( t ) B u ( ) d 0 e At L 1 ( s I A ) 1 The solution of state space equations depends on the roots of the characteristic equation: d et( s I A ) 0 President University Erwin Sitompul SMI 4/14 Chapter 3 State Space Process Models Solution of State Space Equations 1 Consider a matrix A 0 At Calculate e . e At s 1 1 L 0 1 s 2 1 1 L s 1 det 0 1 1 s 1 L 0 President University 1 1 . 2 s 2 1 0 s 2 1 s 1 1 ( s 1)( s 2) 1 s2 Erwin Sitompul e At et = 0 e 2 t t e 2 t e SMI 4/15 Chapter 3 State Space Process Models Canonical Transformation Eigenvalues of A, λ1, …, λn are given as solutions of the equation det(A–λI) = 0. If the eigenvalues of A are distinct, then a nonsingular matrix T exists, such that: ΛT 1 AT is a diagonal matrix of the form 1 0 Λ 0 0 2 0 President University 0 0 n e Λt L 1 e 1t 0 ( s I Λ) 1 0 Erwin Sitompul 0 e 2t 0 SMI 4/16 0 0 n t e Chapter 3 State Space Process Models Canonical Transformation Example Perform the canonical transformation to the state space equations below 1 x (t ) 0 0 y ( t ) 1 4 3 0 0 1 4 0 x (t ) 2 13 4 1 u (t ) 1 0 x (t ) d et( A I ) 0 1 det 0 0 4 3 0 1 4 ( 1 )( 3 )( 2 ) 0 0 2 1 1 2 3 • The eigenvalues of A 3 2 President University Erwin Sitompul SMI 4/17 Chapter 3 State Space Process Models Canonical Transformation ( A 1 I ) e 1 0 0 0 0 4 2 0 1 4 e11 1 0 e 21 0 e 1 0 0 1 e 31 ( A 2 I )e 2 0 2 0 0 4 0 0 1 4 e12 2 0 e 22 0 e 2 1 0 1 e 32 4 1 0 1 4 e13 1 0 e 23 0 e 3 0 4 0 e 33 President University Erwin Sitompul 0 0 3 0 2 0 1 0 0 0 0 2 0 3 0 The eigenvectors of A • T e1 ( A 3 I ) e 3 0 1 0 0 1 Λ 0 0 1 0 0 e2 2 1 0 e3 1 0 4 SMI 4/18 Chapter 3 State Space Process Models Canonical Transformation The equivalence transformation can now be done, with x = T~ x. Then, the state space equations 1 1 A T AT Λ 0 0 1 1 B T B , 1 0 .2 5 0 3 0 0 0 2 C C T 1 1 T 0 0 2 1 T 1 1 0 0 2 1 0 1 0 4 2 1 0 As the result, we obtain a state space in canonical form, 1 x (t ) 0 0 y ( t ) 1 0 3 0 2 0 0 x (t ) 2 1 1 u (t ) 0.25 1 x ( t ) President University Erwin Sitompul SMI 4/19 0 .2 5 0 0 .2 5 Chapter 3 State Space Process Models Homework 4: Canonical Transformation Make yourself familiar with the canonical transformation. Obtain the canonical form of the state space below. 0 x (t ) 1 0 y (t ) 0 19 0 1 2 30 0 x (t ) 0 1 0 u (t ) 0 1 x ( t ) President University Erwin Sitompul SMI 4/20 Chapter 3 State Space Process Models Homework 4: Canonical Transformation Perform the canonical transformation for the following state space equation. 0 x (t ) 0 6 11 y ( t ) 20 9 1 0 0 1 x (t ) 6 0 0 u (t ) 1 1 x ( t ) Hint: Learn the following functions in Matlab: [V,D] = eig(X) NEW President University Erwin Sitompul SMI 4/21