bandStop method

void bandStop(
  1. int order,
  2. double sampleRate,
  3. double centerFrequency,
  4. double widthFrequency, [
  5. int directFormType = DirectFormAbstract.direct_form_II,
])

Butterworth Bandstop filter.

Params:

  • order - Filter order (actual order is twice)
  • sampleRate - Sampling rate of the system
  • centerFrequency - Center frequency
  • widthFrequency - Width of the notch
  • directFormType - The filter topology. Default direct_form_II

Implementation

void bandStop(int order, double sampleRate, double centerFrequency,
    double widthFrequency,
    [int directFormType = DirectFormAbstract.direct_form_II]) {
  _AnalogLowPass analogProto = _AnalogLowPass(order);
  analogProto.design();
  LayoutBase digitalProto = LayoutBase(order * 2);
  BandStopTransform(centerFrequency / sampleRate, widthFrequency / sampleRate,
      digitalProto, analogProto);
  setLayout(digitalProto, directFormType);
}