# EquiRpl_HPF

Advanced Analysis Library Only

AnalysisLibErrType EquiRpl_HPF (double samplingFreq, double f1, double f2, int numberOfCoef, double coefficientArray [], double *delta);

## Purpose

Designs an optimal highpass FIR linear phase filter using the Parks-McClellan algorithm. EquiRpl_HPF is a simplified case of the Equi_Ripple function. EquiRpl_HPF generates only the filter coefficients; it does not actually perform data filtering.

### Example

/* Design a 25-point highpass filter and filter the incoming signal. */
double x[256], coef[25], y[281], fs, f1, f2, delta;
int n, m;
fs = 1000.0; /* sampling frequency */
f1 = 300.0; /* the stop band [0, 300] */
f2 = 400.0; /* the pass band [400, 500] */
n = 25; /* filter length */
m = 256;
EquiRpl_HPF (fs, f1, f2, n, coef, &delta);
Convolve (coef, n, x, m, y); /* Convolve the filter with the signal. */

## Parameters

Input
Name | Type | Description
samplingFreq | double-precision | Sampling frequency in Hertz.
f1 | double-precision | Highest frequency of the stop band. The stop band is [0, f1].
f2 | double-precision | Lowest frequency of the pass band. The pass band is [f2, samplingFreq/2].
numberOfCoef | integer | Length of the window FIR filter. Valid Range: 8 to 511.
Output
Name | Type | Description
coefficientArray | double-precision array | Calculated output window FIR filter coefficients.
delta | double-precision | Calculated normalized absolute ripple size. To obtain the amplitude of the passband ripple in decibels, use the following formula: 20*log(1+Delta) To obtain the attenuation of the stopband in decibels, use the following formula: 20*log(Delta)

## 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.