The text of a manual · part 52 of 68
DL405 User Manual: Chapter 8: PID Loop Operation (DL450 only), pages 459 to 468
Pages 459 to 468 of 608, from DL405 User Manual
The original document is the PDF (8.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the AutomationDirect D4-08B-1, AutomationDirect D4-08ND3S, AutomationDirect D4-16TA, PLC Direct D4-16TD2, AutomationDirect D4-32ND3-1, Konnect-It D4-08B-1, Koyo D4-08B-1, Konnect-It D4-08ND3S, and 6 more models
Page 459
PID Loop Operation (DL450 only)
8--31
Set Control Output Limits Another dialog that will be available in the PID setup will be the Output dialog. The control output address, V+05, (determined by the PID loop table beginning address) will be in view. Enter the output range limits, Upper Limit and Lower Limit, that will meet the requirement of the process and which will agree with the data format that has been selected. For a basic PID operation using a 12 bit output module, set the Upper Limit to 4095 and leave the Lower Limit set to 0. The Auto transfer to I/O module is not available for use by the DL450.The Output Data format area is not available and is grayed out if Common format has been chosen (see page 8--26).
PID Loop Operation (DL450 Only)
WARNING: If the Upper Limit is set to zero, the output will never get above zero. In effect, there will be no control output.
Maintenance DL405 User Manual, 4th Edition
Page 460
8--32
PID Loop Operation (DL450 only)
PID Loop Operation (DL450 Only)
Enter PID Tuning Parameters Another PID setup dialog, Tuning, is for entering the PID parameters shown as: Gain (Proportional Gain), Reset (Integral Gain) and Rate (Derivative Gain)
Recall the position and velocity forms of the PID loop equations which were introduced earlier. The equations basically show the three components of the PID calculation: Proportional Gain (P), Integral Gain (I) and Derivative Gain (D). The following diagram shows a form of the PID calculation in which the control output is the sum of the proportional gain, integral gain and derivative gain. With each calculation of the loop, each term receives the same error signal value.
Setpoint
+ Σ
Error Term --
Maintenance and Troubleshooting
Process Variable
Loop Calculation P I D
+ +
Σ
Control Output
+
The P, I and D gains are 4--digit BCD numbers with values from 0000 to 9999. They contain an implied decimal point in the middle, so the values are actually 00.00 to 99.99. Some gain values have units y Proportional gain has no unit, Integral gain may be selected in seconds or in minutes, and Derivative gain is in seconds. Gain (Proportional Gain) y This is the most basic gain of the three. Values range from 0000 to 9999, but they are used internally as xx.xx. An entry of “0000“ effectively removes the proportional term from the PID equation. This accommodates applications which need integral--only loops. Reset (Integral Gain) y Values range from 0001 to 9998, but they are used internally as xx.xx. An entry of “0000“ or “9999“ causes the integral gain to be “∞”, effectively removing the integrator term from the PID equation. This accommodates applications which need proportional--only loops. The units of integral gain may be either seconds or minutes, as shown in the above dialog. Rate (Derivative Gain) y Values which can be entered range from 0001 to 9999, but they are used internally as xx.xx. An entry of “0000“ allows removal of the derivative term from the PID equation (a common practice). This accommodates applications which require only proportional and/or integral loops. Most control loops will operate as a PI loop.
DL405 User Manual, 4th Edition
Page 461
PID Loop Operation (DL450 only)
8--33
NOTE: You may elect to leave the tuning dialog blank and enter the tuning parameters in the DirectSOFT PID View. Derivative Gain Limiting The derivative gain (rate) has an optional gain--limiting feature. This is provided because the derivative gain reacts badly to PV signal noise or other causes of sudden PV fluctuations. The function of the gain--limiting is shown in the diagram below. Loop Calculation P Setpoint
+
Σ
Error Term
--
D
Process Variable
Loop Table 00XX
Integral
+ + Σ +
Derivative
Control Output
0 Derivative, gain-limited
1
PID Mode 1 Setting V+00
Derivative Gain Limit Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Derivative gain limit select
The gain limit can be particularly useful during loop tuning. Most loops can tolerate only a little derivative gain without going into uncontrolled oscillations. If Derivative Gain Limiting is selected, a unit of 0--20 for Limit must also be entered. NOTE: When first configuring a loop, it’s best to use the standard error term until after the loop is tuned. Once the loop is tuned, you will be able to tell if these functions will enhance control. The Error Squared and/or Enable Deadband can be selected later in the PID setup. Also, values are not required to be entered in the Tuning dialog, but they can set later in the DirectSOFT PID View.
DL405 User Manual, 4th Edition
Maintenance
Error Term Selection The error term is internal to the CPUs PID loop controller, and is generated again in each PID calculation. Although its data is not directly accessible, you can easily calculate it by subtracting: Error = (SP -- PV). The PID calculation operates on this value linearly to give the result. However, a few applications can benefit from non--linear control. The Error--squared method of non--linear control exaggerates large errors and diminishes small error Error Squared y When selected, the squared error function simply squares the error term (but preserves the original algebraic sign), which is used in the calculation. This affects the Control Output by diminishing its response to smaller error values, but maintaining its response to larger errors. Some situations in which the error squared term might be useful: S Noisy PV signal -- using a squared error term can reduce the effect of low--frequency electrical noise on the PV, which will make the control system jittery. A squared error maintains the response to larger errors. S Non--linear process -- some processes (such as chemical pH control) require non--linear controllers for best results. Another application is surge tank control, where the Control Output signal must be smooth.
PID Loop Operation (DL450 Only)
V+25
I
Proportional
Page 462
8--34
PID Loop Operation (DL450 only) Enable Deadband y When selected, the enable deadband function takes a range of small error values near zero, and simply substitutes zero as the value of the error. If the error is larger than the deadband range, then the error value is used normally. Freeze Bias The term reset windup refers to an undesirable characteristic of integrator behavior which occurs naturally under certain conditions. Refer to the figure below. Suppose the PV signal becomes disconnected, and the PV value goes to zero. While this is a serious loop fault, it is made worse by reset windup. Notice the bias (reset) term keeps integrating normally during the PV disconnect, until its upper limit is reached. When the PV signal returns, the bias value is saturated (windup) and takes a long time to return to normal. The loop output consequently has an extended recovery time. Until recovery, the output level is wrong and causes further problems. PV 0
PV loss Reset windup
PV loss Freeze bias enabled
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
Bias
Output Recovery time
Recovery time
In the second PV signal loss episode in the figure, the freeze bias feature is enabled. It causes the bias value to freeze when the control output goes to its range limits. Much of the reset windup is thus avoided, and the output recovery time is much less. For most applications, the freeze bias feature will work with the loop as described above. It is suggested to enable this feature by selecting it in the dialog. Bit 10 of PID Mode 1 Setting (V+00) word can also be set in RLL. NOTE: The freeze bias feature stops the bias term from changing when the control output reaches the end of the data range. If you have set limits on the control output other than the range (i.e, 0--4095 for a unipolar/12 bit loop), the bias term still uses the end of range for the stopping point and bias freeze will not work.
DL405 User Manual, 4th Edition
Page 463
PID Loop Operation (DL450 only)
8--35
Setup the PID Alarms Although the setup of the PID alarms is optional, you surely would not want to operate a process without monitoring it. The performance of a process control loop may generally be measured by how closely the process variable matches the setpoint. Most process control loops in industry operate continuously, and will eventually lose control of the PV due to an error condition. Process alarms are vital in early discovery of a loop error condition and can alert plant personnel to manually control a loop or take other measures until the error condition has been repaired. The alarm thresholds are fully programmable, and each type of alarm may be independently enabled and monitored. The following diagram shows the Alarm dialog in the PID setup which simplifies the alarm setup.
High Alarm PV Low Alarm Low--low Alarm
Loop Table V+16
XXXX
High-high Alarm
V+15
XXXX
High Alarm
V+14
XXXX
Low Alarm
V+13
XXXX
Low-low Alarm
NOTE: The Alarm dialog can be left as it first appears, without alarm entries. The alarms can then be setup in the DirectSOFT PID View.
DL405 User Manual, 4th Edition
Maintenance
High--high Alarm
PID Loop Operation (DL450 Only)
Monitor Limit Alarms Checking this box will allow all of the PV limit alarms to be monitored once the limits are entered. The PV absolute value alarms are organized as two upper and two lower alarms. The alarm status is false as long as the PV value remains in the region between the upper and lower alarms, as shown below. The alarms nearest the safe zone are named High Alarm and Low Alarm. If the loop loses control, the PV will cross one of these thresholds first. Therefore, you can program the appropriate alarm threshold values in the loop table locations shown below to the right. The data format is the same as the PV and SP (12--bit or 15--bit). The threshold values for these alarms should be set to give an operator an early warning if the process loses control.
Page 464
8--36
PID Loop Operation (DL450 only) If the process remains out of control for some time, the PV will eventually cross one of the outer alarm thresholds, named High-high alarm and Low-low alarm. Their threshold values are programmed using the loop table registers listed above. A High-high or Low-low alarm indicates a serious condition exists, and needs the immediate attention of the operator. The PV Absolute Value Alarms are reported in the four bits in the PID Mode and Alarm Status word in the loop table, as shown to the right. We highly recommend using ladder logic to monitor these bits. The bit-of-word instructions make this easy to do. Additionally, you can monitor PID alarms using DirectSOFT. Red Deviation Alarm Yellow Deviation Alarm
Yellow Deviation Alarm
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
Red Deviation Alarm
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
High-high Alarm High Alarm Low Alarm Low-low Alarm
Red Yellow Green
SP
PID Mode and Alarm Status V+06
Yellow
Loop Table V+17
XXXX
Yellow Deviation Alarm
V+20
XXXX
Red Deviation Alarm
Red
The thresholds define zones, which fluctuate with the SP value. The green zone which surrounds the SP value represents a safe (no alarm) condition. The yellow zones lie just outside the green zone, and the red zones are just beyond those. The PV Deviation Alarms are reported in the two bits in the PID Mode and Alarm Status word in the loop table, as shown to the right. We highly recommend using ladder logic to monitor these bits. The bit-of-word instructions make this easy to do. Additionally, you can monitor PID alarms using DirectSOFT.
PID Mode and Alarm Status V+06 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Red Deviation Yellow Deviation
The PV Deviation Alarm can be independently enabled and disabled from the other PV alarms, using bit 13 of the PID Mode 1 Setting V+00 word. Remember, the alarm hysteresis feature works in conjunction with both the deviation and absolute value alarms, and is discussed at the end of this section.
DL405 User Manual, 4th Edition
Page 465
PID Loop Operation (DL450 only)
8--37
PV Rate--of--Change Alarm An excellent way to get an early warning of a process fault is to monitor the rate-of-change of the PV. Most batch processes have large masses and slowly-changing PV values. A relatively fast-changing PV will result from a broken signal wire for either the PV or control output, a SP value error, or other causes. If the operator responds to a PV Rate-of-Change Alarm quickly and effectively, the PV absolute value will not reach the point where the material in process would be ruined. The DL450 loop controller provides a programmable PV Rate-of-Change Alarm, as shown below. The rate-of-change is specified in PV units change per loop sample time. This value is programmed into the loop table location V+21. Loop Table PV slope OK
PV slope excessive
V+21
XXXX
PV Rate-of-Change Alarm
PV PID Mode and Alarm Status V+06 rate-of-change alarm Sample time
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Sample time
As an example, suppose the PV is temperature for our process, and we want an alarm when the temperature changes faster than 15 degrees/minute. We must know PV counts per degree and the loop sample rate. Then, suppose the PV value (in V+03 location) represents 10 counts per degree, and the loop sample rate is 2 seconds. We will use the formula below to convert our engineering units to counts/sample period: Alarm Rate-of-Change =
15 degrees 1 minute
X
10 counts / degree 30 loop samples / min.
=
150 30
=
PID Loop Operation (DL450 Only)
PV Rate of Change Alarm
5 counts / sample period
DL405 User Manual, 4th Edition
Maintenance
From the calculation result, we would program the value “5” in the loop table for the rate-of-change. The PV Rate-of-Change Alarm can be independently enabled and disabled from the other PV alarms, using bit 14 of the PID Mode 1 Setting V+00 word. The alarm hysteresis feature (discussed next) does not affect the Rate-of-Change Alarm.
Page 466
8--38
PID Loop Operation (DL450 only) PV Alarm Hysteresis The PV Absolute Value Alarm and PV Deviation Alarm are programmed using threshold values. When the absolute value or deviation exceeds the threshold, the alarm status becomes true. Real-world PV signals have some noise on them, which can cause some fluctuation in the PV value in the CPU. As the PV value crosses an alarm threshold, its fluctuations cause the alarm to be intermittent and annoy process operators. The solution is to use the PV Alarm Hysteresis feature. The PV Alarm Hysteresis amount is programmable from 1 to 200 (binary/decimal). When using the PV Deviation Alarm, the programmed hysteresis amount must be less than the programmed deviation amount. The figure below shows how the hysteresis is applied when the PV value goes past a threshold and descends back through it. Alarm threshold Hysteresis Loop Table
PV
V+22
XXXX
PV Alarm Hysteresis
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
Alarm 1 0
The hysteresis amount is applied after the threshold is crossed, and toward the safe zone. In this way, the alarm activates immediately above the programmed threshold value. It delays turning off until the PV value has returned through the threshold by the hysteresis amount. Alarm Programming Error The PV Alarm threshold values must have certain mathematical relationships to be valid. The requirements are listed below. If not met, the Alarm Programming Error bit will be set, as indicated to the right.
PID Mode and Alarm Status V+06 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Alarm Programming Error
PV Absolute Alarm value requirements: Low-low < Low < High < High-high S PV Deviation Alarm requirements: Yellow < Red Loop Calculation Overflow/Underflow Error S
This error occurs whenever the output reaches it’s upper or lower limit and the PV does not reach the setpoint. A typical example might be when a valve is stuck, the output is at it’s limit, but the PV has not reached setpoint.
PID Mode and Alarm Status V+06 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Loop Calculation Overflow/Underflow Error
NOTE: Overflow/underflow can be alarmed in PID View. The optional C--more operator interface panel (see the automationdirect.com website) can also be setup to read these error bits using the PID Faceplate templates.
DL405 User Manual, 4th Edition
Page 467
PID Loop Operation (DL450 only)
8--39
Ramp/Soak R/S (Ramp/Soak) is the last dialog available in the PID setup. The basic PID does not require any entries to be made in order to operate the PID loop. Ramp/Soak will be discussed in another section in this chapter.
PID Loop Operation (DL450 Only)
Complete the PID Setup Once you have filled in the necessary information for the basic PID setup, the configuration should be saved. The icons on the Setup PID dialog will allow you to save the configuration to the PLC and to disk. The save to icons have the arrow pointing to the PLC and disk. The read from icons have the arrows pointing away from the PLC and disk. An optional feature is available with the Doc tab in the Setup PID window. You enter a name and description for the loop. This is useful if there are more than one PID loop in your application.
Maintenance
NOTE: It is good practice to save your project after setting up the PID loop by selecting File from the menu toolbar, then Save project > to disk. In addition to saving your entire project, all the PID parameters are also saved.
DL405 User Manual, 4th Edition
Page 468
8--40
PID Loop Operation (DL450 only)
PID Loop Tuning
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
Once you have set up a PID loop, it must be tuned in order for it to work. The goal of loop tuning is to adjust the loop gains so the loop has optimal performance in dynamic conditions. The quality of a loop’s performance may generally be judged by how well the PV follows the SP after a SP step change. It is important to keep in mind that understanding the process is fundamental to getting a well designed control loop. Sensors must be in appropriate locations and valves must be sized correctly with appropriate trim. PID control does not have typical values. There isn’t one control process that is identical to another. Manual Tuning vs. Auto Tuning You may enter the PID gain values to tune your loops (manual tuning), or you can rely on the PID processing “engine“ in the CPU to automatically calculate the gain values (auto tuning). Most experienced process engineers will have a favorite method; the DL450 will accommodate either preference. The use of auto tuning can eliminate much of the trial--and--error of the manual tuning approach, especially if you do not have a lot of loop tuning experience. However, performing the auto tuning procedure will get the gains close to optimal values, but additional manual tuning can get the gain values to their optimal values. WARNING: Only authorized personnel fully familiar with all aspects of the process should make changes that affect the loop tuning constants. Using the loop auto tune procedures will affect the process, including inducing large changes in the control output value. Make sure you thoroughly consider the impact of any changes to minimize the risk of injury to personnel or damage to equipment. The auto tune in the DL450 is not intended to be used as a replacement for your process knowledge. Open--Loop Test
Whether you use manual or auto tuning, it is very important to verify basic characteristics of a newly--installed process before attempting to tune it. With the loop in Manual Mode, verify the following items for each new loop. S Setpoint y verify that the SP source can generate a setpoint. Put the PLC in Run Mode and leave the loop in Manual Mode, then monitor the loop table location V+02 to see the SP value(s). (If you are using the ramp/soak generator, test it now). S Process Variable y verify that the PV value is an accurate measurement, and the PV data arriving in the loop table location V+03 is correct. If the PV signal is very noisy, consider filtering the input either through hardware (RC low--pass filter), or using the filter in this chapter. S Control Output y if it is safe to do so, manually change the output a small amount (perhaps 10%) and observe its affect on the process variable. Verify the process is direct--acting or reverse acting, and check the setting for the control output (inverted or non--inverted). Make sure the control output upper and lower limits are not equal to each other. S Sample Rate y while operating open--loop, this is a good time to find the ideal sample rate (see Configure the PID Loop beginning on page 8--25). However, if you are going to use auto tuning, the auto tuning procedure will automatically calculate the sample rate in addition to the PID gains.
DL405 User Manual, 4th Edition