fast convolution and normalization

Started by Florian Schmidt in comp.dsp16 years ago 1 reply

Hi, i searched the web for quite some time now and just don't grok how to normalize when doing partitioned frequency domain...

Hi, i searched the web for quite some time now and just don't grok how to normalize when doing partitioned frequency domain convolution. Basically for an unnormalized FFT/IFFT pair (i use fftw, so all the FFT/IFFT i use is unnormalized), the necessary normalization factor would be 1/N applied once or 1/sqrt(N) applied twice. But now i have IFF(FFT(signal)*FFT(response)) and i wonder wh...


FFT Return Values

Started by Raeldor in comp.dsp11 years ago 5 replies

Hi Guys, I am using FFT for an audio programming project I'm working on, and was wondering what are the bounds of the array values returned...

Hi Guys, I am using FFT for an audio programming project I'm working on, and was wondering what are the bounds of the array values returned from the FFT function (FFTW)? The input is an array of 16-bit integers representing amplitude between -16,384 and 16,383, with a sample rate of 22k. I am passing a sample length of 2048. At the moment the return values do seem to represent some kind...


Spectrum Analysis: Understanding the results of Amplitude Spectrum/Power Spectrum calculation

Started by Michael in comp.dsp16 years ago 2 replies

Hello, I have no idea how to interpret my results of Amplitude Spectrum calculation correctly: Here is what I have done: I read in...

Hello, I have no idea how to interpret my results of Amplitude Spectrum calculation correctly: Here is what I have done: I read in AudioSamples from Mono 16Bit 22050Hz File and normalize it to [-1,1] Then I use fftw to make a forward realFFT and calculate the Amplitude Spectrum with sqrt(re * re + im * im); Or should it be "sqrt(re * re + im * im) / number FFT points;" ? ...


fftshift equivilent in C

Started by Graham in comp.dsp18 years ago 3 replies

Does anyone have an equivilent to the matlab/octave/sci.py 'fftshift' routine that is written in C? I am using FFTW directly to compute rank 1...

Does anyone have an equivilent to the matlab/octave/sci.py 'fftshift' routine that is written in C? I am using FFTW directly to compute rank 1 and 2 FFTs but need to 'shift' the zero frequency component. -- FFTSHIFT Shift zero-frequency component to center of spectrum. For vectors, FFTSHIFT(X) swaps the left and right halves of X. For matrices, FFTSHIFT(X) swaps the first a...


Same result for FFTW_FORWARD (-1) and FFTW_BACKWARD (+1) on FFTW3

Started by euricovaz in comp.dsp16 years ago 7 replies

Hi all, I am beginner in the fftw. A have made a single code to test how does it work. But i am having the same response if i use FFTW_FORWARD...

Hi all, I am beginner in the fftw. A have made a single code to test how does it work. But i am having the same response if i use FFTW_FORWARD or FFTW_BACKWARD transforms. What could be wrong? Here is the code: #include #include #include int main (void) { int N=4; //linebytes size fftw_complex *in, *out; fftw_plan p; int i; float arr


FFT Questions

Started by Raeldor in comp.dsp11 years ago 14 replies

Hi Guys, I want to use FFT for an audio programming project I'm working on and had some (what are probably quite simple questions). I...

Hi Guys, I want to use FFT for an audio programming project I'm working on and had some (what are probably quite simple questions). I understand the concept that FFT converts a time based array of data into a frequency based array of data, and I found a nice library called FFTW which looks like it will fit the bill. My questions are... (These questions are based on an input array of 16...


How fftw stores data

Started by Anonymous in comp.dsp16 years ago 1 reply

Hi I have a question regarding the way the data is stored in a 2d fourier transform. I am using a fftw_plan_dft_r2c_2d transform, and here is...

Hi I have a question regarding the way the data is stored in a 2d fourier transform. I am using a fftw_plan_dft_r2c_2d transform, and here is my question: > From what i understand of 2d fourier transforms, the dc component lies in the centre of the transform, i.e. for a transform of size (nx,ny), the dc component would be at value (nx/2,ny/2). The fftw_plan_dft_r2c_2d transform returns a


error in linking fftw

Started by mayur.sarode in comp.dsp12 years ago 2 replies

I am not able to link fftw3 library with my c program c code: #include #include int main() { int i=0; fftw_complex...

I am not able to link fftw3 library with my c program c code: #include #include int main() { int i=0; fftw_complex *in,*out; fftw_plan p; fftw_malloc ; int N=100; in=(fft_complex*)fft_malloc(sizeof(fftw_complex) * N); out=(fft_complex*)fft_malloc(sizeof(fftw_complex) * N); for(i=0;i


FFT in MATLAB, do they use radix 2 or radix 4 algorithm>

Started by A.E lover in comp.dsp14 years ago 4 replies

HI all, do yo know what algorithm does MATLAB's fft function based on? I read from MATLAB's help, it is something called FFTW. Is it a radix 2...

HI all, do yo know what algorithm does MATLAB's fft function based on? I read from MATLAB's help, it is something called FFTW. Is it a radix 2 or radix 4 or anything else? Thank you.


2D FFTW Inverse FFT does not give original image when /n

Started by adam3914 in comp.dsp13 years ago 4 replies

I have what I have to assume is a stupid mistake on my part. I am able to take the fft of an image and get back the half of the transformed image...

I have what I have to assume is a stupid mistake on my part. I am able to take the fft of an image and get back the half of the transformed image as I should. When I try to do a inverse fft on the data from the fft I get really big numbers like 10^71 size numbers. When I would expect to get my original image times 640*480, the size of my image. My first question is do I have to create the othe...


Trying to find SNR and THD for MP3 player

Started by amit1947 in comp.dsp14 years ago

