FUNCTION_BLOCK PD
Represents a PD controller
A PD controller continuously calculates an error value e(t) as the difference between a desired set point and a measured process variable. The PD controller applies a correction based on proportional and derivative terms (sometimes denoted P and D respectively) which give their name to the controller type.
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 and stores these values internally.
The output, that is the manipulated variable Y, is calculated as follows:
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 P controller can be easily created by setting TV=0.
For more information see: PID.
InOut: |
|