0% found this document useful (0 votes)
4 views21 pages

CH 3

The document is a homework assignment for a course on System Dynamics and Control, focusing on modeling electrical and mechanical systems in state space. It includes various examples of state space representations for electrical networks and a translational mechanical system, detailing the equations and state vectors. The solutions involve applying Kirchhoff's laws and defining state variables to derive the state equations and outputs for different systems.

Uploaded by

Khoa Nguyễn
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)
4 views21 pages

CH 3

The document is a homework assignment for a course on System Dynamics and Control, focusing on modeling electrical and mechanical systems in state space. It includes various examples of state space representations for electrical networks and a translational mechanical system, detailing the equations and state vectors. The solutions involve applying Kirchhoff's laws and defining state variables to derive the state equations and outputs for different systems.

Uploaded by

Khoa Nguyễn
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/ 21

VIET NAM NATIONAL UNIVERSITY HO CHI MINH CITY

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY


…o0o…

HOMEWORK
SYSTEM DYNAMICS AND CONTROL
CHAPTER III: MODELING IN TIME DOMAIN

Instructor: Associate professor PhD Nguyen Tan Tien


Student: Nguyen Cong Hieu ID Number: 1952048
3.1. Represent the electrical network in state space with output 𝑣0

1Ω 1Ω 1Ω

𝑣𝑖 (𝑡) 1𝐻 1𝐻 1𝐹 𝑣𝑜 (𝑡)

Solution:

1Ω 𝑣1 1Ω 𝑣2 1Ω
𝐴 𝐵 𝐶 𝐷 𝑖3
𝑣𝑖 (𝑡) 1𝐻 𝑖1 1𝐻 𝑖2 1𝐹 𝑣𝑜 (𝑡)
𝐸 𝐹
𝑖1 + 𝑖2 + 𝑖3 𝑖2 + 𝑖3

We have the differential equation for each energy storage element:


