Loop Tuning Lab
Challenges Not all PID controllers are the same. They don t all use the same units for P-I-and D. There are different types of processes. There are different final element types. There can be unknown final control element performance issues.
Different Controller Terms Proportional Term. Controller Gain, K c Proportional Gain, K p Proportional Band, PB Proportional Band specifies how much error will cause the output to go from 0-100%. It is the reciprocal of controller gain. K c = 100% PB The proportional term calculates an output based on the error multiplied by the gain.
Different Controller Terms Integral time. T I Minutes or Seconds It defines the period of time the controller waits before adding additional changes to the controller output due to the proportional term acting on the error. A shorter integral time makes the loop faster but less stable. Repeats per minute or second, Integral Gain Is the reciprocal of integral time. A higher integral gain makes the loop faster.
Different Controller Terms Derivative Term Minutes or Seconds It adds to the controllers output based on the rate of change of the error. The slope of the error curve is extended to a time, T d, and that error is multiplied by the controller gain and added to the output. So a longer derivative makes the loop faster but too long and it will become unstable.
Different Controller Structures There are Three main types. Non-Interactive, Interactive and Parallel They Use slightly different tuning values to achieve the same results. There are formulas to convert from one to another.
Different Controller Structures Non-interactive Ideal, standard or ISA algorithm. The non-interactive algorithm has a controller gain setting that effects the proportional, Integral and derivative functions. This becomes the Controller gain.
Different Controller Structures Interactive, series or Classical algorithm More closely mimics the Pneumatic and old electronic controllers.
Different Controller Structures Parallel Algorithm The parallel algorithm has no interaction between any of the modes.
Output direction A reverse acting controller decreases its output on an increase in process variable. A direct acting controller increases its output on an increase in process variable.
Process Types Self Regulating Most processes are self Regulating. After a step change in controller output the process variable will move toward a new level where it will gradually settle out. Integrating After a step change in controller output, the process responds with a steady ramp. The controller output must be returned to its original output for the process to stabilize. Example is a level control loop.
Typical final element types Control valves Linear inherent characteristics Used when control valve pressure drop is greater than 40-50% of total system pressure drop. Equal Percentage characteristics Used when control valve pressure drop is less than 40-50% of total system pressure drop. Variable frequency Drives Typically flow is a linear function of pump speed.
Linear Vs Equal Percentage
Final Control element performance Sizing/selection issues issues Control valves should be sized based on flow rates and actual pressure drop data. An incorrectly sized valve will cause control problems. Oversized valve will cause a high process gain. Undersized valve can prevent the process from reaching setpoint.
Final Control element performance Stiction, (Static Friction) issues Caused by excessive friction between moving parts of the valve and actuator. Causes a stick-slip effect. If the controller output changes and the valve does not move due to stiction the integral term will continue to increase the output until the valve moves and will likely overshoot. This can cause oscillations around the setpoint.
Stiction
Final Control element performance issues Hysteresis, (Lost motion) Usually caused by sloppy or worn linkage but can be other reasons. When the controller output changes directions, the hysteresis must be taken up before the valve begins moving. This cannot be fixed by tuning, it is a mechanical problem that has to be addressed before tuning the loop.
Hysteresis
Definitions Process Variable The parameter being controlled, flow, pressure etc. Setpoint The desired value of the process variable. Controller Output The result of the PID calculation and the signal to the controlling element, (Control valve).
Gain, Dead time and lag model Process gain describes how much the process variable changes for a given change in controller output. Dead time is also called transportation lag. It is the amount of time the process variable measurement is completely unaffected by a change in output. Time constant is a measurement of how fast the process variable moves on a change in output. Knowing these three variables, we can calculate tuning parameters for the controller.
Process Gain Percentage change in process variable for a given change in controller output.
Dead time The amount of time it takes for a change in controller output to cause a change in process variable.
Time Constant The amount of time it takes the process variable to reach 63.2% of its final value after the dead time has run out.
Speed vs Stability Tuning Considerations
Quarter Amplitude damping Eliminates Error quickly but overshoots setpoint before settling. Basis for many tuning rules and has a stability Margin of 1.
Stability Margin SM at different values and its effect on control.
Tuning Methods Ziegler Nichols open loop tuning method Based on Quarter amplitude damping. Designed for interactive Control algorithm. Ziegler Nichols ultimate cycling tuning method Uses Ultimate Gain and period to calculate parameters on a cycling loop. Coen Coon tuning Method Designed for Non-interactive control algorithm. Also works well on lag dominant processes where lag is greater than 2 times time period. Lambda Tuning method Very stable with minimal overshoot. You can specify your closed loop time constant.
Ziegler Nichols Open loop For a PI controller: For a PID Controller
For a PI Controller Cohen Coon For a PD controller For a PID controller
Lambda Calculate Closed loop response time = a factor, typically between 2.0 and 3.0 smaller factors being faster, larger being more stable.
Dead Time tuning Rule When a process is dead time dominant Dead time > Time constant*4
Ziegler Nichols ultimate cycling tuning method 1. Make sure the process does not oscillate in manual mode. 2. Turn off integral and derivative terms. 3. Put controller in auto mode. 4. Make a small setpoint change. 5. Adjust gain until process oscillates with constant amplitude, not increasing or decaying. 6. Note this is ultimate gain. 7. Measure period of oscillation, this is ultimate period.
Tuning Procedures Step test to establish Process gain, Dead time and time constant. Choose a tuning method or compare multiple. Calculate tuning parameters. Use a spreadsheet. Convert parameters to those in your controller. Enter parameters in controller. Fine tune if desired.
Step test Perform multiple step tests increasing and decreasing at different points in the control range. Typical 4 step sequence, increase/decrease. Do this twice at different places in control range.
Choose a tuning method The Cohen Coon tuning method is the best choice for self regulating processes. If Dead time is greater than 4 times the time constant, use dead time dominant rules. If it is difficult to accurately measure the dead time or wish to absorb process disturbances use Lambda.
Fine Tuning Change stability margin and re-calculate parameters. Make slight adjustments below and re-test. Sluggish control Unstable Parameter Corrective Action Controller gain Increase Decrease Proportional Band Decrease Increase Integral Time Decrease Increase Integral Gain Increase Decrease Derivative Decrease* Increase*
Trial and Error Advantages No Math, formula s or Calculations. Knowledge of process and tuning will increase with the experience. Can be the only choice if the process is very noisy and proper step testing is impossible. Disadvantages Takes a long time. You never know if you have optimum settings. You will never detect any final control element deficiencies. Stability margin is unknown.
Best Practices Don t tune a Controller on a Friday afternoon if you can help it. Do multiple step tests at different conditions. Stability is generally more important than speed. Use a spreadsheet to simplify calculations and reduce errors. Make sure to convert settings to those used in your controller. Do not use Derivative on processes with noisy signals. Test new controller settings. If new settings didn t work, don t tweak them, find out why. Leave the previous settings with the operator just in case.