Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 50 of 68

DL405 User Manual: Chapter 8: PID Loop Operation (DL450 only), pages 439 to 448

Pages 439 to 448 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 439

PID Loop Operation (DL450 only) Freeze Bias

Adjusting the Bias

8--11

Maintenance

DL405 User Manual, 4th Edition

PID Loop Operation (DL450 Only)

If the “Freeze Bias” option is selected when setting up the PID loop (discussed later) then the CPU simply stops changing the bias (Mx) whenever the computed normalized output (M) goes outside the interval 0.0 to 1.0. Mx = Ki * en + Mxn--1 M = Kc * en -- Kr(PVn -- PVn--1) + Mx Mn = 0 “if M < 0” “if 0 < M > 1” Mn = M “if M > 1” Mn = 1 Mxn = Mx “if 0 < M > 1” “otherwise” Mxn = Mxn--1 Thus in this example, the bias will probably not go all the way to zero so that, when the PV does begin to come down, the loop will begin to open the valve sooner than it would have if the bias had been allowed to go all the way to zero. This action has the effect of reducing the amount of overshoot. The normal action of the CPU is to adjust the bias term when the output goes out of range as shown below. Mx = Ki * en + Mxn--1 M = Kc * en -- Kr(PVn -- PVn--1) + Mx Mn = 0 “if M < 0” “if 0 < M > 1” Mn = M “if M > 1” Mn = 1 Mxn = Mx “if 0 < M > 1” Mxn = Mn -- Kc * en -- Kr(PVn -- PVn--1) “otherwise” By adjusting the bias, the valve will begin to open as soon as the PV begins to come down. If the loop is properly tuned, overshoot can be eliminated entirely. If the output went out of range due to a setpoint change, then the loop probably will oscillate because we must wait for the bias term to stabilize again. The choice of whether to use the default loop action or to freeze the bias is dependent on the application. If large step changes to the setpoint are anticipated, then it is probably better to select the freeze bias option (see page 8--34).

Page 440

8--12

PID Loop Operation (DL450 only)

Step Bias Proportional to Step Change SP

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

Eliminating Proportional, Integral or Derivative Action

Velocity Form of the PID Equation

This feature reduces oscillation caused by a step change in setpoint when the adjusting bias feature is used. Mx = Mx * SPn / SPn--1 if the loop is direct acting Mx = Mx * SPn--1 / SPn if the loop is reverse acting Mxn = 0 “if Mx < 0” Mxn = Mx “if 0 < Mx > 1” “if M > 1” Mxn = 1 It is not always necessary to run a full three mode PID control loop. Most loops require only the PI terms or just the P term. Parts of the PID equation may be eliminated by choosing appropriate values for the gain (Kc), reset (Ti) and rate (Td) yielding a P, PI, PD, I and even an ID and a D loop. Eliminating Integral Action The effect of integral action on the output may be eliminated by setting Ti = 9999 or 0000. When this is done, the user may then manually control the bias term (Mx) to eliminate any steady--state offset. Eliminating Derivative Action The effect of derivative action on the output may be eliminated by setting Td = 0 (most loops do not require a D parameter; it may make the loop unstable). Eliminating Proportional Action Although rarely done, the effect of proportional term on the output may be eliminated by setting Kc = 0. Since Kc is also normally a multiplier of the integral coefficient (Ki) and the derivative coefficient (Kr), the CPU makes the computation of these values conditional on the value of \Kc as follows: Ki = Kc * (Ts / Ti) “if Kc ¸ 0” Ki = Ts / Ti “if Kc = 0 (I or ID only)” Kr = Kc * (Td / Ts) “if Kc ¸ 0” Kr = Td / Ts “if Kc = 0 (ID or D only)” The standard position form of the PID equation computes the actual actuator position. An alternative form of the PID equation computes the change in actuator position. This form of the equation is referred to as the velocity PID equation and is obtained by subtracting the equation at time “n“ from the equation at time “n--1“. The velocity equation is given by: nMn = M -- Mn--1

DL405 User Manual, 4th Edition

Page 441

PID Loop Operation (DL450 only)

8--13

Maintenance

DL405 User Manual, 4th Edition

PID Loop Operation (DL450 Only)

