Admin Production ni-theme
Current Publication

Ch_Coef

LabWindows/CVI

Ch_Coef

Advanced Analysis Library Only

AnalysisLibErrType Ch_Coef (int type, int order, double samplingFrequency, double lowerCutoffFreq, double upperCutoffFreq, double passbandRippledb, double aCoefficientArray[], int numberOfACoefficients, double bCoefficientArray[], int numberOfBCoefficients);

Purpose

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.

Parameters

Input
Name Type Description
type int 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 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.
passbandRipple_db double Amplitude of the passband ripple in decibels.

Default Value: 0.1 db.
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