Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
82 views15 pages

State Space Control of Systems Tutorial

The document contains a tutorial solution for a control systems course. It provides: 1) Three methods to obtain a state space realization for a given transfer function: direct programming, iterative programming, and transforming a controllable realization into parallel form. 2) The state space equations, vector matrix format, eigenvalues, and eigenvectors for the systems. 3) The modal matrix and transformation of the realizations into parallel form.

Uploaded by

nestor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views15 pages

State Space Control of Systems Tutorial

The document contains a tutorial solution for a control systems course. It provides: 1) Three methods to obtain a state space realization for a given transfer function: direct programming, iterative programming, and transforming a controllable realization into parallel form. 2) The state space equations, vector matrix format, eigenvalues, and eigenvectors for the systems. 3) The modal matrix and transformation of the realizations into parallel form.

Uploaded by

nestor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

1

UNIVERSITY OF BUEA REPUBLIC OF CAMEROON


P.O.Box:63 Peace - Work - Fatherland
Buea, South West Region
Cameroon
Tel: (+237) 33322134
Fax: (+237) 33322272

FACULTY OF ENGINEERING AND TECHNOLOGY

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

MASTERS OF TELECOMMUNICATION AND NETWORK ENGINEERING

STATE SPACE CONTROL TUTORIAL SOLUTION

BATCHANOU TATAP PERETS ARNAUD – FE20P032

Option: Masters 1, Telecommunication & Network Engineering

Course Code: FET653


Course Title: Modern Control of Systems
Course Instructor: Prof. TANYI Emmanuel

University of Buea

Academic Year 2020/2021


2

EXERCISE 1.
Consider the system:
𝑌(𝑆) 𝑆+1
=
𝑈(𝑠) 𝑆 2 + 7𝑆 + 10

A) Analysis.
i. Obtain the controllable state space realization of the system
 Using direct programming method.
𝑌(𝑆) 𝑌(𝑆) 𝐸(𝑆) 𝑆 +1
= ∗ = 2
𝑈(𝑠) 𝐸(𝑠) 𝑈(𝑠) 𝑆 + 7𝑆 + 10

Dividing top and bottom by the highest power of S we obtain:


𝑌(𝑆) 𝐸(𝑆) 𝑆 −1 + 𝑆 −2
∗ =
𝐸(𝑠) 𝑈(𝑠) 1 + 7𝑆 −1 + 10𝑆 −2

Therefore
𝑌(𝑆) 𝐸(𝑆) 1
= 𝑆 −1 + 𝑆 −2 𝑎𝑛𝑑 =
𝐸(𝑠) 𝑈(𝑠) 1 + 7𝑆 + 10𝑆 −2
−1

𝑌(𝑆) = 𝐸(𝑠) 𝑆 −1 + 𝐸(𝑠) 𝑆 −2

𝐸(𝑆) = 𝑈(𝑠) − 7𝐸(𝑆) 𝑆 −1 + 10𝐸(𝑆) 𝑆 −2

 Analog diagram:

 State space equation


𝑥 1̇ = 𝑥 2
𝑥 2̇ = 𝑢 − 7𝑥 2 − 10𝑥 1
𝑦 = 𝑥1 + 𝑥2
3

 Vector matrix format;


0 1 𝑥1 0 𝑢
𝑥̇ = [ ] [𝑥 ] + [ ] [𝑢 1 ]
−10 −7 2 1 2

𝑦 = [1 1] 𝑥
ii. Using iterative programming

𝑌(𝑆) 𝑌(𝑆) 𝐸(𝑆) 𝑆+1 𝑆+1 1


= ∗ = = ( ) ( )
𝑈(𝑠) 𝐸(𝑠) 𝑈(𝑠) 𝑆 2 + 7𝑆 + 10 𝑆+ 2 𝑆 +5
𝑆+1 1+𝑆 −1
Applying direct programming to (𝑆+2 ) yields
1+2𝑆 −1
1 1
Applying direct programming to (𝑆+5 ) yields 1+5𝑆 −1

 Analog diagram:

 State equation;
𝑥 1̇ = 𝑢 − 2𝑥 1
𝑥̇ 2 = 𝑢 − 2𝑥 1 + 𝑥 1 − 5𝑥 2 ⇒ 𝑥̇ 2 = 𝑢 − 𝑥 1 − 5𝑥 2
𝑦 = 𝑥2
 Vector Matrix format
