FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-23-2005, 05:33 PM
Michel Rouzic
Guest
 
Posts: n/a
Default FFT convolution in the polar form

I got a simple question about performing a FFT convolution in the polar
form, how do you do it?

I expect it to be something like this :

DC out = DC in * DC k (* meaning multiply)
Mag out = Mag in * Mag k
Phase out = Phase in + Mag k

k being the kernel (no need to explain what in and out stand for i
guess)

I suck too much at maths to make sure it is correct, can anyone out
there tell me if it's correct and if not tell me the proper way to do
it?

Reply With Quote
  #2 (permalink)  
Old 12-23-2005, 05:45 PM
[email protected]
Guest
 
Posts: n/a
Default Re: FFT convolution in the polar form


Michel Rouzic wrote:
> I got a simple question about performing a FFT convolution in the polar
> form, how do you do it?
>
> I expect it to be something like this :
>
> DC out = DC in * DC k (* meaning multiply)
> Mag out = Mag in * Mag k
> Phase out = Phase in + Mag k


You probably meant Phase out = Phase in + Phase k. By the way, DC =
Mag[0], no need for seperate variable.

Furthermore, the kernels in the frequency domain (time domain windows)
are real (because the time domain windows are symmetric). If you are
trying to create linear-phase FIR filter coefficients by windowing in
frequency domain (as in your previous posts), the FIR coeffcients in
frequency will also be real, and therefore it is more efficient to
convolve in rectangular coordinates. It also saves you the rect ->
polar transform.

Reply With Quote
  #3 (permalink)  
Old 12-23-2005, 07:50 PM
Michel Rouzic
Guest
 
Posts: n/a
Default Re: FFT convolution in the polar form


[email protected] wrote:
> Michel Rouzic wrote:
> > I got a simple question about performing a FFT convolution in the polar
> > form, how do you do it?
> >
> > I expect it to be something like this :
> >
> > DC out = DC in * DC k (* meaning multiply)
> > Mag out = Mag in * Mag k
> > Phase out = Phase in + Mag k

>
> You probably meant Phase out = Phase in + Phase k. By the way, DC =
> Mag[0], no need for seperate variable.


oh yeah that's what i meant

> Furthermore, the kernels in the frequency domain (time domain windows)
> are real (because the time domain windows are symmetric). If you are
> trying to create linear-phase FIR filter coefficients by windowing in
> frequency domain (as in your previous posts), the FIR coeffcients in
> frequency will also be real, and therefore it is more efficient to
> convolve in rectangular coordinates. It also saves you the rect ->
> polar transform.


ok, but you see, i *might* perform this convolution in the polar form
between a kernel i would create (as we talked about in another topic)
and a real-world signal. The plan is to take the real-world signal, FFT
it, turn it to the polar form, and then, convolve it hundreds of times
with different kernels (as you may have guessed, to cut the real-world
signals into frequency bands).

So the rect->polar transform doesn't matter much since it would be
performed only once, so now I got to figure out which is the more
efficient

For a sample of each part
In the polar form : 3 multiplications, 1 addition, 1 cos, 1 sin
In the rectangular form : 4 multiplications, 1 addition, 1 substraction

I'm not really sure which would be the fastest, i'm gonna have to test,
i bet on the rectangular form, but I was wondering for a long time how
to make a convolution in the polar form, and since i might need it
now..

thanks alot for help by the way

Reply With Quote
  #4 (permalink)  
Old 12-23-2005, 08:42 PM
Michel Rouzic
Guest
 
Posts: n/a
Default Re: FFT convolution in the polar form


Michel Rouzic wrote:
> [email protected] wrote:
> > Michel Rouzic wrote:
> > > I got a simple question about performing a FFT convolution in the polar
> > > form, how do you do it?
> > >
> > > I expect it to be something like this :
> > >
> > > DC out = DC in * DC k (* meaning multiply)
> > > Mag out = Mag in * Mag k
> > > Phase out = Phase in + Mag k

> >
> > You probably meant Phase out = Phase in + Phase k. By the way, DC =
> > Mag[0], no need for seperate variable.

