pide presentation 2

15
PIDE Section 2 Operational Mode Selections The PIDE instruction allows the user to select several different options in how they want it to function. Some of these like Direct/Reverse control action are fairly common. Others are infrequently used. Direct/Reverse Control Action In a direct acting controller, when the error is positive, the output increases. With an indirect acting controller, when the error is positive, the output decreases. The control engineer will select the action type depending on his process and the action of the control valve that he is using. A Boolean input is provided to allow him to select the desired control action. Tag Type Description ControlActio n BOOL Control action request. When set, calculates error as E = PV – SP or Reverse Acting. When cleared, calculates error as E = SP – PV or Direct Acting. Default is cleared (Direct Acting).. Table 1. - Control Action Request Dependent/Independent Gains Algorithm The engineer is given the choice of how he wants the proportional, integral and derivative gains to act on his process. Typically, the dependent ISA gains algorithm is are used when it is desired to use traditional loop tuning methods. When the independent gains algorithm is selected, the three gain constants operate independently from each other. Tag Type Description Depend/ Independ BOOL Dependent/Independent Control request. When set, uses the dependent form of the PID equation, when 1

Upload: blueskiesokie

Post on 28-Nov-2015

40 views

Category:

Documents


2 download

DESCRIPTION

PIDE function block Presentation part 2Allen Bradley

TRANSCRIPT

Page 1: PIDE Presentation 2

PIDE Section 2

Operational Mode Selections

The PIDE instruction allows the user to select several different options in how they want it to function. Some of these like Direct/Reverse control action are fairly common. Others are infrequently used.

Direct/Reverse Control Action

In a direct acting controller, when the error is positive, the output increases. With an indirect acting controller, when the error is positive, the output decreases. The control engineer will select the action type depending on his process and the action of the control valve that he is using. A Boolean input is provided to allow him to select the desired control action.

Tag Type DescriptionControlAction BOOL Control action request. When set, calculates error as E = PV – SP or

Reverse Acting. When cleared, calculates error as E = SP – PV or Direct Acting. Default is cleared (Direct Acting)..

Table 1. - Control Action Request

Dependent/Independent Gains Algorithm

The engineer is given the choice of how he wants the proportional, integral and derivative gains to act on his process. Typically, the dependent ISA gains algorithm is are used when it is desired to use traditional loop tuning methods. When the independent gains algorithm is selected, the three gain constants operate independently from each other.

Tag Type DescriptionDepend/Independ BOOL Dependent/Independent Control request. When set, uses the dependent form

of the PID equation, when cleared, uses the independent form of the equation. Default is cleared.

Table 2. – Dependent/Independent Control Request

Controller Gains

Gains are expressed differently depending upon the algorithm selected as shown above.

Proportional gain = Kp Controller gain = Kc

Integral gain = Ki Reset gain = Ti

Derivative gain = Kd Rate gain = Td

1

Page 2: PIDE Presentation 2

Proportional gain (proportional band) is expressed as: Kp = 1/Kc

Tag Type DescriptionPGain REAL Proportional gain. When using the independent algorithm, enter the unitless

proportional gain in this tag. When using the dependent algorithm, enter the unitless controller gain into this tag. Valid range is maximum positive float. Default = 0.0.

IGain REAL Integral gain When using the independent algorithm, enter the integral gain in units of 1/minutes in this tag. When using the dependent algorithm, enter the integral time constant in units of minutes/repeat into this tag. Valid range is maximum positive float. Default = 0.0.

DGain REAL Derivative gain. When using the independent algorithm, enter the derivative gain in units of minutes in this tag. When using the dependent algorithm, enter the derivative time constant in units of minutes into this tag. Valid range is maximum positive float. Default = 0.0.

Table 3. – Controller gain tags

In addition, there are several tags which change how the proportional and derivative terms in the velocity algorithm are calculated. The algorithm used is:

CVn=CVn-1+Kp E+K iE t+K d En-2En-1+En-2

t

Figure 4 – Velocity Algorithm Tag Type DescriptionPVEProportional BOOL Proportional PV control request. When set, calculate the proportional term

(DeltaPTerm) using the change in process variable (PVPercent). When cleared, use the change in Error (EPercent). Default is cleared.

PVEDerivative BOOL Derivative PV control request. When set, calculate the terivative term (DeltaDTerm) using the change in process variable (PVPercent). When cleared, use the change in Error (EPercent). Default is cleared.

DSmoothing BOOL Derivative Smoothing request. When set, changes in the derivative term are smoothed. Derivative smoothing causes less output “jitters” as a result of a noisy PV signal but also limits the effectiveness of high derivative gains. Default is cleared.

Table 5 – Algorithm Modification Tags

