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
86
votes
3answers
25k views

Why is it a bad idea to filter by zeroing out FFT bins?

It's very easy to filter a signal by performing an FFT on it, zeroing out some of the bins, and then performing an IFFT. For instance: ...
4
votes
4answers
4k 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 <...
83
votes
6answers
155k views

Why should I zero-pad a signal before taking the Fourier transform?

In an answer to a previous question, it was stated that one should zero-pad the input signals (add zeros to the end so that at least half of the wave is "blank") What's the reason for this?
63
votes
7answers
100k views

How do I implement cross-correlation to prove two audio files are similar?

I have to do cross correlation of two audio file to prove they are similar. I have taken the FFT of the two audio files and have their power spectrum values in separate arrays. How should I proceed ...
27
votes
4answers
5k views

Which time-frequency coefficients does the Wavelet transform compute?

The Fast Fourier Transform takes $\mathcal O(N \log N)$ operations, while the Fast Wavelet Transform takes $\mathcal O(N)$. But what, specifically, does the FWT compute? Although they are often ...
8
votes
4answers
4k views

Intuition for sidelobes in FFT

I was wondering if there's a intuitive way to understand why sidelobes appear when performing an FFT on a signal of fixed length?
26
votes
5answers
8k views

Is there a technical term for this simple method of smoothing out a signal?

Firstly, I am new to DSP and have no real education in it, but I am developing an audio visualization program and I am representing an FFT array as vertical bars as in a typical frequency spectrum ...
18
votes
2answers
22k views

Why does spectral leakage arise in an FFT?

I've tried googling and wikipedia-ing it, but I haven't gotten any answers beyond 'it's because the frequency of the input signal is sitting between two bins'. I understand that this is the reason, ...
21
votes
3answers
11k views

Tips for improving pitch detection

I'm working on a simple web app that allows the user to tune his/her guitar. I'm a real beginner in signal processing, so please don't judge me too harshly if my question is inappropriate. So, I ...
21
votes
3answers
51k views

What effect does a delay in the time domain have in the frequency domain?

If I have a signal that is time limited, say a sinusoid that only lasts for $T$ seconds, and I take the FFT of that signal, I see the frequency response. In the example this would be a spike at the ...
11
votes
3answers
3k views

MATLAB: $\tt fft$ and $\tt ifft$ scaling

In MATLAB, the outputs of the fft and/or ifft functions often require additional processing before being considered for analysis....
0
votes
1answer
499 views

Using fourier coefficients to reconstruct data in matlab

When doing a discrete fourier transform on some data using matlab's fft function, its output is a set of fourier coefficients but I was wondering how do I go about converting these into an and bn so I ...
24
votes
1answer
27k views

What is the difference between PSD and squared magnitude of frequency spectrum?

The power spectrum of a signal can be calculated by taking the magnitude squared of its Fourier transform. Being an audio person, the signal of interest for me would be a time series. How does this ...
15
votes
3answers
19k views

Fast Cosine Transform via FFT

I want to implement the Fast Cosine Transform. I read on wikipedia, that there is a fast version of the DCT which is similarly computed to the FFT. I tried to read the cited Makhoul* paper, for the ...
17
votes
8answers
5k views

Is there an algorithm to compute the phase for a single frequecy?

If you have a function $f(t)=A \cdot \sin(\omega t+\phi)$, and reference sin wave $\sin(\omega x)$ what would be a fast algorithm to compute $\phi$? I was looking at Goertzel algorithm, but it doesn'...
11
votes
2answers
25k views

Image Reconstruction:Phase vs. Magnitude

