PIDAT – PID controller with relay autotuner
Block SymbolLicensing group: AUTOTUNING
Function Description
The PIDAT block has the same control function as the PIDU block. Additionally it
is equipped with the relay autotuning function.
In order to perform the autotuning experiment, it is necessary to drive the system to approximately steady state (at a suitable working point), choose the type of controller to be autotuned (PI or PID) and activate the TUNE input by setting it to on. The controlled process is regulated by special adaptive relay controller in the experiment which follows. One point of frequency response is estimated from the data measured during the experiment. Based on this information the controller parameters are computed. The amplitude of the relay controller (the level of system excitation) and its hysteresis is defined by the amp and hys parameters. In case of hys=0 the hysteresis is determined automatically according to the measurement noise properties on the controlled variable signal. The signal TBSY is set to onduring the tuning experiment. A successful experiment is indicated by and the controller parameters can be found on the outputs pk, pti, ptd, pnd and pb. The c weighting factor is assumed (and recommended) c=0. A failure during the experiment causes $\mathtt{\text{TE}}=\mathtt{\text{on}}$ and the output ite provides further information about the problem. It is recommended to increase the amplitude amp in the case of error. The controller is equipped with a builtin function which decreases the amplitude when the deviation of output from the initial steady state exceeds the maxdev limit. The tuning experiment can be prematurely terminated by activating the TBRK input.
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 



TUNE  Start the tuning experiment  Bool 
TBRK  Stop the tuning experiment  Bool 
Outputs
mv  Manipulated variable (controller output)  Double (F64) 
de  Deviation error  Double (F64) 
SAT  Saturation flag  Bool 



TBSY  Tuner busy flag  Bool 
TE  Tuning error  Bool 



ite  Error code; expected time (in seconds) to finishing the tuning experiment while the tuning experiment is active  Long (I32) 



pk  Proposed controller gain  Double (F64) 
pti  Proposed integral time constant  Double (F64) 
ptd  Proposed derivative time constant  Double (F64) 
pnd  Proposed derivative component filtering  Double (F64) 
pb  Proposed weighting factor – proportional component  Double (F64) 
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 $\odot $1.0  Double (F64) 
c  Setpoint weighting – derivative part $\downarrow $0.0  Double (F64) 
tt  Tracking time constant. $\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) 
iainf  Type of apriori information $\odot $1  Long (I32) 



k0  Static gain of the process (must be provided in case of $\mathtt{\text{iainf}}=\mathtt{\text{3}},\mathtt{\text{4}},\mathtt{\text{5}}$) $\odot $1.0  Double (F64) 
n1  Maximum number of halfperiods for estimation of frequency response point $\odot $20  Long (I32) 
mm  Maximum number of halfperiods for averaging $\odot $4  Long (I32) 
amp  Relay controller amplitude $\odot $0.1  Double (F64) 
uhys  Relay controller hysteresis  Double (F64) 
ntime  Length of noise amplitude estimation period at the beginning of the tuning experiment [s] $\odot $5.0  Double (F64) 
rerrap  Termination value of the oscillation amplitude relative error $\odot $0.1  Double (F64) 
aerrph  Termination value of the absolute error in oscillation phase $\odot $10.0  Double (F64) 
maxdev  Maximal admissible deviation error from the initial steady state $\odot $1.0  Double (F64) 
It is recommended not to change the parameters n1, mm, ntime, rerrap and aerrph.
[Previous] [Back to top] [Up] [Next]
2020 © REX Controls s.r.o., www.rexygen.com