- Joined
- May 6, 2020
Most of us probably know a decent bit of info about a subject that most others don't know a damn thing about. Now's your time to let the autism flow and produce a wall of text about your particular interest:
PID loop control is a method with which you can produce a self-correcting system such as cruise control or to create a stable platform on an unstable surface:
The basic principle by which it works is by measuring the state the system is in (the "process variable" or PV) and comparing that to the desired state (the "setpoint" or SP) to calculate the error (E) which signifies the difference between the two. This "E" then gets multiplied by the Proportional (P), Integral (I), and Derivative (D) variables which are set by those calibrating the system to get a "Manipulated Variable" (MV) which is applied to the PV in order correct the error in the most desirable manner for the system at hand. The equation for this system looks like this (lifted from wikipedia because lazy):
Obviously, P, I, and D all correspond to a certain characteristic of the tuning method:
P is the most straightforward: You take the error, whether negative or positive, and multiply it by your P variable and you get a simple correction method where your PV gradually reaches the SP. The heuristic often used to memorize what it is that this part of the method does is that it sees the present (what is the error right now?). The problem with this alone is that the MV becomes weaker as you approach your SP. This often results in a condition where the MV is so negligible that it fails to have an impact on your PV even before the SP is reached. This consistent, unchanging error is known as "offset."
I is the final solution to the offset problem: You take the sum of all errors that the system has measured each scan cycle and multiply it by your I variable. This means that the MV will get stronger the longer the error persists. The heuristic often used to memorize what this part of the method does is that it sees the past (what error have you seen historically?). PI can work together in some cases, but the problem is that the MV grows exponentially when I is applied. This can lead to an aggressive overshoot and undershoot of the PV in relation to the SP as it seeks to find a happy medium.
D is intended specifically to combat this undershoot/overshoot issue: By calculating the difference between the last measured error and the current error, you get a slope which shows how fast the PV is approaching the SP. The heuristic often used to memorize what this part of the method does is that it sees the future (where is the error going?). With the addition of the D correction, the MV will always push the PV towards the SP while minimizing overshoot and undershoot.
Here's a gif that sums up what each of these do in a graphical model:
How you would tune a given system (what your P, I, and D values are) depends on the system itself. I myself have been trained on two of them:
Ziegler–Nichols is a very aggressive tuning method. It will bring you to your setpoint ASAP but there WILL be some over/undershoot.
No Overshoot is exactly what it says on the tin. It takes much longer to get you to your SP, but you know it will never go beyond that.
As an example of how badass this shit can be:
The basic principle by which it works is by measuring the state the system is in (the "process variable" or PV) and comparing that to the desired state (the "setpoint" or SP) to calculate the error (E) which signifies the difference between the two. This "E" then gets multiplied by the Proportional (P), Integral (I), and Derivative (D) variables which are set by those calibrating the system to get a "Manipulated Variable" (MV) which is applied to the PV in order correct the error in the most desirable manner for the system at hand. The equation for this system looks like this (lifted from wikipedia because lazy):
Obviously, P, I, and D all correspond to a certain characteristic of the tuning method:
P is the most straightforward: You take the error, whether negative or positive, and multiply it by your P variable and you get a simple correction method where your PV gradually reaches the SP. The heuristic often used to memorize what it is that this part of the method does is that it sees the present (what is the error right now?). The problem with this alone is that the MV becomes weaker as you approach your SP. This often results in a condition where the MV is so negligible that it fails to have an impact on your PV even before the SP is reached. This consistent, unchanging error is known as "offset."
I is the final solution to the offset problem: You take the sum of all errors that the system has measured each scan cycle and multiply it by your I variable. This means that the MV will get stronger the longer the error persists. The heuristic often used to memorize what this part of the method does is that it sees the past (what error have you seen historically?). PI can work together in some cases, but the problem is that the MV grows exponentially when I is applied. This can lead to an aggressive overshoot and undershoot of the PV in relation to the SP as it seeks to find a happy medium.
D is intended specifically to combat this undershoot/overshoot issue: By calculating the difference between the last measured error and the current error, you get a slope which shows how fast the PV is approaching the SP. The heuristic often used to memorize what this part of the method does is that it sees the future (where is the error going?). With the addition of the D correction, the MV will always push the PV towards the SP while minimizing overshoot and undershoot.
Here's a gif that sums up what each of these do in a graphical model:
How you would tune a given system (what your P, I, and D values are) depends on the system itself. I myself have been trained on two of them:
Ziegler–Nichols is a very aggressive tuning method. It will bring you to your setpoint ASAP but there WILL be some over/undershoot.
No Overshoot is exactly what it says on the tin. It takes much longer to get you to your SP, but you know it will never go beyond that.
As an example of how badass this shit can be:
Last edited: