Automation Model and Control Lab 2023 B
Automation Model and Control Lab 2023 B
Inverted pendulum
Figure 1
1 System model
a. Dynamic model:
I θ̈ = mgl sin θ − cθ̇ + τ (1)
Model linearization:
∂f
f¯(θ) = f (θ0 ) + (θ − θ0 ) (2)
∂θ θ=θ0
Define:
θ̇ θ
Ẋ = X= Y =θ (5)
θ̈ θ̇
The state space equations are:
θ̇ 0 1 θ 0
Ẋ = = mgl + 1 τ (6)
θ̈ I − Ic θ̇ I
θ
Y = 1 0 (7)
θ̇
1
b.
The transfer function of the system can be obtained by this equation where I is the unit matrix:
After multiply the matrices we get the G system (Notice - here I represent the inertia moment)
1
Gsystem = (9)
Is2 + cs − mgl
The transfer function of the motor and sensor (given in the question):
Gcontroller = Kp (12)
p K K
θ(s) Gsystem GControl Gmotor I
H= = = K K mgl
(13)
θd (s) 1 + Gsystem GControl Gmotor 2 c
s + I s + pI − I
c. System parameters:
N msec
m = 13.5 gram l = 10 cm c = 3 · 10−3 I = ml2
rad
Design requirements:
O.S. ≤ 20%
− ln (0.2)
ζ≥p = 0.45
π 2 + ln (0.2)2
Choosing ζ = 0.5
Finding ωn :
c
ωn = = 22.22 (14)
2Iζ
2
Now finding kp :
Iωn2 + mgl
Kp = = 0.4 (15)
K
rad m
[Iωn2 ] = [kg · m2 ][ ] = N mrad=N
˜ m [mgl] = [kg][ ][m] = N m
s2 s2
V
[u] = [Kp ] · [e] → [Kp ] = =V
rad
V · sec
[u] = [Kd ] · [ė] → [Kd ] = = V · sec
Z rad
V V
[u] = [Ki ] · [ edt] → [Kd ] = =
rad · sec sec
Nm
[K] =
V
Nm
[Kp ] = N m = V
V
The steady-state error is:
1 Kp K
ess,P = 1 − lim sH(s) =1− = −0.2 rad (16)
s→0 s Kp K − mgl
1
Gsystem = (17)
Is2
+ cs − mgl
Gmotor = K = 1/5 (18)
Gsensor = 1 (19)
Gcontroller = Kp + kd s (20)
K
θ(s) Gsystem GControl Gmotor I (Kp + Kd s)
H= = = 2 1 (21)
θd (s) 1 + Gsystem GControl Gmotor s + I (c + Kd K)s + I1 (Kp K − mgl)
c. Design requirements:
O.S. ≤ 20%
3
N msec
[Kd ] = Nm
= V sec
V
1
(Kp K − mgl) = ωn2 (23)
I
Iωn2 + mgl
Kp =
K
1
|ess,P D |=
|ess,P | (24)
2
1 Kp K 1
ess,P D = 1 − lim sH(s) = 1 − = |ess,P | (25)
s→0 s Kp K − mgl 2
Kp K 1
|1 − |= |−0.2|= 0.1
Kp K − mgl 2
Kp K − mgl − Kp K −mgl
| |= | |= 0.1
Kp K − mgl Kp K − mgl
1.1mgl
Kp = = 0.73
0.1K
Kp K − mgl
ωn2 = → ωn = 31.3
I
2ζωn I − c
kd = = 0.0061
K