Anda di halaman 1dari 16

PID(190) Page 1 of 16

PID(190)
Purpose
Executes PID control according to the specified parameters.

Ladder Symbol

Variations

Variations Executed Each Cycle for ON Condition PID(190)

Executed Once for Upward Differentiation Not supported.

Executed Once for Downward Differentiation Not supported.

Immediate Refreshing Specification Not supported.

Applicable Program Areas

Block program areas Step program areas Subroutines Interrupt tasks

Not allowed OK OK Not allowed

Parameters
The following diagrams show the locations of the parameter data. For details on the parameters, refer to PID
Parameter Settings in this section.

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 2 of 16

Operand Specifications

Area S C D

CIO  Area CIO 0 to CIO 6143 CIO 0 to CIO 6105 CIO 0 to CIO 6143

Work Area W0 to W511 W0 to W473 W0 to W511

Holding Bit Area H0 to H511 H0 to H473 H0 to H511

Auxiliary Bit Area A0 to A959 A0 to A921 A448 to A959

Timer Area T0000 to T4095 T0000 to T4057 T0000 to T4095

Counter Area C0000 to C4095 C0000 to C4057 C0000 to C4095

DM Area D0 to D32767 D0 to D32729 D0 to D32767

Indirect DM addresses in @ D0 to @ D32767

binary

Indirect DM addresses in *D0 to *D32767

BCD

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 3 of 16

Constants DR0 to DR15 --- DR0 to DR15

Data Registers ---

Index Registers ---

Indirect addressing using ,IR0 to ,IR15

Index Registers –2048 to +2047 ,IR0 to –2048 to +2047 ,IR15

DR0 to DR15, IR0 to IR15

Description
When the execution condition is ON, PID(190) carries out target value filtered PID control with two degrees of
freedom according to the parameters designated by C (set value, PID constant, etc.). It takes the specified input
range of binary data from the contents of input word S and carries out the PID action according to the parameters
that are set. The result is then stored as the manipulated variable in output word D.

The parameters are obtained when the execution condition turns from OFF to ON, and the Error Flag will turn ON
if the settings are outside of the permissible range.

If the settings are within the permissible range, PID processing will be executed using the initial values. Bumpless
operation is not performed at this time. It will be used for manipulated variables in subsequent PID processing
execution. (Bumpless operation is processing that gradually and continuously changes the manipulated variable
in order to avoid the adverse effects of sudden changes.)

When the execution condition turns ON, the PV for the specified sampling period is entered and processing is
performed.

The number of valid input data bits within the 16 bits of the PV input (S) is designated by the input range setting in
C+6, bits 08 to 11. For example, if 12 bits (4 hex) is designated for the input range, the range from 0000 hex to
0FFF hex will be enabled as the PV. (Values greater than 0FFF hex will be regarded as 0FFF hex.)

The set value range also depends on the input range.

Measured values (PV) and set values (SV) are in binary without sign, from 0000 hex to the maximum value of the
input range.

The number of valid output data bits within the 16 bits of the manipulated variable output is designated by the
output range setting in C+6, bits 00 to 03. For example, if 12 bits (4 hex) is designated for the output range, the

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 4 of 16

range from 0000 hex to 0FFF hex will be output as the manipulated variable.

For proportional operation only, the manipulated variable output when the PV equals the SV can be designated as
follows:

0: Output 0%
1: Output 50%.

The direction of proportional operation can be designated as either forward or reverse.

The upper and lower limits of the manipulated variable output can be designated.

The sampling period can be designated in units of 10 ms (0.01 to 99.99 s), but the actual PID action is determined
by a combination of the sampling period and the time of PID(190) instruction execution (with each cycle).

The timing of enabling changes made to PID constants can be set to either 1) the beginning of PID instruction
execution or 2) the beginning of PID instruction execution and each sampling period. Only the proportional band
(P), integral constant (Tik), and derivative constant (Tdk) can be changed each sampling cycle (i.e., during PID
instruction execution). The timing is set in bit 1 of C+5.

Of the PID parameters (C to C+38), only the set value (SV) can be changed when the execution condition is ON.
When changing other values, be sure to change the execution condition from OFF to ON.

Flags

Name Label Operation

Error Flag ER ON if the C data is out of range.

ON if the actual sampling period is more than twice the

designated sampling period.

OFF in all other cases.

Greater Than >  ON if the manipulated variable after the PID action

Flag exceeds the upper limit.

OFF in all other cases.

Less Than Flag <  ON if the manipulated variable after the PID action is