Timing Modes

The PIDE instruction supports three different timing modes. They are “periodic”, “oversample” and real time sampling. A full explanation of how they function and what their differences are is spelled out in Appendix A of the Process Control and Drives Instruction Manual.

2

Page 3: PIDE Presentation 2

Because the PIDE calculations are based upon time, it is necessary that the user select one of these timing modes and fill in the appropriate tags properly.

Periodic ModeThe easiest mode to use with the PIDE is the periodic mode. The PIDE is programmed in a periodic task and that task executes at a time interval that the control engineer selects. The system will place the task time interval into an output tag called DeltaT. Timing mode parameter TimingMode is set to 0.

Oversample ModeUsed when the PIDE is in a continuous task. The timing mode parameter TimingMode is set to a value of 1. The delta time is the value written into the parameter OversampleDT . Use this mode when the instruction executes in a continuous task and the process input does not have a time stamp associated with its input. (Note: If the process input has a time stamp, it is recommended that you use the real time sampling mode). You will need to have some logic in the program to control when the instruction operates. Use a timer set to the OversampleDT value that controls the EnableIn input of the PIDE instruction

Real Time Sampling ModeThis mode can be used when the PIDE instruction is used in a continuous task and the process input has a time stamp associated with the process input. The timing mode parameter TimingMode is set to a value of 2. The instruction compares the configured RTSTime value(expected update period) against the calculated DeltaT to determine if every update of the process update is being read by the PIDE instruction. Using real time sampling, the delta time (DeltaT) used by the instruction is the difference between two time stamp values that correspond to the updates of the process input. The instruction compares the configured RTSTime value (expected update period) against the calculated DeltaT to determine if every update of the process input is being read by the PIDE instruction.

Tag Type DescriptionTimingMode DINT Selects timing mode. 0 = periodic mode, 1 = oversample mode, 2 =

real time sampling mode. Valid range is 0 to 2, Default is 0.OversampleDT REAL Execution time for oversampling mode. The value used for DeltaT is

in seconds. If TimingMode = 1, and OversampleDT = 0.0, the execution of the PIDE is disabled. Valid range is 0.0 to 4194.303 seconds. Default is 0.0

RTSTime DINT Module update time for real time sampling timing. The expected DeltaT update time is in milliseconds. The update period is normally the value that was used to configure the modules update time.Valid range is 1 to 32767 ms. Default = 1.

RTSTimeStamp DINT Module time stamp value for real time sampling timing.. The value is that which corresponds to the last update of the input signal. The value is used to calculate DeltaT. Valid range is 1 to 32767 ms. Default = 0.

Table 6 – Timing Mode Input Tags

3

Page 4: PIDE Presentation 2

Tag Type DescriptionDeltaT REAL Elapsed time between updates. This is the elapsed time in seconds used by the

PIDE algorithm to calculate the process input. Periodic: DeltaT = task scan time. Oversample Delta T = OversampleDT.Real Time Sampling DeltaT = (RTSTimeStampn – RTSTimeStampn-1).

Status2 DINT PIDE Status Word 2. Defines timing errors.

Table7 – Timing Mode Output Tags

Deadband Control

The PIDE function block offers the user the choice of two different types of deadband control. Deadband control is often used when the process is very noisy and it it not desirable to have the control system attempt to regulate the noise signal that is riding on top of the process variable signal. Examples of noise commonly found in process systems are pulsations created by the rotating impeller of a pump on a pressure or flow signal or the pulsations created by a mixer impeller when trying to measure tank level. Typically the pump impeller noise is a much higher frequency than that created by the mixer impeller.

It is common to create a small deadband that is symmetrical around the zero error value. The controller will not take any control action as long as the error is inside the deadband. It only takes control action when the error is greater than the deadband.

The choices in zero crossing control determine how the controller reacts when the error goes outside the selected deadband. The input tags that are used in the PIDE control structure for zero crossing deadband control are shown below in figure 1.

Description ExplanationZCDeadband Zero crossing deadband range. Real variable. Defined as Process Variable Units. Enter a

value to 0 to disable zero crossing deadband checking.. Default value is 0.0ZCOff Zero crossing deadband disable request. Boolean value. Default is 0. When set to a

value of 1, zero crossing deadband control is disabled

Table 8. – Zero crossing deadband input control tags.

Description ExplanationZCDeadbandOn Zero crossing deadband output indicator. When set the value of CV does not change. If

ZCOff is set, then ZCDeadbandOn is set when [E] is within the ZCDeadband range. If ZCOff is cleared, then ZCDeadbandOn is when {E] crosses zero and remains within the ZCDeadband range. ZCDeadbandOn is cleared when [E] exceeds the ZCDeadband range or when ZCDeadband = 0.

