/// <summary>
 /// Creates a basic first order gradient estimator using a demodulation method with first order high and low pass filters.
 /// Uses a sinusoidal dither signal for demodulation.
 /// Creates the filters with cutt-off frequency of wd/10.
 /// </summary>
 /// <param name="wd">The dither frequency (rad/s), must satisfy certain conditions, see Garcia-Rosas ACC 2018.</param>
 /// <param name="L"></param>
 /// <param name="ts"></param>
 public GradientDemodulator(float wd, float[] L, float ts)
 {
     float[] woArr = { wd };
     SetEstimatorFrequencies(woArr);
     SetGains(L);
     SetSamplingTime(ts);
     dither = new SinusoidalDither(1.0f, wd, 0.0f);
     hpf    = new FOHPDFilter(wd / 10.0f, L[0], ts);
     lpf    = new FOLPDFilter(wd / 10.0f, L[0], ts);
 }
 /// <summary>
 /// Creates a basic first order gradient estimator using a demodulation method with first order high and low pass filters.
 /// Uses a sinusoidal dither signal for demodulation.
 /// </summary>
 /// <param name="a">The dither signal amplitude.</param>
 /// <param name="wd">The dither frequency (rad/s), must satisfy certain conditions, see Garcia-Rosas ACC 2018.</param>
 /// <param name="phi">The dither signal phase shift.</param>
 /// <param name="wo">Estimator frequency, well bellow wd, see Garcia-Rosas ACC 2018.</param>
 /// <param name="L">Estimator gains, one dimensional for this type.</param>
 /// <param name="ts">The estimator (system) sampling time.</param>
 public GradientDemodulator(float a, float wd, float phi, float wo, float[] L, float ts)
 {
     float[] woArr = { wo };
     SetEstimatorFrequencies(woArr);
     SetGains(L);
     SetSamplingTime(ts);
     dither = new SinusoidalDither(a, wd, phi);
     hpf    = new FOHPDFilter(wo, L[0], ts);
     lpf    = new FOLPDFilter(wo, L[0], ts);
 }