Professional Documents
Culture Documents
PID Type
1 Output = Kp e + Ti
PI-D Type
e dt + Td dt
d ( PV ) dt
de
1 Output = Kp e + Ti
I-PD Type
e dt + Td
1 d ( PV ) Output = Kp PV + e dt + Td Ti dt Where: Kp = Controller Gain Ti = Integral in Time per Repeat Td = Derivative in Time e = Error (SP-PV) PV = Change in PV
Equation 6.1 - PID, PI-D, and I-PD Controller Types
The PID controller equations illustrated in Equation 6.1 are a simplified differential equation of how error reference values are implemented.
PID Type
As you can see from the formula for PID implementation, all three PID terms act on the error. The controller proportional action acts on the magnitude of the error, and the derivative action acts on the rate of change of the error. Since setpoint changes are typically abrupt, it is undesirable in most applications to have derivative action act on setpoint changes. In normal applications, it is undesirable to kick the valve open on a small setpoint change when derivative action is used.
PI-D Type
The PI-D type in some controller manuals is referred to as derivative on PV. In the PI-D implementation, the derivative acts on -PV and not error. Thus, a step change in the setpoint does not result in an undesirable kick in the controller output. This implementation is preferred anytime derivative action is used.
I-PD Type
In the I-PD implementation, both the controller proportional and derivative act on -PV and not on error. Thus, a step change in the setpoint does not result in either a proportional or derivative kick in the controller output. In self-regulating processes, when the process variable measurement signal contains measurement lag the I-PD controller prevents setpoint overshoot. Many self-regulating processes contain lag in the measurement. In temperature control loops the thermowell adds lag to the temperature measurement. In flow loops, filtering in either the controller or transmitter, add lag to the measurement. In both these examples, the actual measurement of the controlled variable is not seen by the control system due to the lag in the measurement. The controller tuning will calculate a large controller gain because the measurement lag will be much larger than the process deadtime. A step change in setpoint using a standard PID controller will appear to provide very good control, but in fact, the real process variable follows the valve position and will overshoot the setpoint. In level control loops, the proportional gain setting is often very large. Even a small setpoint change with a standard PID controller will result in a very large change in the valve position. If the controlled variable, which is either feeding the tank or controlling the flow from the tank cannot stand the large kick, the I-PD controller should be used. Therefore, you will need to implement the I-PD controller to eliminate the unmeasured overshoot. The I-PD controller implementation protects the system from abrupt operator entered setpoint changes and should be used in all applications, unless; there is a reason that a fast response to a setpoint change is required, or no concern with overshoot in the real measurement, or concern about large and fast changes in the valve position that may upset other processes in the system.
Figure 6.1 - Normal PID Response to a Setpoint Change With Filtering in the Controller
Figure 6.1 illustrates the overshoot in the real unfiltered PV signal and how the filtered PV variable appearing on the screen appears to provide stable response with no overshoot when PV filtering is present and a normal linear PID controller is used.
Figure 6.2 - I-PD Response to a Setpoint Change With Filtering in the Controller
Figure 6.2 clearly illustrates the benefits of the I-PD controller when controller filtering is used. The response of the unfiltered PV to a setpoint change is fast and responsive with no overshoot of the setpoint. The filtered PV signal (as seen by the operator) appears to be slow.
Figure 6.3 illustrates the response to a setpoint change on a level loop utilizing a standard PID controller. Level loops typically require a large controller proportional gain and a slow integral. With a normal PID controller, the large proportional gain setting results in a very large change in the controller output in response to a step change in the setpoint. In many applications, this is unacceptable.
Figure 6.4 illustrates the response of a typical level loop to a setpoint change utilizing the I-PD controller algorithm configuration. As illustrated, the I-PD algorithm makes the response to a step change in setpoint very slow, preventing the large change in the controller output. In many applications, this response minimizes upsets in other loops being controlled and is the preferred response.
Then e = 0 Then e = e
egap = deadband%
Equation 6.2 - Error Calculation
In some applications, where both wide rangeability and precise control are required, a small valve and a large valve are used. The small valve is used to provide the precision and the large valve is used to provide the rangeability.
Protuner 1600PC
FIC
Test 1 Response in PV
SP = 50%
GAP
FT 1
Figure 6.5 - Error Gap Action Controller Application for Large Valve, Small Valve Rangeability Problem
As illustrated in Figure 6.5, a small valve is used to control the flow. The gap action controller is used to control the large valve position to keep
the small valve operating near mid-range. The correct tuning procedure is: 1. 2. Connect the Protunertm to record the three control signals as illustrated. Record a Loop Analysis test on the FIC loop in manual, calculate the PID tuning parameters, enter the parameters in the controller, and place FIC back in automatic control. Place the gap controller in manual and record a Loop Analysis test on the GAP loop, calculate the PID tuning parameters, enter the parameters in the controller. Along with the PID tuning parameters, enter an error gap of 10% into the GAP controller algorithm configuration and set its setpoint to 50%.
3.
4.
In closed loop operation, the flow controller will control the flow and the small valve will operate from 40% to 60% travel. If the system demand is such that the small valve position is required to go below 40% or above 60%, the GAP controller will cause the big valve to make a position change to bring the small valve back into the desired operating range. Therefore, the tuning procedure and the tuning parameters are determined in the same manner as with normal controllers. The PID controller with the gap function is required to keep the system stable and to prevent cycling due to interaction.
Output =
e e Kp 100
e e 100
10000Ti e 2
e dt
Output = K p
10000Ti
e dt
= Absolute Value of e to maintain direction = Controller Gain = Controller Integral Time = Error (SP-PV)
Equation 6.3 - Correct Implementation of the Error Squared PI Control Algorithm for Integrating Processes
The equations in Equation 6.3 illustrate the correct implementation of the Error Squared controller algorithm for a PI controller used for the control of surge and averaging tank level control. Notice, the effective controller gain becomes smaller as the error approaches zero, the effective integral time becomes longer. Thus, the effective controller gain, times the effective controller integral time, remains constant as a function of error and the tuning parameters remain stable for the integrating process being controlled. NOTE There are a number of control system vendors that offer an Error Squared PI controller where the implementation is not correct for the control of integrating processes. In some controller implementations, (e*e)/100 is simply substituted for the error term in the standard PI controller. This implementation is of course incorrect, and will result in unstable control because the effective gain, times the effective integral time, does not remain constant as a function of error. A number of DCS manufacturers implement an error squared on gain controller. When using this controller implementation to control surge vessels, be sure to use P only tuning because any I tuning parameter will result in unstable control and cyclic control. For an integrating process to be stable, the controller gain must be able to balance the process faster than the integral can ramp the valve open. Thus, the integral time is inversely proportional to the controller gain. It is essential that you check that the PI controller implementation configured by the manufacturer is correct before using.
In an averaging level control system, you want to both minimize the movement of the level control valve and have the level control loop settle out at setpoint after a load disturbance.
Serial Cable
Protuner Flow In
Protuner
1600PC Return to Setpoint after load change PI Controller with Error Squared Algorithm
LT
PD PV
LIC
Minimize Valve Movement
Flow Out
Figure 6.6 illustrates an averaging level control loop on a mixing tank. In this application, a number of input flows are blended in the tank. The control objective is to minimize movement of the valve, thus minimize flow disturbances to the process downstream of the vessel. The other control objective is not allow the tank to go empty, or overflow during large disturbances, but to return the level to setpoint after a change in the load to insure proper mixing in the tank. The Loop Analysis test procedure for calculating the optimum tuning parameters of the level controller LIC, uses the same test and analysis procedures as an ordinary integrating level control loop. Using the Protunertm calculated tuning parameters displayed on the Loop Analysis
Report screen, and the Error Squared Controller implementation for the PI controller, will result in the desired control.
Surge Level Control
Surge tanks are intended to absorb process upsets as well as average out load disturbances in the downstream process. For surge control systems, there is no need to return the level to setpoint, doing so would actually reduce the effective capacity of the tank.
Serial Cable
Protuner Flow In
Level at High In Flow Rate Ponly or PI Controller with Error Squared Algorithm
Protuner
1600PC
Setpoint
LT
PD PV
LIC
Minimize Valve Movement
Flow Out
Consider for example, a surge tank as illustrated in Figure 6.7 feeding a downstream process. If the production is high, the level in the surge tank should also be high, the most likely event is a decrease in the inflow to the tank, then the entire volume of the tank is available to feed the downstream process. Conversely, if the production is low, the tank level should be low, so that the maximum volume is available to absorb an input change which is certain to be positive. The Loop Analysis test procedure for calculating the optimum tuning parameters, uses the same test and analysis procedures as an ordinary
integrating level control loop. For surge level control loops, implement P only control utilizing the Error Squared PI controller. NOTE In commissioning any P only controller, you must use the manual reset function (output bias) to insure that the level is at setpoint under normal load conditions. While the Error Squared controller is useful in the control of averaging and surge vessel control, it is not recommended on boilers, reboilers, and other vessels where thermal and hydraulic effects are prominent, and tight control is required under all operating conditions.
Output = Kp(e +
Parallel Algorithm
1 Ti
100 dt )
1 Ti
ee
Output = Kp e +
Where: |e| Kp Ti
100
ee
Error Squared on Integral controllers is typically used on level control loops where fast controller proportional action is required to arrest load upsets, making the flow out of the tank equal to the flow into the tank. Integral action in the controller is required to bring the level back to
setpoint. If you are tuning such a process, and the control valve contains hysteresis or deadband, the integral action in the PI controller will cause continuous cycling at steady state. Figure 6.8 illustrates the closed loop response of a level control loop where the control valve has a 2% deadband subjected to load upset. The controller is a standard PI controller tuned with the optimum Protunertm calculated PI tuning parameters.
Figure 6.8 illustrates how integral action in a controller used to control an integrating process will result in continuous steady state cycling if there is deadband in the control valve. Making the integral setting slower will change the frequency of the cycle, but will not eliminate it completely. Turning off the controller integral action will eliminate the cycling, but with no integral action in the controller the process variable will never be at setpoint.
Figure 6.9 illustrates the closed loop response to a 10% load disturbance utilizing the same PI tuning parameters as shown in the example in Figure 6.8, implementing the Error Squared on Integral algorithm. Comparing the results in the two graphs, you will notice that the Error Squared on Integral controller both returns the process variable to setpoint and eliminates the steady state cycling. Also, the integral action in the Error Squared on Integral controller takes a much longer time to eliminate the error, in that the integral time becomes infinitely slow as the process variable approaches setpoint. Think of the Error Squared on Integral controller as a P only controller with automatic manual reset.
Stick-slip cycling as illustrated in Figure 6.10 occurs when the controller integral action continuously increases the controller output without a corresponding change in the actual valve position. When the valve finally does move, it pops and the process variable overshoots the setpoint. At that point, the error becomes negative and the controller integral action drives the output in the other direction. This results in the distinctive continuous limit cycle known as a stick-slip cycle. The process variable appears as a square wave oscillating around the setpoint. The controller output appears as a triangular wave with a frequency dependent on the tuning parameters, the valve, and the process gain. There are three traditional solutions to the stick-slip cycling problem. The first is to repair or replace the valve. A suspect valve, when removed from service, will often pass the typical bench tests. Despite the verified integrity of the valve, maintenance personnel will sometimes install a new valve and discard the old one. This can be a very expensive response to the stick-slip problem, and one that does not guarantee success. The second is to place the controller in manual. This is an
effective approach to eliminate the cycling but is clearly unacceptable. The third traditional solution is to de-tune the controller integral setting such that the ramp rate as a function of error is so slow the stick-slip cycle is eliminated. Unfortunately, substantial de-tuning of control loops causes problems which are often more serious than the effects of the cycling itself. Deadband Reset Scheduling (DRS) is the name given to an algorithm in which the controller integral setting is adjusted between a fast setting and a slow setting depending on the size of the control error (SP-PV). Output = Kp(e + 1 Ti * Kr
e dt )
Where: if |e| errorgap then Kr = 10 to 20 else Kr = 1 Where: Kp = Controller Gain Ti = Controller Integral Time Kr = Reset Ratio Factor (user adjustable typically between 10 and 20) e = Error (SP - PV) errorgap = Width of Error Deadband around setpoint
Equation 6.5 - PI Time Domain Deadband Reset Scheduling (DRS) Equation
The DRS implementation, essentially increases the controller integral time setting (Ti) when the actual error (e) is smaller than the errorgap, thus, de-tuning the controller integral setting when the error is small. With the controller de-tuned near setpoint, the rate at which the controller integral action drives the controller output is too slow for a stick-slip cycle to be maintained. When the controller is forced to respond to an upset or setpoint change, the optimum tuning is used to insure fast and stable response. Determination of the errorgap and Kr constant is done as part of the standard loop tuning procedure. After entering the Protunertm calculated tuning parameters, the closed loop response of the process is recorded. If a stick-slip cycle is detected, use the Statistical Analysis function to document the range of the cycle on the PV signal. Set the errorgap equal to
the range of oscillation in the PV signal. Since the absolute value of the error is compared to the errorgap this represents a safety factor of 2X. Selection of Kr is made by simply observing the cycling at steady state and increasing Kr until the cycle disappears. Typically, a Kr setting between 10 to 20 is sufficient to stop the cycling. Though not intended to replace good valve selection and maintenance procedures, the Deadband Reset Scheduling DRS algorithm provides a good compromise between the competing requirements of steady state stability and speed of response.
Figure 6.11 - Typical Closed Loop Cycle on Motor Operated Valve Using Standard PI Controller
Figure 6.11 illustrates the closed loop control of water flow in a water treatment plant. The final control element is a large butterfly valve with an electric operator. The actuator was set up by the manufacturer with a minimum deadband and cycle time. As you can see, the cycle looks very similar to the stick-slip cycle discussed in Deadband Reset Scheduling in this Chapter. The controller output, as a function of the Protunertm calculated Medium PI tuning parameters, ramps the controller output to eliminate the error and the motor turns on and makes the smallest change possible and overshoots the setpoint. The new error, causes the controller output to ramp in the opposite direction. When the motor deadband is again overcome, the actuator turns on and makes the smallest change. This cycle will continue forever, or until the motor over heats and shuts off, or the actuator just wears out. For this reason a continuous integral action in the controller is not appropriate for this application.
To control this process use the Deaband Reset Scheduling (DRS) algorithm shown in Equation 6.5 with the reset ratio factor Kr set to 999999 to turn the controller integral action off in the errorgap. Again, the error gap is found by determining the size of the limit cycle in the PV in the closed loop test with the Protunertm calculated tuning parameters in the controller.
Conditional Integration
Solving Overshoot Problems During Setpoint Changes
Batch processes are typically integrating type processes with a large lag time. The optimum control is a P+D action controller without I. Any I action tuning, in a controller controlling an integrating process, will result in an overshoot following a setpoint change. In real processes, integral action is required following load disturbances to integrate any small error to maintain the process variable at setpoint. The preferred controller algorithm is a PID controller with conditional integration. The conditional integration feature turns off the integral action when the error is large, and turns on the integral action when the error is sufficiently small. Output = K p (e + If e 100 Kp 1 Ti
e dt + T
de ) dt
then Ti = Ti
else Ti = 9999999
Equation 6.6 - Conditional Integration Algorithm
Figure 6.12 illustrates the difference between the setpoint response in a batch reactor with and without the use of the conditional integration algorithm.
Figure 6.12 - Setpoint Response Comparing standard PID and a PID controller with the Conditional Integral Algorithm Response
Protuner 1600PC
PV
TT 1
TIC
PD
I/P
Return Coolant
F0 3 - 9 PSIG
Heat Exchanger
FC 9 -15 PSIG
Heating Medium
In this example, the temperature controller TIC sends a single output from 0% to 100% to either heat or cool the reactor. The cooling valve is a fail open with its positioner calibrated for 3 to 9 psi (0.2 to 0.5 bar). The heating valve is a fail closed design with its positioner calibrated for 9 to 15 psi (0.5 to 1 bar). In this example, the Protunertm is connected to both the controller PV and PD signals and scaled in the normal manner, this temperature control loop is an integrating process. The open loop testing is conducted by first allowing the process to come to a steady state condition, placing the loop in manual and conducting a standard open loop integrating step test both above and below 50% controller output to insure that the loop dynamics are the same for both heating and cooling.
Protuner 1600PC
Split Range In Software Requires Special PD Scaling Input = 50% to 100% Output = 0% to 100% I/P
PV
TT 1
PD2 PD
TIC
Input = 0% to 50% Output = 0% to 100% I/P
PD1
Return Coolant
F0 3 - 15 PSIG
Heat Exchanger
FC 3 -15 PSIG
Heating Medium
The Protunertm signal cables are connected as shown to record the outputs to both valves. Scaling of the output signals is critical to insure the correct process gain is recorded. To correctly scale the controller output signals (PD1 and PD2) the following scaling procedure is recommended: 1. 2. 3. Connect the Protunertm leads as shown. Place the controller output at 50%. Click the Channel corresponding to the cooling valve PD signal.
4. 5. 6. 7. 8. 9.
Click Calculate Voltage (Two Point Scaling) enter 50 in the Controller Output 1. Change the controller output to 45% and enter 45 in Controller Output 2. Click the Channel corresponding to the heating valve PD signal. Place the controller output at 50%. Click Calculate Voltage (Two Point Scaling) enter 50 in the Controller Output 1. Change the controller output to 55% and enter 55 in Controller Output 2.
Scaling the PD signals in this manner will correctly record the percent change in the controller output vs. the changes in the controller PV signal. For changes below 50% controller output, the change in PD1 vs. PV are analyzed, above 50% controller output, PD2 vs. PV are analyzed. In many batch processes, heating and cooling result in substantially different process gains. To test the loop use the following steps: 1. 2. 3. Place the controller in manual at 50% output. Step the controller output to 60% and record the rate of temperature increase. Once the temperature increases, step the controller output back to 50% to stop the test. Use this test data to determine tuning parameters for heating. Step the output from 50% to 40% and record the rate at which the process cools. Step the contoller output back to 50% and use this data to calculate the tuning parameters for the cooling mode.
4. 5.
In many batch applications it is necessary to use different PID tuning for heating and cooling. Therefore, configure your controller to change PID settings as a function of controller output.