>
> oh yeah that's what i meant
>
> > Furthermore, the kernels in the frequency domain (time domain windows)
> > are real (because the time domain windows are symmetric). If you are
> > trying to create linear-phase FIR filter coefficients by windowing in
> > frequency domain (as in your previous posts), the FIR coeffcients in
> > frequency will also be real, and therefore it is more efficient to
> > convolve in rectangular coordinates. It also saves you the rect ->
> > polar transform.

>
> ok, but you see, i *might* perform this convolution in the polar form
> between a kernel i would create (as we talked about in another topic)
> and a real-world signal. The plan is to take the real-world signal, FFT
> it, turn it to the polar form, and then, convolve it hundreds of times
> with different kernels (as you may have guessed, to cut the real-world
> signals into frequency bands).
>
> So the rect->polar transform doesn't matter much since it would be
> performed only once, so now I got to figure out which is the more
> efficient
>
> For a sample of each part
> In the polar form : 3 multiplications, 1 addition, 1 cos, 1 sin
> In the rectangular form : 4 multiplications, 1 addition, 1 substraction


OK, I did the test. The polar form thing is about 8 times slower than
the rectangular form. Now I only gotta figure out how I'm gonna make my
kernels directly in the rectangular form. You were talking about stuff
being real only, does it mean that in order to make my FIR kernels,
i'll only need to do the same as i did, reverse every two sample, put
it in the real part and leave the imaginary part at 0?

Reply With Quote
  #5 (permalink)  
Old 12-23-2005, 08:48 PM
[email protected]
Guest
 
Posts: n/a
Default Re: FFT convolution in the polar form

Michel Rouzic wrote:

> OK, I did the test. The polar form thing is about 8 times slower than
> the rectangular form. Now I only gotta figure out how I'm gonna make my
> kernels directly in the rectangular form.


That's easy. As the windows are time-domain symmetric, their DFT
kernels are real (remember the von Hann kernel: [1/2 1/4 0 ... 0 1/4],
no imaginary parts).

> You were talking about stuff
> being real only, does it mean that in order to make my FIR kernels,
> i'll only need to do the same as i did, reverse every two sample, put
> it in the real part and leave the imaginary part at 0?


Yes. The window kernel is real, the unwindowed FIR filter frequency
response is real, just use ordinary (real) convolution, then invert the
sign of every second coefficient for a linear-phase FIR.

Reply With Quote
  #6 (permalink)  
Old 12-24-2005, 04:51 PM
Michel Rouzic
Guest
 
Posts: n/a
Default Re: FFT convolution in the polar form


[email protected] wrote:
> Michel Rouzic wrote:
>
> > OK, I did the test. The polar form thing is about 8 times slower than
> > the rectangular form. Now I only gotta figure out how I'm gonna make my
> > kernels directly in the rectangular form.

>
> That's easy. As the windows are time-domain symmetric, their DFT
> kernels are real (remember the von Hann kernel: [1/2 1/4 0 ... 0 1/4],
> no imaginary parts).
>
> > You were talking about stuff
> > being real only, does it mean that in order to make my FIR kernels,
> > i'll only need to do the same as i did, reverse every two sample, put
> > it in the real part and leave the imaginary part at 0?

>
> Yes. The window kernel is real, the unwindowed FIR filter frequency
> response is real, just use ordinary (real) convolution, then invert the
> sign of every second coefficient for a linear-phase FIR.


Ok, works very fine, thanks alot for help

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PCIe: use 8*x1 PHY devices to form x8 GaLaKtIkUs™ FPGA 2 07-21-2006 02:20 AM
FFT convolution giving different results from convolution Michel Rouzic DSP 46 08-11-2005 11:16 PM
Cascade Form IIR Filters bngguy DSP 4 04-20-2004 10:59 PM
Polar to Rectangular conversion Alexander Weddell VHDL 1 11-28-2003 04:46 PM
Lattice form of Complex QMF porterboy DSP 0 11-19-2003 02:34 PM


All times are GMT +1. The time now is 01:51 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved