Q1. The Equivalent Circuit in The Laplace Domain
Q1. The Equivalent Circuit in The Laplace Domain
1 LS
𝑠𝑐
𝐼1(𝑆) 𝐼2(𝑆)
1 1
𝑅1 + 𝐶𝑠 − 𝐶𝑠 𝐼 (𝑠) 𝑉
[ 1 1 ] [ 1 ] = [ 𝑖𝑛 ]
− 𝐶𝑠 𝑅2 + 𝐶𝑠 + 𝐿𝑠 2 𝐼 (𝑠) 0
𝑉_𝑖𝑛
𝐶𝑆
𝐼2 = 1 1 1
(𝑅1 + )(𝑅2 + +𝐿𝑠)− 2 2
𝐶𝑠 𝐶𝑠 𝐶 𝑠
𝑉
From the circuit 𝑣𝑜 = 𝐼2 𝐿𝑠, 𝐼2 = 𝐿𝑠𝑜
Vin
𝑉𝑜 CS
= R R 1 L 1
𝐿𝑆 R1 R1 + 1 + R1 L1 + 2 + 2 2 + − 2 2
Cs Cs C s C C s
𝐿𝑠
𝑉𝑜 (𝑠) 𝐶𝑆
= (𝑅 +𝑅 ) 𝐿
𝑣𝑖𝑛 (𝑠) 𝑅1 𝐿𝑠 + 1 2 +𝑅1 𝑅2 +
𝐶𝑆 𝐶
𝑉𝑜 (𝑠) 𝐿𝑠
=
𝑣𝑖𝑛 (𝑠) 𝑅1 𝐿𝐶𝑠2 + (𝑅1 +𝑅2 𝐶+𝐿)𝑠+𝑅1 +𝑅2
1
Q2. The equivalent circuit in Laplace domain
1 1
𝐼1 𝑆
𝐶1 𝑆 𝐶2 𝑆
𝐼2 𝑆
1 1
𝑅1 + −
𝐶1 𝑠 𝐶𝑠
1
− 0
𝐼2 = || 1
𝐶𝑠 |
|
𝑅1 + 𝑉1 (𝑠)
𝐶1 𝑠
1 1 1
− 𝑅2 + +
𝐶𝑠 𝐶1 𝑠 𝐶2 𝑠
𝑉1 (𝑠)
𝐶1 𝑠
= 𝐼2 (s) = 1 1 1 1 = 𝑉2 (𝑆)
(𝑅1 + )(𝑅2 + + )− 2 2
𝐶1 𝑠 𝐶1 𝑠 𝐶2 𝑠 𝐶1 𝑠
𝑉2 (𝑠)
From the circuit 𝐼2 = 𝐶2 𝑠
𝑉1 (𝑠)
𝑉2 (𝑆) 𝐶1 𝑠
= 𝑅1 𝑅1 𝑅2 1 1 1
𝐶2 𝑆 𝑅1 𝑅2 + + + + 2 2 + 2 − 2 2
𝐶2 𝑠 𝐶2 𝑠 𝐶1 𝐶 𝑠 𝐶 1 𝐶 2𝑠 𝐶1 𝑠
1
𝐶2
𝑉2 (𝑆) 𝐶1
= 𝑅 +𝑅 𝑅 1
𝑉1 (𝑆) 𝑅1 𝑅2 + 1 2 + 1 +
𝐶1 𝑠 𝐶 2 𝑠 𝐶 1 𝐶 2 𝑠2
𝑉2 (𝑠) 𝑐22 𝑠2
=𝑅 2
𝑉 (𝑠)
1 1 𝑅2 𝐶1 𝐶2 𝑠 +(𝑅1 𝐶1 +𝑅1 𝐶2 +𝑅2 𝐶2 )𝑠+1
2
Q3. The equivalence circuit in Laplace domain
𝐿1 𝑆
𝐿2 𝑆
𝐼1 𝑆 𝐼2 𝑆
∑𝑧11 −∑𝑧12 𝐼1 𝑉
[ ] [ ] =[ 1 ]
−∑𝑧21 ∑𝑧22 𝐼2 𝑉2
𝑅1 + 𝐿1 𝑠 −𝐿1 𝑠 𝐼 𝑉
[ ] [ 1 ] =[ 1 ]
−𝐿1 𝑠 𝑅2 + (𝐿1 + 𝐿2 )𝑠 𝐼2 0
𝑅 + 𝐿1 𝑠 −𝐿1 𝑠
𝛥=| 1 |
−𝐿1 𝑠 𝑅1 (𝐿1 + 𝐿2 )𝑠
= 𝐿1 𝐿2 𝑠 2 + (𝑅1 𝐿1 + 𝑅1 𝐿1 + 𝑅1 𝐿1 )𝑠 + 𝑅1 𝑅2
𝑉2 𝑉1 𝐿1 𝑠
=𝐿 2 +(𝑅 𝐿 +𝑅 𝐿 +𝑅 𝐿 )𝑠+𝑅 𝑅
𝐿2 𝑠 1 𝐿2 𝑠 1 1 1 2 2 1 1 2
𝑉2 (𝑠) 𝐿1 𝐿2 𝑠2
=𝐿 2
𝑉 (𝑠)
1 1 𝐿2 𝑠 +(𝑅1 𝐿1 +𝑅1 𝐿2 +𝑅2 𝐿1 )𝑠+𝑅1 𝑅2
3
Q4.
(S) (S)
MS2 2MS2
BS 2BS
𝑀𝑠 + 𝐵𝑠 + 2𝐾 −𝐾 𝑋 (𝑠) 𝐹(𝑠)
[ 2 ][ 1 ] =
−𝐾 2𝑀𝑠 + 𝐵𝑠 + 2𝐾 𝑋2 (𝑠) 0
𝑋2 (𝑆) 𝑋1 (𝑆)
𝐾1
𝐾2
𝐹 (𝑆)
𝑀1 𝑆 2
𝐷1S
𝐷2S
4
∑𝑧11 −∑𝑧12 𝐼1 𝑉
[ ] [ ] = [ 1]
−∑𝑧21 ∑𝑧22 𝐼2 𝑉2
𝑀1 𝑠 2 + 𝐷1 𝑠 + 𝐾1 −(𝐷1 𝑠 + 𝐾1 𝑋 (𝑠)
[ 2 ] [ 1 ] = ⌈𝐹(𝑠)⌉
−(𝐷1 𝑠 + 𝐾1 𝑀2 𝑠 + (𝐷1 𝐷2 ) + 𝐾1 𝐾2 𝑋2 (𝑠) 0
𝑀 𝑠 2 + 𝐷1 𝑠 + 𝐾1 𝐹(𝑠)
| 1 |
−(𝐷1 𝑠 + 𝐾1 0
𝑀 𝑠 2 + 𝐷1 𝑠 + 𝐾1 −(𝐷1 𝑠 + 𝐾1
| 1 |
−(𝐷1 𝑠 + 𝐾1 𝑀1 𝑠 2 + 𝐷1 𝑠 + 𝐾1
𝑋2 (𝑆) 𝐷1 𝑠+𝐾1
=𝑀 2
𝐹(𝑆) 4 3
1 𝑀2 𝑠 +( 𝑀1 𝐷1 +𝑀1 𝐷2 +𝑀2 𝐷1 )𝑠 +( 𝑀1 𝐾1 𝐾2 +𝑀2 𝐾1 +𝐷1 +𝐷1 𝐷2 )𝑠
2 +( 𝐷1 𝐾1 𝐾2 +𝐷1 𝐷2 )𝑠+ 𝐾12 +𝐾2
Q6.
Ʃ𝑓𝑦 = 0
5
𝑀1 𝑋2̈ = −𝐾1 (𝑋2 − 𝑋1 ) − 𝐷1 (𝑋2̇ − 𝑋1̇ ) + 𝑓(𝑡)
𝐾1 𝐷1 𝐾1 𝐷1 1
𝑋2̈ = 𝑋1 + 𝑋1̇ − 𝑋2 − 𝑋2̇ 𝑓(𝑡)
𝑀1 𝑀1 𝑀1 𝑀1 𝑀1
𝐹𝑜𝑟 𝑀1
−(𝐾1 + 𝐾2 ) 𝐷1 + 𝐷2 𝐾1 𝐷1
𝑋1̈ = 𝑋1 − 𝑋1̇ + 𝑋2 + 𝑋̇
𝑀2 𝑀2 𝑀2 𝑀2 2
𝑙𝑒𝑡 𝑦1 = 𝑥1
𝑦2 = 𝑥̇ 1 = 𝑦̇ 1
𝑦3 = 𝑥2
𝑦̇ 1 = 𝑦2 … … … … … … … … … … … … … … … … … … … … … … … … … … … . (1)
−(𝐾1 + 𝐾2 ) 𝐷1 + 𝐷2 𝐾1 𝐷1
𝑦̇ 2 = 𝑦1 − 𝑦2 + 𝑦3 + 𝑦 … … … … … … … . . . (2)
𝑀2 𝑀2 𝑀2 𝑀2 4
𝑦̇ 3 = 𝑦4 … … … … … … … … … … … … … … … … … … … … … … … … … … … … (3)
𝐾1 𝐷1 𝐾1 𝐷1 1
𝑦̇4 = 𝑦1 + 𝑦2 − 𝑦3 + 𝑦4 + 𝑓(𝑡) … … … … … … … … … . . (4)
𝑀1 𝑀1 𝑀1 𝑀1 𝑀1
𝑥̇ = 𝐴𝑥 + 𝐵𝑢
𝑦̇ = 𝐴𝑦 + 𝐵𝑢
0 1 0 0
𝑦̇ 1 −(𝐾1 + 𝐾2 ) 𝐷1 + 𝐷2 𝐾1 𝐷1 𝑦1 0
− 0
𝑦̇ 2 𝑀2 𝑀2 𝑀2 𝑀2 𝑦2
[ ]= [𝑦 ] + 0 𝑓(𝑡)
𝑦̇ 3 0 0 0 0 3 1
𝑦̇4 𝐾1 𝐷1 𝐾1 −𝐷1 𝑦4
− [𝑀1 ]
[ 𝑀1 𝑀1 𝑀1 𝑀1 ]
6
Q7.
Ʃ𝑓𝑥 = 0
𝐹𝑜𝑟 𝑀1
𝑀1 𝑦̈ 1 = 𝐾2 (𝑦2 − 𝑦1 ) + 𝑐(𝑦̇ 2 − 𝑦̇ 1 ) − 𝐾1 𝑦1
= 𝑘2 𝑦1 − 𝑐𝑦̇ 1 + 𝑘2 𝑦2 + 𝑐𝑦̇ 1 − 𝑘1 𝑦1
−(𝐾1 + 𝐾2 ) 𝑐 𝐾2 𝑐
𝑦̈ 1 = 𝑦1 − 𝑦̇ 1 + 𝑦2 + 𝑦̇
𝑀1 𝑀1 𝑀1 𝑀1 2
𝐹𝑂𝑅 𝑀2
𝐾2 𝑐 𝐾2 𝑐 1
𝑦̈ 2 = 𝑦1 − 𝑦̇ 2 − 𝑦2 + 𝑦̇ 1 + 𝑓(𝑡)
𝑀2 𝑀2 𝑀2 𝑀2 𝑀2
𝑙𝑒𝑡 𝑥1 = 𝑦1
𝑥2 = 𝑦̇ 1 = 𝑥̇ 1
𝑥3 = 𝑦2
𝑥4 = 𝑦̇ 2 = 𝑥̇ 3 ,
𝑦̈ 2 = 𝑥̇ 4 𝑎𝑛𝑑 𝑦̈ 1 = 𝑥̇ 2
7
Converting the above state space equation yield
𝑥̇ 1 = 𝑥2 … … … … … … … … … … … … … … … … … … … … … … … … … … … . (1)
−(𝐾1 + 𝐾2 ) 𝑐 𝐾2 𝑐
𝑥̇ 2 = 𝑥1 − 𝑥2 + 𝑥3 + 𝑥 … … … … … … … … … … … (2)
𝑀1 𝑀1 𝑀1 𝑀2 4
𝑥̇ 3 = 𝑥4 … … … … … … … … … … … … … … … … … … … … … … … … … … … … (3)
𝐾2 𝑐 𝐾2 𝑐 1
𝑥= 𝑥1 + 𝑥2 − 𝑥3 + 𝑥4 + 𝑓(𝑡) … … … … … … … … … … … . (4)
𝑀2 𝑀2 𝑀2 𝑀2 𝑀2
𝑥̇ = 𝐴𝑥 + 𝐵𝑢
0 1 0 0
𝑥̇ 1 −(𝐾1 + 𝐾2 ) 𝑐 𝐾2 𝑐 𝑥1 0
− 0
𝑥̇ 𝑀1 𝑀1 𝑀1 𝑀1 𝑥2
[ 2] = [𝑥 ] + 0 𝑓(𝑡)
𝑥̇ 3 0 0 0 1 3 1
𝑥̇ 4 𝐾2
𝑐 𝐾2 −𝑐 𝑥4
− [𝑀2 ]
[ 𝑀2 𝑀2 𝑀2 𝑀2 ]
Q8.
𝐼1 𝑠 2 𝜃1 (𝑠) + 𝐵𝑠𝜃1 (𝑠) + 𝐾𝜃1 (𝑠) − 𝐵𝑠𝜃2 (𝑆) − 𝐾𝜃2 (𝑠) = 𝑇1 (𝑠)
𝐼2 𝑠 2 𝜃2 (𝑠) + 𝐵𝑆𝜃2 (𝑠) + 𝐾𝜃2 (𝑠) − 𝐵𝑆𝜃1 (𝑠) − 𝐾𝜃1 (𝑠) = 𝑇2 (𝑠)
𝑚𝑎𝑘𝑖𝑛𝑔 𝜃̈1 𝑎𝑛𝑑 𝜃̈1 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑓𝑜𝑟𝑚𝑢𝑙𝑎𝑒 𝑓𝑟𝑜𝑚 𝑒𝑞𝑛 (1)𝑎𝑛𝑑 (2)𝑟𝑒𝑠𝑝𝑒𝑐𝑡𝑖𝑣𝑒𝑙𝑦
8
𝑘𝜃1 (𝑡) 𝑏𝜃̇1 (𝑡) 𝑘𝜃2 (𝑡) 𝑏𝜃̇2 (𝑡) 𝑇2 (𝑡)
𝜃̈2 (𝑡) = + − − −
𝐼2 𝐼2 𝐼2 𝐼2 𝐼2
𝑥3 = 𝜃2 , 𝑥̇ 3 = 𝜃̇2 = 𝑥4 , 𝑥̇ 4 = 𝜃̈2
0 1 0 0
𝑥̇ 1 −𝑘 𝑏 𝑘 𝑏 𝑥1
−
𝑥̇ 2 𝐼 𝐼1 𝐼1 𝐼1 𝑥2 1 1 𝑇1
[ ]= 1 [𝑥 ] + [ ][ ]
𝑥̇ 3 0 0 0 1 3 𝐼1 𝐼2 𝑇2
𝑥̇ 4 𝑘 𝑏 𝑘 −𝑏 𝑥4
−
[ 𝐼2 𝐼2 𝐼2 𝐼2 ]
Q9 T2 𝛉2 Ke
Ie
Be
9
𝑛2
𝑏𝑢𝑡 𝑇2 (𝑠) = 𝐼 (𝑠)
𝑛1 1
𝑛2
𝑇 (𝑠) = 𝜃2 (𝑠)(𝐼𝑒 𝑠 2 + 𝐵𝑒 𝑠 + 𝐾𝑒 )
𝑛1 1
Q10.
𝑛2 10
= =2
𝑛1 5
𝐼𝑒 = (22 )𝑁 + 3 = 4 + 3 = 7𝑘𝑔𝑚−2
𝐾𝑒 = (22 )4 + 4 = 16 + 4 = 20𝑁/𝑚
𝑛2
𝜃2 (𝑆) ⁄𝑛1 2
= 2
= 2
𝑇1 𝐼𝑒 𝑠 + 𝐵𝑒 𝑠 + 𝐾𝑒 7𝑠 + 11.2𝑠 + 20
Q11.
ℎ1 − ℎ2 = 𝑅1 𝑞
ℎ1 − ℎ2
… … … … … … … … … … … … … … … … … (1) 𝑜𝑢𝑡 𝑓𝑙𝑜𝑤 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑡𝑎𝑛𝑘 1
𝑅1
10
For tank 2
𝒉𝟐 = 𝑹𝟐 𝒒𝒐
𝒉
𝒒𝒇 − 𝒒𝒐 = 𝑨𝟐 𝒅𝒅𝒕𝟐
𝑯𝟐
𝑸𝒐 (𝒔) = (𝒔) … … … … … … … … … … … … … … … … … … … . (𝟑)
𝑹𝟐
𝑯𝟐 (𝒔)
𝑸𝒇 = 𝑨𝟐 𝒔𝑯𝟐 + … … … … … … … … … … … … … … … … … … (𝟔)
𝑹𝟐
𝑯𝟐 (𝒔) 𝑯𝟐 (𝒔)
𝑸𝒊 (𝒔) = 𝑨𝟏 𝒔 (𝑹𝟏 ((𝑨𝟐 𝒔𝑯𝟐 (𝒔) + ) + 𝑯𝟐 (𝒔)) + 𝑨𝟐 𝒔𝑯𝟐 (𝒔) +
𝑹𝟐 𝑹𝟐
11
Taking Laplace inverse
𝜹𝟐 𝒉𝟐 𝜹𝒉 𝟐
𝑨𝟏 𝑨𝟐 𝑹𝟏 𝑹𝟐 𝒕𝟐
+ (𝑨𝟏 𝑹𝟏 + 𝑨𝟏 𝑹𝟐 + 𝑨𝟐 𝑹𝟐 ) + 𝒉𝟐 = 𝑹𝟐 𝒒𝒊
𝜹 𝜹𝒕
𝑯𝟐 𝑹𝟐
= 𝟐
𝑸𝒊 𝑨𝟏 𝑹𝟏 𝑨𝟐 𝑹𝟐 𝒔 + (𝑨𝟏 𝑹𝟏 + 𝑨𝟏 𝑹𝟐 + 𝑨𝟐 𝑹𝟐 )𝒔 + 𝟏
Q12.
𝟏 𝟏
𝑳= (𝑴𝟏 + 𝑴𝟐 )𝒙̇ 𝟐 + 𝑴𝟐 (𝟐𝒍𝒙̇ 𝝓̇𝒄𝒐𝒔𝝓 + 𝒍𝟐 𝝓̇𝟐 ) + 𝑴𝟐 𝒈𝒍𝒄𝒐𝒔𝝓
𝟐 𝟐
𝒅𝒍
= (𝑴𝟏 + 𝑴𝟐 )𝒙̇ + 𝑴𝟐 𝒍𝝓̇𝒄𝒐𝒔𝝓
𝒅𝒙̇
𝒅𝒍
=𝟎
𝒅𝒙
𝜹𝒍
𝜹( )
𝜹𝒙̇
= (𝑴𝟏 + 𝑴𝟐 )𝒙̈ + 𝑴𝟐 𝒍𝝓̈𝒄𝒐𝒔𝟇 − 𝑴𝟐 𝒍𝟇̇𝟐 𝒔𝒊𝒏𝟇
𝜹𝒙
𝜹𝒍
𝜹( ) 𝒅𝒍
𝜹𝒙̇
− =𝟎
𝜹𝒙 𝒅𝒙̇
𝒅𝒍
= 𝑴𝟐 𝒍𝒙̇ 𝒄𝒐𝒔𝝓 + 𝑴𝟐 𝒍𝟐 𝝓̇
𝒅𝝓̇
𝜹𝒍
= −𝑴𝟐 𝒍𝒙̇ 𝟇̇𝒔𝒊𝒏𝟇 − 𝑴𝟐 𝒈𝒍𝒔𝒊𝒏𝟇
𝜹𝝓̇
𝜹𝒍
𝜹( )
𝜹𝝓̇
= 𝑴𝟐 𝒍𝒙̈ 𝒄𝒐𝒔𝟇 − 𝑴𝟐 𝒍𝒙̇ 𝟇̇𝒔𝒊𝒏𝟇 + 𝑴𝟐 𝒍𝟐 𝟇̈
𝜹𝒕
𝜹𝒍
𝜹( )
𝜹𝝓̇ 𝒅𝒍
− =𝟎
𝜹𝒕 𝜹𝝓
12
13.
𝑴𝒃 𝑰𝒂 𝟏 𝑰𝒂 𝟏
( + 𝑴𝒘 + 𝟐 ) 𝒙̇ 𝟐 + (𝑴𝒃 𝒅𝟐 + 𝑰𝒙 ) 𝟇̇𝟐 + ((𝒎𝒘 + 𝟐 ) 𝑳𝟐 + (𝑰𝟐 𝑐𝒐𝒔𝟐 𝟇 + 𝑰𝒚 𝒔𝒊𝒏𝟐 𝟇))𝞿̇𝟐
𝟐 𝑹 𝟐 𝑹 𝟐
̇
+ 𝑴𝒃 𝒅 𝐜𝐨𝐬 𝟇 𝒙̇ 𝟇 − (𝑴𝒃 𝒈𝒅 𝐜𝐨𝐬 𝟇 + 𝑴𝒃 𝒈𝑹)
𝜹𝒍 𝟏
= 𝟐(𝑴𝒃 𝒅𝟐 + 𝑰𝒙 )𝟇̇ + 𝑴𝒃 𝒅 𝐜𝐨𝐬 𝒙̇
𝜹𝝓̇ 𝟐
𝜹𝒍
= 𝑰𝒚 𝒔𝒊𝒏𝟐 𝟇 𝐜𝐨𝐬 𝟇 𝝋̇𝟐 + 𝑴𝒃 𝒅 𝐬𝐢𝐧 𝟇 𝐜𝐨𝐬 𝟇 𝝋̇𝟐 − 𝑰𝟐 𝒔𝒊𝒏𝟇 𝐜𝐨𝐬 𝟇 𝝋̇𝟐 − 𝑴𝒃 𝒅 𝐬𝐢𝐧 𝝓 𝒙̇ 𝝋̇
𝜹𝝓
𝜹𝒍
𝜹( )
𝜹𝝓̇ 𝟏
= 𝟐 (𝑴𝒃 𝒅𝟐 + 𝑰𝒙 ) 𝝓̈ + 𝒙̈ 𝑴𝒃 𝒅 𝐜𝐨𝐬 𝝓 − 𝑴𝒃 𝒅𝒙̇ 𝝓̇ 𝐬𝐢𝐧 𝝓
𝜹𝒕 𝟐
𝜹𝒍
𝜹( )
𝜹𝝓̇ 𝒅𝒍
− =𝟎
𝜹𝒕 𝜹𝝓
𝟏
𝟐 (𝑴𝒃 𝒅𝟐 + 𝟐 𝑰𝒙 ) 𝝓̈ + 𝒙̈ 𝑴𝒃 𝒅 𝐜𝐨𝐬 𝝓 − 𝑴𝒃 𝒅𝒙̇ 𝝓̇ 𝐬𝐢𝐧 𝝓 − (𝑰𝒚 + 𝑴𝒃 𝒅 − 𝑰𝟐 ) 𝐬𝐢𝐧 𝝓 𝐜𝐨𝐬 𝝓 𝝋̇𝟐 −
𝑴𝒃 𝒅𝒙̇ 𝝓̇ 𝐬𝐢𝐧 𝝓 = 𝟎…………………………….(1)
13
𝜹𝑳 𝑴𝒃 𝑰𝒂
= 𝟐( + 𝑴𝒘 + 𝟐 )𝒙̇ + 𝑴𝒃 𝒅 𝐜𝐨𝐬 𝟇̇
𝜹𝒙̇ 𝟐 𝑹
𝜹𝑳
=𝟎
𝜹𝒙
𝜹𝒍
𝜹( ) 𝑴𝒃 𝑰𝒂
𝜹𝒙̇
= 𝟐( + 𝑴𝒘 + 𝟐 ) 𝒙̈ + 𝑴𝒃 𝒅 𝞍̈𝐜𝐨𝐬 𝟇 − 𝑴𝒃 𝒅 𝞍̇𝟐 𝒔𝒊𝒏𝟇
𝜹𝒕 𝟐 𝑹
𝜹𝒍
𝜹( ) 𝒅𝒍
𝜹𝒙̇
− = 𝝉𝟐
𝜹𝒕 𝜹𝒙
𝑴𝒃 𝑰𝒂
𝟐( + 𝑴𝒘 + 𝟐 ) 𝒙̈ + 𝑴𝒃 𝒅 𝞍̈𝐜𝐨𝐬 𝟇 −𝑴𝒃 𝒅 𝞍̇𝟐 𝒔𝒊𝒏𝟇 = 𝝉𝟐………………………………………(𝟐)
𝟐 𝑹
𝒅𝒍 𝑰𝒂 𝟏
= 𝟐((𝒎𝒘 + 𝟐 ) 𝑳𝟐 + (𝑰𝟐 𝒄𝒐𝒔𝟐 𝟇 + 𝑰𝒚 𝒔𝒊𝒏𝟐 𝟇))𝞿̇
𝒅𝝋̇ 𝑹 𝟐
𝜹𝑳
=𝟎
𝜹𝞿
𝜹𝒍
𝜹( )
𝜹𝝋̇ 𝑰𝒂
= 𝟐 (𝑴𝒘 + 𝟐 ) 𝑳𝟐 𝝋̈ + 𝑰𝟐 𝝋̈𝒄𝒐𝒔𝟐 𝟇 − 𝞿̇𝑰𝟐 𝟇̇𝟐 𝐬𝐢𝐧 𝟇 𝐜𝐨𝐬 𝟇 + 𝑰𝒚 𝞿̈𝒔𝒊𝒏𝟐 𝟇
𝜹𝒕 𝑹
+ 𝑰𝟐 𝞿̇𝟇̇𝟐 𝐬𝐢𝐧 𝟇 𝐜𝐨𝐬 𝟇 + 𝑴𝒃 𝒅𝞿̈𝒔𝒊𝒏𝟐 𝟇 + 𝑴𝒃 𝒅𝞿̇𝟇̇𝟐 𝐬𝐢𝐧 𝟇 𝐜𝐨𝐬 𝟇 = 𝝉𝟏
𝜹𝒍
𝜹( )
𝜹𝝋̇ 𝒅𝒍
− = 𝝉𝟏
𝜹𝒕 𝜹𝝋
𝑰𝒂 𝟐
𝟐 (𝑴𝒘 + ) 𝑳 + (𝑰𝟐 𝒄𝒐𝒔𝟐 𝟇 + 𝑰𝒚 𝞿̈𝒔𝒊𝒏𝟐 𝟇 + 𝑴𝒃 𝒅𝞿̈𝒔𝒊𝒏𝟐 𝟇)𝞿̈
𝑹𝟐
+ (𝑰𝒚 + 𝑴𝒃 𝒅 − 𝑰𝟐 )𝟐𝞿̇𝟇̇ 𝐬𝐢𝐧 𝟇 𝐜𝐨𝐬 𝟇 = 𝝉𝟏 … … … … … … … … … … … … . (𝟑)
𝟏
𝟐 (𝑴𝒃 𝒅𝟐 + 𝑰𝒙 ) 𝝓̈ + 𝒙̈ 𝑴𝒃 𝒅 = 𝟎 … … … … … … … … … … … … . (∗)
𝟐
14
From equation (2)
𝟐𝑰𝒂
(𝑴𝒃 + 𝟐𝑴𝒘 + ̈ = 𝝉𝟐 … … … … … … … (∗∗)
) 𝒙̈ + 𝑴𝒃 𝒅𝟇𝟇
𝑹𝟐
𝑰𝒂 𝟐
((𝟐𝑴𝒘 + ) 𝑳 + 𝑰𝟐 ) 𝞿̈ = 𝝉𝟏 … … … … … … … … … … … (∗∗∗)
𝑹𝟐
iii)
𝟎. 𝟐𝟔𝟎
𝑴𝒃 = 𝟏𝟑𝒌𝒈, 𝑹 = = 𝟎. 𝟏𝟑𝒎, 𝒅 = 𝟎. 𝟏𝟏𝟑𝒎, 𝑴𝒘
𝟐
̈
−𝑴𝒃 𝒅𝟇𝟇 𝝉𝟐
𝒙̈ = +
𝟐𝑰𝒂 𝟐𝑰𝒂
(𝑴𝒃 + 𝟐𝑴𝒘 + ) (𝑴𝒃 + 𝟐𝑴𝒘 + )
𝑹𝟐 𝑹𝟐
̈
−𝟏𝟑 × 𝟎. 𝟏𝟑𝟇𝟇 𝝉𝟐
= +
𝟐 × 𝟎. 𝟏𝟐𝟐𝟗 𝟐 × 𝟎. 𝟏𝟐𝟐𝟗
((𝟏𝟑 + 𝟐 × 𝟏. 𝟖𝟗 + 𝟎. 𝟏𝟑 )) ((𝟏𝟑 + 𝟐 × 𝟏. 𝟖𝟗 + 𝟎. 𝟏𝟑 ))
−𝟏. 𝟔𝟗𝟇𝟇̈ 𝝉𝟐
= + = −𝟎. 𝟎𝟗𝟏𝟇𝟇̈ + 𝟎. 𝟎𝟓𝟒𝝉𝟐
𝟏𝟖. 𝟔𝟕 𝟏𝟖. 𝟔𝟕
From equation……………………………………………………………………………. *
−𝑴𝒃 𝒅𝒙̈
𝝓̈ = = −𝟐. 𝟔𝟕𝒙̈
𝟏
𝟐(𝑴𝒃 𝒅𝟐 + 𝟐 𝑰𝒙 )
𝒙̇ 𝟏 = 𝒙̇ 𝟏 = 𝒙𝟐
𝒚𝟑 = 𝒙 𝟐
𝝓 = 𝒙𝟒
𝒙̇ 𝟒 = 𝝓̇𝟏 = 𝒙𝟓
15
𝒙̇ 𝟓 = 𝝓 ̈= 𝒙𝟔 = −𝟐. 𝟔𝟕𝒙̈
𝒙̇ 𝟓 = 𝝓̈ = 𝒙𝟔 = −𝟐. 𝟔𝟕𝒙𝟑
𝒙 = 𝒙𝟏
𝝋 = 𝒙𝟔
𝒙̇ 𝟔 = 𝝋̇ = 𝒙𝟕
𝒙̇ 𝟕 = 𝝋̇ = 𝟎. 𝟐𝟓𝟓𝟒𝝉𝟏
𝒙̇ 𝟏 𝟎 𝟏 𝟎 𝟎 𝟎 𝟎 𝒙𝟏 𝟎
𝒙̇ 𝟐 −𝟎. 𝟎𝟗𝟏𝒙𝟔 𝟎 𝟎 𝟎 𝟎 −𝟎. 𝟎𝟗𝟏𝒙𝟏 𝒙𝟐 𝟎. 𝟎𝟓𝟒
𝒙̇ 𝟑 𝟎 𝟎 𝟎 𝟏 𝟎 𝟎 𝒙𝟑 𝟎
= = 𝒙 +
𝒙̇ 𝟓 𝟎 𝟎 −𝟐. 𝟔𝟕 𝟎 𝟎 𝟎 𝟒 𝟎
𝒙̇ 𝟔 𝟎 𝟎 𝟎 𝟎 𝟏 𝟎 𝒙𝟓 𝟎
[𝒙̇ 𝟕 ] [ 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 ] [ 𝒙 𝟔 ] [ 𝟎. 𝟐𝟓𝟓 ]
Q (14)
K B
X (t)
M
Applying Newton’s law of motion, the force equation of the system is.
𝒅𝟐 𝑿 𝒅𝒙
𝑀 𝟐 + 𝑩 + 𝒌𝒎 = 𝟎
𝒅𝒕 𝒅𝒕
𝑀𝑥̈ + 𝑩𝒙̇ + 𝒌𝒙 = 𝟎
16
The position of the mass is x, the velocity of the mass is x, the acceleration of the mass is x.
Expressing the system mass “first order” derivatives the equation becomes.
𝑀𝑉̇ + 𝑏𝑣 + 𝑘𝑥 = 0
𝒙̇ = 𝑉
1
𝒗̇ = − 𝑀 (𝒃𝒗 + 𝒌𝒙)
And when thinking of UDES ‘states equation equal integrator block’ in simulink
Add one integrator block per state, level the input and output here are the two integrators for the
mass – damper system.
𝑋𝑑 = 𝑉 𝑥̇ = 𝑋𝑑
1
𝑉𝑑 = − (𝑏𝑉 + 𝐾𝑥) 𝑉̇ = 𝑉𝑑
𝑀
Integrator1
𝑋𝑑 𝑋
1
𝑆
Integrator 2
𝑉𝑑 𝑉
1
𝑆
Connecting the terms to form the system connecting the output of the velocity integrator to the
input of the position integrator
𝑉𝑑
1 1
𝑆 𝑉 𝑆 𝑥
Integrator 2 Integrator 1
17
Aligning the integrators shows that it is a second order system.
Gains and sum block are added to the diagram and the terms are linked up.
−1
+ 𝑀 𝑉𝑑
1 𝑉 1 𝑥
𝑆 𝑆
+ 𝑏
𝑏𝑉
𝑏𝑉 𝑘
𝑘𝑥
Modeling differential equations required initial conditions for the states in order to stimulate the
initial states / condition are set in the integral blocks.
In our mass - spring - damper system, these are the initial values for the velocity, V and position
x at time o.
The ODE SOVLES (ODE 23 and ODE 45) for medium accuracy or high accuracy computer the
derivative at time zero using these initial conditions and then propagate the system forward in
time.
Summarily, using Matlab / simulink a non – liner system can be simulated using the following
steps.
18
Q15a)
(1) An experiment is designed to collect input-output data from the process to be identified.
(2) Examination and Polish of data is done to remove trends and outliers, and useful portions of
the original data is selected, to enhance important frequency ranges filtering is applied.
(3) A model structure is defined and selected. (a set of candidate system descriptions) within which
a model is to be found).
(4) According to the input-output data and a given criterion of fit, the best model in the model
structure is computed.
(5) Examine the obtained model’s properties, If the model is good enough then stop; otherwise go
back to Step 3 to try another model set. Possibly also try other estimation methods (Step 4) or work
further on the input-output data (Steps 1 and 2).
𝒁−𝒏 ⇋ (𝒌 − 𝒏)
19
The above Equation is then arranged in a regression equation form as follows:
𝒚 (𝒌) =
𝒂𝟏
.
.
.
𝒂𝒏
[𝒚(𝒌 − 𝟏) 𝒚(𝒌 − 𝟐) … 𝒚 (𝒌 − 𝒏)
⏟ 𝒖(𝒌) 𝒖(𝒌 − 𝟏) … 𝒖 (𝒌 − 𝒏)] 𝒃 … … … … … … … … . .∗
𝝋𝑻 (𝒌) .𝟏
..
.
[⏟
𝒃𝒏 ]
̂
𝜽
̂ (𝒌)
̂(𝒌) = 𝝋𝑻 (𝒌)𝜽
=𝒚
̂ (𝒌) Is determined such that the output calculated from the right – hand side of Equation (*),
𝜽
which is 𝒚̂(𝒌) = ∅𝑻 (𝒌)𝜽 ̂ (𝒌) , marches as closely as possible with the measured y (k) in the sense
of lease squares. This is done by minimizing.
̂(𝒌) → 𝒓𝒆𝒔𝒊𝒅𝒖𝒂𝒍
𝑬(𝒌) = 𝒚(𝒌) − 𝒚
𝟏
𝑱 = 𝟐 ∑𝑵
𝒌=𝟏[𝑬(𝒌)]
𝟐
𝟏
𝑱= ̂ (𝒌)]𝟐
[𝒚(𝒌) − 𝝋𝑻 (𝒌)𝜽
𝟐
J Equation is minimized by expanding the quadratic function, finding its derivative and equating
it to zero to find the minimum point.
𝜹𝑱
̂ (𝒌)]𝟏
= −𝝋𝑻 . [𝒚(𝒌) − 𝝋𝑻 (𝒌)𝜽
𝜹𝜽̂
𝜹𝑱
=𝟎
𝜹𝜽̂
̂ (𝒌) = 𝝋𝑻 𝒚(𝒌)
-𝝋𝑻 (𝒌)𝝋(𝒌)𝜽
20
Q16.
𝒚(𝒌) = 𝒂𝒙(𝒌) + 𝒃. 𝟏
𝒙(𝟏) 𝟏 𝟏 𝟏
𝝋 = [𝒙(𝟐) 𝟏] = [𝟏. 𝟔 𝟏]
𝒙(𝟑) 𝟏 𝟑. 𝟒 𝟏
𝟏 𝟏
𝟏 𝟏. 𝟔 𝟑. 𝟒 𝟏𝟓. 𝟏𝟐 𝟔
𝝋𝑻 . 𝝋 = [ ] [𝟏. 𝟔 𝟏] = [ ]
𝟏 𝟏 𝟏 𝟔 𝟑
𝟑. 𝟒 𝟏
𝟎. 𝟑𝟐𝟏 −0. 𝟔𝟒𝟏
(𝝋𝑻 . 𝝋)−𝟏 = [ ]
−𝟎. 𝟔𝟒𝟏 𝟏. 𝟔𝟏𝟓
𝟏. 𝟐
𝑻 𝟏 𝟏. 𝟔 𝟑. 𝟒 𝟏𝟐. 𝟕𝟐
𝝋 . 𝒀(𝟑) = [ ] [𝟐. 𝟏] = [ ]
𝟏 𝟏 𝟏 𝟓. 𝟕
𝟐. 𝟒
The cost function of the linear system can be calculated with the formulae;
𝟏 𝑻
𝑱= 𝑬 (𝒌)𝑬(𝒌)
𝟐
̂
𝑬 = 𝒀(𝟑) − 𝝋𝜽
𝟏. 𝟐 𝟏 𝟏 −𝟎. 𝟐𝟖
𝟎. 𝟒𝟑𝟗
𝑬(𝒌) = [𝟐. 𝟏] − [𝟏. 𝟔 𝟏] [ ] = [ 𝟎. 𝟑𝟔𝟐 ]
𝟏. 𝟎𝟓
𝟐. 𝟒 𝟑. 𝟒 𝟏 −𝟎. 𝟏𝟏𝟐
𝟏 −𝟎. 𝟐𝟖
𝑱= [−𝟎. 𝟐𝟖 𝟎. 𝟑𝟔𝟐 −𝟎. 𝟏𝟏𝟐] [ 𝟎. 𝟑𝟔𝟐 ] = 𝟎. 𝟏𝟏𝟏
𝟐
−𝟎. 𝟏𝟏𝟐
21
ii)
𝒂 𝟏. 𝟐
̂ = [𝒃],
𝜽 𝝋𝑻 (𝒌) = [𝒙𝟐 (𝒌) 𝒙(𝒌) 1], 𝒚(𝒌) = [𝟐. 𝟏]
𝒄 𝟐. 𝟒
𝒙𝟐 (𝟏) 𝒙(𝟏) 𝟏 𝟏 𝟏 𝟏
𝝋 = [ 𝒙𝟐 (𝟐) 𝒙(𝟐) 𝟏] = [ 𝟐. 𝟓𝟔 𝟏. 𝟔 𝟏]
𝒙𝟐 (𝟑) 𝒙(𝟑) 𝟏 𝟏𝟏. 𝟓𝟔 𝟑. 𝟒 1
22
The cost function of the quadratic system can be calculated with the formulae;
1 𝑇
𝐽= 𝐸 (𝑘)𝐸(𝑘)
2
𝐸 = 𝑌(𝑘) − 𝜑𝜃̂
1 0.0051
𝐽= [0.0051 −0.0598 −0.3097] [−0.0598] = 0.049 ≅ 0.05
2
−0.3097
Conclusion: Comparing the cost function of both if linear and if quadratic function, it clearly
shows that the quadratic model represent the data more accurately than the linear model
23