Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® Integrated Performance Primitives
- How to set up and run an IIR bandpass filter

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

sisyphuscafe

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-12-2012
02:56 PM

213 Views

How to set up and run an IIR bandpass filter

I have a rather slow signal (256Hz) and I've been using the IPP functions rather nicely to perform FIR-based bandpass filtering on this signal. I use the 'ippsFIRGenBandpass_xx' methods to generate my taps vector (taps length of 60 and Hamming windowing).

Now I would like to run some IIR-based bandpass filters. Unfortunately, I've not been able to get this to work. First, there is no IPP function to generate an IIR-based bandpass taps vector. I can successfully create and run both low-pass and high-pass filters, but not bandpass.

I've used MATLAB to check my work. The taps vectors for the low-pass and high-pass filters I created using the IPP methods were identical to what MATLAB created for me (as well as the filtered results).

I then created a taps vector for an IIR-based filter in MATLAB and just tried to use that in the IPP filter call (ippsIIRxxx) but the results were not correct. I'm using a filter order of 12 and taps length of (2 * (order + 1)) = 26. I tried this with a delay buffer and without, all produced the same results...

Any ideas?

thanks.

Link Copied

11 Replies

SergeyKostrov

Valued Contributor II

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-13-2012
06:14 AM

213 Views

sisyphuscafe

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-13-2012
06:58 AM

213 Views

SergeyKostrov

Valued Contributor II

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-14-2012
08:40 AM

213 Views

sisyphuscafe

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-17-2012
09:03 AM

213 Views

Sergey Kostrov wrote:Yes.

>>...I then created a taps vector for an IIR-based filter in MATLAB... A Band-pass?

Sergey Kostrov wrote:Are you saying that I cannot create an IIR taps vector with band-pass semantics in MATLAB and use that in the 'ippsIIR_xxx' functions? Also, I've seen in other posts that one should 'initialize the delay line as per the MATLAB direct form II documentation. I have looked high and low but cannot find documentation in MATLAB that describes how to initialize the delay line buffer. Can you point me to this documentation? Thanks.I'm not sure that it could work and a response from IPP team is needed on if it is a right attempt to do Band-pass filtering with ippsIIR_xxx functions.

Chuck_De_Sylva

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-17-2012
09:39 AM

213 Views

SergeyKostrov

Valued Contributor II

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-17-2012
11:48 AM

213 Views

sisyphuscafe

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-17-2012
01:22 PM

213 Views

Chuck De Sylva (Intel) wrote:Hmm, Here's what I see in the IIRInit description: [plain] Parameters pTaps Pointer to the array containing the taps. The number of elements in the array is 2*(order+1). tapsFactor Scale factor for the taps of integer data type. order Order of the IIR filter. pDlyLine Pointer to the array containing the delay line values. The number of elements in the array is order. [/plain] Looks like the length of the delay line vector is 'order' and taps vector is '2*(order+1)'. I changed the length of the delay line to 'nTaps' length and got the same values out of the filter. Given the various algorithms I've seen, the delay line vector only needs to be 'order' length.

sisyphuscafe

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-17-2012
03:25 PM

213 Views

Sergey Kostrov wrote:We've been successful at creating taps vectors for low-pass and high-pass IIR filters in MATLAB and using those in IPP. In fact, if we call the ippsIIRGenLowpass_64f and ippsIIRGenHighpass_64f functions we get the same taps values as MATLAB so we're pretty confident with those. However, if use MATLAB to generate a taps vector with band-pass semantics (order 6) and use those in our IPP filtering call (ippsIIR64f_32f), the filtered signal diverges pretty quickly. We're going to try bi-quad methods tomorrow....I'm not sure that it could work and a response from IPP team is needed on if it is a right attempt to do Band-pass filtering with ippsIIR_xxx functions.

SergeyKostrov

Valued Contributor II

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-17-2012
06:47 PM

213 Views

sisyphuscafe

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-18-2012
07:21 AM

213 Views

Sergey Kostrov wrote:Both of my tests (MATLAB and IPP) use the Chebyshev1 window. The IPP code: [cpp] status = ippsIIRGenLowpass_64f(hiFreqNormal, _ripple, _order, _pTaps1, ippChebyshev1); [/cpp] The MATLAB code: [cpp] [d,c] = cheby1(6,0.1,[.19140625 .19921875]); [/cpp]What about a Window function? What if MATLAB uses a Window function A and IPP uses a Window finction B?

sisyphuscafe

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-20-2012
08:38 AM

213 Views

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.