𝑖1̇ = 𝑣1
{𝑖2̇ = 𝑣2
𝑣0̇ = 𝑖3
Therefore, the state vector is:
𝑖1
𝑋 = [ 𝑖2 ]
𝑣0
By applying the KVL for ADFE, it yields

𝑉𝐴𝐵 + 𝑉𝐵𝐶 + 𝑉𝐶𝐷 + 𝑣0 = 𝑣𝑖


𝑣𝑖 𝑣0 𝑖1 2𝑖2
⟺ (𝑖1 + 𝑖2 + 𝑖3 ) + (𝑖2 + 𝑖3 ) + 𝑖3 + 𝑣0 = 𝑣𝑖 ⟺ 𝑖3 = − − −
3 3 3 3
By applying the KVL for ABE, it yields

𝑉𝐴𝐵 + 𝑣1 = 𝑣𝑖
2 2 1 1
⟺ 𝑣1 = 𝑣𝑖 − (𝑖1 + 𝑖2 + 𝑖3 ) = 𝑣𝑖 − 𝑖1 − 𝑖2 + 𝑣0
3 3 3 3
By applying the KVL for ACFE, it yields

𝑉𝐴𝐵 + 𝑉𝐵𝐶 + 𝑣2 = 𝑣𝑖
1 1 2 2
⟺ 𝑣2 = 𝑣𝑖 − (𝑖1 + 𝑖2 + 𝑖3 ) − (𝑖2 + 𝑖3 ) = 𝑣𝑖 − 𝑖1 − 2𝑖2 − 2𝑖3 = 𝑣𝑖 − 𝑖1 − 𝑖2 + 𝑣0
3 3 3 3

Using 𝑣1 , 𝑣2 , and 𝑖3 , the state equation is


2 1 1 2


𝑖1̇ = 𝑣1 3 3 3 3
1 2 2 1
[𝑖2̇ = 𝑣2 ] = − − 𝑋+ 𝑣𝑖
𝑣0̇ = 𝑖3 3 3 3 3
1 2 1 1

[ 3 − −
3 3] [3]

𝑦 = [0 0 1] × 𝑋

3.2. Represent the electrical network in state space with output 𝑖𝑅

3Ω 𝑣 (𝑡) 2𝐻
1

4𝑣1 (𝑡) 𝑖𝑅 (𝑡)


𝑣𝑖 (𝑡) 3𝐹 3Ω

Solution:

𝑖1 + 𝑖2 𝑖2 𝑖2 + 4𝑣1
3Ω 𝑣 (𝑡) 2𝐻
1
𝐴 𝐵 𝐶 𝐷
4𝑣1 (𝑡) 𝑖𝑅 (𝑡)
𝑣𝑖 (𝑡) 3𝐹 𝑖1 3Ω
𝐸 𝐹
We have the differential equation for each energy storage element:
3𝑣1̇ = 𝑖1
{
2𝑖2̇ = 𝑣𝐿
Therefore, the state vector is:
𝑣1
𝑋 = [𝑖 ]
2

By applying the KVL for ABE, it yields

𝑉𝐴𝐵 + 𝑣1 = 𝑣𝑖 ⟺ 3(𝑖1 + 𝑖2 ) + 𝑣1 = 𝑣𝑖
𝑣𝑖 𝑣1 𝑣𝑖 𝑣1 𝑣𝑖 𝑖2 𝑣1
⟺ 𝑖1 = − 𝑖2 − ⟺ 3𝑣1̇ = − 𝑖2 − ⟺ 𝑣1̇ = − −
3 3 3 3 9 3 9
By applying the KVL for ADEF, it yields

𝑉𝐴𝐵 + 𝑣𝐿 + 𝑉𝑅 = 𝑣𝑖

⟺ 3(𝑖1 + 𝑖2 ) + 𝑣𝐿 + 3(𝑖2 + 4𝑣1 ) = 𝑣𝑖 ⟺ 𝑣𝐿 = 𝑣𝑖 − 3𝑖1 − 6𝑖2 − 12𝑣1


3𝑖2 11𝑣1
⟺ 𝑣𝐿 = −3𝑖2 − 11𝑣1 ⟺ 2𝑖2̇ = −3𝑖2 − 11𝑣1 ⟺ 𝑖2̇ = − −
2 2
Using 𝑣1 and 𝑖2 , the state equation is
1 1
− 1
𝑋̇ = [ 9 3] 𝑋 + [ ] 𝑣
9 𝑖
11 3
− − 0
2 2
𝑖𝑅 = 4𝑣1 + 𝑖2 = [4 1]𝑋

3.3. Find the state-space representation of the network with output 𝑣0

𝑖3 (𝑡)
1𝐻
𝐶2 1𝐹
𝑣𝑖 (𝑡) 𝐶1
1Ω 𝑣𝑜 (𝑡)
1𝐹
𝑖1 (𝑡) 𝑖2 (𝑡)
Solution:

𝐴 1Ω 𝐵

𝑖3 (𝑡)
1𝐻 𝐻
𝐺 𝐶
𝐶2 1𝐹
𝑣𝑖 (𝑡) 𝐶1
1Ω 𝑣𝑜 (𝑡)
1𝐹
𝑖1 (𝑡) 𝑖2 (𝑡)
𝐹 𝐸 𝐷

We have the differential equation for each energy storage element:


𝑖𝐿̇ = 𝑣𝑖 − 𝑣𝐶1
{ 𝑣𝐶1 ̇ = 𝑖1 − 𝑖2
𝑣𝐶2̇ = 𝑖2 − 𝑖3
Therefore, the state vector is:
𝑖𝐿
𝑋 = [𝑣𝐶1 ]
𝑣𝐶2
By applying the KVL for HCDE, it yields

𝑣𝐶1 = 𝑣𝐶2 + 𝑖2 ⟺ 𝑖2 = 𝑣𝐶1 − 𝑣𝐶2

By applying the KVL for ABCG, it yields

𝑖3 = 𝑣𝐶2 + 𝑣𝐿 = 𝑣𝐶2 + 𝑣𝑖 − 𝑣𝐶1

Also, 𝑖𝐿 = 𝑖1 − 𝑖3 ⟺ 𝑖1 = 𝑖𝐿 + 𝑖3 = 𝑖𝐿 + 𝑣𝐶2 + 𝑣𝑖 − 𝑣𝐶1

Therefore

̇ = 𝑖1 − 𝑖2 = (𝑖𝐿 + 𝑣𝐶2 + 𝑣𝑖 − 𝑣𝐶1 ) − (𝑣𝐶1 − 𝑣𝐶2 ) = 𝑖𝐿 − 2𝑣𝐶1 + 2𝑣𝐶2 + 𝑣𝑖


𝑣𝐶1

𝑣𝐶2
̇ = 𝑖2 − 𝑖3 = (𝑣𝐶1 − 𝑣𝐶2 ) − (𝑣𝐶2 + 𝑣𝑖 − 𝑣𝐶1 ) = 2𝑣𝐶1 − 2𝑣𝐶2 − 𝑣𝑖

Using 𝑖𝐿 , 𝑣𝐶1 and 𝑣𝐶2 , the state equation is


0 −1 0 1
𝑋̇ = [1 −2 2 ] 𝑋 + [ 1 ] 𝑣𝑖
0 2 −2 −1
𝑣0 = 𝑣𝐶1 − 𝑣𝐶2 = [0 1 −1]𝑋
3.4. Represent the system in state space with output 𝑥3 (𝑡).
𝑓𝑣4 = 𝑓𝑣5 = 1𝑁𝑠

𝑓𝑣3 = 1𝑁𝑠 𝑀3 𝑥3 (𝑡)


1𝑘𝑔
𝑥1 (𝑡) 𝑓𝑣2 = 1𝑁𝑠 𝑥2 (𝑡)
𝑓𝑣1 = 1𝑁𝑠
𝑀1 𝑀2
2𝑘𝑔 𝐾 = 2𝑁/𝑚 1𝑘𝑔 𝑓(𝑡)

𝑓𝑟𝑖𝑐𝑡𝑖𝑜𝑛𝑙𝑒𝑠𝑠

Solution:
Equations of motion in Laplace:
(2𝑠 2 + 3𝑠 + 2)𝑋1 − (𝑠 + 2)𝑋2 − 𝑠𝑋3 = 0
−(𝑠 + 2)𝑀1 + (𝑠 2 + 2𝑠 + 2)𝑋2 − 𝑠𝑋3 = 𝐹
−𝑠𝑋1 − 𝑠𝑋2 + (𝑠 2 + 3𝑠)𝑋3 = 0
Define state variables:
𝑧1 = 𝑥1 & 𝑧2 = 𝑥1̇ ⇒ 𝑧1̇ = 𝑧2
𝑧3 = 𝑥2 & 𝑧4 = 𝑥2̇ ⇒ 𝑧3̇ = 𝑧4
𝑧5 = 𝑥3 & 𝑧6 = 𝑥3̇ ⇒ 𝑧5̇ = 𝑧6
Therefore, the state vector is:
𝑧1
𝑧2
𝑧3
𝑋 = 𝑧4
𝑧5
[𝑧6 ]
Equations of motion in the time domain:
3 1 1
𝑧2̇ = − 𝑧2 − 𝑧1 + 𝑧4 + 𝑧3 + 𝑧6
2 2 2
𝑧4̇ = −2𝑧4 − 2𝑧3 + 𝑧2 + 2𝑧1 + 𝑧6 + 𝐹
𝑧6̇ = −3𝑧6 + 𝑧2 + 𝑧4
The state equation is:
0 1 0 0 0 0
3 1 1 0
−1 − 1 0 0
2 2 2 0
𝑋̇ = 0 0 0 1 0 0 𝑋+ 𝑓(𝑡)
1
2 1 −2 −2 0 1
0
0 0 0 0 0 1 [0]
[0 1 0 1 0 −3]
𝑥3 (𝑡) = [0 0 0 0 1 0]𝑋

3.5. Represent the translational mechanical system in state space with output 𝑥1 (𝑡).
𝑓𝑣1 = 𝑓𝑣2 = 1𝑁𝑠

𝐾1 = 1𝑁/𝑚 𝑀2 𝑥2 (𝑡)
𝑥3 (𝑡) 1𝑘𝑔
𝑀3 𝑥1 (𝑡)
𝑓(𝑡) 1𝑘𝑔
𝑀1 𝐾2 = 1𝑁/𝑚
2𝑘𝑔

𝑓𝑣3 = 1𝑁𝑠 𝑓𝑟𝑖𝑐𝑡𝑖𝑜𝑛𝑙𝑒𝑠𝑠

Solution:
Equations of motion in Laplace:
(2𝑠 2 + 2𝑠 + 1)𝑋1 − 𝑠𝑋2 − (𝑠 + 1)𝑋3 = 0
−𝑠𝑋1 + (𝑠 2 + 2𝑠 + 1)𝑋2 − (𝑠 + 1)𝑋3 = 0
−(𝑠 + 1)𝑋1 − (𝑠 + 1)𝑋2 + (𝑠 2 + 2𝑠 + 2)𝑋3 = 𝐹
Define state variables:
𝑧1 = 𝑥1 & 𝑧2 = 𝑥1̇ ⇒ 𝑧1̇ = 𝑧2
𝑧3 = 𝑥2 & 𝑧4 = 𝑥2̇ ⇒ 𝑧3̇ = 𝑧4
𝑧5 = 𝑥3 & 𝑧6 = 𝑥3̇ ⇒ 𝑧5̇ = 𝑧6
Therefore, the state vector is:
𝑧1
𝑧2
𝑧3
𝑋 = 𝑧4
𝑧5
[𝑧6 ]
Equations of motion in the time domain:
1 1 1 1
𝑧2̇ = −𝑧2 − 𝑧1 + 𝑧4 + 𝑧5 + 𝑧6
2 2 2 2
𝑧4̇ = −2𝑧4 − 𝑧3 + 𝑧2 + 𝑧6 + 𝑧5
𝑧6̇ = −2𝑧6 − 2𝑧5 + 𝑧2 + 𝑧1 + 𝑧4 + 𝑧3 + 𝐹

The state equation is:


0 1 0 0 0 0
1 1 1 1 0
− −1 0 0
2 2 2 2 0
𝑋̇ = 0 0 0 1 0 0 𝑋+ 𝑓(𝑡)
0
0 1 −1 −2 1 1
0
0 0 0 0 0 1 [1]
[ 1 1 1 1 −2 −2]
𝑥1 (𝑡) = [1 0 0 0 0 0]𝑋

3.6. Represent the rotational mechanical system in state space with output 𝜃1 (𝑡).
𝑇 𝜃1

𝑁1 = 30
𝜃2
100𝑁𝑚/𝑟𝑎𝑑 100𝑁𝑚𝑠/𝑟𝑎𝑑
𝐽1 = 50𝑘𝑔𝑚2
𝑁2 = 100

𝐽2 = 100𝑘𝑔𝑚2

Solution:
Drawing the equivalent network:
10 3
𝑇 𝜃 𝜃2
3 10 1
100𝑁𝑚/𝑟𝑎𝑑 100𝑁𝑚𝑠/𝑟𝑎𝑑

5000 𝐽2 = 100𝑘𝑔𝑚2
𝐽1 = 𝑘𝑔𝑚2
9

Equations of motion in Laplace:


5000 2 3 10
( 𝑠 + 100) × Θ1 − 100Θ2 = 𝑇
9 10 3
3
−100 × Θ + (100𝑠 2 + 100𝑠 + 100)Θ2 = 0
10 1
Define state variables:

𝑧1 = 𝜃1 & 𝑧2 = 𝜃1̇ ⇒ 𝑧1̇ = 𝑧2

𝑧3 = 𝜃2 & 𝑧4 = 𝜃2̇ ⇒ 𝑧3̇ = 𝑧4


Therefore, the state vector is:
𝑧1
𝑧2
𝑋 = [𝑧 ]
3
𝑧4
Equations of motion in the time domain:
𝑧2̇ = −0.18𝑧1 + 0.6𝑧3 + 0.02𝑇
𝑧4̇ = −𝑧4 − 𝑧3 + 0.3𝑧1
The state equation is:
0 1 0 0 0
−0.18 0 0.6 0 0.02
𝑋̇ = [ ]𝑋 + [ ] 𝑇(𝑡)
0 0 0 1 0
0,3 0 −1 −1 0
𝜃1 = [1 0 0 0]𝑋
3.7. Represent the system in state space with output 𝜃𝐿 (𝑡).
𝑇
𝑁1 = 30

2𝑁𝑚/𝑟𝑎𝑑 3𝑁𝑚𝑠/𝑟𝑎𝑑
0.1𝑁𝑚/𝑟𝑎𝑑 𝑁2 ′ = 10
𝑁2 = 300
𝜃𝐿

𝑁3 = 100

200𝑁𝑚/𝑟𝑎𝑑

Solution:
Drawing the equivalent network:

10𝑇 𝜃𝐼 = 0.1𝜃1 𝜃𝐼𝐼 𝜃𝐼𝐼𝐼 = 10𝜃𝐿


3𝑁𝑚𝑠/𝑟𝑎𝑑

2𝑁𝑚/𝑟𝑎𝑑
10𝑁𝑚/𝑟𝑎𝑑 2𝑁𝑚/𝑟𝑎𝑑

Equations of motion in Laplace:


12𝜃𝐼 − 2𝜃𝐼𝐼 = 10𝑇 (1)
−2𝜃𝐼 + (3𝑠 + 2)𝜃𝐼𝐼 − 3𝑠𝜃𝐼𝐼𝐼 = 0 (2)
−3𝑠𝜃𝐼𝐼 + 5𝑠𝜃𝐼𝐼𝐼 = 0 (3)
Therefore, the state vector is:
𝜃𝐼
𝑋 = [ 𝜃𝐼𝐼 ]
𝜃𝐼𝐼𝐼
From equation (1) & (3), we have:
5
𝜃𝐼𝐼 = 𝜃
3 𝐼𝐼𝐼
5 1 5 5
𝜃𝐼 = 𝑇 + 𝜃𝐼𝐼 = 𝑇 + 𝜃𝐼𝐼𝐼
6 6 6 18
5 5 5
𝐹𝑟𝑜𝑚 (2) ⇒ −2 ( 𝑇 + 𝜃𝐼𝐼𝐼 ) + (3𝑠 + 2) 𝜃𝐼𝐼𝐼 − 3𝑠𝜃𝐼𝐼𝐼 = 0
6 18 3
25 5
⟺ 2𝑠𝜃𝐼𝐼𝐼 = − 𝜃𝐼𝐼𝐼 + 𝑇
9 3
Equations of motion in the time domain:
25 5
̇ =−
𝜃𝐼𝐼𝐼 𝜃𝐼𝐼𝐼 + 𝑇
18 6
𝜃𝐿 = 0.1 × 𝜃𝐼𝐼𝐼 (𝑡)

3.8. Show that the system yields a fourth-order TF if we relate the displacement of either mass to the
applied force, and a third-order one if we relate the velocity of either mass to the applied force.

𝑥1 (𝑡) 𝑥2 (𝑡)
𝐷 𝐾
𝑀1 𝑀2 𝑓(𝑡)

𝑓𝑟𝑖𝑐𝑡𝑖𝑜𝑛𝑙𝑒𝑠𝑠

Equations of motion in Laplace:


(𝑀1 𝑠 2 + 𝐷𝑠 + 𝐾)𝑋1 − 𝐾𝑋2 = 0
−𝐾𝑋1 + (𝑀2 𝑠 2 + 𝐾)𝑋2 = 𝐹
Solve equations:
−𝐾 0
−| 2 | 𝐹×𝐾
𝑀2 𝑠 + 𝐾 𝐹
𝑋1 = =
𝑀 𝑠 2 + 𝐷𝑠 + 𝐾 −𝐾 𝑀1 𝑀2 𝑠 4 + 𝑀2 𝐷𝑠 3 + 𝐾(𝑀1 + 𝑀2 )𝑠 2 + 𝐷𝐾𝑠
| 1 2 |
−𝐾 𝑀2 𝑠 + 𝐾
2
|𝑀1 𝑠 + 𝐷𝑠 + 𝐾 0 | 𝐹 × (𝑀1 𝑠 2 + 𝐷𝑠 + 𝐾)
𝑋2 = −𝐾 𝐹 =
𝑀 𝑠 2 + 𝐷𝑠 + 𝐾 −𝐾 𝑀1 𝑀2 𝑠 4 + 𝑀2 𝐷𝑠 3 + 𝐾(𝑀1 + 𝑀2 )𝑠 2 + 𝐷𝐾𝑠
| 1 |
−𝐾 𝑀2 𝑠 2 + 𝐾
That the system yields a fourth-order TF.
𝑣1 (𝑡) = 𝑥1̇ ⇒ 𝑉1 = 𝑠𝑋1
𝑣2 (𝑡) = 𝑥2̇ ⇒ 𝑉2 = 𝑠𝑋2
𝑉1 𝑠𝑋1 𝐾
⇒ = =
𝐹 𝐹 𝑀1 𝑀2 𝑠 3 + 𝑀2 𝐷𝑠 2 + 𝐾(𝑀1 + 𝑀2 )𝑠 + 𝐷𝐾
𝑉2 𝑠𝑋2 𝑀1 𝑠 2 + 𝐷𝑠 + 𝐾
⇒ = =
𝐹 𝐹 𝑀1 𝑀2 𝑠 3 + 𝑀2 𝐷𝑠 2 + 𝐾(𝑀1 + 𝑀2 )𝑠 + 𝐷𝐾
Relate the velocity of either mass to the applied force yields a third-order TF.

3.9. Find the state-space representation in phase-variable form for


𝑅(𝑠) 100 𝐶(𝑠) 𝑅(𝑠) 30 𝐶(𝑠)
𝑠4 + 20𝑠 3 + 10𝑠 2 + 7𝑠 + 100 𝑠5 + 8𝑠 4 + 9𝑠 3+ 6𝑠 2 + 𝑠 + 30

Solution:

𝑅(𝑠) 100 𝐶(𝑠)


𝑠 + 20𝑠 + 10𝑠 2 + 7𝑠 + 100
4 3

Define state variables:


𝑧1 = 𝑟

𝑧2 = 𝑟̇ ⇒ 𝑧1̇ = 𝑧2

𝑧3 = 𝑟̈ ⇒ 𝑧2̇ = 𝑧3

𝑧4 = 𝑟⃛ ⇒ 𝑧3̇ = 𝑧4

Therefore, the state vector is:


𝑧1
𝑧2
𝑋 = [𝑧 ]
3
𝑧4
The state equation is:
0 1 0 0 0
0 0 1 0
𝑋̇ = [ ] 𝑋 + [0] 𝑟(𝑡)
0 0 0 1 0
−100 −7 −10 −20 1
𝑐(𝑡) = [100 0 0 0] × 𝑋
𝑅(𝑠) 30 𝐶(𝑠)
𝑠5 + 8𝑠 4 + 9𝑠 3+ 6𝑠 2 + 𝑠 + 30

Define state variables:


𝑧1 = 𝑟

𝑧2 = 𝑟̇ ⇒ 𝑧1̇ = 𝑧2

𝑧3 = 𝑟̈ ⇒ 𝑧2̇ = 𝑧3

𝑧4 = 𝑟⃛ ⇒ 𝑧3̇ = 𝑧4

𝑧5 = 𝑟 (4) ⇒ 𝑧4̇ = 𝑧5
Therefore, the state vector is:
𝑧1
𝑧2
𝑋 = 𝑧3
𝑧4
[𝑧5 ]
The state equation is:
0 1 0 0 0 0
0 0 1 0 0 0
𝑋̇ = 0 0 0 1 0 𝑋 + 0 𝑟(𝑡)
0 0 0 0 1 0
[−30 −1 −6 −9 −8 ] [ 1]
𝑐(𝑡) = [30 0 0 0 0] × 𝑋

3.10. Find the state-space representation in phase-variable form using matlab


𝑅(𝑠) 100 𝐶(𝑠) 𝑅(𝑠) 30 𝐶(𝑠)
𝑠4 + 20𝑠 3 + 10𝑠 2 + 7𝑠 + 100 𝑠5 + 8𝑠 4 + 9𝑠 3+ 6𝑠 2 + 𝑠 + 30

Solution:
'a'
num=100;
den=[1 20 10 7 100];
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
A=flipud(fliplr(Acc))
B=flipud(Bcc)
C=fliplr(Ccc)
'b'
num=30;
den=[1 8 9 6 1 30];
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=flipud(fliplr(Acc))
B=flipud(Bcc)
C=fliplr(Ccc)

3.11. For each system write the state equations and the output equation for the phase-variable
representation
𝑅(𝑠) 8𝑠 + 10 𝐶(𝑠) 𝑠 4 + 2𝑠 3 + 12𝑠 2 + 7𝑠 + 6 𝐶(𝑠)
𝑅(𝑠)
𝑠 + 5𝑠 + 𝑠 2 + 5𝑠 + 13
4 3 𝑠 5 + 9𝑠 4 + 13𝑠 2 + 8𝑠 2

Solution:
𝑅(𝑠) 8𝑠 + 10 𝐶(𝑠)
𝑠 4 + 5𝑠 3 + 𝑠 2 + 5𝑠 + 13

Define state variables:


𝑧1 = 𝑟

𝑧2 = 𝑟̇ ⇒ 𝑧1̇ = 𝑧2

𝑧3 = 𝑟̈ ⇒ 𝑧2̇ = 𝑧3

𝑧4 = 𝑟⃛ ⇒ 𝑧3̇ = 𝑧4
Therefore, the state vector is:
𝑧1
𝑧2
𝑋 = [𝑧 ]
3
𝑧4
The state equation is:
0 1 0 0 0
0 0 1 0
𝑋̇ = [ ] 𝑋 + [0] 𝑟(𝑡)
0 0 0 1 0
−13 −5 −1 −5 1
𝑐(𝑡) = [10 8 0 0] × 𝑋

𝑠 4 + 2𝑠 3 + 12𝑠 2 + 7𝑠 + 6 𝐶(𝑠)
𝑅(𝑠)
𝑠 5 + 9𝑠 4 + 13𝑠 3 + 8𝑠 2

Define state variables:


𝑧1 = 𝑟

𝑧2 = 𝑟̇ ⇒ 𝑧1̇ = 𝑧2

𝑧3 = 𝑟̈ ⇒ 𝑧2̇ = 𝑧3

𝑧4 = 𝑟⃛ ⇒ 𝑧3̇ = 𝑧4

𝑧5 = 𝑟 (4) ⇒ 𝑧4̇ = 𝑧5
Therefore, the state vector is:
𝑧1
𝑧2
𝑋 = 𝑧3
𝑧4
[𝑧5 ]
The state equation is:
0 1 0 0 0 0
0 0 1 0 0 0
𝑋̇ = 0 0 0 1 0 𝑋 + 0 𝑟(𝑡)
0 0 0 0 1 0
[0 0 −8 −13 −9] [1]

𝑐(𝑡) = [6 7 12 2 1] × 𝑋

3.12. For each system write the state equations and the output equation for the phase-variable
representation using matlab
𝑅(𝑠) 8𝑠 + 10 𝐶(𝑠) 𝑠 4 + 2𝑠 3 + 12𝑠 2 + 7𝑠 + 6 𝐶(𝑠)
𝑅(𝑠)
𝑠 + 5𝑠 + 𝑠 2 + 5𝑠 + 13
4 3 𝑠 5 + 9𝑠 4 + 13𝑠 2 + 8𝑠 2

Solution:
'a'
num=[8 10];
den=[1 5 1 5 13];
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
A=flipud(fliplr(Acc))
B=flipud(Bcc)
C=fliplr(Ccc)
'b'
num=[1 2 12 7 6];
den=[1 9 13 8 0 0];
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=flipud(fliplr(Acc))
B=flipud(Bcc)
C=fliplr(Ccc)
3.13. Represent the following TF in state space. Give your answer in vector-matrix form
𝑠 2 + 3𝑠 + 8
𝑇(𝑠) =
(𝑠 + 1)(𝑠 2 + 5𝑠 + 5)

Solution:

𝑠 2 + 3𝑠 + 8 𝑠 2 + 3𝑠 + 8
𝑇(𝑠) = =
(𝑠 + 1)(𝑠 2 + 5𝑠 + 5) 𝑠 3 + 6𝑠 2 + 10𝑠 + 5
Define state variables:
𝑧1 = 𝑟

𝑧2 = 𝑟̇ ⇒ 𝑧1̇ = 𝑧2
𝑧3 = 𝑟̈ ⇒ 𝑧2̇ = 𝑧3

Therefore, the state vector is:


𝑧1
𝑧
𝑋 = [ 2]
𝑧3
The state equation is:
0 1 0 0
𝑋̇ = [ 0 0 1 ] 𝑋 + [0] 𝑟(𝑡)
−5 −10 −6 1
𝑐(𝑡) = [8 3 1] × 𝑋

3.14. Find the TF 𝐺𝑆 = 𝑌(𝑠)/𝑋(𝑠) for each of the following systems represented in state space

0 1 0 0
𝑥̇ = [ 0 0 1 ] 𝑥 + [ 0 ] 𝑟, 𝑦 = [1 0 0]𝑥
−3 −2 −5 10
2 3 −8 1
𝑥̇ = [ 0 5 3 ] 𝑥 + [4] 𝑟, 𝑦 = [1 3 6]𝑥
−3 −5 −4 6

3 −5 2 5
𝑥̇ = [ 1 −8 7 ] 𝑥 + [−3] 𝑟, 𝑦 = [1 −4 3]𝑥
−3 −6 −2 2

Solution:
a)
We have:
0 1 0 0
𝐴=[ 0 0 1 ] ; 𝐵 = [ 0 ] ; 𝐶 = [1 0 0]
−3 −2 −5 10
𝑠 −1 0
(𝑠𝐼 − 𝐴) = [0 𝑠 −1 ]
3 2 𝑠+5

𝐴𝑑𝑗 1 𝑠 2 + 5𝑠 + 2 𝑠+5 1
(𝑠𝐼 − 𝐴) −1
= = [ −3 𝑠 2 + 5𝑠 𝑠]
𝐷𝑒𝑡 𝑠 3 + 5𝑠 2 + 2𝑠 + 3
−3𝑠 −2𝑠 − 3 𝑠2
10
𝐺(𝑠) = 𝐶(𝑠𝐼 − 𝐴)−1 𝐵 =
𝑠 3 + 5𝑠 2 + 2𝑠 + 3
b)
We have:
2 3 −8 1
𝐴=[ 0 5 3 ] ; 𝐵 = [4] ; 𝐶 = [1 3 6]
−3 −5 −4 6
𝑠 − 2 −3 8
(𝑠𝐼 − 𝐴) = [ 0 𝑠 − 5 −3 ]
3 5 𝑠+4

𝐴𝑑𝑗 1 𝑠2 − 𝑠 − 5 3𝑠 + 52 −8𝑠 + 49
(𝑠𝐼 − 𝐴) −1 2
= = 3 × [ −9 𝑠 + 2𝑠 − 32 3𝑠 − 6 ]
𝐷𝑒𝑡 𝑠 − 3𝑠 2 − 27𝑠 + 157
−3𝑠 + 15 −5𝑠 + 1 𝑠 − 7𝑠 + 10
49𝑠 2 − 349𝑠 + 452
𝐺(𝑠) = 𝐶(𝑠𝐼 − 𝐴)−1 𝐵 =
𝑠 3 − 3𝑠 2 − 27𝑠 + 157
c)
We have:
3 −5 2 5
𝐴 = [ 1 −8 7] ; 𝐵 = [−3] ; 𝐶 = [1 −4 3]
−3 −6 2 2
𝑠−3 5 −2
(𝑠𝐼 − 𝐴) = [ −1 𝑠 + 8 −7 ]
3 6 𝑠−2

