template<class T>
class controlpp::timevar::PIControl< T >
A PI (Proportional Integral) controller with varying sample-times.
With the transfer function:
\[
\text{PI} = k_p + \frac{k_i}{s}
\]
and the discretisation using the tustin transformation:
\[
s = \frac{2}{T_s} \frac{1 - z^{-1}}{1 + z^{-1}}
\]
resulting in the controlers time series:
\[
y_k = \left( \frac{k_i T}{2} + k_p \right) u_k + \left( \frac{k_i T}{2} - k_p \right) u_{k-1} + y_{k-1}
\]
with:
- \(T_s\) the sample-time in seconds
- \(u_{k}\) and \(u_{k-1}\) are current and previous control inputs
- \(y_{k}\) and \(y_{k-1}\) are current and previous control outputs
The purely proportional component can amplify high-frequency noise. * While this does not improve control performance, it may lead to increased power consumption due to rapid steering actions. * To mitigate this, the proportional gain (P) can be replaced with a first-order low-pass filter (PT1), effectively transforming the PI controller into a PT1I controller.
- See also
- controlpp::vartime::PT1I
- Template Parameters
-
| T | Value type of the filter like float or double |