Table 9. – Zero crossing deadband output indicators.

An example of zero crossing deadband is shown below in Figure 10. The deadband is defined in the tag “ZCDeadband”. As stated above, it is in units of the PV and is symmetrical around 0 error. ZCOff = 0.

4

Page 5: PIDE Presentation 2

Note that when the error term exceeds the value of the deadband, either positive aor negative, controller starts adjusting the output and continues to calculate new values until the error signal crosses the zero error point. At that time, the PIDE quits making adjustments in its output (CV) until the error value exceeds the deadband range again.

Figure 10. – Example of Zero Crossing Deadband with ZCOff = 0.

Figure 11 below illustrates how deadband control works when ZCOff is set to a value of 1. In this example, the PIDE only make changes in the output whenever the error value is outside of the deadband.

Figure 11. – Example of Zero Crossing Deadband with ZCOff = 1.

Bumpless Transfer going from Manual to Automatic Mode.

When Manual mode has been selected, the CV or CVEU output values equal the value of CVProg or CVOper depending upon which control state has been selected. There is no relationship between the process variable signal and the values in SPProg or SPOper. In order to achieve what is called Bumpless transfer when switching back to the Auto mode, it is necessary to enable the PV Tracking function by setting the value to a 1.

Tag Type DescriptionPVTracking BOOL SP track PV request. When set, causes the SP to track the PV when in the

Manual mode. Ignored when in Auto or Cascade/Ratio modes, Default is cleared.

Table 12 – PV Tracking Selection Tag

5

Page 6: PIDE Presentation 2

Cascade Control

Cascade control is used in applications where there are upstream disturbances in the controlled variable. An example would be a tank where it is desired to control the temperature of the liquid by regulating the amount of steam going to the steam jacket around the tank. This type of process has a long time constant.

If the steam supply is stable, it is okay to use a three mode (PID) temperature controller with a long reset time. This controller will measures the temperature of the liquid and regulate the amount of steam going to the tanks steam jacket as long as the upstream steam pressure is constant. If however, the steam supply (pressure) is not stable, it will be necessary to use a cascade control system to get good temperature regulation. The temperature controller will not know that the steam pressure has changed until the temperature of the liquid starts to change. Since the time constant of the temperature loop is long, it will take a long time for the temperature controller to return the process to an equilibrium condition (a new steam valve output position corresponding to the new level of heat input or steam pressure).

The cascade control system shown will both control the temperature in the vessel and correct for changes in supply-steam pressure. The secondary controller monitors the jacket inlet steam pressure. Any changes in the upstream supply will be quickly corrected for by readjusting the valve position because the loop has a fast time constant and therefore a short reset time., The temperature controller, adjusts the setpoint of the secondary (pressure) controller as dictated by the heat or temperature requirements of the incoming liquid.

Figure 13 – Connection diagram for Cascade Control System.

6

Page 7: PIDE Presentation 2

Figure 14 – Block diagram of Cascade Control System.

Ratio Control

Ratio control is used when it is needed to control one or more flows as a percentage of a primary flow. It is used in continuous blending systems in different industries, such as Petro-chem or paper.

In the flow diagram shown below, a level controller for a blend tank senses the change in demand of the downstream process by changes in tank level. In order to maintain tank level, it will adjust the control valve regulating Flow “A”. A flow transmitter measures the flow rate of “A” and its output goes to the SPCascade input of the Ratio controllers for Flows “B” and “C”. A ratio signal multiplier is connected to the “RatioProg” or “RatioOper” input for each Ratio controller. The value of the SPCascade is multiplied by

7

Page 8: PIDE Presentation 2

the ratio multiplier and becomes the set point for the Ratio controller. With this configuration, it is only necessary to know the ratio of flow components “B” and “C” to that of flow component “A”. If “B” is supposed to be 50% of “A”, set its ratio at 0.50 and if “C” is 20% of “A”, set its ratio at 0.20.

Figure 15 –Block Diagram of Ratio Control System

8

Page 9: PIDE Presentation 2

Level Controller Flow “B” Controller

Figure 16 – Connection diagram for two component Ratio Control System

Notes: 1. Additional ratio controllers would be added in parallel to the Flow “B” controller.2. Ratio input is only applied when the ratio controller has CascadeRatio mode

selected and the UseRatio input is enabled. Refer to the chart for inputs that was provided as part of the earlier session on PIDE..

The connection diagrams for both the Ratio and the Cascade control systems do not show all the inputs and outputs required for their operation. A number is permissive inputs are required to put the PIDE controllers in the desired mode of operation. These inputs are covered in the first section of the PIDE presentation. Listed below in Tables 17 and 18 are inputs and outputs, including some limit points that apply to the Cascade and Ratio controllers. Tag Type Explanation Used