𝐴𝑑𝑗 1 𝑠 2 + 6𝑠 + 26 −5𝑠 − 2 2𝑠 − 19
(𝑠𝐼 − 𝐴) −1 2
= = 3 [ 𝑠 − 23 𝑠 − 5𝑠 + 12 7𝑠 − 19 ]
𝐷𝑒𝑡 𝑠 + 3𝑠 2 + 19𝑠 − 133 2
−3𝑠 − 30 −6𝑠 + 33 𝑠 + 5𝑠 − 19
23 𝑠 2 − 48 𝑠 − 7
𝐺(𝑠) = 𝐶(𝑠𝐼 − 𝐴)−1 𝐵 =
𝑠 3 + 3𝑠 2 + 19𝑠 − 133
3.15. Use matlab to find the TF 𝐺 𝑠 = 𝑌(𝑠)/𝑋(𝑠) for each of the following systems represented in state
space
0 1 5 0 0
0 0 1 0 5
𝑥̇ = [ ] 𝑥 + [ ] 𝑟, 𝑦 = [1 3 6 6]𝑥
0 0 0 1 8
−7 −9 −2 −3 2

3 1 0 4 −2 2
−3 5 −5 2 −1 7
𝑥̇ = 0 1 −1 2 8 𝑥 + 8 𝑟, 𝑦 = [1 −2 −9 7 6]𝑥
−7 6 −3 −4 0 5
[−6 0 4 −3 1 ] [ 4]

