Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [fft]

The fast Fourier transform is an efficient algorithm to compute the discrete Fourier transform (DFT) and its inverse.

Filter by
Sorted by
Tagged with
5
votes
2answers
3k views

Confirmation on how to calculate phase differences at every frequency point between two wideband signals?

I have a problem that I thought was going to be simple, but it has become surprisingly stubborn and I question my method... I have used the method (described below), but I wanted to confirm that ...
5
votes
1answer
4k views

How does zero-padding affect the magnitude of the DFT?

Let's simulate sinusoids of two frequencies using the following Matlab code: ...
5
votes
2answers
3k views

Generating wavelet using amplitude spectra

Equation (4) of a recent paper (An improved peak-frequency-shift method for Q estimation) shows how to generate a wavelet using a zero-phase Ricker wavelet. $|B_1(f)| = |B_0(f)|\exp(-\pi t f / Q)$ ...
5
votes
1answer
1k views

FFT window phase syncronising

I'm currently devising a solution for demodulating a DPSK signal in C#. So far I've got a working FFT with phase detection, BUT: I now have an issue of aligning the window of the FFT to synchronise ...
5
votes
2answers
4k views

Complex impulse response functions?

I think I must have misunderstood something regarding the relation between impulse and frequency responses. I have calculated the Impulse Response Function, IRF, from the Frequency Response Function,...
5
votes
1answer
215 views

Morphing between two FFTs

I'm a musician and I'm making a script that takes a wave file and snaps each of its frequencies from the fourier transforms to the nearest musical harmonic. Thanks to help from another question I ...
5
votes
1answer
478 views

How to combine bins of my DFT

I have a time series and apply the FFT to get a spectrum. Let's assume that my sampling frequency and the length of the time sample are chosen such that I end up with a $\Delta f = 0.1$ Hz. As this ...
5
votes
1answer
799 views

Why do we discard imaginary part of the phase spectrum?

Suppose I compute phase spectrum from the fftn function in MATLAB as ...
5
votes
1answer
270 views

How to detect specific behavior in time series?

I was not quite sure what the right SE for this was, so I posted this also here on SciComp. Please tell me which one to remove :) Problem statement I have a few hundred unrelated time series, say $...
5
votes
1answer
848 views

