2.1. INTRODUCTORY EXAMPLES: PENDULUM PROBLEMS 27
vertical reference set to a zero value. Hence, the control structure may be
redrawn as shown in Figure 2.8. The force applied to the cart is added as an
impulse disturbance.
Figure 2.8. Modified control structure
From the modified control structure, we can obtain the closed-loop transfer
function that relates the output with the disturbance input. Referring to Figure
2.8,
E(s)=D(s)−Gc(s)Y(s)
and
Y(s)=Gp(s)E(s)
Therefore,
Y(s)
D(s)
=
Gp(s)
[1 +Gp(s)Gc(s)]
Defining the transfer function of the PID controller
Gc(s)=
Nc(s)
Dc(s)
and using
Gp(s)=
Np(s)
Dp(s)
we can write the transfer function as
Y(s)
D(s)
=
Np(s)
Dp(s)
[1 +DNcc((ss))NDpp((ss))]
=
Np(s)Dc(s)
[Dc(s)Dp(s)+Nc(s)Np(s)]
Since the transfer function for the PID controller is
Gc(s)=
°
s^2 KD+sKP+KI
¢
s
=
Nc(s)
Dc(s)
and the transfer function of the inverted pendulum with a cart is
Gp(s)=
4. 5455
s^3 +0. 1818 s^2 − 31. 1818 s− 4. 4545
=
Np(s)
Dp(s)