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
- Problem on applying ippsIIRGenLowpass/Highpass

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

Wei_Kin_Wong

Beginner

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

09-02-2010
07:05 AM

68 Views

Problem on applying ippsIIRGenLowpass/Highpass

I am having difficulties on applying ippsIIRGenLowpass/Highpass since there is no sample code online. What I need is to filter a Fourier transformed signal using Butterworth filter. The code below is what I figure out so far by studying Example 6-10 and 6-16 in IPPS manual.

//FFT of input signal

Ipp32f buf_FFT_left[len_FFT];

Ipp32f buf_FFT_right[len_FFT];

Ipp64f buf_FFT_left_64f[len_FFT];

Ipp64f buf_FFT_right_64f[len_FFT];

IppsFFTSpec_R_32f* spec;

ippsFFTInitAlloc_R_32f(&spec, 12, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone );

ippsFFTFwd_RToCCS_32f( buf_left_32f, buf_FFT_left, spec, NULL );

ippsFFTFwd_RToCCS_32f( buf_right_32f, buf_FFT_right, spec, NULL );

//Butterworth filter

ippsConvert_32f64f(buf_FFT_left,buf_FFT_left_64f,len_buf);

ippsConvert_32f64f(buf_FFT_right,buf_FFT_right_64f,len_buf);

int order=4;

Ipp64f rFreq=10*2/RATE;

int tapslen=2*(order+1);

IppsIIRState_64f* pState;

Ipp64f* pTaps=ippsMalloc_64f(tapslen*sizeof(Ipp64f));

ippsIIRGenHighpass_64f(rFreq,0,order,pTaps,ippButterworth);

ippsIIRInitAlloc_64f(&pState,pTaps,order,0);

ippsIIR_64f_I(buf_FFT_left_64f,len_FFT,pState);

ippsIIR_64f_I(buf_FFT_right_64f,len_FFT,pState);

ippsIIRFree_64f(pState);

ippsConvert_64f32f(buf_FFT_left_64f,buf_FFT_left,len_buf);

ippsConvert_64f32f(buf_FFT_right_64f,buf_FFT_right,len_buf);

Without the filter, the FFT signal works in my application, but filtered signal do not work. Is anyone have any idea on what is wrong with my code? May be can point me to some sample code or way to display the signal in graph?

Thank you very much.

Wong

Link Copied

2 Replies

Chao_Y_Intel

Employee

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

09-03-2010
01:52 AM

68 Views

Hi Wong,

Could you provide some clarification about the code: what is the error of the filtered signal?

For the code, the FFT result is CCS format ( the data are the complex), but ippsIIR use a real filter for the computation. Is this expected?

Thanks,

Chao

Chao_Y_Intel

Employee

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

09-03-2010
01:55 AM

68 Views

To display the data in graph, do you notice IPP demo at \IPP\6.1.6.056\ia32\demo\ippsDemo.exe.

It can demo the IPP single processing function usage.

Thanks,

Chao

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.