Discrete PID controller
![]() |
![]() |
| Vector | |
| in the palette | on the schematic |
The block implements a transfer function of a discrete PID controller:

where KP, KI, KD – proportional, integral and differential term respectively; T – sampling period.

where KP, KI, KD – proportional, integral and differential term respectively; T – sampling period.
Inputs
- input – the port for the input signal of the block.
Outputs
- output – the output port of the block.
Properties
- Sampling period – sampling period of T block calculation.
- Initial conditions – vector of initial values yi of the block output.
- Proportional term – KP.
- Integral term – KI.
- Differential term – KD.
Parameters
none
Note:
- By default, the block implements scalar input signal processing.
- Coefficients ai, bj are introduced according to increasing powers z. For the proper operation of this unit, it is necessary to set the maximum integration step no more than 0.5·T. When integrating with a constant step, it is recommended to set the step such that the quantization period is a multiple of the integration step T = k·h, where k, h is an integer and the integration step.

