You are on page 1of 32

TUTORIAL 1

BEEE2364
CONTROL PRINCIPLES

HAFEZ JTKEK FTKEE


Question 1
Find the Laplace transform of the following expression
𝑦 𝑡 = 6𝑡 3 − 5𝑒 −2𝑡 cos 2𝑡 𝑢(𝑡).

Solution:
LT 3! 3∙2∙1 36
6𝑡 3 6 =6 =
𝑠 3+1 𝑠4 𝑠4

LT 𝑠 𝑠
cos 2𝑡 =
𝑠 2 +22 𝑠 2 +4

LT 𝑠+2 𝑠+2
5𝑒 −2𝑡 cos 2𝑡 5 =5
(𝑠+2)2 +4 𝑠 2 +4𝑠+8

36 𝑠+2
∴𝑌 𝑠 = −5
𝑠4 𝑠 2 +4𝑠+8

HAFEZ JTKEK FTKEE


Question 2
Given the following differential equation, solve for 𝑦 𝑡 if all initial
conditions are zero. Use the Laplace transform.
𝑑 2 𝑦(𝑡) 𝑑𝑦(𝑡)
+ 12 + 32𝑦 𝑡 = 32𝑢(𝑡).
𝑑𝑡 2 𝑑𝑡

Solution:
#1. Find Laplace transform of the equation and solve for 𝑌 𝑠
32
𝑠 2 𝑌 𝑠 + 12𝑠𝑌 𝑠 + 32𝑌 𝑠 =
𝑠

32
𝑠 2 + 12𝑠 + 32 𝑌 𝑠 =
𝑠

32 32
𝑌 𝑠 = =
𝑠 𝑠 2 +12𝑠+32 𝑠(𝑠+4)(𝑠+8)

HAFEZ JTKEK FTKEE


Question 2 (Cont.)
Solution (Cont.):
#2. Find the partial-fraction expansion of 𝑌 𝑠
32 𝐴 𝐵 𝐶
𝑌 𝑠 = = + +
𝑠(𝑠+4)(𝑠+8) 𝑠 𝑠+4 𝑠+8

32
𝐴= | =1
(𝑠+4)(𝑠+8) 𝑠=0

32
𝐵= | = −2
𝑠(𝑠+8) 𝑠=−4

32
𝐶= | =1
𝑠(𝑠+4) 𝑠=−8

1 2 1
𝑌 𝑠 = − +
𝑠 𝑠+4 𝑠+8

HAFEZ JTKEK FTKEE


Question 2 (Cont.)
Solution (Cont.):
#3. Find inverse Laplace transform of 𝑌 𝑠 to get 𝑦(𝑡)
1 2 1
𝑌 𝑠 = − +
𝑠 𝑠+4 𝑠+8

1 ILT
𝑢(𝑡)
𝑠

2 ILT
2𝑒 −4𝑡 𝑢(𝑡)
𝑠+4

1 ILT
𝑒 −8𝑡 𝑢(𝑡)
𝑠+8

∴ 𝑦 𝑡 = (1 − 2𝑒 −4𝑡 + 𝑒 −8𝑡 )𝑢(𝑡)

HAFEZ JTKEK FTKEE


Question 3
3
Find inverse Laplace transform of 𝐹 𝑠 = .
𝑠 2 (𝑠 2 +2𝑠+5)

Solution:
#1. Find the partial-fraction expansion of 𝐹 𝑠
3 3
𝐹 𝑠 = =
𝑠 2 (𝑠 2 +2𝑠+5) 𝑠 2 (𝑠+1+𝑗2)(𝑠+1−𝑗2)

𝐴 𝐵 𝐶 𝐷
= + + +
𝑠2 𝑠 𝑠+1+𝑗2 𝑠+1−𝑗2

1 3 3
𝐴= |𝑠=0 =
0! 𝑠 2 +2𝑠+5 5

HAFEZ JTKEK FTKEE


Question 3 (Cont.)
Solution (Cont.):
1 𝑑 3 𝑑
𝐵= |𝑠=0 = 3 (𝑠 2 + 2𝑠 + 5)−1 |𝑠=0
1! 𝑑𝑠 𝑠 2 +2𝑠+5 𝑑𝑠

3 2𝑠+2 6
= − 2 |𝑠=0 = −
(𝑠 +2𝑠+5)2 25

3 3 3 2+𝑗 3
𝐶= | = − = − = − (2 + 𝑗)
𝑠 2 (𝑠+1−𝑗2) 𝑠=−1−𝑗2 4 2−𝑗 4 2−𝑗 2+𝑗 20

3 3 3 2−𝑗 3
𝐷= | =− =− =− (2 − 𝑗)
𝑠 2 (𝑠+1+𝑗2) 𝑠=−1+𝑗2 4 2+𝑗 4 2+𝑗 2−𝑗 20

3 1 6 1 3 2+𝑗 2−𝑗
𝐹 𝑠 = − − +
5 𝑠2 25 𝑠 20 𝑠+(1+𝑗2) 𝑠+(1−𝑗2)

HAFEZ JTKEK FTKEE


Question 3 (Cont.)
Solution (Cont.):
#2. Find inverse Laplace and simplify the equation
3 1 6 1 3 2+𝑗 2−𝑗
Recall 𝐹 𝑠 = − − + . Thus ILT
5 𝑠2 25 𝑠 20 𝑠+(1+𝑗2) 𝑠+(1−𝑗2)

3 6 3
𝑓 𝑡 = 𝑡 − − 2 + 𝑗 𝑒 (−1−𝑗2)𝑡 + (2 − 𝑗)𝑒 (−1+𝑗2)𝑡 𝑢(𝑡)
5 25 20
3 6 3
=
5
𝑡 − 25 − 20 2 + 𝑗 𝑒 −𝑡 𝑒 −𝑗2𝑡 + (2 − 𝑗)𝑒 −𝑡 𝑒 𝑗2𝑡 𝑢(𝑡)
3 6 3
=
5
𝑡 − 25 − 20 𝑒 −𝑡 2 + 𝑗 𝑒 −𝑗2𝑡 + (2 − 𝑗) 𝑒 𝑗2𝑡 𝑢(𝑡)
3 6 3 −𝑡
= 𝑡 − − 𝑒 2 𝑒 −𝑗2𝑡 + 𝑒 𝑗2𝑡 − 𝑗 𝑒 𝑗2𝑡 − 𝑒 −𝑗2𝑡 𝑢(𝑡)
5 25 20

3 6 3 𝑒 𝑗2𝑡 + 𝑒 −𝑗2𝑡 𝑒 𝑗2𝑡 − 𝑒 −𝑗2𝑡


= 𝑡 − − 𝑒 −𝑡 4 +2 𝑢(𝑡)
5 25 20 2 𝑗2
HAFEZ JTKEK FTKEE
Question 3 (Cont.)
Solution (Cont.):

3 6 3 𝑒 𝑗2𝑡 + 𝑒 −𝑗2𝑡 𝑒 𝑗2𝑡 − 𝑒 −𝑗2𝑡


Recall: 𝑓 𝑡 = 𝑡 − − 𝑒 −𝑡 4 +2 𝑢(𝑡)
5 25 20 2 𝑗2

Euler formula

3 6 3
𝑓 𝑡 = 𝑡 − − 𝑒 −𝑡 4cos 2𝑡 + 2sin 2𝑡 𝑢 𝑡
5 25 20

3 6 3 1
= 𝑡 − − 𝑒 −𝑡 cos 2𝑡 + sin 2𝑡 𝑢(𝑡).
5 25 5 2
HAFEZ JTKEK FTKEE
Question 4
Find the transfer function of the electrical network circuit below. Choose
𝑣𝑖 (𝑡) as the input and 𝑣𝑜 (𝑡) as the output.

HAFEZ JTKEK FTKEE


Question 4 (Cont.)
Solution:
#1. Convert to frequency domain

HAFEZ JTKEK FTKEE


Question 4 (Cont.)
Solution (Cont.):
#2. Obtain two voltage equations (KVL) for the two loops

Procedure:
1. Sum impedances
around the respective
loop.
Loop 1: 2 I1 (s) − 2 I2 (s) = Vi (s) 2. Minus impedances
share with other loops
1
Loop 2: − 2 I1 s + 2 + 2s + I2 (s) = 0
2s
HAFEZ JTKEK FTKEE
Question 4 (Cont.)
Solution (Cont.):
#2. Obtain two voltage equations (KVL) for the two loops (Cont.)

Recall:
Loop 1: 2 I1 (s) − 2 I2 (s) = Vi (s)
1
Loop 2: − 2 I1 s + 2 + 2s + I2 (s) = 0
2s

In matrix form:

2 −2
1 𝐼1 (𝑠) = Vi (s)
−2 2 + 2𝑠 + 𝐼 (𝑠) 0
2𝑠 2
HAFEZ JTKEK FTKEE
Question 4 (Cont.)
Solution (Cont.):
#3. Find the transfer function
𝑉𝑜 𝑠
Transfer function .
𝑉𝑖 𝑠

1
From the circuit, 𝑉𝑜 𝑠 = 𝐼 (𝑠).
2𝑠 2
2 −2
Thus solve for 𝐼2 (𝑠) first. 1 𝐼1 (𝑠) = Vi (s)
−2 2 + 2𝑠 + 𝐼 (𝑠) 0
2𝑠 2
2 Vi (s)
−2 0 0−(−2Vi s ) 2 𝑠 Vi s
𝐼2 𝑠 = 2 −2 = 1 = 4𝑠 2 +1
1 2 2+2s+2s −(−2)(−2)
−2 2+2𝑠+2𝑠

1 2 𝑠 Vi s 𝑉𝑜 𝑠 1
𝑉𝑜 𝑠 = ⇒ =
2𝑠 4𝑠 2 +1 𝑉𝑖 𝑠 4𝑠 2 +1
HAFEZ JTKEK FTKEE
Question 5
Find the state-space representation of the electrical network circuit
𝑖𝐿
below. Choose 𝑣𝑖 (𝑡) as the input, 𝑣𝑜 (𝑡) as the output, and 𝑥 = as
𝑣𝑐
the state vector.

HAFEZ JTKEK FTKEE


Question 5 (Cont.)
Solution:
#1. Obtain voltage equation for the inductor and current equation for
the capacitor and write the derivative of the state-variables.

𝑑𝑖𝐿 𝑑𝑖𝐿 1 1 1 1
𝑣𝐿 = 𝐿 = 𝑣𝑖 − 𝑣𝐶 ⇒ = − 𝑣𝐶 + 𝑣𝑖 = − 𝑣𝐶 + 𝑣𝑖
𝑑𝑡 𝑑𝑡 𝐿 𝐿 2 2

𝑑𝑣𝐶 𝑑𝑣𝐶 1 1
𝑖𝐶 = 𝐶 = 𝑖𝐿 ⇒ = 𝑖 = 𝑖
𝑑𝑡 𝑑𝑡 𝐶 𝐿 2 𝐿
HAFEZ JTKEK FTKEE
Question 5 (Cont.)
Solution (Cont.):
#2. Write state-space representation
General state-space representation: 𝑥ሶ = 𝐴𝑥 + 𝐵𝑢, 𝑦 = 𝐶𝑥 + 𝐷𝑢
𝑑𝑖𝐿
𝑖𝐿 𝑑𝑡
Given 𝑥 = , 𝑢 = 𝑣𝑖 , and 𝑦 = 𝑣𝑜 . Thus 𝑥ሶ = .
𝑣𝑐 𝑑𝑣𝐶
𝑑𝑡
Recall:
𝑑𝑖𝐿 1 1
= − 𝑣𝐶 + 𝑣𝑖
𝑑𝑡 2 2
𝑑𝑣𝐶 1
= 𝑖𝐿
𝑑𝑡 2

