Filter design. More...
Functions | |
RealSequence1 | SPL::lowpassFilter (double cutoffFreq, double transWidth, double maxPassbandRipple=0.1, double minStopbandAtten=20.0) |
Design a zero-phase FIR lowpass filter. More... | |
RealSequence1 | SPL::highpassFilter (double cutoffFreq, double transWidth, double maxPassbandRipple=0.1, double minStopbandAtten=20.0) |
Design a zero-phase FIR highpass filter. More... | |
RealSequence1 | SPL::bandpassFilter (double cutoffFreq0, double cutoffFreq1, double transWidth0, double transWidth1, double maxPassbandRipple=0.1, double minStopbandAtten=20.0) |
Design a zero-phase FIR bandpass filter. More... | |
Filter design.
RealSequence1 SPL::bandpassFilter | ( | double | cutoffFreq0, |
double | cutoffFreq1, | ||
double | transWidth0, | ||
double | transWidth1, | ||
double | maxPassbandRipple = 0.1 , |
||
double | minStopbandAtten = 20.0 |
||
) |
Design a zero-phase FIR bandpass filter.
Effects: A linear-phase FIR filter with zero group delay is designed with the (normalized) lower cutoff frequency cutoffFreq0, (normalized) upper cutoff frequency cutoffFreq1, (normalized) lower transition width transWidth0, (normalized) upper transition width transWidth1, maximum peak-to-peak passband ripple maxPassbandRipple (in dB), and minimum stopband attenuation minStopbandAtten (in dB). Note: Frequencies are normalized such that a value of one corresponds to the Nyquist frequency.
The cutoff frequencies cannot be 0 or 1. In other words, this function cannot be used to design a lowpass or highpass filter.
Returns: The impulse response of the designed filter is returned.
RealSequence1 SPL::highpassFilter | ( | double | cutoffFreq, |
double | transWidth, | ||
double | maxPassbandRipple = 0.1 , |
||
double | minStopbandAtten = 20.0 |
||
) |
Design a zero-phase FIR highpass filter.
Effects: A linear-phase FIR filter with zero group delay is designed with the (normalized) cutoff frequency cutoffFreq, (normalized) transition width transWidth, maximum peak-to-peak passband ripple maxPassbandRipple (in dB), and minimum stopband attenuation minStopbandAtten (in dB). Note: Frequencies are normalized such that a value of one corresponds to the Nyquist frequency.
Returns: The impulse response of the designed filter is returned.
RealSequence1 SPL::lowpassFilter | ( | double | cutoffFreq, |
double | transWidth, | ||
double | maxPassbandRipple = 0.1 , |
||
double | minStopbandAtten = 20.0 |
||
) |
Design a zero-phase FIR lowpass filter.
Effects: A linear-phase FIR filter with zero group delay is designed with the (normalized) cutoff frequency cutoffFreq, (normalized) transition width transWidth, maximum peak-to-peak passband ripple maxPassbandRipple (in dB), and minimum stopband attenuation minStopbandAtten (in dB). Note: Frequencies are normalized such that a value of one corresponds to the Nyquist frequency.
Returns: The impulse response of the designed filter is returned.