below the lower limit.

OFF in all other cases.

Carry Flag CY ON while PID control is being executed.

OFF in all other cases.

Precautions
PID(190) is executed as if the execution condition was a STOP-RUN signal. PID calculations are executed when

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 5 of 16

the execution condition remains ON for the next cycle after C+9 to C+38 are initialized. Therefore, when using the
Always ON Flag (ON) as an execution condition for PID(190), provide a separate process where C+9 to C+38 are
initialized when operation is started.

If the C data is out of range, an error will occur and the Error Flag will turn ON.

If the actual sampling period is more than twice the designated sampling period, an error will occur and the Error
Flag will turn ON. PID control will still be executed, however.

The Carry Flag turns ON while PID control is being executed.

The Greater Than Flag turns ON if the manipulated variable after the PID action exceeds the upper limit. At this
time, the results are output at the upper limit.

The Less Than Flag turns ON if the manipulated variable after the PID action is below the lower limit. At this time,
the results are output at the lower limit.

Within the PID parameters (C to C+38), the only value that can be changed while the input condition is ON is the
set value for C. If any other value is changed, be sure to turn the input condition from OFF to ON to enable the
new value.

Example
At the rising edge of CIO 0.00 (OFF to ON), the work area in D209 to D238 is initialized according to the
parameters (shown below) set in D200 to D208. After the work area has been initialized, PID control is executed
and the manipulated variable is output to CIO 2000.

When CIO 0.00 is turned ON, PID control is executed at the sampling period intervals according to the
parameters set in D200 to D208. The manipulated variable is output to CIO 2000.

The PID constants used in PID calculations will not be changed if the proportional band (P), integral constant
(Tik), or derivative constant is changed after CIO 0.00 turns ON.

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 6 of 16

Input Values and Manipulated Variable Ranges


The number of valid input data bits for the measured value is designated by the input range setting in C+6, bits 08
to 11, and the number of valid output data bits for the manipulated variable output is designated by the output
range setting in C+6, bits 0 to 3. These ranges are shown in the following table.

C+6, bits 08 to 11 or Number of valid bits Range

C+6, bits 00 to 03

0 8 0000 to 00FF hex

1 9 0000 to 01FF hex

2 10 0000 to 03FF hex

3 11 0000 to 07FF hex

4 12 0000 to 0FFF hex

5 13 0000 to 1FFF hex

6 14 0000 to 3FFF hex

7 15 0000 to 7FFF hex

8 16 0000 to FFFF hex

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 7 of 16

 
If the range of data handled by an Analog Input Unit or Analog Output Unit cannot be set accurately by setting the
number of valid bits, APR(069) (ARITHMETIC PROCESS) can be used to convert to the proper ranges before
and after PID(190).

The following program section shows an example for a DRT1-AD04 Analog Input Unit and DRT1-DA02 Analog
Output Unit operating as DeviceNet slaves. The data ranges for these two Units is 0000 to 1770 hex, which
cannot be specified merely by setting the valid number of digits. APR(069) is thus used to convert the 0000 to
1770 hex range of the Analog Input Unit to 0000 to FFFF hex for input to PID(190) and then the manipulated
variable output from PID(190) is converted back to the range 0000 to 1770 hex, again using APR(069), for output
from the Analog Output Unit.

Performance Specifications

Item Specifications

PID control method --- Target value filter-type two-degrees-of-freedom PID method

(forward/reverse)

Number of PID control loops --- Unlimited (1 loop per instruction)

Sampling period  0.01 to 99.99 s

PID constant Proportional band P 0.1 to 999.9%

Integral constant Tik 1 to 8191, 9999 (No integral action for sampling period multiple, 9999.)

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 8 of 16

Derivative constant Tdk 0 to 8191 (No derivative action for sampling period multiple, 0.)

Set value SV 0 to 65535 (Valid up to maximum value of input range.)

Measured value PV 0 to 65535 (Valid up to maximum value of input range.)

Manipulated variable MV 0 to 65535 (Valid up to maximum value of output range.)

Calculation Method
Calculations in PID control are performed by the target value filtered control with two degrees of freedom.

Block Diagram for Target Value PID with Two Degrees of Freedom
When overshooting is prevented with simple PID control, stabilization of disturbances is slowed (1). If stabilization
of disturbances is speeded up, on the other hand, overshooting occurs and response toward the target value is
slowed (2).

When target-value PID control with two degrees of freedom is used, on the other hand, there is no overshooting,
and response toward the target value and stabilization of disturbances can both be speeded up (3).