Thus the state equation is given by


𝑑𝑖𝐿 1
0 − 𝑖𝐿 1
𝑑𝑡 2
= + 2 𝑣𝑖
𝑑𝑣𝐶 1
0 𝑣𝐶 0
𝑑𝑡 2
HAFEZ JTKEK FTKEE
Question 5 (Cont.)
Solution (Cont.):
#2. Write state-space representation (Cont.)

The output is given by y = 𝑣𝑜 = 𝑣𝐶 .


Thus the output equation given by
𝑖𝐿
𝑦= 0 1
𝑣𝐶

Therefore the matrices are given by


1
0 − 1
2
𝐴= 1 , 𝐵= 2 , 𝐶= 0 1, 𝐷=0
0 0
2

HAFEZ JTKEK FTKEE


Question 6
Find the transfer function from state-space representation of the
electrical network circuit below. Choose 𝑣𝑖 (𝑡) as the input, 𝑣𝑜 (𝑡) as the
𝑖
output, and 𝑥 = 𝐿 as the state vector.
𝑣𝑐

HAFEZ JTKEK FTKEE


Question 6 (Cont.)
Solution:
To find transfer function from state-space representation, the following
formula is used
𝐺 𝑠 = 𝐶 𝑠𝐼 − 𝐴 −1 𝐵 +𝐷

From the solution of Question 5, it is found out that


1
0 − 1
2
𝐴= 1 , 𝐵= 2 , 𝐶 = 0 1 , 𝐷 = 0.
0 0
2

Thus
1 1
0 − 𝑠
𝑠 0 2 = 2
𝑠𝐼 − 𝐴 = −
0 𝑠 1 1
0 − 𝑠
2 2
HAFEZ JTKEK FTKEE
Question 6 (Cont.)
Solution (Cont.):
1 1
𝑠 −2 𝑠 −
2
1 1
adjoint(𝑠𝐼−𝐴) 𝑠 𝑠
−1 2
𝑠𝐼 − 𝐴 = = 1 = 2
1
determinant(𝑠𝐼−𝐴) 𝑠 𝑠2 +
2 4
1
− 𝑠
2
1
𝑠 −2
1 1
2
𝑠
𝐺 𝑠 = 𝐶 𝑠𝐼 − 𝐴 −1 𝐵 +𝐷 = 0 +0
1 1 2
𝑠 2 +4 0
1
1 𝑠
2
= 1 0 1 1
𝑠 2 +4
4
1
4 1
= 1 = (Similar with the answer of Question 4)
𝑠 2 +4 4𝑠 2 +1
HAFEZ JTKEK FTKEE
Question 7
Find the transfer function of the translational mechanical system below.
Choose 𝑥2 (𝑡) as the output.

HAFEZ JTKEK FTKEE


Question 7 (Cont.)
Solution:
#1. Draw the free-body diagram in frequency domain.

𝐾𝑋1 𝑠
𝑓𝑣2 𝑠𝑋2 𝑠
𝑓𝑣1 + 𝑓𝑣2 𝑠𝑋1 𝑠
𝐹(𝑠)
𝑀1 𝑠 2 𝑋1 𝑠

𝑓𝑣2 + 𝑓𝑣3 𝑠𝑋2 𝑠


𝑓𝑣2 𝑠𝑋1 𝑠
𝑀2 𝑠 2 𝑋2 𝑠

HAFEZ JTKEK FTKEE


Question 7 (Cont.)
Solution (Cont.):
#2. Write equations of motion

