The text of a manual · part 53 of 68
DL405 User Manual: Chapter 8: PID Loop Operation (DL450 only), pages 469 to 478
Pages 469 to 478 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 469
PID Loop Operation (DL450 only) Manual Tuning Procedure
8--41
It is not necessary to try to obtain the best values for the P, I and D parameters in the PID loop by trial and error. Following is a typical procedure for tuning a temperature control loop which you may use to tune your loop. Monitor the values of SP, PV and CV with a loop trending instrument or use the PID View feature in DirectSOFT (see page 8--49). NOTE: We recommend using the PID View to select manual for the vertical scale feature, for both SP/PV area and Bias/Control Output areas. The auto scaling feature would otherwise change the vertical scale on the process parameters and add confusion to the loop tuning process. S
S S S
S
S
Increase the Proportional gain in small increments, such as 4, 6, 7, etc. until the control output response begins to oscillate. This is the Proportional gain that should be recorded.
DL405 User Manual, 4th Edition
Maintenance
The response may take awhile, but you will see that there isn’t any oscillation. This response is not desirable since it takes a long time to correct the error; also, there is a difference between the SP and the PV. S Increase the Proportional gain, for example to 2.0. The control output will be greater and the response time will be quicker. The trend should resemble the figure below.
PID Loop Operation (DL450 Only)
Adjust the gains so the Proportional Gain = 0.5 or 1.0 (1.0 is a good value based on experience), Integral Gain = 9999 (this basically eliminates reset) and Derivative Gain = 0000. This disables the integrator and derivative terms, and provides some proportional gain. Check the bias value in the PID View and set it to zero. Set the SP to a value equal to 50% of the full range. Now, select Auto Mode. If the loop will not stay in Auto Mode, check the troubleshooting tips at the end of this chapter. Allow the PV to stabilize around the 50% point of the range. Change the SP to the 60% point of the range.
Page 470
8--42
PID Loop Operation (DL450 only)
S S
PID Loop Operation (DL450 Only)
S
Maintenance and Troubleshooting
S
S
DL405 User Manual, 4th Edition
Now, return the Proportional gain to the stable response, for example, 9.7. The error, SP--PV, should be small, but not at zero. Next, add a small amount of Integral gain (reset) in order for the error to reach zero. Begin by using 80 seconds (adjust in minutes if necessary). The error should get smaller. Set the Integral gain to a lower value, such as 50 for a different response. If there is no response, continue to decrease the reset value until the response becomes unstable. See the figure below.
For discussion, let us say that a reset value of 35 made the control output unstable. Return the reset value to the stable value, such as 38. Be careful with this adjustment since the oscillation can destroy the process. The control output response should be optimal now, without a Derivative gain. The example recorded values are: Proportional gain = 9.7 and Integral gain = 38 seconds. Note that the error has been minimized.
Page 471
PID Loop Operation (DL450 only)
8--43
The foregone method is the most common method used to tune a PID loop. Derivative gain is almost never used in a temperature control loop. This method can also be used for other control loops, but other parameters may need to be added for a stable control output. Test your loop for a high PV of 80% and again for a low PV of 20%, and correct the values if necessary. Small adjustments of the parameters can make the control output more precise or more unstable. It is sometimes acceptable to have a small overshoot to make the control output react quicker. The derivative gain can be helpful for those control loops which are not controlling temperature. For these loops, try adding a value of 0.5 for the derivative gain and see if this improves the control output. If there is little or no response, increase the derivative by increments of 0.5 until there is an improvement to the output trend. Recall that the derivative gain reacts with a rate of change of the error.
PID Loop Operation (DL450 Only) Maintenance DL405 User Manual, 4th Edition
Page 472
8--44
PID Loop Operation (DL450 only)
Auto Tuning Procedure
The auto tuning feature for the DL450 loop controller will only run once each time it is enabled in the PID table. Therefore, auto tuning does not run continuously during operation (this would be adaptive control). Whenever there is a substantial change in loop dynamics, such as mass of process, size of actuator, etc., the tuning process will need to be repeated in order to derive new gains required for optimal control.
Once the physical loop components are connected to the PLC, auto tuning can be initiated within DirectSOFT (see the DirectSOFT Programming Software Manual), and it can be used to establish initial PID parameter values. Auto tuning is the best “guess“ the CPU can do after some trial tests. The loop controller offers both closed--loop and open--loop methods. The following sections describe how to use the auto tuning feature, and what occurs in open and closed--loop auto tuning. The controls for the auto tuning function use three bits in the PID Mode 2 word V+01, as shown below. DirectSOFT will manipulate these bits automatically when you use the auto tune feature within DirectSOFT. Or, you may have your ladder logic access these bits directly for allowing control from another source such as a dedicated operator interface. The individual control bits allow you to start the auto tune procedure, select PID or PI tuning and select closed--loop or open--loop tuning. If you select PI tuning, the auto tune procedure leaves the derivative gain at 0. The Loop Mode and Alarm Status word V+06 reports the auto tune status as shown. Bit 12 will be on (1) during the auto tune cycle, automatically returning to off (0) when done.
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
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 tuning 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.
DL405 User Manual, 4th Edition
Page 473
PID Loop Operation (DL450 only)
8--45
Open--Loop Auto Tuning During an open--loop auto tuning cycle, the loop controller operates as shown in the diagram below. Before starting this procedure, place the loop in Manual Mode and ensure the PV and control output values are in the middle of their ranges (away from the end points).
NOTE: In theory, the SP value does not matter in this case, because the loop is not closed. However, the requirement of the firmware is that the SP value must be more than 5% of the PV range from the actual PV before starting the auto tune cycle (for the DL450, 12 bit PV should be 205 counts or more below the SP for forward--acting loops, or 205 counts or more above the SP for reverse--acting loops).
Maintenance
DL405 User Manual, 4th Edition
PID Loop Operation (DL450 Only)
When auto tuning, the loop controller induces a step change on the output and simply observes the response of the PV. From the PV response, the auto tune function calculates the gains and the sample time. It automatically places the results in the corresponding registers in the loop table. The following timing diagram shows the events which occur in the open--loop auto tuning cycle. The auto tune function takes control of the control output and induces a 10%--of--span step change. If the PV change which the loop controller observes is less than 2%, then the step change on the output is increased to 20%--of--span. S When Auto Tune starts, step change output m = 10% S During Auto Tune, the controller output reached the full scale positive limit. Auto Tune stopped and the Auto Tune Error bit in the Alarm word bit turned on. S When PV change is under 2%, output is changed at 20%. Open Loop Auto Tune Cycle Wave: Step Response Method.
Page 474
8--46
PID Loop Operation (DL450 only) When the loop tuning observations are complete, the loop controller computes Rr (maximum slope in %/sec.) and Lr (dead time in sec). The auto tune function computes the gains according to the Zeigler--Nichols equations, shown below: PID Tuning
SP Range
P = 1.2* nm/LrRr
P = 0.9* nm/LrRr
I = 2.0* Lr
I = 3.33* Lr
D = 0.5* Lr
D=0
Sample Rate = 0.056* Lr
Sample Rate = 0.12* Lr
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
nm = Output step change (10% = 0.1, 20% = 0.2)
We highly recommend using DirectSOFT for the auto tuning interface. The duration of each auto tuning cycle will depend on the mass of the process. A slowly--changing PV will result in a longer auto tune cycle time. When the auto tuning is complete, the proportional, integral, and derivative gain values are automatically updated in loop table locations V+10, V+11, and V+12 respectively. The sample time in V+07 is also updated automatically. You can test the validity of the values the auto tuning procedure yields by measuring the closed--loop response of the PV to a step change in the output. The instructions on how to do this are in the section on the manual tuning procedure (located prior to this auto tuning section). Closed--Loop Auto Tuning During a closed--loop auto tuning cycle the loop controller operates as shown in the diagram below.
When auto tuning, the loop controller imposes a square wave on the output. Each transition of the output occurs when the PV value crosses over/under the SP value. Therefore, the frequency of the limit cycle is roughly proportional to the mass of the process. From the PV response, the auto tune function calculates the gains and the sample time. It automatically places the results in the corresponding registers in the loop table.
DL405 User Manual, 4th Edition
Page 475
PID Loop Operation (DL450 only)
8--47
The following timing diagram shows the events which occur in the closed--loop auto tuning cycle. The auto tune function examines the direction of the offset of the PV from the SP. The auto tune function then takes control of the control output and induces a full--span step change in the opposite direction. Each time the sign of the error (SP y PV) changes, the output changes full--span in the opposite direction. This proceeds through three full cycles.
Kpc = 4M / (π £ X0)
PID Loop Operation (DL450 Only)
*Mmax = Output Value upper limit setting. Mmin = Output Value lower limit setting. * This example is direct--acting. When set to reverse--acting, the output will be inverted. When the loop tuning observations are complete, the loop controller computes To (bump period) and Xo (amplitude of the PV). Then it uses these values to compute Kpc (sensitive limit) and Tpc (period limit). From these values, the loop controller auto tune function computes the PID gains and the sample rate according to the Zeigler--Nichols equations shown below: Tpc = 0
M = Amplitude of output PI Tuning
P = 0.45 £ Kpc
P = 0.30 £ Kpc
I = 0.60 £ Tpc
I = 1.00 £ Tpc
D = 0.10 £ Tpc
D=0
Sample Rate = 0.014 £ Tpc
Sample Rate = 0.03 £ Tpc
Auto Tuning Error In open--loop tuning, if the auto tune error bit (bit 13 of loop Mode/Alarm status word V+06) is on, please verify the PV and SP values are at least 5% of full scale difference, as required by the auto tune function. NOTE: If your PV fluctuates rapidly, you probably need to create a filter in ladder logic (see example on page 8--54).
DL405 User Manual, 4th Edition
Maintenance
PID Tuning
Page 476
8--48
PID Loop Operation (DL450 only)
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
Use DirectSOFT 5 Data View with PID View Open a New Data View Window
Open PID View
The Data View window is a very useful tool which can be used to help tune your PID loop. You can compare the variables in the PID View with the actual values in the V--memory location with Data View. A new Data View window can be opened in any one of three ways; the menu bar Debug > Data View > New, the keyboard shortcut Ctrl + Shift + F3 or the Data button on the Status toolbar. By default, the Data View window is assigned Data1 as the default name. This name can be changed for the current view using the Options dialog. The following diagram is an example of a newly opened Data View. The window will open next to the Ladder View by default.
The Data View window can be used just as it is shown above for troubleshooting your PID logic, and it can be most useful when tuning the PID loop. The PID View can only be opened after a loop has been setup in your ladder program and the programming computer is connected to the PLC (online). PID View is opened by selecting it from the View submenu on the Menu bar, View > PID View. The PID View can also be opened by clicking on the PID View button from the PLC Setup toolbar if it is in view.
DL405 User Manual, 4th Edition
Page 477
PID Loop Operation (DL450 only)
8--49
The PID View will open and appear over the Ladder View which can be brought into view by clicking on it’s tab. When using the Data View and the PID View together, each view can be sized for better use as shown on the facing page.
PID Loop Operation (DL450 Only)
The two views are now ready to be used to tune your loop. You will be able to see where the PID values have been set and see the process that it is controlling.
Maintenance DL405 User Manual, 4th Edition
Page 478
8--50
PID Loop Operation (DL450 only) The diagram below illustrates how the to use the views to see the current SP, PV and Output values, along with the other PID addresses. Refer to the Loop Table Definitions page 8--21 for details of each word in the table. This is also a good data type reference for each word in the table. Scale the time axis of the viewing
The trend can be cleared and window by using this input box.
restarted from the left at anytime. Process Variable and Setpoint trends are color coded.
The loop name area turns red whenever there is an
P I D
With both windows positioned in this manner, you are able to see where the PID values have been set and see the process that it is controlling.
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
overflow error.
DL405 User Manual, 4th Edition