Spirit flow-x Function Reference page 267

Table of Contents

Advertisement

Check if the current setpoint needs to be gradually ramped up or down to the required
setpoint:
If (SP
- SP
CUR
PRV
SP
= SP
CUR
Else if (SP
- SP
PRV
SP
= SP
CUR
Calculate the current error:
If Control direction = Forward then
e
= SP
CUR
CUR
Else
e
= PV
CUR
CUR
Calculate the Proportional part:
P = K
* e
P
CUR
Calculate the Integral part:
I
= I
+ Ki * Δt * ( e
CUR
PRV
CUR
Note: the latter part is required to avoid anti-windup.
Calculate the Derivative part:
D = Kd / Δt * (e
CUR
Calculate the required control output:
v
= [ P + I
+ D - Low scale value ] / [ High scale vale – Low scale value ]
CUR
CUR
Check if change in control output is within the slew rate
If v
- u
> Upwards slew rate * Δt then
CUR
PRV
u
= u
+ ( Upwards slew rate * Δt )
CUR
PRV
Else if Δu < - ( Downwards slew rate * Δt ) then
u
= u
- ( Downwards slew rate * Δt )
CUR
PRV
Else
u
= v
CUR
CUR
Check if new control output is outside its limits
If u
> u
then
CUR
MAX
u
= u
CUR
MAX
) > ( Upwards SP clamp rate * Δt ) then
+ ( Upwards SP clamp rate * Δt )
PRV
) > ( Downwards SP clamp rate * Δt) then
CUR
- ( Downwards SP clamp rate * Δt )
PRV
– PV
CUR
– SP
CUR
+ (u
- v
)*(High scale value - Low scale value)/100 )
PRV
PRV
- e
)
PRV
Flow-X─ Function Reference
Flow-X General functions - fxPID
4-267

Advertisement

Table of Contents
loading

Table of Contents