𝐾𝑋1 𝑠
𝑓𝑣2 𝑠𝑋2 𝑠 𝑓𝑣2 + 𝑓𝑣3 𝑠𝑋2 𝑠
𝑓𝑣1 + 𝑓𝑣2 𝑠𝑋1 𝑠 𝑓𝑣2 𝑠𝑋1 𝑠
𝐹(𝑠) 𝑀2 𝑠 2 𝑋2 𝑠
𝑀1 𝑠 2 𝑋1 𝑠

Mass 1: 𝑀1 𝑠 2 𝑋1 𝑠 + 𝑓𝑣1 + 𝑓𝑣2 𝑠𝑋1 𝑠 + 𝐾𝑋1 𝑠 − 𝑓𝑣2 𝑠𝑋2 𝑠 = 𝐹(𝑠)


Mass 2: 𝑀2 𝑠 2 𝑋2 𝑠 + 𝑓𝑣2 + 𝑓𝑣3 𝑠𝑋2 𝑠 − 𝑓𝑣2 𝑠𝑋1 𝑠 = 0
In matrix form:
𝑀1 𝑠 2 + 𝑓𝑣1 + 𝑓𝑣2 𝑠 + 𝐾 −𝑓𝑣2 𝑠 𝑋1 (𝑠) 𝐹(𝑠)
=
−𝑓𝑣2 𝑠 𝑀2 𝑠 2 + 𝑓𝑣2 + 𝑓𝑣3 𝑠 𝑋2 (𝑠) 0
HAFEZ JTKEK FTKEE
Question 7 (Cont.)
Solution (Cont.):
#3. Obtain transfer function
𝑋2 𝑠
Transfer function 𝐺 𝑠 = .
𝐹 𝑠

Solve for 𝑋2 𝑠
𝑀1 𝑠 2 + 𝑓𝑣1 +𝑓𝑣2 𝑠+𝐾 𝐹(𝑠)
−𝑓𝑣2 𝑠 0
𝑋2 𝑠 = 𝑀1 𝑠 2 + 𝑓𝑣1 +𝑓𝑣2 𝑠+𝐾 −𝑓𝑣2 𝑠
−𝑓𝑣2 𝑠 𝑀2 𝑠 2 + 𝑓𝑣2 +𝑓𝑣3 𝑠

2𝑠 2 +2𝑠+2 𝐹(𝑠)
−𝑠 0 𝑠𝐹(𝑠)
= 2 =
2𝑠 +2𝑠+2 −𝑠 2𝑠 4 +6𝑠 3 +5𝑠 2 +4𝑠
−𝑠 𝑠 2 +2𝑠

𝑋2 𝑠 𝑠
∴ =
𝐹 𝑠 2𝑠 4 +6𝑠 3 +5𝑠 2 +4𝑠
HAFEZ JTKEK FTKEE
Question 8
Find the state-space representation of the translational mechanical
system below. Choose 𝑥2 (𝑡) as the output.

HAFEZ JTKEK FTKEE


Question 8 (Cont.)
Solution:
#1. Draw the free-body diagram in time domain.

HAFEZ JTKEK FTKEE


Question 8 (Cont.)
Solution (Cont.):
#2. Write equations of motion

Mass 1: 𝑀1 𝑥ሷ 1 + 𝑓𝑣1 + 𝑓𝑣2 𝑥ሶ 1 + 𝐾𝑥1 − 𝑓𝑣2 𝑥ሶ 2 = 𝑓


Mass 2: 𝑀2 𝑥ሷ 2 + 𝑓𝑣2 + 𝑓𝑣3 𝑥ሶ 2 − 𝑓𝑣2 𝑥ሶ 1 = 0
Substituting the parameters:
Mass 1: 2𝑥ሷ 1 + 2𝑥ሶ 1 + 2𝑥1 − 𝑥ሶ 2 = 𝑓
Mass 2: 𝑥ሷ 2 + 2𝑥ሶ 2 − 𝑥ሶ 1 = 0
HAFEZ JTKEK FTKEE
Question 8 (Cont.)
Solution (Cont.):
#3. Define state-variables and rewrite equations of motion
Recall:
Mass 1: 2𝑥ሷ 1 + 2𝑥ሶ 1 + 2𝑥1 − 𝑥ሶ 2 = 𝑓
Mass 2: 𝑥ሷ 2 + 2𝑥ሶ 2 − 𝑥ሶ 1 = 0

