template<class T>
class controlpp::timevar::DControl< T >
A D (differntial) controller, with varying smaple-time.
An ideal D (differential) control element has the transfer function:
\[
D(s) = k_d * s.
\]
However, such a transfer function is:
- not realisable
- will amplify lots of noise
So a low pass filter is added:
\[
D(s) = \frac{k_d s}{1 + \frac{s}{\omega}}
\]
where:
- \(k_d\) is the differential gain
- \(omega\) is the low-pass bandwidth in radians per second
Discretised with the tustin transformation:
\[
s = \frac{2}{T_s} \frac{1 - z^{-1}}{1 + z^{-1}}
\]
with the sample time \(T_s\) and the delay operator \(z^{-1}\) to:
\[
y_k = \frac{1}{\frac{\omega T_s}{2} + 1} \left[ \omega k_d \left( u_k - u_{k-1} \right) - \left( \frac{\omega T_s}{2} - 1 \right) y_{k-1} \right]
\]
- Template Parameters
-
| T | The data type of the D controller (inputs/outputs/states). Usually float or double. |