Two computer programs were written to aid in the selection of feedback control values.
The first program, ACKERMAN, calculates the control vector K given the desired pole
positions using Ackerman's formula. The second program, PENDULUM, does the reverse;
it calculates the pole positions given a control vector K.
Control of the Pendulum
Various values of the control vector K were obtained using program ACKERMAN.
The final control vector used was X = 3.5,
= 7.0,
= 25.0,
= 3.0 Using these values the poles were calculated to be at 0.752
0.382j, 0.929, 0.982
Using these values the pendulum remained upright with the cart slowly oscillating
back and forth covering a distance of about 25 cm. The cart was run for a period
of 2 minutes and showed no signs of instability.
Analysis of the Results
In a final effort to justify the endless hours spent in deriving a theoretical
analysis of the pendulum system, it is gratifying to be able to sit back and say
IT WORKS!
(If you've been paying attention you may have noticed that two of the poles
were at 0.929 and 0.982, which is pretty close to being unstable. The reason
is I initially made a mistake calculating the control values because I
used the full length of the rod for
when
was originally defined as 1/2 the length of the rod. Recalculating
using the correct value for
gave the true poles.)