Advanced Analysis Library Only
AnalysisLibErrType Ch_Coef (int type, int order, double samplingFreq, double lowerCutoffFreq, double upperCutoffFreq, double ripple, double aCoefficientArray[], int numberACoefficients, double bCoefficientArray[], int numberBCoefficients);
Generates the set of filter coefficients to implement an IIR filter as specified by the Chebyshev 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 Chebyshev 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 array | Sampling frequency in Hertz. |
lowerCutoffFreq | double-precision array | Lower cutoff frequency of the filter in Hertz. |
upperCutoffFreq | double-precision array | Upper cutoff frequency of the filter in Hertz. |
ripple | double-precision array | Amplitude of the passband ripple in decibels. Default Value: 0.1 db. |
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. |