PID Parameter Settings

Control data Item Contents Setting range Change with

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 9 of 16

ON input

condition

C Set value (SV) The target value of the process Binary data (of the same Allowed

being controlled. number of bits as specified for

the input range)

C+1 Proportional band The parameter for P action 0001 to 270F hex (1 to 9999); Can be changed

expressing the proportional (0.1% to 999.9%, in units of with input

control range/total control range. 0.1%) condition ON if

bit 1 of C+5 is 1.
C+2 Tik A constant expressing the 0001 to 1FFF hex (1 to 8191);

Integral Constant strength of the integral action. (9999 = Integral operation not

As this value increases, the executed) (See note 1.)

integral strength decreases.

C+3 Tdk A constant expressing the 0001 to 1FFF hex (1 to 8191);

Derivative Constant strength of the derivative action. (0000 = Derivative operation not

As this value increases, the executed) (See note 1.)

derivative strength decreases.

C+4 Sampling period () Sets the period for executing the 0001 to 270F hex (1 to 9999); Not allowed

PID action. (0.01 to 99.99 s, in units of

10 ms)

Bits 04 to 15 2-PID parameter () The input filter coefficient. 000 hex:  = 0.65
of C+5 Normally use 0.65 (i.e., a setting Setting from 100 to 163 hex

of 000). The filter efficiency means that the value of the

decreases as the coefficient rightmost two digits is set from


approaches 0. = 0.00 to = 0.99. (See note
2.)

Bit 03 of C+5 Manipulated variable Designates the manipulated 0: Output 0%

output designation variable output for when the PV 1: Output 50%

equals the SV.

Bit 01 of C+5 PID constant change The timing of enabling changes 0: At start of PID instruction Allowed

enable setting made to the proportional band execution

(P), integral constant (Tik), and 1: At start of PID instruction


derivative constant (Tdk) for use execution and each sampling

in PID calculations. period

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 10 of 16

Bit 00 of C+5 PID forward/reverse Determines the direction of the 0: Reverse action Not allowed

designation proportional action. 1: Forward action

Bit 12 of C+6 Manipulated variable Determines whether or not limit 0: Disabled (no limit control)

output limit control control will apply to the 1: Enabled (limit control)

manipulated variable output.

Bits 08 to 11 Input range The number of input data bits. 0: 8 bits 5: 13 bits

of C+6 1: 9 bits 6: 14 bits

2: 10 bits 7: 15 bits

3: 11 bits 8: 16 bits

4: 12 bits

Bits 04 to 07 Integral and Determines the unit for 1: Sampling period multiple

of C+6 derivative unit expressing the integral and 9: Time (unit: 100 ms)

derivative constants.

Bits 00 to 03 Output range The number of output data bits. 0: 8 bits 5: 13 bits

of C+6 (The number of output bits is 1: 9 bits 6: 14 bits

automatically the same as the 2: 10 bits 7: 15 bits

number of input bits.) 3: 11 bits 8: 16 bits

4: 12 bits

C +7 Manipulated variable The lower limit for when the 0000 to FFFF (binary)

output lower limit manipulated variable output limit (See note 3.)

is enabled.

C +8 Manipulated variable The upper limit for when the 0000 to FFFF (binary)

output upper limit manipulated variable output limit (See note 3.)

is enabled.

Note

(1)          When the unit is designated as 1, the range is from 1 to 8,191 times the period. When the unit is
designated as 9, the range is from 0.1 to 819.1 s. When 9 is designated, set the integral and derivative times
to within a range of 1 to 8,191 times the sampling period.

(2)         Setting the 2-PID parameter () to 000 yields 0.65, the normal value.

(3)         When the manipulated variable output limit control is enabled (i.e., set to "1"), set the values as follows:

0000  MV output lower limit   MV output upper limit   Max. value of output range

Sampling Period and Cycle Time

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 11 of 16

The sampling period can be designated in units of 10 ms (0.01 to 99.99 s), but the actual PID action is determined
by a combination of the sampling period and the time of PID instruction execution (with each cycle). The
relationship between the sampling period and the cycle time is as follows:

•     If the sampling period is less than the cycle time, PID control is executed with each cycle and not with each
sampling period.

•     If the sampling period is greater than or equal to the cycle time, PID control is not executed with each cycle,
but PID(190) is executed when the cumulative value of the cycle time (the time between PID instructions) is
greater than or equal to the sampling period. The surplus portion of the cumulative value (i.e., the cycle time's
cumulative value minus the sampling period) is carried forward to the next cumulative value.

