PIDMA – PID controller with moment autotuner
Block SymbolLicensing group: AUTOTUNING
Function Description
The PIDMA block has the same control function as the PIDU block. Additionally it
is equipped with the moment autotuning function.
In the automatic mode ($\mathtt{\text{MAN}}=\mathtt{\text{off}}$), the block PIDMA 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 $\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 is $\mathtt{\text{tt}}\approx \sqrt{{T}_{i}{T}_{d}}$ or $\mathtt{\text{tt}}\approx 2\cdot \sqrt{{T}_{i}}$ in the case of a PI controller). 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 in the saturation of the output mv (antiwindup). The additional outputs dmv, de and SAT generate the velocity output (difference of mv), deviation error and saturation flag, respectively.
If the PIDMA block is connected with the block SCUV 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 PIDMA block is quite clear from the following diagram:
The block PIDMA extends the control function of the standard PID controller by the built in autotuning feature. Before start of the autotuner the operator have to reach the steady state of the process at a suitable working point (in manual or automatic mode) and specify the required type of the controller ittype (PI or PID) and other tuning parameters (iainf, DGC, tdg, tn, amp, dy and ispeed). The identification experiment is started by the input TUNE (input TBRK finishes the experiment). In this mode ($\mathtt{\text{TBSY}}=\mathtt{\text{on}}$), first of all the noise and possible drift gradient ($\mathtt{\text{DGC}}=\mathtt{\text{on}}$) are estimated during the user specified time ($\mathtt{\text{tdg}}+\mathtt{\text{tn}}$) and then the rectangle pulse is applied to the input of the process and the first three process moments are identified from the pulse response. The amplitude of the pulse is set by the parameter amp. The pulse is finished when the process variable pv deviates from the steady value more than the dy threshold defines. The threshold is an absolute difference, therefore it is always a positive value. The duration of the tuning experiment depends on the dynamic behavior of the process. The remaining time to the end of the tuning is provided by the output trem.
If the identification experiment is properly finished ($\mathtt{\text{TE}}=\mathtt{\text{off}}$) and the input ips is equal to zero, then the optimal parameters immediately appear on the block outputs pk, pti, ptd, pnd, pb, pc. In the opposite case ($\mathtt{\text{TE}}=\mathtt{\text{on}}$) the output ite specifies the experiment error more closely. Other values of the ips input are reserved for custom specific purposes.
The function of the autotuner is illustrated in the following picture.
During the experiment, the output ite indicates the autotuner phases. In the phase of estimation of the response decay rate ($\mathtt{\text{ite}}=\mathtt{\text{4}}$) the tuning experiment may be finished manually before its regular end. In this case the controller parameters are designed but the potential warning is indicated by setting the output ite=100.
At the end of the experiment (TBSY on$\to $off), the function of the controller depends on the current controller mode. If the $\mathtt{\text{TAFF}}=\mathtt{\text{on}}$ the designed controller parameters are immediately accepted.
Inputs
dv  Feedforward control variable  double 
sp  Setpoint variable  double 
pv  Process variable  double 
tv  Tracking variable  double 
hv  Manual value  double 
MAN  Manual or automatic mode  bool 



IH  Integrator hold  bool 



TUNE  Start the tuning experiment (off$\to $on) or force transition to the next tuning phase (see the description of the ite output)  bool 
TBRK  Stop the tuning experiment  bool 
TAFF  Tuning affirmation; determines the way the computed parameters are handled  bool 



ips  Meaning of the output signals pk, pti, ptd, pnd, pb and pc  long 



Outputs
mv  Manipulated variable (controller output)  double 
dmv  Controller velocity output (difference)  double 
de  Deviation error  double 
SAT  Saturation flag  bool 



TBSY  Tuner busy flag  bool 
TE  Tuning error  bool 



ite  Error code  long 
 Tuning error codes (after the experiment): 




 Tuning phases codes (during the experiment): 




 Remark about terminating the tuning phases 




trem  Estimated time to finish the tuning experiment [s]  double 
pk  Proposed controller gain $K$ ($\mathtt{\text{ips}}=\mathtt{\text{0}}$)  double 
pti  Proposed integral time constant ${T}_{i}$ ($\mathtt{\text{ips}}=\mathtt{\text{0}}$)  double 
ptd  Proposed derivative time constant ${T}_{d}$ ($\mathtt{\text{ips}}=\mathtt{\text{0}}$)  double 
pnd  Proposed derivative component filtering $N$ ($\mathtt{\text{ips}}=\mathtt{\text{0}}$)  double 
pb  Proposed weighting factor – proportional component ($\mathtt{\text{ips}}=\mathtt{\text{0}}$)  double 
pc  Proposed weighting factor – derivative component ($\mathtt{\text{ips}}=\mathtt{\text{0}}$)  double 
Parameters
irtype  Controller type (control law) $\odot $6  long 



RACT  Reverse action flag  bool 



k  Controller gain $K$ $\odot $1.0  double 
ti  Integral time constant ${T}_{i}$ $\odot $4.0  double 
td  Derivative time constant ${T}_{d}$ $\odot $1.0  double 
nd  Derivative filtering parameter $N$ $\odot $10.0  double 
b  Setpoint weighting – proportional part $\odot $1.0  double 
c  Setpoint weighting – derivative part  double 
tt  Tracking time constant. No meaning for controllers without integrator. $\odot $1.0  double 
hilim  Upper limit of the controller output $\odot $1.0  double 
lolim  Lower limit of the controller output $\odot $1.0  double 
dz  Dead zone  double 
icotype  Controller output type $\odot $1  long 



ittype  Controller type to be designed $\odot $6  long 



iainf  Type of apriori information $\odot $1  long 



DGC  Drift gradient compensation $\odot $on  bool 



tdg  Drift gradient estimation time [s] $\odot $60.0  double 
tn  Length of noise estimation period [s] $\odot $5.0  double 
amp  Tuning pulse amplitude $\odot $0.5  double 
dy  Tuning pulse get down threshold (absolute difference from the steady pv value) $\downarrow $0.0 $\odot $0.1  double 
ispeed  Desired closed loop speed $\odot $2  long 



ipid  PID controller form $\odot $1  long 



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