President University Erwin Sitompul SMI 4/1
Dr.-Ing. Erwin SitompulPresident University
Lecture 4
System Modeling and Identification
http://zitompul.wordpress.com
President University Erwin Sitompul SMI 4/2
Chapter 2 Linearization
Homework 3
v1
qi
h1 h2
v2
q1
a1 a2
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 Matlab-Simulink file
+ scope.
President University Erwin Sitompul SMI 4/3
Solution to Homework 3Chapter 2 Linearization
i 11 1 2
1 1
2 ( )q a
h g h hA A
1 22 1 2 2
2 2
2 ( ) 2a a
h g h h ghA A
The model of the system is:
1 1 2 i( , , )f h h q
2 1 2 i( , , )f h h q
1,0
2,03 3
i,0
0.638 m0.319 m
5 10 m s
hh
q
1 1y h
2 2y h1 1 2 i( , , )g h h q
2 1 2 i( , , )g h h q
As can be seen from the result of Homework 2, the steady state parameter values, which are taken to be the operating point, are:
President University Erwin Sitompul SMI 4/4
Solution to Homework 3Chapter 2 Linearization
The linearization around the operating point (h1,0, h2,0, qi,0) is performed as follows:
1,0
2,0
i,0
1 1
1 1 1,0 2,0
1 2
2 ( )hhq
f a g
h A h h
31 2 10 2 9.8
2 0.25 (0.638 0.319)
0.03135
1,0
2,0
i,0
1 1
2 1 1,0 2,0
1 2
2 ( )hhq
f a g
h A h h
31 2 10 2 9.8
2 0.25 (0.638 0.319)
0.03135
1,0
2,0
i,0
1
i 1
1hhq
f
q A
1
0.25 4
President University Erwin Sitompul SMI 4/5
Solution to Homework 3Chapter 2 Linearization
1,0
2,0
i,0
2 1
1 2 1,0 2,0
1 2
2 ( )hhq
f a g
h A h h
31 2 10 2 9.8
2 0.1 (0.638 0.319)
0.07838
1,0
2,0
i,0
2 1 2
2 2 1,0 2,0 2 2,0
1 2 1 2
2 ( ) 2hhq
f a ag g
h A h h A h
3 31 2 10 2 9.8 1 2 10 2 9.8
2 0.1 (0.638 0.319) 2 0.1 0.319
0.15677
1,0
2,0
i,0
2
i
0hhq
f
q
President University Erwin Sitompul SMI 4/6
i( ) ( ) ( )t t q t h A h B
Solution to Homework 3Chapter 2 Linearization
1 1 1
1 1 2 11i
22 2 22
1 2 1
( ) ( )( )
( )( )
f f f
h t h h qh tq t
h tf f fh th h q
1 1i
22
( ) ( )0.03135 0.03135 4( )
( )0.07838 0.15677 0( )
h t h tq t
h th t
President University Erwin Sitompul SMI 4/7
Solution to Homework 3Chapter 2 Linearization
i( ) ( ) ( )t t q t y C h D
1 1 1
1 2 11 1i
2 22 2 2
1 2 1
( ) ( )( )
( ) ( )
g g g
h h qh t h tq t
h t h tg g g
h h q
1 1i
2 2
( ) ( )1 0 0( )
( ) ( )0 1 0
h t h tq t
h t h t
President University Erwin Sitompul SMI 4/8
Solution to Homework 3Chapter 2 Linearization
President University Erwin Sitompul SMI 4/9
Solution to Homework 3Chapter 2 Linearization
: h1, original model: h2, original model
: h1, linearized model: h2, linearized model
i i,0
1 1,0
2 2,0
q qh hh h
President University Erwin Sitompul SMI 4/10
Solution to Homework 3Chapter 2 Linearization
i i,0
5.5 liters sq q
: h1, original model: h2, original model
: h1, linearized model: h2, linearized model
President University Erwin Sitompul SMI 4/11
Solution to Homework 3Chapter 2 Linearization
: h1, original model: h2, original model
: h1, linearized model: h2, linearized model
i i,0
7.5 liters sq q
President University Erwin Sitompul SMI 4/12
Chapter 3
Analysis of Process Models
System Modeling and Identification
President University Erwin Sitompul SMI 4/13
State Space Process ModelsChapter 3 Analysis of 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 tt t
dt
xf x u
( ) ( ), ( )t t ty g x u
( )
( )
( )
t
t
t
x
u
y
: vector of state space variables
: vector of input variables
: vector of output variables
President University Erwin Sitompul SMI 4/14
Solution of State Space EquationsChapter 3 State Space Process Models
0
( )( ) ( ), (0)
d tt t
dt
xAx Bu x x
0( ) ( ) ( )s s s s X x AX BU
1 10( ) ( ) ( ) ( )s s s s X I A x I A BU
Consider the state space equations:
1 1( ) ( ) (0) ( ) ( )s s s s Y C I A x I A BU
( ) ( )t ty C x
Taking the Laplace Transform yields:
President University Erwin Sitompul SMI 4/15
Chapter 3
After the inverse Laplace transformation,
Solution of State Space EquationsState Space Process Models
( )
0
( ) (0) ( )t
t tt e e d A Ax x Bu
( )
0
( ) (0) ( )t
t tt e e d A Ay C x C Bu
1 1( )te s A I AL
The solution of state space equations depends on the roots of the characteristic equation:
det( ) 0s I A
President University Erwin Sitompul SMI 4/16
1 1
0 2
A
1
1 1 1
0 2t s
es
A L
1
2 111 1 0 1
det0 2
s
s s
s
L
Chapter 3
Solution of State Space EquationsState Space Process Models
Consider a matrix .
Calculate .teA
1
1 1
1 ( 1)( 2)
10
2
s s s
s
L2
20
t t tt
t
e e ee
e
A =
President University Erwin Sitompul SMI 4/17
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:
Chapter 3
Canonical TransformationState Space Process Models
1Λ T AT
is a diagonal matrix of the form
1
2
0 0
0
0
0 0 n
Λ
1 1( )te s Λ I ΛL
1
2
0 0
0
0
0 0 n
t
t
t
e
e
e
President University Erwin Sitompul SMI 4/18
ExamplePerform the canonical transformation to the state space equations below
Chapter 3 State Space Process Models
Canonical Transformation
1 4 1 4 13 4
( ) 0 3 0 ( ) 1 ( )
0 0 2 1
t t u t
x x
( ) 1 0 0 ( )y t t x
det( ) 0 A I
1 4 1 4
det 0 3 0
0 0 2
( 1 )( 3 )( 2 ) 01 1 2 3 3 2
• The eigenvalues of A
President University Erwin Sitompul SMI 4/19
Chapter 3 State Space Process Models
Canonical Transformation11( ) 0A I e
11
21
31
0 4 1 4
0 2 0
0 0 1
e
e
e
0 1
1
0
0
e
22( ) 0A I e
12
22
32
2 4 1 4
0 0 0
0 0 1
e
e
e
0 2
2
1
0
e
33( ) 0A I e
13
23
33
1 4 1 4
0 1 0
0 0 0
e
e
e
0 3
1
0
4
e
1
2
3
0 0
0 0
0 0
Λ
1 0 0
0 3 0
0 0 2
1 2 3T e e e
1 2 1
0 1 0
0 0 4
The eigenvectors of A•
President University Erwin Sitompul SMI 4/20
Chapter 3 State Space Process Models
Canonical TransformationThe equivalence transformation can now be done, with x = T x. Then, the state space equations
~
1
1 2 0.25
0 1 0
0 0 0.25
T
1
1 0 0
0 3 0
0 0 2
A T AT Λ
1
1
,1
0.25
B T B 1 2 1 C CT
1 2 1
0 1 0
0 0 4
T
As the result, we obtain a state space in canonical form,
11 0 0
( ) ( ) 1 ( )0 3 0
0.250 0 2
t t u t
x x
( ) 1 2 1 ( )y t t x
President University Erwin Sitompul SMI 4/21
Make yourself familiar with the canonical transformation. Obtain the canonical form of the state space below.
Chapter 3 State Space Process Models
Homework 4
0 19 30 1
( ) 1 0 0 ( ) 0 ( )
0 1 0 0
t t u t
x x
( ) 0 2 1 ( )y t t x
President University Erwin Sitompul SMI 4/22
Perform the canonical transformation for the following state space equation.
Chapter 3 State Space Process Models
Homework 4 (New)
0 1 0 0
( ) 0 0 1 ( ) 0 ( )
6 11 6 1
t t u t
x x
( ) 20 9 1 ( )y t t x
NEW
Hint: Learn the following functions in Matlab: [V,D] = eig(X)