Bumpless Transfer The DL450 loop controller provides for bumpless mode changes. A bumpless transfer from manual mode to automatic mode is achieved by preventing the control output from changing immediately after the mode change. When a loop is switched from Manual mode to Automatic mode, the setpoint and Bias are initialized as follows: Position PID Algorithm Velocity PID Algorithm SP = PV SP = PV Mx = Control Ouput The bumpless transfer feature of the DL450 is available in two types: Bumpless I and Bumpless II (see page 8--27). The transfer type is selected when the loop is set up. The DL450 allows the user to specify alarm conditions that are to be monitored for Loop Alarms each loop. Alarm conditions are reported to the CPU by setting up the alarms in DirectSOFT using the PID setup alarm dialog when the loop is setup. The alarm features for each loop are: S PV Limit y Specify up to four PV alarm points. High--High PV rises above the programmed High--High Alarm Limit. High PV rises above the programmed High Alarm Limit. Low PV fails below the Low Alarm Limit. Low--Low PV fails below the Low--Low Limit. S PV Deviation Alarm y Specify an alarm for High and Low PV deviation from the setpoint (Yellow Deviation). An alarm for High High and Low Low PV deviation from the setpoint (Orange Deviation) may also be specified. When the PV is further from the setpoint than the programmed Yellow or Orange Deviation Limit the corresponding alarm bit is activated. S Rate--of--Change y This alarm is set when the PV changes faster than a specified rate--of--change limit. S PV Alarm Hysteresis y The PV Limit Alarms and PV Deviation Alarms 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 will cause the alarm to be intermittent and annoy process operators. The solution is to use the PV Alarm Hysteresis feature.

Page 442

8--14

PID Loop Operation (DL450 only)

Loop Operating Modes

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

Special Loop Calculations

The DL450 loop controller operates in one of two modes, either Manual or Automatic. Manual In manual mode, the control output is determined by the operator, not the loop controller. While in manual mode, the loop controller will still monitor all of the alarms including High--High, High, Low, Low--Low, Yellow deviation, Orange deviation and Rate--of--Change. Automatic In automatic mode, the loop controller computes the control output based on the programmed parameters stored in V--memory. All alarms are monitored while in automatic. Cascade Cascade mode is an option with the DL450 PLC and is used in special control applications. If the cascade feature is used, the loop will operate as it would if in automatic mode except for the fact that a cascaded loop has a setpoint which is the control output from another loop. Reverse Acting Loop Although the PID algorithm is used in a direct, or forward, acting loop controller, there are times when a reverse acting control output is needed. The DL450 loop controller allows a loop to operate as reverse acting. With a reverse acting loop, the output is driven in the opposite direction of the error. For example, if SP > PV, then a reverse acting controller will decrease the output to increase the PV. Mx = --Ki * en + Mxn--1 M = --Kc * en + Kr(PVn --PVn--1) + Mxn Square Root of the Process Variable Square root is selected whenever the PV is from a device such as an orifice meter which requires this calculation. Error Squared Control Whenever error squared control is selected, the error is calculated as: en = (SP -- PVn) * ABS(SP -- PVn) A loop using the error squared is less responsive than a loop using just the error, however, it will respond faster with a large error. The smaller the error, the less responsive the loop. Error squared control would typically be used in a pH control application.

DL405 User Manual, 4th Edition

Page 443

PID Loop Operation (DL450 only)

8--15

Error Deadband Control With error deadband control, no control action is taken if the PV is within the specified deadband area around the setpoint. The error deadband is the same above and below the setpoint. Once the PV is outside of the error deadband around the setpoint, the entire error is used in the loop calculation. “SP -- Deadband__Below_SP < PV < SP -- Deadband_Above_SP” en = 0 “otherwise” en = P -- PVn The error will be squared first if both Error Squared and Error Deadband is selected. Derivative Gain Limiting When the coefficient of the derivative term, Kr, is a large value, noise introduced into the PV can result in erratic loop output. This problem is corrected by specifying a derivative gain limiting coefficient, Kd. Derivative gain limiting is a first order filter applied to the derivative term computation, Yn, as shown below. Yn = Yn--1 +

__________ Ts Ts + ( Td )

* (PVn = Yn--1 )

Kd

PID Loop Operation (DL450 Only)

Position Algorithm Mx = Ki * en + Mxn--1 M = Kc * en -- Kr * (Yn --Yn--1) + Mx Velocity Algorithm nM = Kc * (en -- en--1) + Ki * en -- Kr * (Yn -- 2 * Yn--1 + Yn--2)

Maintenance DL405 User Manual, 4th Edition

Page 444

8--16

PID Loop Operation (DL450 only)

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

