Bw_Coef
Advanced Analysis Library Only
AnalysisLibErrType Bw_Coef (int type, int order, double samplingFrequency, double lowerCutoffFreq, double upperCutoffFreq, double aCoefficientArray[], int numberOfACoefficients, double bCoefficientArray[], int numberOfBCoefficients);
Purpose
Generates the set of filter coefficients to implement an IIR filter as specified by the Butterworth filter model.
aCoefficientArray and bCoefficientArray are the reverse and forward filter coefficients. Use IIRFiltering to achieve actual filtering.
Parameters
Input | ||
Name | Type | Description |
type | int | Controls the filter type of the Butterworth IIR filter coefficients. type has the following valid values: lowpass = 0 (default) highpass = 1 bandpass = 2 bandstop = 3 |
order | int | Order of the IIR filter. Default Value: 3. |
samplingFrequency | double | Sampling frequency in Hertz. |
lowerCutoffFreq | double | Lower cutoff frequency of the filter in Hertz. |
upperCutoffFreq | double | Upper cutoff frequency of the filter in Hertz. |
numberOfACoefficients | int | Number of coefficients in aCoefficientArray. numberACoefficients = order + 1 for low or highpass filters numberACoefficients = 2 × order + 1 for bandpass or bandstop filters |
numberOfBCoefficients | int | 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 [] | Array that contains the reverse coefficients of the designed IIR filter. |
bCoefficientArray | double [] | Array that contains the forward coefficients of the designed IIR filter. |
Return Value
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |
Additional Information
Library: Advanced Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later