News for hackers. Stuff that matters.
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.
Re:Show HN: 2D PID controller simulation by agoetz on Saturday May 02, 2015 @12:36PM (#9477611)
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

Re:Show HN: 2D PID controller simulation by niccl on Saturday May 02, 2015 @05:12PM (#9478593)
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.
Re:Show HN: 2D PID controller simulation by danielvf on Saturday May 02, 2015 @10:50PM (#9479597)
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.

Re:Show HN: 2D PID controller simulation by Matumio on Saturday May 02, 2015 @12:40PM (#9477623)
For some definition of "optimal". I expect you can reach the "5% deviation from target" region much faster if you allow a bit of overshoot.