Professional Documents
Culture Documents
Answer HW02
Answer HW02
Answer HW02
امید عاقب
مهیار نراقی
1. Companion + Jordan forms:
a.
𝑠+2 Eq.1.1
𝐻(𝑠) =
𝑠 3 +2𝑠 2 +5𝑠
0 1 0 0
̇
=> 𝑐𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑎𝑏𝑙𝑒 𝑓𝑜𝑟𝑚: 𝑥⃗ = [0 0 1 ] 𝑥⃗ + [0] 𝑢
Eq.1.2
0 −5 −2 1
𝑦 = [2 1 0]𝑥⃗
0 0 0 2
̇
=> 𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑏𝑙𝑒 𝑓𝑜𝑟𝑚: 𝑥⃗ = [1 0 −5] 𝑥⃗ + [1] 𝑢
Eq.1.3
0 1 −2 0
[
𝑦= 0 0 1 ⃗ ]𝑥
Jordan form:
𝑠+2 𝑟1 𝜆+𝑗𝛾 𝜆−𝑗𝛾 𝑎𝑓𝑡𝑒𝑟 𝑓𝑖𝑛𝑑𝑖𝑛𝑔 𝑟1 ,𝜆 𝑎𝑛𝑑 𝛾
𝐻(𝑠) = = + + ⇒ 𝑟1 = 0.4, 𝜆 = −0.2, 𝛾 =
𝑠((𝑠+1)2 +4) 𝑠 𝑠+1+𝑗2 𝑠+1−𝑗2 Eq.1.4
0.15, 𝜎 = 1, 𝜔 = −2
In which 𝜎 and 𝜔 are used as follows:
0 0 0 1 0 0 0 1
̇
=> 𝑥⃗ = [0 0 1 ] 𝑥⃗ + [0] 𝑢 = [0 0 1 ] 𝑥⃗ + [0] 𝑢
2 2) Eq.1.5
0 −(𝜎 + 𝜔 −2𝜎 1 0 −5 −2 1
𝑦 = [𝑟1 2(𝜆𝜎 − 𝛾𝜔) 2𝜆]𝑥⃗ = [0.4 0.2 −0.4]𝑥⃗
b.
𝑠+3 𝑟1 𝑟21 𝑟
22
𝑎𝑓𝑡𝑒𝑟 𝑓𝑖𝑛𝑑𝑖𝑛𝑔 𝑟1 ,𝑟21 𝑎𝑛𝑑 𝑟22 Eq.1.6
𝐻(𝑠) = (𝑠+1)2(𝑠+2) = + + (𝑠+1) 2
⇒ 𝑟1 = 1, 𝑟21 = −1 , 𝑟22 = 2
𝑠+2 𝑠+1
1 −1 2
=> 𝐻(𝑠) = + + (𝑠+1)2 Eq.1.7
𝑠+2 𝑠+1
−2 0 0 1
̇
=> 𝐽𝑜𝑟𝑑𝑎𝑛 𝑓𝑜𝑟𝑚: 𝑥⃗ = [ 0 −1 0 ] 𝑥⃗ + [0] 𝑢 ; 𝑦 = [1 −1 2]𝑥⃗ Eq.1.8
0 1 −1 0
2. According to figure1:
𝑃 = 𝑚𝑔𝑙𝑐𝑜𝑠(𝜃) Eq.2.2
ℒ =𝑇−𝑃 Eq.2.3
𝑑 𝜕ℒ 𝜕ℒ 𝑘𝑒 𝑘2𝜔 𝑘𝑒 𝑘 2𝜔
( ) − 𝜕𝑥 = 𝑓 = 𝑅𝑟 − => (𝑀 + 𝑚)𝑥̈ + 𝑚𝑙𝜃̈ cos(𝜃) − 𝑚𝑙𝜃̇ 2 sin(𝜃) = − Eq.2.4
𝑑𝑡 𝜕𝑥̇ 𝑅𝑟 𝑅𝑟 𝑅𝑟
𝑑 𝜕ℒ 𝜕ℒ
( ) − = 0 => 𝑚𝑙𝜃̈ + 𝑚𝑥̈ cos(𝜃) 𝑚𝑔𝑠𝑖𝑛(𝜃) = 0 Eq.2.5
𝑑𝑡 𝜕𝜃̇ 𝜕𝜃
If the pendulum is stabilized, eqs.2.4,5 can be simplified more to finally deal with a pair of
linear ODEs. On the other hand:
𝑥̇ = 𝑟𝜔 Eq.2.6
0 0 0 Eqs.2.10
0
1 0 0 122.5
− 𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑏𝑙𝑒 𝑓𝑜𝑟𝑚: 𝐴2 = [ ] & 𝐵2 = [−2.45 0 0.25 0]′
0 1 0 10.29
0 0 1 −12.5
𝐶2 = [0 0 0 1] & 𝐷2 = [0]
𝑌2 (𝑠) 0.25𝑠 2
=− 4
𝑈(𝑠) 𝑠 + 12.5𝑠 3 − 10.29𝑠 2 − 122.5𝑠
0 1 0 0 0
0 0 1 0 0
− 𝑐𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑎𝑏𝑙𝑒 𝑓𝑜𝑟𝑚: 𝐴1 = [ ] & 𝐵1 = [ ]
0 0 0 1 0
0 122.5 10.29 −12.5 1
Eqs.2.11
𝐶1 = [0 0 0.25 0] & 𝐷1 = [0]
0 0 0 0 0
1 0 0 122.5 0
− 𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑏𝑙𝑒 𝑓𝑜𝑟𝑚: 𝐴2 = [ ] & 𝐵2 = [ ] & 𝐶2 = [0 0 0 1] & 𝐷2
0 1 0 10.29 0.25
0 0 1 −12.5 0
= [0]
PART.2: SIMULATION
1. Refer to the first problem of PART.1: (file: Part2_p1.m)
Which results in the same answer as PART.1.
2. Using the 'state-space' block in Simulink, the system can be easily shown as:
Which confirms the answer in c.
And for the observable and controllable forms, the code written below leads to the same answer as part d:
3.
o Files: 'Part2_p3.mlx'