I *finally* figured out how to bend Matlab to my will, and close a very simple oplev loop using LQR technology.
This is super, super simple, but it's a step in the right direction. There is no noise, just a simple pendulum with a resonant frequency of 0.75Hz, and a Q of 10. The LQR tries to keep the position of the pendulum at a minimum, and does not care at all about the velocity. You cannot (with Matlab's LQR, at least that I can find) make it care "0" about the control output, so it cares about the control output a factor of 1e-4 as much as the position.
Here are some plots:
The first plot has the open loop system (just the pendulum, no control at all), as well as the closed loop system (the pendulum under control).

Plot 2 is the open loop gain of the controller that the LQR designed.

Plots 3 and 4 are the step and impulse responses of the open loop (pendulum with no control), and closed loop (pendulum with feedback) systems.


The conclusion from the plots (if this were an interesting system) is that it doesn't take much to damp an ideal pendulum. The real conclusion here is that I think I now know how to use the Matlab LQR function, and can make a loop with some noise now. |