4 ms·
This is probably not necessary here but I'll try anyway. PID is a control loop algorithm: something which takes a desired value and an actual value from a sens
by shawnz 5y ago
This is probably not necessary here but I'll try anyway.
PID is a control loop algorithm: something which takes a desired value and an actual value from a sensor, and outputs something to some kind of actuator to try and get the actual value to match the desired value.
A simple example of a control loop algorithm is the "bang-bang" algorithm used by your thermostat. When it's too cold the furnace turns on, and when it's too hot the furnace turns off.
PID was discovered by observing boat helmspeople. It was observed that there are three major factors in their decision of how to turn the boat's wheel (the P, I, and D respectively).
First, they set the wheel to approximately where they think it needs to be to achieve the desired angle. That's the P, or proportional part.
Then they note the cumulative error over time, i.e. the distance away from the desired angle summed up over each moment that they are still waiting. As the cumulative error rises, they turn the wheel a bit further to compensate. This is the I, or integral term, which accommodates conditions where the controls are particularly dull, causing the proportional control to undershoot.
Finally they observe the rate at which they are approaching the desired angle and compensate negatively if they are approaching it more quickly than they expected. This is the D (derivative) term, which accommodates conditions where the controls are particularly sensitive and the proportional control overshoots.
PID just adds these three terms together with weights chosen for the specific application. Choosing those weights is the tuning process.
- Redimo 5y agoI made myself the work and created a very basic ClosedFeedbackLoop Example for java, for anyone that might want to try it out. It's old and has terrible documentation, but I also haven't touched it in quite some time. Either way, here it is: https://github.com/RicardoMonteiroSimoes/ClosedLoopControlBlocks https://github.com/RicardoMonteiroSimoes/ClosedLoopControlBl... It contains several blocks,P,I,D,PID,PT1 and PT2, basically the ones that were teached to me
- hawski 5y agoThanks, I missed this explanation years ago when I studied industrial control systems! I truly appreciate it. Though I wonder if that's me that got older and have better understanding of things that I now think I get it, or is it your explanation. Probably both.