OptimalFir::RemezImpulse Function

Overload List

#SignatureDescription
1bool RemezImpulse(TVec *H, const DewArray<double> &W, double Ripple, TFilterType FilterType, double Gain = 1, double FS = 2, bool EnsureOdd = true);Design an optimal equiripple FIR filter with Parks-McClellan algorithm.
2bool RemezImpulse(TVec *H, const DewArray<double> &W, TFilterType FilterType, double Gain = 1, double FS = 2);Design an optimal equiripple FIR filter with Parks-McClellan algorithm.

Overload 1: bool RemezImpulse(TVec *H, const DewArray<double> &W, double Ripple, TFilterType FilterType, double Gain = 1, double FS = 2, bool EnsureOdd = true);

Design an optimal equiripple FIR filter with Parks-McClellan algorithm.

#NameTypeDescription
1HTVec *H vector holds the impulse response on exit.
2Wconst DewArray<double> &Array which can hold only 2 (highpass/lowpass definition) or 4(bandpass/bandstop definition) parameters.
3RippledoubleThe required linear ripple of the passband and 20*Log10(Ripple) is the required attenuation of the stop band.
4FilterTypeTFilterTypeParameter defines the filter type.
5Gain = 1doubleSpecifies the gain of the passband.
6FS = 2doubleThe sampling frequency used to normalize transition band edges defined in the W array. Default value for FS is 2.
7EnsureOdd = trueboolResulting filter length will be odd (not divisable by 2), if set to true. Default is true.
Remarks:

The resulting impulse response is placed in H. Length of the filter is automatically estimated from the required Ripple and transition bandwidth. Function returns True, if the filter was succesfully designed. This does not guarantee that filter specifications have been meet.

This routine is a simplified version of Remez and can be used to design: Lowpass, bandpass, bandstop, highpass, differentiators and hilbert transformers.

Note:

RemezImpulse routine designes FIR filters about 10-20% shorter than the KaiserImpulse routine.

See Also: OptimalFir::remez
Declared in Dew::Signal::Units::OptimalFir · Dew.Signal/Units.OptimalFIR.h · Cross-compiler

Overload 2: bool RemezImpulse(TVec *H, const DewArray<double> &W, TFilterType FilterType, double Gain = 1, double FS = 2);

Design an optimal equiripple FIR filter with Parks-McClellan algorithm.

#NameTypeDescription
1HTVec *
2Wconst DewArray<double> &
3FilterTypeTFilterType
4Gain = 1double
5FS = 2double
Remarks:

Required length of the filter must be preset by setting H.Length. H vector holds the impulse response on exit.

See Also: KaiserImpulse, SavGolayImpulse, OptimalFir::remez, FirImpulse
Declared in Dew::Signal::Units::OptimalFir · Dew.Signal/Units.OptimalFIR.h · Cross-compiler