Developer Reference

  • 2020
  • 10/21/2020
  • Public Content
Contents

IIRGenLowpass
,
IIRGenHighpass

Computes lowpass and highpass IIR filter coefficients.

Syntax

IppStatus ippsIIRGenLowpass_64f(Ipp64f
rFreq
, Ipp64f
ripple
, int
order
, Ipp64f*
pTaps
, IppsIIRFilterType
filterType
, Ipp8u*
pBuffer
);
IppStatus ippsIIRGenHighpass_64f(Ipp64f
rFreq
, Ipp64f
ripple
, int
order
, Ipp64f*
pTaps
, IppsIIRFilterType
filterType
, Ipp8u*
pBuffer
);
Include Files
ipps.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
Libraries:
ippcore.lib
,
ippvm.lib
Parameters
rFreq
Cutoff frequency, should be in the range (0, 0.5).
ripple
Posible ripple in pass band for
ippChebyshev1
type of filter.
order
Order of the filter [1, 12]
pTaps
Pointer to the array where computed tap values are stored.
filterType
Type of the IIR filter, possible values:
ippButterworth
,
ippChebyshev1
.
pBuffer
Pointer to the buffer for internal calculations. To get the size of the buffer, use the
ippsIIRGenGetBufferSize
function.
Description
These functions computes coefficients for lowpass or highpass IIR filters, respectively, with the cutoff frequency
rFreq
. The parameter
filterType
specifies the type of the filter. The computed coefficients are stored in the array
pTaps
. Its length must be at least 2*(
order
+ 1) and the taps arranged in the array as follows:
B
0
, B
1
, . . ., B
order
, A
0
, A
1
, . . ., A
order
Application Notes
Butterworth filters
are characterized by a magnitude response that is at most flat in the passband and monotonic overall. Butterworth filters sacrifice rolloff steepness for monotonicity in the passband. Unless the smoothness of the Butterworth filter is needed,
Chebyshev1 filter
can generally provide steeper rolloff characteristics with a lower filter order. Chebyshev1 type filters are equiripple in the passband and monotonic in the stopband. For
ippButterworth
filter cutoff frequency is the frequency where the magnitude response of the filter is 2
-1/2
. For
ippChebyshev1
filter cutoff frequency is the frequency at which the magnitude response of the filter is (-
ripple
) dB. For the functions
ippsIIRGenLowpass
and
ippsIIRGenHighpass
, the normalized cutoff frequency
rFreq
must be a number between 0 and 0.5, where 0.5 corresponds to the Nyquist frequency, π radians per sample. The correspondence between MATLAB's
Wn
and Intel IPP
rFreq
is very simple:
Wn
= 2*
rFreq
.
Examples:
1) For data sampled at 1000 Hz, create a 9th-order highpass Butterworth filter with cutoff frequency at 300 Hz.
Intel IPP:
Ipp64f pTaps[2*(9+1)];
status = ippsIIRGenHighpass( 300.0/1000.0, 0, 9, pTaps, ippButterworth );
MATLAB:
[b,a] = butter(9,300/500,'high');
2) For data sampled at 1000 Hz, create a 9th-order lowpass Chebyshev1 filter with ripple in the passband of 0.5 dB and a cutoff frequency at 300 Hz.
Intel IPP:
Ipp64f pTaps[2*(9+1)];
status = ippsIIRGenLowpass( 300.0/1000.0, 0.5, 9, pTaps, ippChebyshev1 );
MATLAB:
[b,a] = cheby1(9, 0.5, 300/500);
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when the
pTaps
pointer is
NULL
.
ippStsIIRGenOrderErr
Indicates an error when the
order
is less than 1 or greater than 12.
ippStsFilterFrequencyErr
Indicates an error when the
rFreq
is out of the range.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804