Now that the basic PID terms have been examined, we can now look deeper into the PID calculations and some less common variations that can be used.
In the basic definition of the Proportional Term in Part 1, the Proportional Term was calculated by finding the Error (either SP-PV or PV-SP) and multiplying it by a gain constant. This calculation becomes a little more complicated when determining what KP actually is. Below are four scenarios for defining KP.
1. Direct Proportional Gain Constant. One common definition of KP is as a direct gain constant. The value entered for this constant is directly multiplied by the Error to get the Proportional Term. This is the most straightforward method of calculating “P”.
2. Proportional Band. When a controller uses Proportional Band (PB) to calculate KP the following equation is used: KP = 100/PB. A higher value for Proportional Band will result in a lower KP and a less sensitive proportional control.
Proportional Band can be thought of as the percentage range difference in the process variable from Setpoint to produce a 0% to 100% change in the Control Output. For example: a proportional-only system that has a 0-100 psi transmitter, a setpoint of 50 psi, a Proportional Band setting of 20.00, and an offset of 50 (50% output is what is expected as the typical load); the resulting Control Output when the PV is 45 psi will be 75%.
Output = (SP – PV) * (100 / PB) + Offset
Output = (50 – 45) * (100 / 20) + 50 = 75
1. Gap Band. When a controller uses a Gap Band for Gain, there will be two settings for calculating KP. When the Error is within +/- a selected % of the Setpoint, the smaller of the two values of KP will be used, and when the Error is outside the selected +/- of the Setpoint, the greater of the two KP will be used. This allows the proportional controller to have a greater change to the Control Output when there is a large error, instead of a linear response.
2. Adaptive Gain. Expanding from the dual-gain concept of Gap Band, Adaptive Gain allows further adjustment to KP than just two discrete settings. Depending on how the control is setup, a full F(x) curve could be used to scale KP across an error range, or a secondary analog signal could be used.
Of the four methods above, Direct Gain and Proportional band are much more common and are typically adequate for boiler controls.
A Closer Look at the Integral Term
As mentioned in Part 1, the Integral term allows the controller to “Reset” the proportional control offset over time to account for changes in load demand. The Integral term gets its name from the mathematical function of Integration. Integration is the method of calculating the area under a curve by summing smaller and smaller discrete rectangles below the curve. Consider the “P” term discussed above as a fluctuating trend curve graphed over time. The Integral term essentially integrates this curve with respect to time to apply a time-averaged reset to the proportional control. The controller cannot re-calculate this Integral term in infinitesimally small time chunks, but instead must account for the time it takes to run a full scan of its software program. The frequency that these rectangle chunks are calculated and added into the PID result is determined by the Integral Constant KI value.
The Integral Term is calculated by the following sequence:
1. Calculate the Integral constant KI. This term takes into account the software scan rate of the controller and the adjustable Integral setting, typically expressed as either repeats-per-minute or as minutes-per-repeat. An example of a controller running at ten scans each second, an Integral setting of 3.00 minutes/repeat, and a Proportional term “P” of 20 the calculation for that scan would be:
KI = 1 / (3.00 * 60 * 10) = 0.000555….
2. Multiply the Proportional term “P” by the Integral constant KI to get the amount to add the Integral term this scan.
ΔI = 20 * 0.000555… = 0.01111…
This value is added to the Integral term from the previous program scan to become the new Integral term “I”. As the measured SP-PV Error changes, “P” will change and subsequently the calculated ΔI will change. Notice that if the “P” term remains constant for three consecutive minutes (1800 software scans) in this example, the total ΔI added to the Output over that 3-minute span will be 20, equal to the “P” term. In a sense, Integral minutes/repeat can be thought of the amount of time it takes for the PID to add the proportional “P” term to the Output for a constant Error. This is how the steady-state offset of Proportional-only control is corrected or “Reset”.
In Part 3 we will look at how PIDs are applied to boiler control systems using the foundation established in Parts 1 and 2.