−2 0 𝑥 1 1 𝑢
𝑥̇ = [ ] [𝑥 ] + [ ] [𝑢 1 ]
−1 −5 2 1 2
𝑦 = [ 0 1] 𝑥

iii. Transformation from controllable realization in (i) into parallel form.

0 1 𝑥1 0 𝑢1
𝑥̇ = [ ] [𝑥 ] + [ ] [𝑢 ]
−10 −7 2 1 2

𝑦 = [1 1] 𝑥
 Eigenvalues

4

|λI − A| = 0
0 1
|[λ 0] − [ ]| = 0
0 λ −10 −7
λ −1
|[ ]| = 0.
10 (λ + 7)
λ2 + 7λ + 10 = 0.

λ1 = −2 𝑎𝑛𝑑 λ2 = −5

 Eigenvector associated to λ1 𝑎𝑛𝑑 λ2


𝑤
For λ1 = −2. Let 𝑊1 = [𝑤1 ]
2
[λ1 𝐼 − 𝐴]𝑊1 = 0

−2 0 0 1 𝑤
[[ ]−[ ]]*[𝑤1 ] = 0.
0 −2 −10 −7 2

−2 −1 𝑤1
[ ][ ] = 0
10 5 𝑤2
−2𝑤1 − 𝑤2 = 0
10𝑤1 + 5𝑤2 = 0

1
For 𝑤1 = 1 𝑤2 = −2. 𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒 𝑊1 = [ ]
−2

For λ2 = −5
[λ2 𝐼 − 𝐴]𝑊2 = 0

−5 0 0 1 𝑤1
[[ ]−[ ]] [𝑤 ] = 0.
0 −5 −10 −7 2

−5 −1 𝑤1
[[ ]] [𝑤 ] = 0
10 2 2
−5𝑤1 − 𝑤2 = 0
10𝑤1 + 2𝑤2 = 0)

1
For 𝑤1 = 1 𝑤2 = −5 𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒 𝑊1 = [ ]
−5

 Modal matrix is;

𝑊 = (𝑤1 𝑤2 ) = [ 1 1
]
−2 −5
5

1 1
[−5 −1]. 𝑊 −1 = − [−5 −1].
𝑊 −1 =
−5 + 2 2 1 3 2 1
 Parallel form.
𝐹 = 𝑊 −1 𝑊𝐴
1 0 1 1 1
𝐹 = − [−5 −1] [ ][ ]
3 2 1 −10 −7 −2 −5
1
𝐹 = − [−5 −1] [−2 −5]
3 2 1 4 25
1 6 0
𝐹=− [ ]
3 0 15

−2 0
𝐹 =[ ]
0 −5

𝑔 = 𝑊 −1 𝑏
1 −5 −1 0
𝑔=− [ ][ ]
3 2 1 1
1 −1
𝑔=− [ ]
3 1
1
𝑔=[ 3 ];
−1
3

ℎ𝑇 = 𝐶 𝑇 𝑊
1 1
ℎ𝑇 = [ 1 1] [ ]
−2 −5
ℎ𝑇 = [−1 −4]

Parallel realization is therefore;

𝑍̇ = 𝐹𝑧 + 𝑔𝑢 𝑦 = ℎ𝑇 𝑧

1
−2 0
𝑍̇ = [ ] 𝑧 + [ 3 ]𝑢 𝑦 = [−1 −4]𝑧
0 −5 −1
3

Where 𝑥 = 𝑊𝑧

iv. Transform the iterative programming realization into parallel form.

−2 0 𝑥1 1 𝑢
𝑥̇ = [ ] [𝑥 ] + [ ] [𝑢 1 ]
−1 −5 2 1 2
6

𝑦 = [0 1] 𝑥

 Eigenvalues
|λI − A| = 0
λ 0 −2 0
|[ ]−[ ]| = 0
0 λ −1 −5
(λ − 2) 0
|[ ]| = 0.
1 (λ + 5)
λ2 + 7λ + 10 = 0.

λ1 = −2 𝑎𝑛𝑑 λ2 = −5

 Eigenvector associated to λ1 𝑎𝑛𝑑 λ2


𝑤1
For λ1 = −2. Let 𝑊1 = [𝑤 ]
2
[λ1 𝐼 − 𝐴]𝑊1 = 0
−2 0 −2 0 𝑤
[[ ]−[ ]] [𝑤1 ] = 0.
0 −2 −1 −5 2

0 0 𝑤
[[ ]]*[𝑤1 ] = 0
1 3 2
0𝑤1 − 0𝑤2 = 0
𝑤1 + 3𝑤2 = 0
−3
for 𝑤2 = 1; 𝑤1 = −3. 𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒 𝑊1 = [ ]
1

For λ2 = −5
[λ2 𝐼 − 𝐴]𝑊1 = 0
−2 0 𝑤
[[−5 0 ] − [ ]] [𝑤1 ] = 0
0 −5 −1 −5 2

−3 0 𝑤
[[ ]]*[𝑤1 ] = 0
1 0 2
−3𝑤1 + 0𝑤2 = 0)
𝑤1 + 0𝑤2 = 0

𝑤1 = 0 𝑤2 ∈ 𝑅 , 𝑙𝑒𝑡 𝑤2 = 1
0
𝑊2 = [ ]
1

 Modal matrix

𝑊 = (𝑤1 𝑤2 ) = [−3 0
]
1 1
7

1 1 0 1 1 0
𝑊 −1 = [ ]. 𝑊 −1 = − [ ].
−3 + 0 −1 −3 3 −1 −3
 Parallel form.

𝐹 = 𝑊 −1 𝑊𝐴
1 1 0 −2 0 −3 0
𝐹 =− [ ][ ][ ]
3 −1 3 −1 −5 1 1
1 1 0 6 0
𝐹 =− [ ][ ]
3 −1 −3 −2 −5
1 6 0 −2 0
𝐹 =− [ ] ; 𝐹=[ ]
3 0 15 0 −5

𝑔 = 𝑊 −1 𝑏
1 1 0 1
𝑔=− [ ][ ]
3 −1 −3 1
1 1
𝑔=− [ ] ;
3 −4
1

𝑔 = [ 3]
4
3

ℎ𝑇 = 𝐶 𝑇 𝑊
−3 0
ℎ𝑇 = [0 1] [ ]
1 1
ℎ𝑇 = [1 1]

Parallel realization is therefore;

𝑍̇ = 𝐹𝑧 + 𝑔𝑢 𝑦 = ℎ𝑇 𝑧

1

−2 0
𝑍̇ = [ ] 𝑧 + [ 3] 𝑢 𝑦 = [1 1] 𝑧
0 −5 4
3

v. Conclusion
From iii and iv above we obtain the same F matrix but not g and ℎ𝑇 . this means that

vi. Using controllable realization of (i)


 Controllability of the system
8

𝑃 = [𝑏 𝐴𝑏]
0 1 0
𝐴𝑏 = − [ ][ ]
−10 −7 1
1
𝐴𝑏 = [ ]
−7
0 1
𝑃=[ ]
1 −7
|𝑃| = −1
None zero value implies rank is 2
Rank of system equals n therefore the system is controllable.

 Observability of the system

𝑇
𝑄 = [ 𝐶 𝑇]
𝐴𝐶
0 1
𝐴𝐶 𝑇 = − [ ] [1 1]
−10 −7
𝐴𝐶 𝑇 = [−10 −6]
1 1
𝑄=[ ]
−10 −6

|𝑄| = 4
None zero value implies rank equals 2. Also rank equals n therefore the system is
observable.

vii. Iterative programming realization (ii)

 Controllability of the system

𝑃 = [𝑏 𝐴𝑏]
−2 0 1
𝐴𝑏 = − [ ][ ]
−1 −5 1
−2
𝐴𝑏 = [ ]
−6
1 −2
𝑃=[ ]
1 −6
|𝑃| = −4
None zero value implies the rank equals 2. Also, rank equals n hence, the system is
controllable.

 Observability of the system

𝑇
𝑄 = [ 𝐶 𝑇]
𝐴𝐶
9

−2 0
𝐴𝐶 𝑇 = [0 1] [ ]
−1 −5
𝐴𝐶 𝑇 = [−1 −5]
0 1
𝑄=[ ]
−1 −5

|𝑄| = −1
Non zero determinant implies rank equals 2. Also rank equals n therefor the system is
observable.

