# PID Structure Tips

Nov. 5, 2014

Before the 1990s relatively few choices in PID structure were offered. There were also various supplier specific rules as to how to set the proportional mode and integral mode tuning settings to get proportional-only and integral-only control. A different model controller may have been needed for a different structure. The modern DCS offers the flexibility to readily choose 8 structures to take advantage of what each has to offer. Here we take a look at the type of applications where each structure offers an advantage.

Before the 1990s relatively few choices in PID structure were offered. There were also various supplier specific rules as to how to set the proportional mode and integral mode tuning settings to get proportional-only and integral-only control. A different model controller may have been needed for a different structure. The modern DCS offers the flexibility to readily choose 8 structures to take advantage of what each has to offer. Here we take a look at the type of applications where each structure offers an advantage.

PID structure choices use beta (β) and gamma (γ) set point weighting factors where the setpoint is multiplied by beta for the proportional mode and is multiplied by gamma for the derivative mode. A controller that has both factors adjustable is called a “two degree of freedom controller (2DOF).” Other structures have the β  and γ factors set equal to 0 or 1. The user can also omit a mode entirely to get P-only, I-only, ID, and PD control with various assigned factors. PI control is achieved by simply setting the derivative (rate) time to zero. In general, the user must not set the controller gain equal to zero in an attempt to get I-only or ID control or set the integral (reset) time to zero in an attempt to get P-only or PD control. Note that the use of P-only or PD control requires additional choices of how to set the bias and its ramp time. Table 1 lists 8 major choices offered.

Table 1 Major PID Structure Choices

1. PID action on error (β = 1 and γ = 1)
2. PI action on error, D action on PV (β = 1 and γ = 0)
3. I action on error, PD action on PV (β = 0 and γ = 0)
4. PD action on error, no I action (β = 1 and γ = 1)
5. P action on error, D action on PV, no I action (β = 1 and γ = 0)
6. ID action on error, no P action (γ = 1)
7. I action on error, D action on PV, no P action (γ = 0)
8. Two degrees of freedom controller (β and γ adjustable 0 to 1)

Structure 1 (PID action on error) provides the fastest approach to a new setpoint by virtue of a step from the proportional mode and the kick from the derivative mode in the controller output from the setpoint change. The brief text and figure in “Contribution of Each PID Mode to PID Output” provides a clear view of the response of each mode. A large step change from the proportional mode is the key to reducing the rise time (time to reach setpoint whether the PV is increasing or decreasing) in near-integrating, true integrating, and runaway loops. For small setpoint changes and low controller gains where the step change in the PID output from the proportional mode is small, the kick instigated by derivative action can help get through significant valve backlash and stick-slip to get the valve moving. The kick appears to be a spike on trend charts with a large time spans. The abrupt change in output is often seen as disruptive by operators when they make setpoint changes. If the burst of flow through the control valve does not affect other users of the process or utility fluid, the kick is more of a psychological than a process concern. The kick can be made smaller by decreasing the gamma factor (γ). At any rate, the reduction in rise time from derivative action on error is marginal for good control valves or higher controller gains and larger setpoint changes.

Structure 2 (PI action on error, D action on PV) is the structure most often used. Structure 2 eliminates the kick from derivative action for a setpoint change by setting gamma to zero (γ=0). The increase in rise time going from structure 1 to 2 is negligible for the more important loops, such as column and vessel temperature where derivative action is used. The step in the output from the proportional mode on a setpoint change is large because of the high controller gain. Increases in process gain or dead time will increase the overshoot unless the controller gain is decreased accordingly. If the elimination of setpoint overshoot is much more important than rise time, then structure 3 may be best.

Structure 3 (I action on error, PD action on PV) eliminates overshoot but with quite a sacrifice in speed of approach to the setpoint. For bioreactors where the prevention of overshoot for pH and temperature setpoint changes is of paramount importance and increases of cycle time of even an hour in a batch that has a fixed cycle time of 10 days is unimportant structure 3 is a simple and effective solution. Structure 3 is also used for plug flow and gas unit operations, because the overshoot of the PID output besides the PV is important and the rise time is fast anyway because the primary process time constant is small. When rise time, overshoot, errors from fast load upsets must all be minimized, a setpoint lead-lag or structure 8 enables the use of aggressive tuning and the means for optimizing the setpoint response.

Structure 4 (PD action on error, no I action) is used on processes adversely affected by integral action. The temperature control of severely exothermic polymerization reactors use structure 4 because integrating action in the controller increases the risk of a runaway. If integral action is used, the reset time should be increased by a factor of 10 for these positive feedback processes to be safe. Users may not be aware of this requirement leading to overshoot that can trigger a runaway. The bias for structure 4 is set equal to the normal PD controller output when the PV is at setpoint.

Structure 4 is used for total dissolved solids (TDS) control of boiler drums and vessel level control to eliminate the slow reset cycles from too small of a reset time or too small of PID gain. For drums, the boiler blow down may be discontinuous making control of the TDS integrating response more difficult with integral action. For reactors, the increase in level from proportional-only control for a decrease in reactant feed flow provides a more constant residence time. However, the setting of the bias in these applications is confusing to the user.

Structure 4 is used on batch processes that respond in only one direction. For example, in bringing a batch pH up to a setpoint by the addition of a base reagent where the base is not consumed in a reaction, the batch will only respond in the direction of increasing pH. The pH will overshoot setpoint if integral action is used. If split ranging is added with an acid reagent, there will be some wasted reagent due to cross neutralization of reagents and limit cycling across the split range point from stiction that is greatest near the closed position. For structure 4 and a single reagent, the bias is set for zero reagent addition when the PV is at setpoint.

Structure 5 (P action on error, D action on PV, no I action) is used for the same reasons as structure 4. As with structure 2, the kick from rate action for setpoint changes is eliminated. The use of structure 4 instead of 5 may not offer any advantage because the value of the kick is marginal for these processes since the PID gain is usually high.

Structure 6 (ID action on error, no P action) is used for valve position controllers (VPC) to eliminate the interaction with process controller whose valve position is being optimized. The VPC could be optimizing the coarse adjustment from a large control valve in parallel with a small control valve manipulated as fine adjustment by the process controller or many of the optimization opportunities. VPC can optimize utility supply pressure or temperature to minimize energy use or optimize feed rate to maximize production rate. The tuning of this VPC is problematic. Tuning rules often cited are the reset time should be larger than 10 times the product of the gain and reset time of the process controller and 10 times the residence time of the process to eliminate interaction. The reliance on slow integral action makes the VPC unable to prevent the process controller from getting into trouble for large fast disturbances. Feedforward action can be added to help, but a more flexible and easier to tune solution is to use an enhanced PID with external reset feedback and analog output or driven PID setpoint rate limits to provide directional move suppression. The setpoint rate limits on the manipulated variable can provide a gradual optimization with a fast getaway for upsets.

Structure 7 (I action on error, D action on PV, no P action) is used for the same reasons as structure 6. As with structure 2, the kick from rate action for setpoint changes is eliminated. Since there is no PID output step change to get through backlash and stiction, structure 6 instead of 7 may help by reducing rise time for valves with poor precision.

Structure 8 is used to provide a balance between a fast rise time and minimal overshoot. The performance of this structure for various beta and gamma factors is compared in a future blog to a setpoint lead-lag where the lead and lag times are varied.