Ten Steps to Successful Process Control Modern electronic controllers such as the DL450 CPU provide sophisticated process control features. Automated control systems can be very difficult to debug, because a given symptom can have many possible causes. We recommend a careful, step-by-step approach to bringing new control loops online: The most important knowledge is -- how to produce your product. This knowledge is Step 1: the foundation for designing an effective control system. A good process recipe will Know the Recipe do the following: S Identify all relevant Process Variables, such as temperature, pressure, or flow rates, etc. which need precise control. S Plot the desired Setpoint values for each of the process variables for the duration of one process cycle. Step 2: This simply means choosing the method the machine will use to maintain control over the Process Variables to follow their Setpoints. This involves many issues and Plan Loop trade-offs, such as, energy efficiency, equipment costs, ability to service the Control Strategy machine during production, and more. You must also determine how to generate the Setpoint value during the process, and whether a machine operator can change the SP. Step 3: Assuming the control strategy is sound, it is still crucial to properly size the actuators and properly scale the sensors. Size and Scale Loop Components S Choose an actuator (heater, pump. etc.) which matches the size of the load. An oversized actuator will have an overwhelming effect on your process after a SP change. However, an undersized actuator will allow the PV to lag or drift away from the SP after a SP change or process disturbance. S Choose a PV sensor which matches the range of interest (and control) for our process. Decide the resolution of control you need for the PV (such as within 2°C), and make sure the sensor input value provides the loop with at least 5 times that resolution (at LSB level). However, an over-sensitive sensor can cause control oscillations, etc. The DL450 provides 12-bit and 15-bit, unipolar and bipolar data format options, and a 16--bit unipolar option. This selection affects SP, PV, Control Output, and Integrator sum. Step 4: After deciding the number of loops, PV variables to measure, and SP values, you Select I/O Modules can choose the appropriate I/O modules. Refer to the figure on the next page. In many cases, you will be able to share input or output modules among several control loops. The example shown sends the PV and Control Output signals for two loops through the same set of modules. Up to four loops could be handled by the modules shown. AutomationDirect offers DL405 analog modules with 4, 8, and 16 channels per module in various signal types and ranges. Also available are thermocouple and RTD modules which can be used to maintain temperatures to within a 10th of a degree. Refer to our sales catalog for further information on these modules, or find the modules on our website, www.automationdirect.com.

DL405 User Manual, 4th Edition

Page 445

PID Loop Operation (DL450 only)

DL450 CPU V-memory

Input Module

Loop 1 Data

Channel 1

PV

Channel 2

PV

SP

OUT

Loop 2 Data SP

OUT

8--17

Output Module Channel 1 Channel 2

Channel 3

Channel 3

Channel 4

Channel 4

Process 1 Process 2

After selection and procurement of all loop components and I/O modules, we can perform the wiring and installation. Refer to the wiring guidelines in Chapter 2 of this Manual, and to the DL405 Analog I/O Module manual as needed. The most commonly overlooked wiring details when installing PID loop controls are: S Reversing the polarity of sensor or actuator wiring connections. S Incorrect signal ground connections between loop components.

Step 6: Loop Parameters

After wiring and installation, choose the loop setup parameters. The easiest method for programming the loop tables is by using DirectSOFT. This software provides PID Setup using dialog boxes to simplify the task. Note: It is important to understand the meaning of all loop parameters mentioned in this chapter before choosing values to enter. With the sensor and actuator wiring completed, and loop parameters entered, the Manual mode must be used to manually and carefully check out the new control system. S Verify that the PV value from the sensor is correct. S If it is safe to do so, gradually increase the control output up above 0%, and see if the PV responds (and moves in the correct direction!).

Step 7: Check Open Loop Performance

If the open loop test (page 8--40) shows the PV reading is good and the control output has the proper effect on the process; follow the closed--loop auto tuning procedure (see page 8--45). In this step, the loop is tuned so the PV automatically follows the SP. Step 9: If the closed loop test shows PV will follow small changes in the SP, consider running Run Process Cycle an actual process cycle. The programming which will generate the desired SP in real time must be completed. In this step, it may desirable to run a small test batch of product through the machine, while watching the SP change according to the recipe. WARNING: Be sure the Emergency Stop and power-down provision is readily accessible, in case the process goes out of control. Damage to equipment and/or serious injury to personnel can result from loss of control of some processes. Step 10: Save Loop Parameters

When the loop tests and tuning sessions are complete, be sure to save all loop setup parameters to disk.

DL405 User Manual, 4th Edition

Maintenance

Step 8: Loop Tuning

PID Loop Operation (DL450 Only)

Step 5: Wiring and Installation

Page 446

8--18

PID Loop Operation (DL450 only)

PID Loop Setup Some Things to Do Have your analog module installed and operational before beginning the loop setup (refer to the DL405 Analog I/O Modules Manual, D4--ANLG--M). The DL450 CPU and Know Before gets its PID loop processing instructions from V--memory tables. There isn’t a PID Starting instruction that can be used in RLL, such as a block, to setup the PID loop control. Instead, the CPU reads the setup parameters from system V--memory locations. These locations are shown in the table below for reference only; they can be used in a RLL program if needed. Address

Setup Parameter

Data type

Ranges

Read/Write

V7640

Loop Parameter Table Pointer

Octal

V1400 -- V7340, V10000 -- V37740 write

V7641

Number of Loops

BCD

0 -- 16 write

V7642

Loop Error Flags

Binary

0 or 1 read

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

If the number of loops is “0”, the loop controller task is turned off during the ladder program scan. The loop controller will allow use of loops in ascending order, beginning with 1. For example, you cannot use loop 1 and 4 while skipping 2 and 3. The loop controller attempts to control the full number of loops specified in V7641. PID Error Flags

The CPU reports any programming errors of the setup parameters in V7640 and V7641. It does this by setting the appropriate bits in V7642 on program-to-run mode transitions.

PID Error Flags, V7642 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

If you use the DirectSOFT loop setup dialog box, its automatic range checking prohibits possible setup errors. However, the setup parameters may be written using other methods such as RLL, so the error flag register may be helpful in those cases. The following table lists the errors reported in V7642. Bit

Error Description (0 = no error, 1 = error)

0

The starting address (in V7640) is out of the lower V-memory range.

1

The starting address (in V7640) is out of the upper V-memory range.

2

The number of loops selected (in V7641) is greater than 16.

3

The loop table extends past (straddles) the boundary at V7377. Use an address closer to V1400.

4

The loop table extends past (straddles) the boundary at V37777. Use an address closer to V10000.

As a quick check, if the CPU is in Run mode and V7642=0000, then we know there are no programming errors.

DL405 User Manual, 4th Edition

Page 447

PID Loop Operation (DL450 only) Establishing the Loop Table Size and Location

8--19

On a PROGRAM-to-RUN mode transition, the CPU reads the loop setup parameters as pictured below. At that moment, the CPU learns the location of the loop table and the number of loops it configures. Then during the ladder program scan, the PID Loop task uses the loop data to perform calculations, generate alarms, and so on. There are some loop table parameters the CPU will read or write on every loop calculation. CPU Tasks

Ladder Program

V--Memory Space

READ/ WRITE

User Data

LOOP DATA CONFIGURE/ MONITOR

PID Loop Task READ (at powerup)

Setup Parameters V7640, V7641 DirectSOFT 5 Programming Software

NOTE: Whether one or more loops are being setup, this block of V--memory will only be used for the PID loop parameters, do not use this block of memory for anything else in your program.

DL405 User Manual, 4th Edition

Maintenance

The Loop Table contains data for only the V--Memory Space number of loops selected. The address for User Data the table is stored in V7641. Each loop V2000 LOOP #1 configuration occupies 32 words (0 to 37 V2037 32 words octal) in the loop table. LOOP #2 V2040 For example, consider an application with 32 words V2077 4 loops, and V2000 has been chosen as LOOP #3 the starting location. The Loop Parameter 32 words will occupy V2000 -- V2037 for loop 1, LOOP #4 V2040 -- V2077 for loop 2 and so on. Loop 32 words 4 occupies V2140 -- V2177. Determine the block of V--memory to be used for each PID loop. Besides being the beginning of the PID parameter memory block, the first address will be the start of loop 1 parameters. Remember, there are 32 words (0 to 37 octal) needed for each loop. Once you have determined the beginning V--memory address to be used, you can setup and store the PID parameters either directly in your RLL program or by the using PID Setup in DirectSOFT.

PID Loop Operation (DL450 Only)

NOTE: The DL450 CPU’s PID algorithm requires at least DirectSOFT32, version 3.0c, Build 58 (or later) and CPU firmware version 1.9 (H8) and 2.446 (SH) (or later), or DirectSOFT 5, version 5.0 (or later). See our website for more information: www.automationdirect.com.

Page 448

8--20

PID Loop Operation (DL450 only)

First type the beginning address in the PID Table Address dialog. After the address has been entered, the memory range will appear. Also, entering the number of PID loops (1 to 16) will set the total V--memory range for the number of loops entered. After the V--memory address has been entered, the necessary PID parameters for a basic loop operation for each loop can be setup with the dialogs made available.

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

Using DirectSOFT is the simplest way to setup the parameters. The DL450 PID parameters can be setup either offline or online while developing the user program. The parameters will be loaded to V--memory as the program is loaded into the PLC. If the PID parameters are setup or changed while the PLC is connected to the programming computer, this can only be done in Program Mode. To begin the PID setup, open an edited program with DirectSOFT, then click on PLC > Setup > PID to access the Setup PID dialog which is pictured below.

DL405 User Manual, 4th Edition