viii. Conclusion draw from (vi) and (vii).

The system is controllable and observable irrespective of the programming used.

MATLAB Code Used


i) X(t)

A = [0, 1; -10, -7]


b = [0; 1]
C= [ 1, 1]
X0 = [0; 1]
eig(A)
[W, D] = eig(A)
syms t
x(t) = (W * diag(exp(diag(D*t))) *inv(W) * X0)

display(x(t))

ii) State Transition Matrix Φ(t)


A = [0, 1; -10, -7]
b = [0; 1]
C= [ 1, 1]
X0 = [0; 1]

I = exp(A)
syms t
phi = exp(A*t)
display phi

phi = [ 1, exp(t)]
[ exp(-10*t), exp(-7*t)]
10

𝟎
iii) X(t) when X0 = [ ] and U = 1
𝟏
A = [0, 1; -10, -7]
b = [0; 1]
C= [ 1, 1]
X0 = [0; 1]

I = exp(A)
syms t
phi = exp(A*t)
x(t) = phi*X0 + b
display x(t)

EXERCISE 2.
Consider the system:
𝑌(𝑆) 𝑆+5
=
𝑈(𝑠) 𝑆3 + 6𝑆 2 + 11𝑆 + 6

A) Analysis.
i. Obtain the controllable state space realization of the system
 Using direct programming method.
𝑌(𝑆) 𝑌(𝑆) 𝐸(𝑆) 𝑆 +5
= ∗ = 3
𝑈(𝑠) 𝐸(𝑠) 𝑈(𝑠) 𝑆 + 6𝑆 2 + 11𝑆 + 6

Dividing top and bottom by highest power of s, we obtain


𝑌(𝑆) 𝐸(𝑆) 𝑆 −2 + 5𝑆 −3
∗ =
𝐸(𝑠) 𝑈(𝑠) 1 + 6𝑆 −1 + 11𝑆 −2 + 6𝑆 −3

𝑌(𝑆) 𝐸(𝑆) 1
= 𝑆 −2 + 5𝑆 −3 𝑎𝑛𝑑 =
𝐸(𝑠) 𝑈(𝑠) 1 + 6𝑆 −1 + 11𝑆 −2 + 6𝑆 −3

𝑌(𝑆) = 𝐸(𝑠) 𝑆 −2 + 5𝐸(𝑠) 𝑆 −3

𝐸(𝑆) = 𝑈(𝑠) − 6𝐸(𝑆) 𝑆 −1 + 11𝐸(𝑆) 𝑆 −2 + 6𝐸(𝑆) 𝑆 −3


11

 Analog diagram:

 State space equation;

𝑥 1̇ = 𝑥 2
𝑥 2̇ = 𝑥 3
𝑥 3̇ = 𝑢 − 6𝑥1 − 11𝑥 2 − 6𝑥 3
𝑦 = 5𝑥 1 + 𝑥 2

 Vector matrix format;


0 1 0 0
𝑥̇ = ⌈ 0 0 1 ⌉ 𝑥 + [ 0] 𝑢
−6 −11 −6 1
𝑦 = [5 1 0] 𝑥
ii. Using iterative programming to obtain state space realization

𝑌(𝑆) 𝑌(𝑆) 𝐸(𝑆) 𝑆 +5 𝑆+5 1 1


= ∗ = =( )( )( )
𝑈(𝑠) 𝐸(𝑠) 𝑈(𝑠) 𝑆3 2
+ 6𝑆 + 11𝑆 + 6 𝑆+1 𝑆+2 𝑆+3
𝑆+5 1+5𝑆 −1
Applying direct programming to ( ) we obtain
𝑆+1 1+𝑆 −1

1 𝑆 −1
Applying direct programming to (𝑆+2 ) we obtain 1+2𝑆 −1

1 𝑆 −1
Applying direct programming to (𝑆+3 ) we obtain 1+3𝑆 −1
12

 Analog representation;

 State space equation;


𝑥 1̇ = 𝑢 − 𝑥 1
𝑥 2̇ = 𝑢 + 4𝑥 1 −2𝑥 2
𝑥 3̇ = 𝑢 + 4𝑥 1 −2𝑥2 + 𝑥 2 − 3𝑥 3
𝑥 3̇ = 𝑥 2 − 3𝑥 3

