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

The text of a manual · part 55 of 68

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

Pages 489 to 498 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 489

PID Loop Operation (DL450 only)

8--61

Program the Refer to the Ramp/Soak Flag Bit Description table on page 8--59 when adding the Ramp/Soak Control control rungs to your program similar to the ladder rungs below. For the example below, the PID parameters begin at V7000. The Ramp/Soak bit flags are located at in Relay Ladder V7033.

PID Loop Operation (DL450 Only) Maintenance DL405 User Manual, 4th Edition

Page 490

8--62

PID Loop Operation (DL450 only) After the Ramp/Soak program has been developed in RLL, test the program. Check your profile by using PID View. If there are any changes to be made in the profile, they are made in the PID Setup R/S profile. Make the changes in Program mode then start the Ramp/Soak process again.

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

Test the Profile

DL405 User Manual, 4th Edition

Page 491

PID Loop Operation (DL450 only)

8--63

Cascade Control Introduction

Cascaded loops are an advanced control technique that is superior to individual loop control in certain situations. As the name implies, cascade means that one loop is connected to another loop. In addition to Manual (open loop) and Auto (closed loop) Modes, the DL450 also provides Cascaded Mode. NOTE: Cascaded loops are an advanced process control technique. Therefore, we recommend their use only for experienced process control engineers. When a manufacturing process is complex and contains a lag time from control input to process variable output, even the most perfectly tuned single loop around the process may yield slow and inaccurate control. It may be that the actuator operates on one physical property, which eventually affects the process variable, measured by a different physical property. Identifying the intermediate variable allows us to divide the process into two parts as shown in the following figure. PROCESS Control input

Process A

Intermediate Variable

Process B

Process Variable (PV)

+

Loop B Calculation

Σ --

Major Loop

Output B/ Setpoint A +

Loop A Calculation

Σ

Output A

External Disturbances

Process A (secondary)

Process B (primary)

-Minor Loop PV, Process A PV, Process B

One of the benefits to cascade control can be seen by examining its response to external disturbances. Remember that the minor loop is faster acting than the major loop. Therefore, if a disturbance affects process A in the minor loop, the Loop A PID calculation can correct the resulting error before the major loop sees the effect.

DL405 User Manual, 4th Edition

Maintenance

Setpoint

External Disturbances

PID Loop Operation (DL450 Only)

The principle of cascaded loops is simply that we add another process loop to more precisely control the intermediate variable! This separates the source of the control lag into two parts, as well. The diagram below shows a cascade control system, showing that it is simply one loop nested inside another. The inside loop is called the minor loop, and the outside loop is called the major loop. For overall stability, the minor loop must be the fastest responding loop of the two. We do have to add the additional sensor to measure the intermediate variable (PV for process A). Notice that the setpoint for the minor loop is automatically generated for us, by using the output of the major loop. Once the cascaded control is programmed and debugged, we only need to deal with the original setpoint and process variable at the system level. The cascaded loops behave as one loop, but with improved performance over the previous single-loop solution.

Page 492

8--64

PID Loop Operation (DL450 only)

Cascaded Loops in In the use of the term “cascaded loops”, we must make an important distinction. Only the minor loop will actually be in the Cascade Mode. In normal operation, the major the DL450 CPU loop must be in Auto Mode. If you have more than two loops cascaded together, the outer-most (major) loop must be in Auto Mode during normal operation, and all inner loops in Cascade Mode. NOTE: Technically, both major and minor loops are “cascaded” in strict process control terminology. Unfortunately, we are unable to retain this convention when controlling loop modes. Just remember that all minor loops will be in Cascade Mode, and only the outer-most (major) loop will be in Auto Mode. You can cascade together as many loops as necessary on the DL450, and you may have multiple groups of cascaded loops. For proper operation on cascaded loops you must use the same data range (12/15 bit) and polar/bipolar settings on the major and minor loop. To prepare a loop for Cascade Mode operation as a minor loop, you must program its remote Setpoint Pointer in its loop parameter table location V+32, as shown below. The pointer must be the address of the V+05 location (control output) of the major loop. In Cascade Mode, the minor loop will ignore the its local SP register (V+02), and read the major loop’s control output as its SP instead. Major Loop (Auto mode) Loop Table

PID Loop Operation (DL450 Only) Maintenance and Troubleshooting

Minor Loop (Cascade Mode) Loop Table

V+02

XXXX

SP

V+02

XXXX

SP

V+03

XXXX

PV

V+03

XXXX

PV

V+05

XXXX

Control Output

V+05

XXXX

Control Output

V+32

XXXX

Remote SP Pointer

When using DirectSOFT’s PID View to watch the SP value of the minor loop, DirectSOFT automatically reads the major loop’s control output and displays it for the minor loop’s SP. The minor loop’s normal SP location, V+02, remains unchanged. Now, we use the loop parameter arrangement above and draw its equivalent loop schematic, shown below. Major loop