Solution:
'a'
A=[0 1 5 0;0 0 1 0;0 0 0 1;-7 -9 -2 -3];
B=[0;5;8;2];
C=[1 3 6 6];
D=0;
ss(A,B,C,D)
[num,den]=ss2tf(A,B,C,D);
G=tf(num,den)
'b'
A=[3 1 0 4 -2;-3 5 -5 2 -1;0 1 -1 2 8;-7 6 -3 -4 0;-6 0 4 -3 1];
B=[2;7;8;5;4];
C=[1 -2 -9 7 6];
D=0;
ss(A,B,C,D)
[num,den]=ss2tf(A,B,C,D);
G=tf(num,den)

3.16. Use matlab, the Symbolic Math Toolbox, and Eq.3.73 to find the TF 𝐺 𝑠 = 𝑌(𝑠)/𝑋(𝑠) for each
of the following systems
0 1 5 0 0
0 0 1 0 5
𝑥̇ = [ ] 𝑥 + [ ] 𝑟, 𝑦 = [1 3 6 6]𝑥
0 0 0 1 8
−7 −9 −2 −3 2

3 1 0 4 −2 2
−3 5 −5 2 −1 7
𝑥̇ = 0 1 −1 2 8 𝑥 + 8 𝑟, 𝑦 = [1 −2 −9 7 6]𝑥
−7 6 −3 −4 0 5
[−6 0 4 −3 1 ] [4]

Solution:
syms s
'a'
A=[0 1 3 0
0 0 1 0
0 0 0 1
-7 -9 -2 -3];
B=[0;5;8;2];
C=[1 3 4 6];
D=0;
I=[1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1];
'T(s)'
T=C*((s*I-A)^-1)*B+D
pretty(T)
'b'
A=[3 1 0 4 -2
-3 5 -5 2 -1
0 1 -1 2 8
-7 6 -3 -4 0
-6 0 4 -3 1];
B=[2;7;6;5;4];
C=[1 -2 -9 7 6];
D=0;
I=[1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1];
'T(s)'
T=C*((s*I-A)^-1)*B+D
pretty(T)

You might also like