For example, suppose that the sampling period is 100 ms and that the cycle time is consistently 60 ms. For
the first cycle after the initial execution, PID(190) will not be executed because 60 ms is less than 100 ms. For
the second cycle, 60 ms + 60 ms is greater than 100 ms, so PID(190) will be executed. The surplus of 20 ms
(i.e., 120 ms – 100 ms = 20 ms) will be carried forward.

For the third cycle, the surplus 20 ms is added to 60 ms. Because the sum of 80 ms is less than 100 ms, PID
(190) will not be executed. For the fourth cycle, the 80 ms is added to 60 ms. Because the sum of 140 ms is
greater than 100 ms, PID(190) will be executed and the surplus of 40 ms (i.e., 120 ms – 100 ms = 20 ms) will
be carried forward. This procedure is repeated for subsequent cycles.

Control Actions
Proportional Action (P)

Proportional action is an operation in which a proportional band is established with respect to the set value (SV),
and within that band the manipulated variable (MV) is made proportional to the deviation. An example for reverse
operation is shown in the following illustration.

If the proportional action is used and the present value (PV) becomes smaller than the proportional band, the
manipulated variable (MV) is 100% (i.e., the maximum value). Within the proportional band, the MV is made
proportional to the deviation (the difference between from SV and PV) and gradually decreased until the SV and

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 12 of 16

PV match (i.e., until the deviation is 0), at which time the MV will be at the minimum value of 0% (or 50% ,
depending on the setting of the manipulated variable output designation parameter). The MV will also be 0%
when the PV is larger than the SV.

The proportional band is expressed as a percentage of the total input range. The smaller the proportional band,
the larger the proportional constant and the stronger the corrective action will be. With proportional action an
offset (residual deviation) generally occurs, but the offset can be reduced by making the proportional band
smaller. If it is made too small, however, hunting will occur.

Integral Action (I)

Combining integral action with proportional action reduces the offset according to the time that has passed, so
that the PV will match the SV. The strength of the integral action is indicated by the integral time, which is the time
required for the manipulated variable of the integral action to reach the same level as the manipulated variable of
the proportional action with respect to the step deviation, as shown in the following illustration. The shorter the
integral time, the stronger the correction by the integral action will be. If the integral time is too short, the
correction will be too strong and will cause hunting to occur.

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 13 of 16

Derivative Action (D)

Proportional action and integral action both make corrections with respect to the control results, so there is
inevitably a response delay. Derivative action compensates for that drawback. In response to a sudden
disturbance it delivers a large manipulated variable and rapidly restores the original status. A correction is
executed with the manipulated variable made proportional to the incline (derivative coefficient) caused by the
deviation.

The strength of the derivative action is indicated by the derivative time, which is the time required for the
manipulated variable of the derivative action to reach the same level as the manipulated variable of the
proportional action with respect to the step deviation, as shown in the following illustration. The longer the
derivative time, the stronger the correction by the derivative action will be.

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 14 of 16

PID Action

PID action combines proportional action (P), integral action (I), and derivative action (D). It produces superior
control results even for control objects with dead time. It employs proportional action to provide smooth control
without hunting, integral action to automatically correct any offset, and derivative action to speed up the response
to disturbances.

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 15 of 16

Direction of Action
When using PID control, select either of the following two control directions. In either direction, the MV increases
as the difference between the SV and the PV increases.

•    Forward action: MV is increased when the PV is larger than the SV.

•    Reverse action: MV is increased when the PV is smaller than the SV.

Adjusting PID Parameters


The general relationship between PID parameters and control status is shown below.

•     When it is not a problem if a certain amount of time is required for stabilization (settlement time), but it is
important not to cause overshooting, then enlarge the proportional band.

•     When overshooting is not a problem but it is desirable to quickly stabilize control, then narrow the
proportional band. If the proportional band is narrowed too much, however, then hunting may occur.

•    When there is broad hunting, or when operation is tied up by overshooting and undershooting, it is probably
because integral action is too strong. The hunting will be reduced if the integral time is increased or the
proportional band is enlarged.

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012
PID(190) Page 16 of 16

•     If the period is short and hunting occurs, it may be that the control system response is quick and the
derivative action is too strong. In that case, set the derivative action lower.

mk:@MSITStore:C:\Program%20Files\OMRON\CX-One\CX-Programmer\PLCRefCP1H... 4/23/2012

Anda mungkin juga menyukai