Define the following state-variables to achieve first order DE.


𝑧1 = 𝑥1 ,
𝑧2 = 𝑧1ሶ = 𝑥ሶ 1 ,
𝑧ሶ2 = 𝑧1ሷ = 𝑥ሷ 1 ,
𝑧3 = 𝑥2 ,
𝑧4 = 𝑧ሶ3 = 𝑥ሶ 2 ,
𝑧ሶ4 = 𝑧ሷ3 = 𝑥ሷ 2 .
HAFEZ JTKEK FTKEE
Question 8 (Cont.)
Solution (Cont.):
#3. Define state-variables and rewrite equations of motion (Cont.)
New equations of motion:
Mass 1. 2𝑧ሶ2 + 2𝑧2 + 2𝑧1 − 𝑧4 = 𝑓 ⇒ 𝑧ሶ2 = −𝑧1 − 𝑧2 + 0.5𝑧4 + 0.5𝑓
Mass 2. 𝑧ሶ4 + 2𝑧4 + 𝑧3 − 𝑧2 = 0 ⇒ 𝑧ሶ4 = 𝑧2 − 𝑧3 − 2𝑧4
Recall
Rewrite all derivative of the state-variables: 𝑧1 = 𝑥1 ,
𝑧1ሶ = 𝑧2 , 𝑧2 = 𝑧1ሶ = 𝑥ሶ 1 ,
𝑧ሶ2 = −𝑧1 − 𝑧2 + 0.5𝑧4 + 0.5𝑓 𝑧ሶ2 = 𝑧1ሷ = 𝑥ሷ 1 ,
𝑧ሶ3 = 𝑧4 𝑧3 = 𝑥2 ,
𝑧ሶ4 = 𝑧2 − 𝑧3 − 2𝑧4 𝑧4 = 𝑧ሶ3 = 𝑥ሶ 2 ,
𝑧ሶ4 = 𝑧ሷ3 = 𝑥ሷ 2 .

HAFEZ JTKEK FTKEE


Question 8 (Cont.)
Solution (Cont.):
#4. Write state-space representation
Recall:
𝑧1ሶ = 𝑧2 ,
𝑧ሶ2 = −𝑧1 − 𝑧2 + 0.5𝑧4 + 0.5𝑓
𝑧ሶ3 = 𝑧4
𝑧ሶ4 = 𝑧2 − 𝑧3 − 2𝑧4

Thus the state equation is given by


𝑧1ሶ 0 1 0 0 𝑧1 0
𝑧ሶ2 −1 −1 0 0.5 𝑧2 0.5 𝑓
= +
𝑧ሶ3 0 0 0 1 𝑧3 0
𝑧ሶ4 0 1 −1 −2 𝑧4 0

HAFEZ JTKEK FTKEE


Question 8 (Cont.)
Solution (Cont.):
#4. Write state-space representation (Cont.) Recall
Given the output 𝑦 = 𝑥2 = 𝑧3 . 𝑧1 = 𝑥1 ,
𝑧2 = 𝑧1ሶ = 𝑥ሶ 1 ,
The output equation is given by 𝑧ሶ2 = 𝑧1ሷ = 𝑥ሷ 1 ,
𝑧1 𝑧3 = 𝑥2 ,
𝑧2 𝑧4 = 𝑧ሶ3 = 𝑥ሶ 2 ,
𝑦= 0 0 1 0 𝑧 .
3 𝑧ሶ4 = 𝑧ሷ3 = 𝑥ሷ 2 .
𝑧4

HAFEZ JTKEK FTKEE

You might also like