Inports
| |
In | Control error input |
Init | Value which is loaded at initialization function call |
max | Maximum output value |
min | Minimum output value |
Enable | Enable == 0: Deactivation of block; Out set to 0 Enable 0->1: Preload of integral part Enable == 1: Activation of block |
Outports
| |
Out |
|
Mask Parameters | |
Kp | Proportional Factor |
Ki | Integral Factor |
Kd | Derivative Factor |
fc | Cutoff frequency of realization low pass |
ts_fact | Multiplication factor of base sampling time (in integer format) |
PID Controller with Output Limitation:
G(s) = Kp + Ki/s + Kd*s/(s/(2*pi*fc) + 1)
Each fixed point implementation uses the next higher integer datatype for the integrational value storage variable.
A rising flank at the Enable inport will preload the integrational part with the value present on
the Init inport.
Transfer function (zero-order hold discretization method):
FiP8 bug: When using the TI compiler the step response of the derivative part doesn’t return to zero, but generates an overflow at zero crossing if the derivative parameter value is too high.
Developer note: The fixed point implementation source code of this block is used for block PID.
FiP8 | 8 Bit Fixed Point Implementation |
FiP16 | 16 Bit Fixed Point Implementation |
FiP32 | 32 Bit Fixed Point Implementation |
Float32 | 32 Bit Floating Point Implementation |
Float64 | 64 Bit Floating Point Implementation |
Name | FiP8 |
ID | 3264 |
Revision | 1.0 |
C filename | PIDLimit_FiP8.c |
H filename | PIDLimit_FiP8.h |
8 Bit Fixed Point Implementation
Controller Parameters | |
b0 | Integral coefficient |
b1 | Proportional coefficient |
b0d | Derivational coefficient b0 |
b1d | Derivational coefficient b1 |
a0d | Derivational coefficient a0 |
sfrb0 | Shift factor for PI coefficient b0 |
sfrb1 | Shift factor for PI coefficient b1 |
sfrd | Shift factor for D coefficients b0d and b1d |
in_old | Input value of previous cycle |
i_old | Integrator value of previous cycle |
d_old | Derivative value of previous cycle |
enable_old | Enable(k-1) |
Data Structure:
Name | FiP16 |
ID | 3265 |
Revision | 1.0 |
C filename | PIDLimit_FiP16.c |
H filename | PIDLimit_FiP16.h |
16 Bit Fixed Point Implementation
Controller Parameters | |
b0 | Integral coefficient |
b1 | Proportional coefficient |
b0d | Derivational coefficient b0 |
b1d | Derivational coefficient b1 |
a0d | Derivational coefficient a0 |
sfrb0 | Shift factor for PI coefficient b0 |
sfrb1 | Shift factor for PI coefficient b1 |
sfrd | Shift factor for D coefficients b0d and b1d |
in_old | Input value of previous cycle |
i_old | Integrator value of previous cycle |
d_old | Derivative value of previous cycle |
enable_old | Enable(k-1) |
Data Structure:
Name | FiP32 |
ID | 3266 |
Revision | 1.0 |
C filename | PIDLimit_FiP32.c |
H filename | PIDLimit_FiP32.h |
32 Bit Fixed Point Implementation
Controller Parameters | |
b0 | Integral coefficient |
b1 | Proportional coefficient |
b0d | Derivational coefficient b0 |
b1d | Derivational coefficient b1 |
a0d | Derivational coefficient a0 |
sfrb0 | Shift factor for PI coefficient b0 |
sfrb1 | Shift factor for PI coefficient b1 |
sfrd | Shift factor for D coefficients b0d and b1d |
in_old | Input value of previous cycle |
i_old | Integrator value of previous cycle |
d_old | Derivative value of previous cycle |
enable_old | Enable(k-1) |
Data Structure:
Name | Float32 |
ID | 3267 |
Revision | 0.1 |
C filename | PIDLimit_Float32.c |
H filename | PIDLimit_Float32.h |
32 Bit Floating Point Implementation
Controller Parameters | |
b0 | Integral coefficient |
b1 | Proportional coefficient |
b0d | Derivational coefficient b0 |
b1d | Derivational coefficient b1 |
a0d | Derivational coefficient a0 |
in_old | Input value of previous cycle |
i_old | Integrator value of previous cycle |
d_old | Derivative value of previous cycle |
enable_old | Enable(k-1) |
Data Structure:
Name | Float64 |
ID | 3268 |
Revision | 0.1 |
C filename | PIDLimit_Float64.c |
H filename | PIDLimit_Float64.h |
64 Bit Floating Point Implementation
Controller Parameters | |
b0 | Integral coefficient |
b1 | Proportional coefficient |
b0d | Derivational coefficient b0 |
b1d | Derivational coefficient b1 |
a0d | Derivational coefficient a0 |
in_old | Input value of previous cycle |
i_old | Integrator value of previous cycle |
d_old | Derivative value of previous cycle |
enable_old | Enable(k-1) |
Data Structure: