Additional features:
- Control Action toggle (reverse acting/direct acting). This simply causes my raw P, I and D values to be negated after being calculated.
- Gain Type toggle (independent/dependent). If set to dependent, the raw I and D values are multiplied by kP after being calculated.
- Derivative Of toggle (PV/Error). If set to Error, the Error is used to calculate the derivative instead of the PV. As Peter has mentioned previously, using the error in the derivative calculation can cause large output spikes on setpoint changes, so the default is to use the PV - but we can use the error if the application would benefit from the additional "kickstart" and can tolerate the output spikes
- Deadband with zero crossing toggle and deadband timer - so that I can determine whether the PV must cross the SP before activating the deadband, and I ca specify a minimum time for the PV to be within deadband before holding the controller output
- Bumpless restart. This one is a little more complicated, and I'm interested to get some input on my approach here.
When the loop is in manual, the Cumulative_I value is not updated, and nor is the controller output, allowing the operator to manipulate the output as desired.
If the application uses Integral (kI > 0) then when the loop is in manual, I track the manually manipulated output, and adjust the Cumulative_I such that when the loop returns to auto, the combination of P, Cumulative_I, D and Bias will result in the same output set by the operator. Effectively, I'm adjusting the integral value to match the existing controller output. When the loop returns to auto, there will be no immediate change - if there is an error, the integral gain will start accumulating again to bring it back to setpoint.
If integral gain is not being used (kI = 0), then I do the same thing with the bias - effectively adjusting the bias so that the combination of P, D and Bias is equal to the output set by the operator.
Of course, if this behaviour is not desired, I can toggle off the Bumpless Restart option. In that case, when switched to manual, the Cumulative_I simply stops being updated until the loop is switched back to auto.
- Control Action toggle (reverse acting/direct acting). This simply causes my raw P, I and D values to be negated after being calculated.
- Gain Type toggle (independent/dependent). If set to dependent, the raw I and D values are multiplied by kP after being calculated.
- Derivative Of toggle (PV/Error). If set to Error, the Error is used to calculate the derivative instead of the PV. As Peter has mentioned previously, using the error in the derivative calculation can cause large output spikes on setpoint changes, so the default is to use the PV - but we can use the error if the application would benefit from the additional "kickstart" and can tolerate the output spikes
- Deadband with zero crossing toggle and deadband timer - so that I can determine whether the PV must cross the SP before activating the deadband, and I ca specify a minimum time for the PV to be within deadband before holding the controller output
- Bumpless restart. This one is a little more complicated, and I'm interested to get some input on my approach here.
When the loop is in manual, the Cumulative_I value is not updated, and nor is the controller output, allowing the operator to manipulate the output as desired.
If the application uses Integral (kI > 0) then when the loop is in manual, I track the manually manipulated output, and adjust the Cumulative_I such that when the loop returns to auto, the combination of P, Cumulative_I, D and Bias will result in the same output set by the operator. Effectively, I'm adjusting the integral value to match the existing controller output. When the loop returns to auto, there will be no immediate change - if there is an error, the integral gain will start accumulating again to bring it back to setpoint.
If integral gain is not being used (kI = 0), then I do the same thing with the bias - effectively adjusting the bias so that the combination of P, D and Bias is equal to the output set by the operator.
Of course, if this behaviour is not desired, I can toggle off the Bumpless Restart option. In that case, when switched to manual, the Cumulative_I simply stops being updated until the loop is switched back to auto.