Hello everybody this is my first post, I thank everyone in advance for any help. I am trying to calculate the SNR and THD of an MP3 player that...

Hello everybody this is my first post, I thank everyone in advance for any help. I am trying to calculate the SNR and THD of an MP3 player that is playing a 1KHz tone. I am using a digitizer card (A to D) to capture 70000 samples at 700,000 Hertz. I then use the FFTW C library to find the DFT. To calculate the THD I am using the following formula: THD = SQRT(FFT[200]^2 + FFT[300]^2 + FFT...


mixed radix fft (radix 2 and radix 5)

Started by Jenny in comp.dsp18 years ago 5 replies

I am looking for a mixed radix 2 and 5 fft algorithm in C. I have download some algorithm from www.fftw.com but don't know how to install it(I...

I am looking for a mixed radix 2 and 5 fft algorithm in C. I have download some algorithm from www.fftw.com but don't know how to install it(I am using windows XP not unix). Basically I have to do a 10, 100, 1000,... fft by using mixed radix(2,5)algorithm. Does anyone can give me some information about the algorithm? Where can I download? Thanks! Jenny


fixed-point real FFT for embedded

Started by Shlomi in comp.dsp18 years ago 4 replies

Hi ! I'm working on real-time speech recongnition application for embedded systems (with ARM compatible processor). I'm looking for a very...

Hi ! I'm working on real-time speech recongnition application for embedded systems (with ARM compatible processor). I'm looking for a very fast (for real-time) real FFT fixed-point version, with 16-32 bit input percision, up to 512 array-size. I found fftw to be one of the fastest, but no fixed-point version :( help would be very appreciated. Regards, Shlomi


fftw: real/even inverse fft

Started by tania in comp.dsp16 years ago 5 replies

I wrote the following program to compute the inverse fft of a real/even list of data in the frequency domain. I expected to obtain a real/even...

I wrote the following program to compute the inverse fft of a real/even list of data in the frequency domain. I expected to obtain a real/even list of data in the time domain but this is not the case. Please, what am I doing wrong?? #include #include #include #define N 512 main() { int i; float t,f, xt, yt, xf, yf; fftw_complex *time, *freq;


MFCC Test Data?

Started by Raeldor in comp.dsp11 years ago

Hi Guys, I've written some c# code to produce the MFCC from a set of floating point magnitude values returned from FFTW. Does anyone have any...

Hi Guys, I've written some c# code to produce the MFCC from a set of floating point magnitude values returned from FFTW. Does anyone have any test data (ie, FFT magnitude values and their resulting 12 MFCC values) that I could use to verify my code is working correctly? Failing that, could I pass a set of the 64 values from the FFT for someone to run through Matlab and give me back the 1...


Suggestion for a fast (and thread-safe) java FFT library

Started by Georg Holzmann in comp.dsp11 years ago

Hallo! I need to calculate FFTs in java on a server in multiple threads - and the FFTs must be fast. As a C-coder I tried the JNI interface...

Hallo! I need to calculate FFTs in java on a server in multiple threads - and the FFTs must be fast. As a C-coder I tried the JNI interface to the FFTW3 library [1], which works quite nice - however, unfortunately the plan generation of FFTW is not threadsafe (see e.g. [2],[3],[4]). Therefore my question: can some Java coder suggest me a fast, thread- safe FFT library (with or without J...


question about fftw3 in fortran, reuse plan, FFTW_MEASURE, FFTW_ESTIMATE, Segmentation fault

Started by Jinbo Wang in comp.dsp12 years ago 1 reply

Hello, I tried to test the sin transform using fftw, met some problems which I had no clue what's the reason. The following is my program, it...

Hello, I tried to test the sin transform using fftw, met some problems which I had no clue what's the reason. The following is my program, it first does sin transform of sin([1:7]/ 8*pi) use flags :FFTW_RODFT00,FFTW_ESTIMATE and there's no problem. Problem appeared after I try to reuse the 'plan' to do inverse, which gave 'Segmentation fault'. If I recreate the plan again, the problem dis...


FFTW Forward FFT Gives All Zeros

Started by Anonymous in comp.dsp16 years ago 2 replies

I have an array of non-zero, somewhat periodic, real data that I put into the real components of the complex input. The imaginary components of...

I have an array of non-zero, somewhat periodic, real data that I put into the real components of the complex input. The imaginary components of the complex input are all zeros. I then get the FFT with the following call for (iInc=0; iInc


fftw3 compilation in VSC++ 2008 on vista SP1

Started by Kwisatch in comp.dsp12 years ago 1 reply

Hi I'm trying to get fftw3 running in visual studio C++ 2008. have linked libfftw3-3.lib in project properties-> config properties-> linker->...

Hi I'm trying to get fftw3 running in visual studio C++ 2008. have linked libfftw3-3.lib in project properties-> config properties-> linker-> input: additional dependencies:libfftw3-3.lib libfftw3f-3.lib libfftw3l-3.lib and added C:\FFTProj\fftw-3.2.2-dll64 to my INCLUDE path, LIB path and PATH. when I execute libfftw3-3.lib on the command line it starts VSC++ but on cancel windows says. The


convert data to frequency domain

Started by Marc2050 in comp.dsp10 years ago 7 replies

Hi. I've a signal data that I obtained by sampling it at 1024Hz. Assuming my data is of length 300 seconds. It has amplitude values (signal...

Hi. I've a signal data that I obtained by sampling it at 1024Hz. Assuming my data is of length 300 seconds. It has amplitude values (signal voltage). I can plot a graph of the values vs. time. I like to convert this data into frequency domain. So, this is what I did: 1. perform a fft on the signal data using fftw and obtained an output 2. take the absolute values of the output from (1) ...