PIDMA – PID controller with moment autotuner

Block SymbolLicensing group: AUTOTUNING
PIC

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 (MAN = off), the block PIDMA implements the PID control law with two degrees of freedom in the form

U(s) = ±K bW(s) Y (s) + 1 Tis W(s) Y (s) + Tds Td N s + 1 cW(s) Y (s) + Z(s)

where U(s) is Laplace transform of the manipulated variable mv, W(s) is Laplace transform of the setpoint variable sp, Y (s) is Laplace transform of the process variable pv, Z(s) is Laplace transform of the feedforward control variable dv and K, Ti , Td, 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 = 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 tt Ti Td or tt 2 Ti 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 3-point 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 (MAN = 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:

PIC

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 (TBSY = on), first of all the noise and possible drift gradient (DGC = on) are estimated during the user specified time (tdg + 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 (TE = 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 (TE = 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.

PIC

During the experiment, the output ite indicates the autotuner phases. In the phase of estimation of the response decay rate (ite = -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 off), the function of the controller depends on the current controller mode. If the TAFF = 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

off ..

Automatic mode

on ...

Manual mode

IH

Integrator hold

bool

off ..

Integration enabled

on ...

Integration disabled

TUNE

Start the tuning experiment (off 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

off ..

Parameters are only computed

on ...

Parameters are set into the control law

ips

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

long

0 ....

Designed parameters k, ti, td, nd, b and c of the PID control law

1 ....

Process moments: static gain (pk), resident time constant (pti), measure of the system response length (ptd)

2 ....

Three-parameter first-order plus dead-time model: static gain (pk), dead-time (pti), time constant (ptd)

3 ....

Three-parameter second-order plus dead-time model with double time constant: static gain (pk), dead-time (pti), time constant (ptd)

4 ....

Estimated boundaries for manual fine-tuning of the PID controller (irtype = 7) gain k: upper boundary khi (pk), lower boundary klo (pti)

>99 ..

Reserved for diagnostic purposes

Outputs

mv

Manipulated variable (controller output)

double

dmv

Controller velocity output (difference)

double

de

Deviation error

double

SAT

Saturation flag

bool

off ..

The controller implements a linear control law

on ...

The controller output is saturated

TBSY

Tuner busy flag

bool

TE

Tuning error

bool

off ..

Autotuning successful

on ...

An error occurred during the experiment

ite

Error code

long

Tuning error codes (after the experiment):

0 ....

No error or waiting for steady state

1 ....

Too small pulse getdown threshold

2 ....

Too large pulse amplitude

3 ....

Steady state condition violation

4 ....

Too small pulse aplitude

5 ....

Peak search procedure failure

6 ....

Output saturation occurred during experiment

7 ....

Selected controller type not supported

8 ....

Process not monotonous

9 ....

Extrapolation failure

10 ...

Unexpected values of moments (fatal)

11 ...

Abnormal manual termination of tuning

12 ...

Wrong direction of manipulated variable

100 ..

Manual termination of tuning (warning)

Tuning phases codes (during the experiment):

0 ....

Steady state reaching before the start of the experiment

-1 ...

Drift gradient and noise estimation phase

-2 ...

Pulse generation phase

-3 ...

Searching the peak of system response

-4 ...

Estimation of the system response decay rate

Remark about terminating the tuning phases

TUNE .

The rising edge of the TUNE input during the phases -2, -3 and -4 causes the finishing of the current phase and transition to the next one (or finishing the experiment in the phase -4).

trem

Estimated time to finish the tuning experiment [s]

double

pk

Proposed controller gain K (ips = 0)

double

pti

Proposed integral time constant Ti (ips = 0)

double

ptd

Proposed derivative time constant Td (ips = 0)

double

pnd

Proposed derivative component filtering N (ips = 0)

double

pb

Proposed weighting factor – proportional component (ips = 0)

double

pc

Proposed weighting factor – derivative component (ips = 0)

double

Parameters

irtype

Controller type (control law)  6

long

1 ....

D

2 ....

I

3 ....

ID

4 ....

P

5 ....

PD

6 ....

PI

7 ....

PID

RACT

Reverse action flag

bool

off ..

Higher mv higher pv

on ...

Higher mv lower pv

k

Controller gain K  1.0

double

ti

Integral time constant Ti  4.0

double

td

Derivative time constant Td  1.0

double

nd

Derivative filtering parameter N  10.0

double

b

Setpoint weighting – proportional part  1.0

double

c

Setpoint weighting – derivative part

double

tt

Tracking time constant. No meaning for controllers without integrator.  1.0

double

hilim

Upper limit of the controller output  1.0

double

lolim

Lower limit of the controller output  -1.0

double

dz

Dead zone

double

icotype

Controller output type  1

long

1 ....

Analog output

2 ....

Pulse width modulation (PWM)

3 ....

Step controller unit with position feedback (SCU)

4 ....

Step controller unit without position feedback (SCUV)

ittype

Controller type to be designed  6

long

6 ....

PI controller

7 ....

PID controller

iainf

Type of apriori information  1

long

1 ....

Static process

2 ....

Astatic process

DGC

Drift gradient compensation  on

bool

off ..

Disabled

on ...

Enabled

tdg

Drift gradient estimation time [s]  60.0

double

tn

Length of noise estimation period [s]  5.0

double

amp

Tuning pulse amplitude  0.5

double

dy

Tuning pulse get down threshold (absolute difference from the steady pv value)   0.0 0.1

double

ispeed

Desired closed loop speed  2

long

1 ....

Slow closed loop

2 ....

Normal (middle fast) closed loop

3 ....

Fast closed loop

ipid

PID controller form  1

long

1 ....

Parallel form

2 ....

Series form

2019 © REX Controls s.r.o., www.rexygen.com