PDΒΆ

The library The library UTIL.Library\ \ provides the following PD controller function block:

../_images/0a8689c71e8fcf9cc0a8640e01947982

PD in FBD

Inputs of the function block:

Variable Data type Description
ACTUAL REAL ICurrent value of the controlled variable
SET_POINT REAL Desired value, command variable
KP REAL Proportionality coefficient, unity gain of the P-part
TV REAL Derivative action time, unity gain of the D-part in seconds, for example β€œ0.5” for 500 msec
Y_MANUAL REAL Defines output value Y in case of MANUAL = TRUE
Y_OFFSET REAL Offset for the manipulated variable Y
Y_MIN, Y_MAX REAL Lower resp. upper limit for the manipulated variable Y. If Y exceeds these limits, output LIMITS_ACTIVE will be set to TRUE and Y will be kept within the prescribed range. This control will only work if Y_MIN<Y_MAX.
MANUAL BOOL If TRUE, manual operation will be active, that is the manipulated value will be defined by Y_MANUAL.
RESET BOOL TRUE resets the controller; during reinitialization Y = Y_OFFSET.

Outputs of the function block:

Variable Data type Description
Y REAL Manipulated value, calculated by the function block (see below)
LIMITS_ACTIVE BOOL TRUE indicates that Y has exceeded the given limits (Y_MIN, Y_MAX).

Y_OFFSET, Y_MIN and Y_MAX are used for the transformation of the manipulated variable within a prescribed range.

MANUAL can be used to switch on and off manual operation. RESET serves to reset the controller.

In normal operation (MANUAL = RESET = LIMITS_ACTIVE = FALSE) the controller calculates the controller error e as difference SET_POINT – ACTUAL, generates the derivation with respect to time de/ dt and stores these values internally.

The output, that is the manipulated variable Y, is calculated as follows:

1b4a5ca51e8fcfc7c0a8640e008dd3ab_d8b563631e8fc90bc0a8640e01947982

So besides the P-part also the current change of the controller error (D-part) influences the manipulated variable.

Additionally Y is limited on a range prescribed by Y_MIN and Y_MAX. If Y exceeds these limits, LIMITS_ACTIVE will get TRUE. If no limitation of the manipulated variable is desired, Y_MIN and Y_MAX have to be set to 0.

As long as MANUAL=TRUE, Y_MANUAL will be written to Y.

A:strong:P-controller can be easily created by setting TV=0.