252
6 Hierarchical Component Models
Fig. 6.59 Physical model of
an inverted pendulum
As a result, a term appears corresponding to the generalized force:
Q ext = −
∂ R
∂ ˙
x
And finally, we take into account the external control action f. Performing transformations similar to those that we did to construct the model of an elliptic pendulum,
we obtain a mathematical model of an inverted pendulum
(M + m) ¨
x − ml ¨
ϕ cos ϕ + ml ˙
ϕ
2 sin ϕ + b ˙
x = f
l ¨
ϕ − g sin ϕ − ¨
x cos ϕ = 0
The basics of modeling a PID controller were described in Example 6.1. We
already know that the output signal of the controller u is determined by three terms:
u(t) = P + I + D = K p e(t) + K i
t
0
e(τ )dτ + K d
de
dt
where K p , K i , K d are the gain factors of the proportional, integrating, and differentiating components of the controller, respectively. We assume that the vertical position
of the pendulum is ϕ 0 = 0, and for the error, we take the deviation of the pendulum
from the vertical e(t) = (ϕ 0 − ϕ).
For the PID controller, we obtain the following system of equations:
e(t) = (ϕ 0 − ϕ)
u(t) = K p P + K i I + K d D
P = e(t)
6 Hierarchical Component Models
Fig. 6.59 Physical model of
an inverted pendulum
As a result, a term appears corresponding to the generalized force:
Q ext = −
∂ R
∂ ˙
x
And finally, we take into account the external control action f. Performing transformations similar to those that we did to construct the model of an elliptic pendulum,
we obtain a mathematical model of an inverted pendulum
(M + m) ¨
x − ml ¨
ϕ cos ϕ + ml ˙
ϕ
2 sin ϕ + b ˙
x = f
l ¨
ϕ − g sin ϕ − ¨
x cos ϕ = 0
The basics of modeling a PID controller were described in Example 6.1. We
already know that the output signal of the controller u is determined by three terms:
u(t) = P + I + D = K p e(t) + K i
t
0
e(τ )dτ + K d
de
dt
where K p , K i , K d are the gain factors of the proportional, integrating, and differentiating components of the controller, respectively. We assume that the vertical position
of the pendulum is ϕ 0 = 0, and for the error, we take the deviation of the pendulum
from the vertical e(t) = (ϕ 0 − ϕ).
For the PID controller, we obtain the following system of equations:
e(t) = (ϕ 0 − ϕ)
u(t) = K p P + K i I + K d D
P = e(t)
