Elp_LPF

Advanced Analysis Library Only

AnalysisLibErrType Elp_LPF (double inputArray[], int numberOfElements, double samplingFreq, double cutoffFreq, double ripple, double stopBandAtten, int order, double outputArray[]);

Purpose

Filters the input array using an elliptic lowpass digital filter. Elp_LPF can perform the operation in place; that is, the input and output arrays can be the same.

Example

/* Generate a random signal and filter it using a fifth-order lowpass elliptic filter. */
double x[256], y[256], fs, fc, ripple, atten;
int n, order;
n = 256;
fs = 1000.0;
fc = 200.0;
ripple = 0.5;
atten = 40.0;
order = 5;
Uniform (n, 17, x);
Elp_LPF (x, n, fs, fc, ripple, atten, order, y);

Parameters

Input
Name Type Description
inputArray double-precision array Array containing the raw data to filter.
numberOfElements integer Number of elements in both the input and output array.
samplingFreq double-precision Sampling frequency in Hertz.
cutoffFreq double-precision Cutoff frequency in Hertz.
ripple double-precision The amplitude of the stop band ripple in decibels.

Default Value: 0.1 db.
stopBandAtten double-precision Stop band attenuation in decibels.

Default Value: 40.0 db.
order integer Filter order.

Default Value: 5.
Output
Name Type Description
outputArray double-precision array Filtered data.

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.