𝑦 = 𝑥3

 Vector matrix format;


−1 0 0 1
𝑥̇ = ⌈ 4 −2 0 ⌉ 𝑥 + [1] 𝑢
0 1 −3 0
𝑦 = [0 0 1] 𝑥
iii. Determine the controllability and observability using control realization in (i).
Controllability
𝑃 = [𝑏 𝐴𝑏 𝐴2 𝑏]
0 1 0 0
𝐴𝑏 = ⌈ 0 0 1 ⌉ [0]
−6 −11 −6 1
0
𝐴𝑏 = [ 1 ]
−6
0 1 0 0
2 ⌈
𝐴 𝑏= 0 0 1 ⌉[ 1 ]
−6 −11 −6 −6
1
𝐴2 𝑏 = [−6]
25
13

0 0 1
𝑃 = ⌈0 1 −6⌉
1 −6 25
|𝑃| = 0[25 + 36] − 0[0 − 6] + 1[0 − 1]
|𝑃| = −1

Non zero determinant implies rank equals 3. Also rank rank equals 3 hence system is
controllable.
Observability

𝐶𝑇
𝑄 = [ 𝐶𝑇𝐴 ]
𝐶 𝑇 𝐴2
0 1 0
𝐴𝐶 𝑇 = [5 1 0] ⌈ 0 0 1 ⌉ = [0 5 1]
−6 −11 −6
0 1 0
2 𝑇
𝐴 𝐶 = [0 5 1] ⌈ 0 0 1 ⌉ = [−6 −11 −1]
−6 −11 −6
5 1 0
𝑄 = ⌈0 5 1⌉
6 −11 −1
|𝑄| = 0(9 + 15) − 0(0 − 12) + 1(0 − 4) = −4

Non zero determinant implies rank equals 3. Also, n equals 3 hence system is observable.

iv. Determine the controllability and observability using iterative programming


realization in.
Controllability
𝑃 = [𝑏 𝐴𝑏 𝐴2 𝑏]
−1 0 0 1
𝐴𝑏 = ⌈ 4 −2 1 ⌉ [1]
0 1 −3 0
−1
𝐴𝑏 = [ 2 ]
1
−1 0 0 −1
𝐴2 𝑏 = ⌈ 4 −2 0 ⌉[ 2 ]
0 1 −3 1
14

1
𝐴2 𝑏 = [−8]
−1
1 −1 1
𝑃 = ⌈1 2 −8⌉
0 1 −1
|𝑃| = 1[−2 + 8] + 1[−1 − 0] + 1[1 − 0]
|𝑃| = 6

Non zero determinant implies rank equals 3. Also rank rank equals 3 hence system is
controllable.
Observability
𝐶𝑇
𝑄 = [ 𝐶𝑇𝐴 ]
𝐶 𝑇 𝐴2
−1 0 0
𝑇
𝐶 𝐴 = [0 0 1] ⌈ 4 −2 1 ⌉ = [0 1 − 3]
0 1 −3
−1 0 0
2 𝑇
𝐴 𝐶 = [0 1 ]
−3 4⌈ −2 1 ⌉ = [4 − 5 10]
0 1 −3
0 0 1
𝑄 = ⌈0 1 −3⌉
4 −5 10
|𝑄| = 0[10 − 15] − 0[0 − 12] + 1[0 − 4] = −4

Non zero determinant implies rank equals 3. Also n=3 hence the matrix is observable.

v. What conclusion can you draw from (iii) and (iv).


The controllability and observability of the system remains the same irrespective of the
programming method used.
15

MATLAB Code Used


i) State Transition Matrix Φ(t)
A = [0, 1 0; 0, 0, 1; -6, -11, -6]
b = [0;0;1]
C= [ 5, 1,0]
X0 = [0]

I = exp(A)
syms t
phi = exp(A*t)
display phi

phi = [ 1, exp(t)]
[ exp(-10*t), exp(-7*t)]

𝟎
ii) X(t) when X0 = [ ] and U = 1
𝟏
A = [0, 1; -10, -7]
b = [0; 1]
C= [ 1, 1]
X0 = [0; 1]

I = exp(A)
syms t
phi = exp(A*t)
x(t) = phi*X0 + b
display x(t)

You might also like