PIDU – PID controller unit
Block SymbolLicensing group: STANDARD
Function Description
The PIDU block is a basic block for creating a complete PID controller (or P, I, PI, PD, PID,
PI+S). In the most simple case it works as a standalone unit with the standard PID
controller functionality with two degrees of freedom. It can operate in automatic mode
($\mathtt{\text{MAN}}=\mathtt{\text{off}}$) or manual
mode ($\mathtt{\text{MAN}}=\mathtt{\text{on}}$).
In the automatic mode ($\mathtt{\text{MAN}}=\mathtt{\text{off}}$), the block PIDU implements the PID control law with two degrees of freedom in the form
where $U\left(s\right)$ is Laplace transform of the manipulated variable mv, $W\left(s\right)$ is Laplace transform of the setpoint variable sp, $Y\left(s\right)$ is Laplace transform of the process variable pv, $Z\left(s\right)$ is Laplace transform of the feedforward control variable dv and $K$, ${T}_{i}$, ${T}_{d}$, $N$, $b$ and $c$ 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 ($\mathtt{\text{IH}}=\mathtt{\text{on}}$). 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 rule of thumb for a PID controller is $\mathtt{\text{tt}}\approx \sqrt{{T}_{i}{T}_{d}}$. For a PI controller the formula is $\mathtt{\text{tt}}\approx {T}_{i}\u22152$. In this way we obtain the bumpless operation of the controller in the case of the mode switching (manual, automatic) and also the correct operation of the controller when saturation of the output mv occurs (antiwindup).
By adjusting the tt parameter, it is possible to tune the behaviour at saturation limits (socalled bouncing from limits due to noise) and when switching multiple controllers (bump in the controller output occurs when switching controllers while the control error is nonzero).
The additional outputs dmv, de and SAT generate the velocity output (difference of mv), deviation error and saturation flag, respectively.
If the PIDU block is connected with the SCUV block to configure the 3point step controller without the positional feedback, then the parameter icotype must be set to 4 and the meaning of the outputs mv and dmv and SAT is modified in the following way: mv and dmv give the PD part and difference of I part of the control law, respectively, and SAT provides the information for the SCUV block whether the deviation error is less than the dead zone dz in the automatic mode. In this case, the setpoint weighting factor c should be zero.
In the manual mode ($\mathtt{\text{MAN}}=\mathtt{\text{on}}$), 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:
Inputs
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 



Outputs
mv  Manipulated variable (controller output)  Double (F64) 
dmv  Controller velocity output (difference)  Double (F64) 
de  Deviation error  Double (F64) 
SAT  Saturation flag  Bool 



Parameters
irtype  Controller type (control law) $\odot $6  Long (I32) 



RACT  Reverse action flag  Bool 



k  Controller gain $K$. By definition, the value 0 turns the controller off. Negative values are not allowed, use the RACT parameter for such a purpose. $\downarrow $0.0 $\odot $1.0  Double (F64) 
ti  Integral time constant ${T}_{i}$. The value 0 disables the integrating part (the same effect as disabling it by the irtype parameter). $\downarrow $0.0 $\odot $4.0  Double (F64) 
td  Derivative time constant ${T}_{d}$. The value 0 disables the derivative part (the same effect as disabling it by the irtype parameter). $\downarrow $0.0 $\odot $1.0  Double (F64) 
nd  Derivative filtering parameter $N$. The value 0 disables the derivative part (the same effect as disabling it by the irtype parameter). $\downarrow $0.0 $\odot $10.0  Double (F64) 
b  Setpoint weighting – proportional part $\downarrow $0.0 $\uparrow $2.0 $\odot $1.0  Double (F64) 
c  Setpoint weighting – derivative part $\downarrow $0.0 $\uparrow $2.0  Double (F64) 
tt  Tracking time constant. The value 0 stands for an implicit value, which is ${T}_{i}\u22152$ or $\sqrt{{T}_{i}{T}_{d}}$ (see above) for controllers with integrating part. For controllers without integrating part, the value 0 disables tracking. If tracking is needed for a P or PD controller, it can be enabled by entering a positive value greater than the sampling time. It is not possible to turn off tracking for controllers with the integrating part (due to the windup effect). $\downarrow $0.0 $\odot $1.0  Double (F64) 
hilim  Upper limit of the controller output $\odot $1.0  Double (F64) 
lolim  Lower limit of the controller output $\odot $1.0  Double (F64) 
dz  Dead zone  Double (F64) 
icotype  Controller output type $\odot $1  Long (I32) 



[Previous] [Back to top] [Up] [Next]
2022 © REX Controls s.r.o., www.rexygen.com