Hacker News new | ask | show | jobs
by jcims 2223 days ago
I'm a PID newbie and am wondering if it's the right way to go for a hobby project. My control variable (heat input) and process variable (volume of vapor output) have a fairly laggy and non-linear relationship due to changing mass and composition of working fluid and phase change. Proportional just kind of runs out of steam (har har) near the set point presumably b/c of the non-linearity, and that plus lag really messes with the integral tuning (i basically need two different values for when pv is under or over the setpoint).

Should i keep tinkering or try something different (maybe multiple loops or something?) What's next after PID?

Also this is an ambient pressure system with multiple safety precautions to ensure it stays that way.

1 comments

PID is popular because it has only three tunable parameters, and you can kind of just turn the knobs until it works. :-)

For a more systematic design, construct a simple mathematical model of your plant. If nothing else, this will allow you to run faster-than-realtime simulations to experiment with parameters. (Thermal time constants are typically annoyingly slow to fiddle with in real time.)

Simulink is an ideal tool for this, but you can just as well use Python or C++. One way to do it is to structure your model as a differential equation and then use a solver to integrate it.

There are several typical lines of attack. Write the plant either as a transfer function and then think about poles and zeros. Write it as coupled first-order linear differential equations and think about state space.

"Feedback systems: An intro for scientists and engineers" by Åstrom and Murray is a popular introductory text. "Feedback control of dynamic systems" by Franklin and Powell is a superb, slightly more advanced college textbook. (The current edition is wildly expensive but older editions are just as good and nearly free.) I also like "Control System Design: An Intro to State-Space Methods" by Friedland (an inexpensive paperback published by Dover).

This is awesome and has got a few ideas flowing already (and a few terms to google). Not only are the simulations faster, i can mess around with them whenever i feel like it. Setting up the 'real deal' is a weekend affair. Fidelity of any simulation i put together will be very questionable for a while but at least it can help me understand how the parameters affect the response.

I really appreciate it! Thanks!