Advanced Analysis Library Only
AnalysisLibErrType Bessel_Coef (int type, int order, double samplingFreq, double lowerCutoffFreq, double upperCutoffFreq, double aCoefficientArray[], int numberACoefficients, double bCoefficientArray[], int numberBCoefficients);
Generates the set of filter coefficients to implement an IIR filter as specified by the Bessel filter model.
aCoefficientArray and bCoefficientArray are the reverse and forward filter coefficients. Use IIRFiltering to achieve the actual filtering.
Input | ||
Name | Type | Description |
type | integer | Controls the filter type of the Bessel IIR filter coefficients. type has the following valid values: lowpass = 0 (default) highpass = 1 bandpass = 2 bandstop = 3 |
order | integer | Order of the IIR filter. Default Value: 3. |
samplingFreq | double-precision | Sampling frequency in Hertz. |
lowerCutoffFreq | double-precision | Lower cutoff frequency of the filter in Hertz. |
upperCutoffFreq | double-precision | Upper cutoff frequency of the filter in Hertz. |
numberACoefficients | integer | Number of coefficients in aCoefficientArray. numberACoefficients = order + 1 for low or highpass filters numberACoefficients = 2 × order + 1 for bandpass or bandstop filters |
numberBCoefficients | integer | Number of coefficients in bCoefficientArray. numberBCoefficients = order + 1 for low or highpass filters numberBCoefficients = 2 × order + 1 for bandpass or bandstop filters |
Output | ||
Name | Type | Description |
aCoefficientArray | double-precision array | Array that contains the reverse coefficients of the designed IIR filter. |
bCoefficientArray | double-precision array | Array that contains the forward coefficients of the designed IIR filter. |
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |