3 ms·
I gave you an example: a thermostat. It's amusingly common to try and apply PID control to these, and the replies to that parent comment highlight several super
by jcalvinowens 5y ago
I gave you an example: a thermostat. It's amusingly common to try and apply PID control to these, and the replies to that parent comment highlight several superior alternatives, both in terms of simplicity and optimality.
Simplicity is hard to quantify, but it's one of the most important properties of robust and reliable systems. That's not vapid at all: that's engineering.
- srean 5y agoIf thermostats are indeed better why doesnt chemical industry use thermostats to control the temperature of the reagents. PID seems to rule the roost there. What problems does a PID face in comparison to thermostat. Does bang bang track the set point better (in terms of some quantifiable error) than a tuned PID ? I would be surprised if missile guidance, drone guidance use bang bang. My hunch would be they use something more sophisticated than PID. Same for something more banal like cruise control in a car set to some cruising speed.
- jcalvinowens 5y agoPID requires very fragile tuning, and that makes it generally inferior to anything that doesn't. > If thermostats are indeed better why doesnt chemical industry use non-PID to control the temperature of the reagents. PID seems to rule the roost there. For the same reason they still use constant speed compressors: it's how it has been done forever, it's good enough, and all the equipment still works. We know better now, we build new ones with VFDs. I'm not saying "let's tear down everything using PID and rewrite it", it obviously works. But if you're writing new code using PID, you're probably wrong.
- srean 5y agoIf you are going to sell me a bang-bang controller for cruise control of a mini car or a trajectory tracking of welding robots, or automated gun/fire control to track a moving target while firing at the same time, blaming the lack of bang bang on institutional inertia, then I unfortunately have to call you out for speaking through a hat. Bang-bangs are just not smooth enough and does not give enough control over tracking. With tuning, PID can at least perform within the desired smoothness envelop. PID have been surprisingly robust even if the gains are set far from optimal. There are satisfactory tools and best practices for tuning PIDs. A stuttering car on bang bang cruise control will certainly not be a pleasant ride. Bang-bangs cannot do the job where you have a low inertia, low damping system that cannot tolerate jerks. PID introduces exactly those properties, inertia and damping, but through the controller.
- jcalvinowens 5y agoYou're arguing with a point I didn't make: the bang bang controller was a random counterexample. > Bang-bangs cannot do the job where you have a low inertia, low damping system that cannot tolerate jerks. PID simulates exactly those properties, inertia and damping, but through the controller. This is exactly what I'm saying: the control theory should model the actual system being controlled. Most uses I have seen of PID in the software industry do not, and consequently have to be hacked to death and are very sensitive to tuning. Old industrial stuff can be like that too sometimes. Does datacenter load have analogous properties? Absolutely not. That's my point: it's a bad usecase for PID. > Bang-bangs are just not smooth enough and does not give enough control over tracking Well, in fairness it could if the timestep could be made arbitrarily small. But in practice, yes, this obviously wouldn't work.
- srean 5y ago> Well, in fairness it could if the timestep could be made arbitrarily small. But in practice, yes, this obviously wouldn't work. I agree. This would essentially be pulse width modulation or control. You need sufficient inertia though, and damping that the vibration does not have any adverse effect. > Does datacenter load have analogous properties? Absolutely not. That's my point: it's a bad usecase for PID. I am not knowledgeable about that but I would presume there would be inertia like effects, delays. Bringing lots of servers up simultaneously may choke a contended shared resource leading to damping. In such cases one cant boot up too many servers too fast. Jerks might be better tolerated, except perhaps in high frequency trading scenario.
- jcalvinowens 5y ago> I am not knowledgeable about that but I would presume there would be inertia like effects, delays. Bringing lots of servers up simultaneously may choke a contended shared resource leading to damping. In such cases one cant boot up too many servers too fast. Jerks might be better tolerated, except perhaps in high frequency trading scenario. Sure, you can model it like that. But I can actually go measure all the physical properties of the car and calculate a tuning that will work for cruise control, because the car follows known physical laws (within the limits of my ability to measure things). I can't "weigh" the datacenter. I must to some extent observe the system and empirically derive tuning. That tuning is basically overfitting PID to second and higher order effects in the system without taking the time to actually understand the root of them. Can that work? Sure. That doesn't change the fact that, IMHO, there is almost always a better way. This is probably more contraversial... but personally, I'd rather have a hacky ad hoc approach than overfit PID, because the former is so much easier to debug and understand.