Figure 1.(c) shows the Test image reconstructed from MAGNITUDE spectrum only. We can say that the intensity values of LOW frequency pixels are comparatively more than HIGH frequency pixels. Figure 1.(...
3
votes
2answers
6k views

What should be the correct scaling for PSD calculation using $\tt fft$

I would to calculate the PSD of a signal using FFT however the result do not match with periodogram command. What did was as follow : ...
9
votes
2answers
17k views

FFT frequency resolution

I'm having some problems understanding the FFT. Is the frequency resolution in the spectrum calculated as $\frac{\textrm{sampling rate}}{\textrm{number of FFT points}}$ or $\frac{\textrm{sampling ...
34
votes
9answers
13k views

Is there an algorithm for finding a frequency without DFT or FFT?

I was looking in the Android app store for a guitar tuner. I found a tuner app that claimed it was faster than other apps. It claimed it could find the frequency without using the DFT (I wish I still ...
22
votes
4answers
6k views

How to distinguish voice from snoring?

Background: I'm working on an iPhone application (alluded to in several other posts) that "listens to" snoring/breathing while one is asleep and determines if there are signs of sleep apnea (as a pre-...
16
votes
1answer
21k views

What is the phase and magnitude response of white noise?

I would like to create white noise in the frequency domain, and then transform it to the time domain using python. To understand the problem, I simply generated white noise in the time domain, and ...
13
votes
4answers
21k views

Efficiently calculating autocorrelation using FFTs

I'm trying to calculate an autocorrelation on a platform where the only accelerated primitive I have available is the (I)FFT. I'm having a problem though. I prototyped it in MATLAB. I am, however, ...
6
votes
3answers
24k 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 ...
14
votes
5answers
10k views

FFT of sine wave not coming as expected i.e single point

The cyan plot is a spectrum of 50 Hz, and the magenta one is a 50.1 Hz sine wave (having amplitude 0.7). Both are sampled at 1024 samples/s. I performed a 1024 point FFT to get this spectrum. Why is ...
12
votes
3answers
2k views

Why do I have frequency leakage in DFT after zero padding if frequency resolution is fine?

Let's consider this example: Fs=1000; Ns=500; t=0:1/Fs:(Ns-1)*1/Fs; f1=10; f2=400; x=5+5*sin(2*pi*f1*t)+2*sin(2*pi*f2*t); X=fft(x); In this scenario, frequency ...
17
votes
4answers
9k views

How do you calculate spectral flatness from an FFT?

Ok, the spectral flatness (also called Wiener entropy) is defined as the ratio of the geometric mean of a spectrum to its arithmetic mean. Wikipedia and other references say the power spectrum. Isn'...
3
votes
3answers
7k views

How condition for existence of Fourier transform is valid?

The condition for Discrete time Fourier transform to exist for function $f(n)$ is given as $$\sum_{-\infty}^\infty |f(n)| < \infty.$$ In case of continuous Fourier transform the difference is ...
2
votes
1answer
6k views

scipy.signal.spectrogram

I want to do time-frequency analysis of a signal. So i decided to use spectrogram function from scipy. This function returns, three parameters f,t,Sxx. I am using below arguements: x : my signal fs : ...
4
votes
1answer
5k views

Non Uniform FFT / DFT with FFTW?

Can FFTW perform the FFT on data which is not uniform in time? I can't seem to find a straight-forward answer to this question anywhere online.
3
votes
1answer
451 views

Filtering $ n \times n $ Images by Separable $ m \times m $ Filters. Computation Time for Filtering Using FFT, 2D Convolution and Two 1D Convolutions

Consider filtering square $n\times n$ images by square, separable $m\times m$ filters. Give general equations for the computation time for the following approaches to this: Filtering using FFT 2-D ...
28
votes
3answers
32k views

Picking the correct filter for accelerometer data

I am fairly new to DSP, and have done some research on possible filters for smoothing accelerometer data in python. An example of the type of data Ill be experiencing can be seen in the following ...
12
votes
2answers
50k views

Power spectral density vs. FFT bin magnitude

What's the difference between these? Both are measurements of some form of signal power, but surely there's some difference between the power they are measuring?
18
votes
3answers
5k views

FFT with asymmetric windowing?

Common non-rectangular window functions all seem to be symmetric. Is there ever a case when one would want to use a non-symmetric window function before an FFT? (Say if the data on one side of the ...
14
votes
3answers
16k views

When to use the DTFT vs the DFT (and their inverses) in analysis?

In many of my readings, whenever some author speaks about working in the frequency (transform) domain (of a digital signal), they often times take the DFT, or the DTFT, (and of course their ...
12
votes
2answers
3k views

What statistic is used to determine presence of a signal in noise?

This is a detector problem I believe: I am being stumped by what appears to be a simple problem. Basically, I have a band of interest. If signal energies exist within this band of interest, then I ...
0
votes
2answers
7k views

FFT Pitch Detection methods: Autocorrelation or other?

I've seen many posts here that state that an FFT is almost all you need to get the fundamental frequency from an input stream. The problem is that, with sound, this doesn't work; we need to look for ...
0
votes
1answer
2k views

Real valued FFT in Matlab

I'm trying to compute FFT of size (N/2) for sequence of real values of length N. I'm using this recipe. Here is my code in matlab: ...
9
votes
1answer
3k views

What transform can I use to “zoom” in a specific portion of a signal's spectrum?

If I recall correctly, there is a variation of the DFT that can be used to analyze a specific band of the spectrum of a signal. How is it called?
7
votes
1answer
5k views

SPL values from FFT of microphone signal

I am trying to get a frequency response vs dB SPL plot for recorded sounds. I have a microphone with a flat response, a sensitivity of 4mV/Pa, and 1 Pa = 94dB. To get the dB SPL, I have the following ...
5
votes
3answers
30k views

FFT to spectrum in decibel

Here is a 10 seconds-long 440hz sine wave normalized at $0\textrm{ dBFS}$. When computing the STFT (with the code below) of this audio file, I noticed that ...
3
votes
2answers
2k views

FFT analysis for Vibration Signal

I am working on balancing an air-spindle. For the unbalance analysis I use an accelerometer (NI device). I have the voltage signal from the accelerometer corresponding to the vibration of spindle at a ...
2
votes
2answers
6k views

Implementing inverse FFT using forward FFT

I am trying to implement an inverse FFT using the forward FFT. For clarity: Let S[t] be a signal in time, and S[w] the transformed signal. As per this site, it seems one can reverse S[w], use the ...
3
votes
4answers
371 views

Why do we have to rearrange a vector and shift the zero point to the first index, in preparation for an FFT?

I am trying to learn how to implement the FFT as a way to approximate the continuous-time Fourier transform, and as a "nice easy example" I have chosen to test it with a simple Gaussian pulse in the ...
3
votes
3answers
3k views

recover image by only magnitude of image fourier transform

I have a image and I want calculate fft2 of it, after it I want recover image only by magnitude of it. how can I achieve this work? ...
2
votes
1answer
953 views

For 2D signals can it be said that the frequency response is the same as the Fourier transform?

Say I have a signal: [1, 1 , 1; 1 100 1; 1 1 1];, I wanted its frequency response, then can I take its FFT? Why does MATLAB have two functions to do the same ...
0
votes
1answer
2k views

Specific Frequency Resolution

I have an audio signal SampleRate Fs: 44100 Hz TotalSamples: 94144 samples Duration t: 2.1348 s The frequency resolution is given by ...
0
votes
2answers
214 views

How can I plot the frequency response on a bode diagram with Fast Fourier Transform?

Assume that we have an unknow dynamical system and we only want to estimate its parameters. The system can be discribed as: Continous time: $$G(s) = \frac{3s + 5} {5s^2 + 3s + 2}$$ Discrete time ...
18
votes
3answers
8k views

Why are magnitudes normalised during synthesis (IDFT), not analysis (DFT)?

In most examples and FFT code that I've seen, the output (frequency magnitudes) of the forward DFT operation is scaled by N -- i.e. instead of giving you the magnitude of each frequency bin, it gives ...
8
votes
1answer
2k views

Coloring a waveform with spectral centroid or by other means

Update 8 Unhappy of having to upload tracks to the service and looking at the new release of RekordBox 3 I've decided to take another look for an offline approach and a finer resolution :D Sounds ...
12
votes
3answers
4k views

STFT and DWT (Wavelets)

STFT can be successfully used on sound data (with a .wav soundfile for example) in order to do some frequency-domain modifications (example : noise removal). With ...

1
2 3 4 5 6