WithSPCascade REAL Set point for Cascade and Ratio control. Scaled in PV Units. If

CascadeRatio is set and UseRatio is cleared, then SP = SPCascade. Typically the CVEU of a primary controller. If Cascade

Cascade and Ratio

RatioProg REAL Program mode ratio multiplier. Ratio output is set equal to this value when in Operator control. If RatioProg <RatioLLimit or > RatioHLimit, instruction set bit in Status word. Valid range is RatioLLimit to RatioHLimit. Default =1.0

Ratio

RatioOper REAL Operator mode ratio multiplier. RatioOper and Ratio output are Ratio

9

Page 10: PIDE Presentation 2

set equal to this value when in Program control. If RatioProg <RatioLLimit or > RatioHLimit, instruction set bit in Status word. Valid range is RatioLLimit to RatioHLimit. Default =1.0

UseRatio BOOL Ratio control mode permissive. Set to enable ratio control when in Cascade/Ratio mode.Default = zero.

Ratio

AllowCasRat BOOL Cascade/Ratio mode permissive. Set to allow Cascade/Ratio mode to be selected by either the ProgCascade/RatioReq or OperCascadeRatioReq. Default = zero.

Cascade and Ratio

ProgCasRatReq BOOL Program Cascade/Ratio mode request. Set by the user program to request Cascade/Ratio mode. WhenProgValueReset is set, the instruction clears the input each execution. Default = zero.

Cascade and Ratio

OperCasRatReq BOOL Operator Cascade/Ratio mode request. Set by the operator interface to request Cascade/Ratio mode. The instruction clears the input each execution. Default = zero.

Cascade and Ratio

RatioHLimit REAL Ratio high limit value. Limits the value of Ratio obtained from RatioProg or RatioOper. If RatioHLimit < RatioLLimit, instruction sets appropriate bit in Status1 and limits Ratio using the value of RatioLLimit. Valid range = RatioLLimit to maximum positive float. Default = 1.0

Ratio

RatioLLimit REAL Ratio low limit value. Limits the value of Ratio obtained from RatioProg or RatioOper. If RatioLLimit < 0, instruction sets appropriate bit in Status1 and limits the value to 0 If RatioHLimit < RatioLLimit, instruction sets appropriate bit in Status1 and limits the value to RatioLLimit. Valid range = 0.0 to RatioLimit. Default = 1.0

Ratio

CVInitReq BOOL CV initialization request. Normally controlled by the “In Hold” status on the analog output module controlled by CVEU or from the InitPrimary output of a secondary PIDE loop.

Cascade primary

CVInitValue REAL CVEU initialization value, scaled in CVEU units. When CVInitializing is set, CVEU = CVInitValue and CV equals the corresponding percentage value. CVInitValue comes from the feedback of the analog output controlled by CVEU or from the setpoint of a secondary PIDE loop. Instruction initialization is disabled when CVFaulted or CVEUSpanInv is set. Valid range is any float. Default is 0.0

Cascade primary

WindupHIn BOOL Windup high request. When set, the CV is not allowed to increase in value. The signal is normally obtained from the WindupHOut output from a secondary PIDE loop. Default is cleared.

Cascade primary

WindupLIn BOOL Windup low request. When set, the CV is not allowed to decrease in value. The signal is normally obtained from the WindupLOut output from a secondary PIDE loop. Default is cleared.

Cascade primary

Table 17 – Cascade/Ratio Controller Inputs

Tag Type Explanation Used With

10

Page 11: PIDE Presentation 2

InitPrimary BOOL Initialize primary loop command. Set when not in Cascade/Ratio mode or when CVInitializing is set. Signal normally used by the CVInitReq of a primary PIDE loop.

Cascade primary

WindupHOut BOOL Reset windup high indicator. Set when either a SPhigh, CV high or CV low (depending on control action) has been reached. Typically used with the WindupHIn input of a primary controller to prevent the windup of the CV output.

Cascade secondary

WindupLOut BOOL Reset windup low indicator. Set when either a SPlow, CV high or CV low (depending on control action) has been reached. Typically used with the WindupLIn input of a primary controller to prevent the windup of the CV output.

Cascade secondary

SP REAL Current SP value. Used to control the value of CVInitValue of of the primary controller when in Cascade/Ratio mode.

Cascade primary

Ratio REAL Current ratio multiplier value RatioRatioHAlarm BOOL Ratio high alarm indicator. Set when Ratio > RatioHLimit RatioRatioLAlarm BOOL Ratio low alarm indicator. Set when Ratio < RatioLLimit Ratio

Table 18 – Cascade/Ratio Controller Outputs

11