Constant Magnitude Chirp across audio band (Parseval's Theorem?)

I want to excite a loudspeaker with a constant magnitude chirp that sweeps across all frequencies in the audio band. I downloaded a test file from this website to start with. I plot the log magnitude ...
5
votes
1answer
265 views

How to triangulate 2 sources on a 2d plane formed by 4 sensors?

I have 4 sensors capturing signal data. Signal distribution speed is constant and known. I have sensors positions in 3d space. Also, I have an amplitude/frequency decomposition for data received by ...
5
votes
1answer
5k views

Applying a filter on an audio signal with Python

Let's say I have a filter described by its transfer function: $$ H(\omega) = \frac{1}{1 + j\frac{\omega}{\omega_0}} $$ And I want to apply this filter to an audio signal (a .wav file) using Python. ...
5
votes
3answers
1k views

FFT: Removed padded zeroes?

I have an application where I do this: DFT->Filter->IDFT on a range For computational performance I'm zero-padding my FFT to a power of two, but when I ...
5
votes
1answer
2k views

How to choose FFT depth for ADC performance analysis (SINAD, ENOB)

I am trying to simulate a model of an ADC and determine its performance. One of the interesting properties is the ENOB (Effective Number Of Bits), which can be calculated from SINAD (SIgnal-to-Noise ...
5
votes
2answers
3k views

Filter size vs. FFT size and Overlap add

First of all I would like to say that : I'm new to DSP and in a "learning curve" hence the "basicness" of my questions. I've read as many posts/articles as possible on the internet but still need "...
4
votes
5answers
4k views

How to separate a low amplitude signal of same frequency but different phase

I have a signal consisting of two sine waves of same frequency but have different phase (and also a lot of HF noise). Their amplitudes differ by about $120\textrm{ dB}$. How to I go about separating ...
4
votes
4answers
3k views

Removing values from FFT result same as filtering?

I don't quite understand why the textbooks say it is impossible to implement an ideal low pass filter. If I was to take the FFT of a discrete signal x[n], with Matlab's fft function I'd be returned ...
4
votes
5answers
2k views

Why does FFT output need to conjugate processing?

I came across some matlab code as the below, fftout = fft(adc_in, 1024); fftout_p = fftout.*conj(fftout); I think fftout is formatted as complex form. from ...
4
votes
4answers
3k views

About Discrete Fourier Transform vs. Discrete Fourier Series

I am new to the field of signal processing. I am wondering what is the difference between DFS(Fourier Series) vs. DFT(Fourier Transform). For common applications, usually we get a segment(length <...
4
votes
2answers
1k views

Optimizing FFT code for 12 bit processing on microcontroller

I want to port the following FFT code on a microcontoller having a very little floating point capability. I want to perform FFT of the output from 12 bit ADC. Since my values are all 12 bit numbers it ...
4
votes
3answers
13k views

Choosing the length of a signal when calculating the FFT

I'm trying to transforming an already know signal from time domain to frequency domain using fft function in MATLAB. And I got different values of amplitude when I ...
4
votes
1answer
1k views

Analysing 2500 frequencies using FFT with an input vector of 2048 samples?

I am currently reading the paper A Highly Robust Audio Fingerprinting System and on page 4 one can read about the technical parameters they use: Sampling rate of 5000 Hz, frames of 2048 samples as ...
4
votes
3answers
21k views

Number of DFT (FFT) Points Required for a Specific Frequency Resolution for an Oversampled Signal

I have a bandpass signal centered at 2 MHz and bandwidth of 50 kHz (the signal frequency varies from 2 MHz - 25 kHz to 2 MHz + 25 kHz). This signal is being sampled at 10 MHz. I want a frequency ...
4
votes
1answer
6k views

Difference Between Linear Convolution and Circular Convolution

If I understood correctly (and this page should confirm: http://www.cs.ioc.ee/~khoros2/linear/convolution-teo/front-page.html) if I convolve linearly (the usual point-to-point multiplication and ...
4
votes
2answers
681 views

FFT vs DFT Run Time Comparison (Complexity Analysis) in MATLAB

So we were given an assignment to plot the time taken by the FFT algorithm by MATLAB and a DFT algorithm written by me in MATLAB.G The expected output should have been the DFT algorithm following the ...
4
votes
1answer
15k views

How should I select window size and overlap?

I'm new to DSP and I have a wav file with a number of different frequencies playing at different volumes. I'd like to plot the power of the 350Hz frequency signal at each point in time. The source is ...
4
votes
3answers
6k views

Processing Accelerometer Vibration Data With FFT

For a project I am attempting to use an accelerometer to measure vibration in an RC aircraft and determine frequency from the result. To do this I am using an MPU-6000 accelerometer sampling @ 1000Hz. ...
4
votes
1answer
9k views

MATLAB - remove the frequency at zero in FFT

I am getting a high frequency at 0Hz. How can I remove it? I am not supposed to get it. My code is ...
4
votes
3answers
20k views

Apply Low pass Butterworth filter in Python

I want to use a low pass Butterworth filter on my data but on applying the filter I don't get the intended signal. Here is the dummy code: Signal A: ...
4
votes
2answers
815 views

Discontinuities in the FFT

So I am taking the Fast Fourier Transform of the following function: $$ x[n] = \displaystyle\sum\limits_{i=0}^{5} A_{i} \cos\left(\frac{\omega_{i}}{\omega_{s}} n + \phi_{i}\right) $$ Where the ...
4
votes
2answers
9k views

Negative values of the FFT

I try to describe a simple signal in the frequency domain with the use of FFT function: ...
4
votes
4answers
11k views

Choosing the right overlap for a window function

On Wikipedia there is quite a list of window functions. However, when you are doing a lot of STFTs, you often have to have some overlap to get better results. Generally an overlap factor of 2 (i.e., ...
4
votes
1answer
290 views

Discrete Fourier Transform a dummy approach

I'm trying to understand how DFT works exactly. However, when experimenting around, I compared both Matlab generated FFT result with a dummy approach result and I get similar result. However, the ...
4
votes
1answer
297 views

What sonic artifacts are caused by phase vocoders?

When using a phase vocoder to alter the spectral envelope of a signal, the input signal is split up into many (often hundreds of) bands. With many phase vocoders, the output levels these individual ...
4
votes
3answers
2k views

Correct method for processing FFT in realtime

I am attempting to build a 'live' FFT for continuous analysis of an audio signal. I am relatively new to this, but have attempted the full thing, and then updating the graph at 20Hz refresh rate. My ...
4
votes
4answers
2k views

How do I compare chords played on a guitar with a known sample?

I want to create a project that will recognized the chords that i played in guitar. I recorded a raw sound to be compare to the one that the user will input. Example I have a recorded sound chordA ...
4
votes
1answer
16k views

Cross correlation with FFT and fftshift

When I calculate the cross correlation between two vectors with the following code ...
4
votes
3answers
2k views

Basics of frequency spectrum for onset detection using FFT

I'm pretty new on signal processing and I've been reading a lot the last days in order to understand a little about it. But still there are things that I'm not sure if I got well. Sorry if I don't use ...
4
votes
1answer
13k views

What do I do with the result of an FFT?

So I am working on a project using digital signal processing, which I am not familiar with at all, and a lot of this is all new to me. I am using SciPy\NumPy to play around with code to understand the ...
4
votes
1answer
4k views

Why can the FFT always be mirrored in the middle of the x axis? [duplicate]

Plotting the FFT of a signal with Matlab e.g. by the code: y_fft = abs(fft(y)); f = fs*(0:length(y)-1)/length(y); plot(f,y_fft); where ...
4
votes
1answer
8k views

python scipy fft on numpy hanning window smears peaks

I have a signal that I have acquired from an experimental instrument, that I wish to examine in the frequency domain. I don't care about phase for this exercise, I only care about magnitude. I ...
4
votes
1answer
2k views

Which information do we get from magnitude and phase spectrum?

I am learning image processing. I want to ask very basic question related to FFT topic Which information do we actually get from "phase spectrum" and "magnitude spectrum" about an image?
4
votes
1answer
6k views

How do you plot an SPL vs frequency curve for a given set of pressure data?

I have a set of pressure data at a sampling rate of 262144 Hz for 3 seconds making it 786432 samples of pressure data. I want to plot a curve of the SPL (sound pressure level) vs frequency. I first ...
4
votes
3answers
20k views

Calculating values of frequency bins in Python

I have to use FFT to determine the period of waves inside a signal. After applying FFT on a window of 10000 point from a signal, I get something like this: What I don't understand is that FFT is ...
4
votes
2answers
5k views

the difference between dft and dfs

in the literature i've found that dfs and dft are one and the same.if they are one and the same why to use two different names for them? if there is really a difference what is it and what is the ...
4
votes
1answer
7k views

Working backwards from PSD to possible signal

I have been trying to reconstruct a random signal from its PSD and am running into trouble. I know that many different signals in the time or spatial domains can result in the same PSD-- I am ...
4
votes
2answers
225 views

Creating an array whose DFT is all whole numbers

I'm working on a simple FFT implementation and currently running some unit tests. Long floating point numbers in C and assembly become very hard to keep track of, and this whole thing is error prone. ...
4
votes
2answers
4k views

Removing drift from integration of accelerometer data

I am trying to get a positional data from the accelerometer data using the following steps: Re-zero the accelerometer value Removing mean from accelerometer value First integration of accelerometer ...
4
votes
2answers
2k views

Implementing Convolution in Frequency Domain?

Suppose, we have a bitmap image represented as a 2D integer array, int [,] image2D; whose FFT is Complex[,] fftImage2D; ...
4
votes
2answers
5k views

Extracting accurate phase and amplitude information from FFT with an arbitrary number of samples

This is a followup question to one I asked earlier based on the chat after the answer given by @hotpaw2, and cross-posted from stackoverflow since it was suggested it is more relevant to DSP. I have a ...