Re:Show HN: 2D PID controller simulation
by ambrop7 on Saturday May 02, 2015 @11:33AM
(#9477420)
I'm curious, is there any configuration of the PID parameters that would achieve optimal control for this simple physical system? I suppose the optimum looks like 100% thrust and switching to -100% thrust at just the right time to stop at the target position.
[ Parent
| on HN ]
Yes. Reformulate the systems transfer function into a state space representation, and then solve the algebraic ricatti equation to find an optimal gain matrix. This is know and the LQR problem.
http://en.m.wikipedia.org/wiki/Linear-quadratic_regulator
Switching the output from 100% to -100% is another viable approach, known as bang-bang control, but it is not necessarily optimal
slightly relevant: I've just built a lighting desk that uses motorised faders for some of the control input. To get the PID values for the faders I built a genetic algorithm tool that would evolve the right numbers. Worked a treat but the first half hour of running had the fader slamming about like nobody's business: I burnt one out during testing... But the really interesting thing I found was that you really need a genetic algorithm tool to evolve the correct set of parameters for the goodness function: different goodness functions produced different results in different timeframes.
I've used desks with motorized faders! (and spent a couple days a week in high school running, maintaining, and programming a small half million dollar lighting setup for a big theater. ) Recently I've done some firmware programming on for theatrical/stage LEDs.
All this to say, did you ever consider writing a test sequence of various position and rate changes, and then analyze the actual vs commanded data offline to get an equation for the response? I've had some success doing that for a similar control problem.