Minor Cascaded loop Cascade

Control Output V+05 Loop Calculation Remote SP

Setpoint +

Local SP V+02

Auto/Manual

Σ --

Loop Calculation

Control Output

Process Variable

Remember that a major loop goes to Manual Mode automatically if its minor loop is taken out of Cascade Mode.

DL405 User Manual, 4th Edition

Page 493

PID Loop Operation (DL450 only) Tuning Cascaded Loops

8--65

When tuning cascaded loops, you will need to de--couple the cascade relationship and tune the minor loop, using one of the loop tuning procedures previously covered. Once this has been done, have the minor loop in cascade mode and auto tune the major loop (see Step 4). 1. If you are not using auto tuning, then find the loop sample rate for the minor loop, using the method discussed earlier in this chapter. Then set the sample rate of the major loop slower than the minor loop by a factor of 10. Use this as a starting point. 2. Tune the minor loop first. Leave the major loop in Manual Mode, and you will need to generate SP changes for the minor loop manually as described in the loop tuning procedure. 3. Verify the minor loop gives a critically--damped response to a 10% SP change while in Auto Mode. Then we are finished tuning the minor loop. 4. In this step, you will need to get the minor loop in Cascade Mode, and then the Major loop in Auto Mode. We will be tuning the major loop with the minor loop treated as a series component its overall process. Therefore, do not go back and tune the minor loop again while tuning the major loop. 5. Tune the major loop, following the standard loop tuning procedure in this section. The response of the major loop PV is actually the overall response of the cascaded loops together. PID Loop Operation (DL450 Only) Maintenance DL405 User Manual, 4th Edition

Page 494

8--66

PID Loop Operation (DL450 only)

Time-Proportioning Control

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

The PID loop controller in the DL450 CPU generates a smooth control output signal across a numerical range. The control output value is suitable to drive an analog output module, which connects to the process. In the process control field, this is called continuous control, because the output is on (at some level) continuously. While continuous control can be smooth and robust, the cost of the loop components (such as actuators, heater amplifiers) can be expensive. A simpler form of control is called time-proportioning control. This method uses actuators which are either on or off (no in-between). Loop components for on/off-based control systems are lower cost than their continuous control counterparts. In this section, we will show you how to convert the control output of a loop to time-proportioning control for the applications that need it. Let’s take a moment to review how alternately turning a load on and off can control a process. The diagram below shows a hot-air balloon following a path across some mountains. The desired path is the setpoint. The balloon pilot turns the burner on and off alternately, which is his control output. The large mass of air in the balloon effectively averages the effect of the burner, converting the bursts of heat into a continuous effect, slowly changing balloon temperature and ultimately the altitude, which is the process variable.

Time-proportioning control approximates continuous control by virtue of its duty-cycle -- the ratio of ON time to OFF time. The following figure shows an example of how duty cycle approximates a continuous level when it is averaged by a large process mass. period Desired Effect On/Off Control

On Off

If we were to plot the on/off times of the burner in the hot-air balloon, we would probably see a very similar relationship to its effect on balloon temperature and altitude.

DL405 User Manual, 4th Edition

Page 495

PID Loop Operation (DL450 only)

8--67

The following ladder segment provides a time proportioned on/off control output. It converts the continuous output in V2005 to on/off control, using the ouptut coil, Y0.

On/Off Control Program Example SP +

Loop Calculation

Σ --

Time Proportioning

V2005 continuous

PV

Y0

Process

P V on/off

The example program uses two timers to generate on/off control. It makes the following assumptions, which you can alter to fit your application: S The loop table starts at V2000, so the control output is at V2005. S The data format of the control output is 12-bit, unipolar (0 -- FFF or 0 -- 4095). S The on/off control output is Y0. The control program must “match” the resolution of the PID output to the resolution of the time interval. The time interval for one full cycle of the on/off waveform is 10 seconds. NOTE: Some processes change too fast for time proportioning control. Consider the speed of your process when you choose this control method. Use continuous control for processes that change too fast for time proportioning control. TMRF T0 K1000

T0

At the end of the 10 second period, T0 turns on, and loads the control output value (binary) from the loop table V+05 location (V2005).

BTOR

The BTOR instruction changes the number in the accumulator to a real number.

DIVR R4.095

Dividing the control output by 4.095, converts the 0 -- 4095 range to 0 -- 1000, which “matchs” the preset time for TMRF T0.

RTOB

This instruction converts the real number back to binary. This step prepares the number for conversion to BCD. There is no real-to-BCD instruction.

BCD

Convert the number in the accumulator to BCD format. This satisfies the timer preset format requirement.

T1

TMRF T1 V1400 TA1

K0

Output the result to V1400. In our example, this is the location of the timer preset for TMRF T1. The second fast timer also counts in increments of .01 seconds, so its range is variable from 0 to a maximum of 1000 ticks, or 10 seconds. This timer’s output, T1, turns off the output coil, Y0, when the preset is reached.

Y0 OUT

The N.C. T1 contact, inverts the T1 timer output. The control output is on at the beginning of the 10-second time interval. Y0 turns off when T1 times out. The STRNE contact prevents Y0 from energizing during the one scan when T0 resets T1. Y0 is the actual control output.

END

END coil marks the end of the main program.

DL405 User Manual, 4th Edition

Maintenance

LD V2005

OUT V1400 T0

A fast timer (0.01 sec. timebase) establishes the primary time interval. The constant, K1000, sets the preset at 10 seconds (1,000 ticks). The N.C. enabling contact, T0, makes the timer self-resetting. T0 is on for one scan each 10 seconds, when it resets itself and T1.

PID Loop Operation (DL450 Only)

T0

Page 496

8--68

PID Loop Operation (DL450 only)

Feedforward Control Feedforward control is an enhancement to standard closed-loop control. It is most useful for diminishing the effects of a quantifiable and predictable loop disturbance or sudden change in setpoint. Use of this feature is an option available to you on the DL450. However, it’s best to implement and tune a loop without feedforward, and adding it only if better loop performance is still needed. The term “feed-forward” refers to the control technique involved, shown in the diagram below. The incoming setpoint value is fed forward around the PID equation, and summed with the output. Feedforward path

Setpoint

+ Σ kf

Loop Calculation

--

+ +

Σ

Control Output

Process Variable

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

In the previous section on the bias term, we said that “the bias term value establishes a “working region” or operating point for the control output. When the error fluctuates around its zero point, the output fluctuates around the bias value.” Now, when there is a change in setpoint, an error is generated and the output must change to a new operating point. This also happens if a disturbance introduces a new offset in the loop. The loop does not really “know its way” to the new operating point... the integrator (bias) must increment/decrement until the error disappears, and then the bias has found the new operating point. Suppose that we are able to know a sudden setpoint change is about to occur (common in some applications). We can avoid much of the resulting error in the first place, if we can quickly change the output to the new operating point. If we know (from previous testing) what the operating point (bias value) will be after the setpoint change, we can artificially change the output directly (which is feedforward). The benefits from using feedforward are: S The SP--PV error is reduced during predictable setpoint changes or loop offset disturbances. S Proper use of feedforward will allow us to reduce the integrator gain. Reducing integrator gain gives us an even more stable control system. Feedforward is very easy to use in the DL450 loop controller, as shown below. The bias term has been made available to the user in a special read/write location, at PID Parameter Table location V+04.

kp Setpoint

+ Σ

Error Term ki

Loop Calculation P I

--

Process Variable

DL405 User Manual, 4th Edition kd

D

V+04 XXXX Bias Term

+ +

Σ +

Control Output

Page 497

PID Loop Operation (DL450 only)

8--69

To change the bias (operating point), ladder logic only has to write the desired value to V+04. The PID loop calculation first reads the bias value from V+04 and modifies the value based on the current integrator calculation. Then it writes the result back to location V+04. This arrangement creates a sort of “transparent” bias term. All you have to do to implement feed forward control is write the correct value to the bias term at the right time (the example below shows you how). NOTE: When writing the bias term, one must be careful to design ladder logic to write the value just once, at the moment when the new bias operating point is to occur. If ladder logic writes the bias value on every scan, the loop’s integrator is effectively disabled. Feedforward Example

How do we know when to write to the bias term, and what value to write? Suppose we have an oven temperature control loop, and we have already tuned the loop for optimal performance. Refer to the figure below. We notice that when the operator opens the oven door, the temperature sags a bit while the loop bias adjusts to the heat loss. Then when the door closes, the temperature rises above the SP until the loop adjusts again. Feedforward control can help diminish this effect.

Open

PV

PV sags

Closed

PV excess

Bias

Oven Closed door

Open

Closed

PV Feed-forward

Feed-forward

Bias

The step changes in the bias are the result of our two feed-forward writes to the bias term. We can see that the PV variations are greatly reduced. The same technique may be applied for changes in setpoint.

DL405 User Manual, 4th Edition

Maintenance

First, we record the amount of bias change the loop controller generates when the door opens or closes. Then, we write a ladder program to monitor the position of an oven door limit switch. When the door opens, our ladder program reads the current bias value from V+04, adds the desired change amount, and writes it back to V+04. When the door closes, we duplicate the procedure, but subtracting desired change amount instead. The following figure shows the results.

PID Loop Operation (DL450 Only)

Oven Closed door

Page 498

8--70

PID Loop Operation (DL450 only)

PID Example Program After the PID loop(s) has been setup with DirectSOFT, you will need to edit your RLL program to include the rungs needed to setup the analog I/O module to be used by the PID loop(s).

Maintenance and Troubleshooting

PID Loop Operation (DL450 Only)

Program Setup for the PID Loop

DL405 User Manual, 4th Edition