PIDU – PID controller unit
Block SymbolLicensing group: STANDARD
Function Description
The PIDU block serves as a foundational component for constructing a complete PID controller
(P, I, PI, PD, PID, PI+D). In its simplest form, it can operate independently as a
standard PID controller with two degrees of freedom, accommodating both automatic
() and manual
modes ().
In automatic mode (), the PIDU block executes the PID control law with two degrees of freedom as follows:
where is Laplace transform of the manipulated variable mv, is Laplace transform of the setpoint variable sp, is Laplace transform of the process variable pv, is Laplace transform of the feedforward control variable dv and , , , , and are the parameters of the controller. The sign of the right hand side depends on the parameter RACT. The range of the manipulated variable mv (position controller output) is limited by parameters hilim, lolim. The parameter dz determines the dead zone in the integral part of the controller. The integral part of the control law can be switched off and fixed on the current value by the integrator hold input IH (). For the proper function of the controller, it is necessary to connect the output mv of the controller to the controller input tv and properly set the tracking time constant tt.
The recommended default value for the PID controller is , and for the PI controller, it is . This ensures a bumpless transfer during switching between manual and automatic modes and correct anti-windup functionality when the output mv saturates. Adjusting the parameter tt allows for precise behaviour adjustment during saturation (e.g., bouncing off the limits due to noise) and when switching between multiple controllers (the size of the jump when switching, if there is a deviation error). A value of 0 sets recommended default values for PI and PID controllers. For controllers withou an integral part, it means disabling the tracking. To enable tracking for P or PD controllers (e.g., for control around a setpoint), set a positive value for tt higher than the sampling period. Disabling tracking for controllers with an integral part is not possible due to the risk of windup.
For the gain setting, a value of disables the controller. Negative values are not allowed (use the RACT parameter for negative effect instead). Setting the integral time constant to disables the integral component of the controller (same effect as disabling it with the irtype parameter). For , the derivative component of the controller is disabled. The additional outputs dmv, de, and SAT sequentially provide the controller’s velocity output (difference of mv), the deviation error, and the saturation flag of the controller’s output mv.
The PIDU block can be prepared for connection with other types of control blocks by using the icotype parameter. The icotype parameter can be set to the following values with the given meanings:
- Analog - standard block mode,
- PWM - mode suitable for connecting the output mv to the input of pulse-width modulated regulation PWM,
- SCU - mode for connection with a step controller with position feedback SCU,
- SCUV - mode for connection with a step controller without positional feedback SCUV.
For the last option, the meanings of the outputs mv, dmv, and SAT are modified in this case: the output mv equals the sum of the P and D components of the controller, while the output dmv provides the difference of its I component, and the output SAT carries information for the SCUV block whether the deviation error de in automatic mode is less than the dead zone dz. Additionally, for connecting the PIDU and SCUV blocks, it is recommended to set the setpoint weighting factor for the derivative component c to zero.
In the manual mode (), the input hv is copied to the output mv unless saturated. The overall control function of the PIDU block is quite clear from the following diagram:
This block propagates the signal quality. More information can be found in the 1.4 section.
Input
dv | Feedforward control variable | Double (F64) |
sp | Setpoint variable | Double (F64) |
pv | Process variable | Double (F64) |
tv | Tracking variable | Double (F64) |
hv | Manual value | Double (F64) |
MAN | Manual or automatic mode | Bool |
|
|
|
IH | Integrator hold | Bool |
|
|
|
Parameter
irtype | Controller type (control law) 6 | Long (I32) |
|
|
|
RACT | Reverse action flag | Bool |
|
|
|
k | Controller gain 0.0 1.0 | Double (F64) |
ti | Integral time constant 0.0 4.0 | Double (F64) |
td | Derivative time constant 0.0 1.0 | Double (F64) |
nd | Derivative filtering parameter 0.0 10.0 | Double (F64) |
b | Setpoint weighting - proportional part 0.0 2.0 1.0 | Double (F64) |
c | Setpoint weighting - derivative part 0.0 2.0 | Double (F64) |
tt | Tracking time constant 0.0 1.0 | Double (F64) |
hilim | Upper limit of the controller output 1.0 | Double (F64) |
lolim | Lower limit of the controller output -1.0 | Double (F64) |
dz | Dead zone | Double (F64) |
icotype | Controller output type 1 | Long (I32) |
|
|
|
Output
mv | Manipulated variable (controller output) | Double (F64) |
dmv | Controller velocity output (difference) | Double (F64) |
de | Deviation error | Double (F64) |
SAT | Saturation flag | Bool |
|
|
|
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com