Skip to main content
Share Your Experience: Take the 2024 Developer Survey
11 votes
Accepted

Difference between frequency sampling and windowing method

The Windowing method for filter design uses samples of the impulse response for the filter coefficients, truncated to the filter length (and then possibly, but not required, tapered by a higher ...
Dan Boschen's user avatar
  • 52.1k
11 votes

Is the negative spectrum (by DFT) of a real signal "needed" to reconstruct it?

is, in fact, the mirrored spectrum needed to reconstruct the signal? No, and yes. If I give you a spectrum with points from $n = 0$ to $n = \frac N 2$ and I tell you the original signal was real, ...
TimWescott's user avatar
  • 12.8k
10 votes
Accepted

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

Whether or not to scale the forward FFT by 1/N depends on which result you want for further analysis: energy (preserving Parseval's identity), or amplitude (measuring height or volts, etc.). If you ...
hotpaw2's user avatar
  • 35.4k
9 votes

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

The scaling convention used by Matlab is common in DSP. You could also use the unitary DFT where both the DFT and the IDFT are scaled by a factor of $1/\sqrt{N}$. You could also use the factor $1/N$ ...
Matt L.'s user avatar
  • 90.4k
9 votes

Are there any reasons to use overlap algorithm when one could do ifft(X * Y) from the complete signal as well in similiar time complexity

Apart from the latancy reason, fast convolution is faster than the linear convolution when $x[n]$ and $y[n]$ have similar lengths. Suppose the lengths of $x[n]$ and $y[n]$ are $M$ and $L$ respectively,...
ZR Han's user avatar
  • 3,248
7 votes

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

particularly since this is a question about convention, i will not reinforce the ridiculous convention of MATLAB and will answer only with the right and proper convention or conventions. i.e. MATLAB'...
robert bristow-johnson's user avatar
7 votes
Accepted

How the increasing of sampling frequency in OFDM didn't cause increase on the required channel bandwidth

You can say the null subcarriers have their own bandwidth if you define an alphabet including "zeros" and use null carriers to transmit these "zeros". As the comment of MBaz, If we start with the ...
AlexTP's user avatar
  • 6,595
7 votes

FFT showing peaks at 0Hz?

[EDITED FROM DISCUSSION] On the first order, your data looks like a decay with a positive origin on a small-valued range $[0.7 \; 0.49]\times 10^{-7}$, and very tiny fluctuations with respect to the ...
Laurent Duval's user avatar
7 votes
Accepted

Are there any reasons to use overlap algorithm when one could do ifft(X * Y) from the complete signal as well in similiar time complexity

The main reason for using overlap-save or overlap-add is latency. Usually you don't want to wait for the complete signal before the first output samples can be computed. Of course, you also save ...
Matt L.'s user avatar
  • 90.4k
6 votes
Accepted

Calculate IFFT using only FFT?

We want to do inverse DFT: $$ x(k) = \frac{1}{\sqrt{N}}\sum_n y(n) e^{j 2\pi kn/N}, $$ but can only do forward DFT. So let's try to make it "look" like a forward DFT. Note that we want a minus sign in ...
Atul Ingle's user avatar
  • 4,134
6 votes
Accepted

How does MATLAB recover picture from magnitude spectrum alone?

Your code uses the phase for the reconstruction. Have a look at the output of fft2(x); they are complex numbers, i.e. the contain phase and magnitude. Have a look at this code: ...
Maximilian Matthé's user avatar
6 votes
Accepted

IFFT gives complex values in Matlab

Don’t use the original size for the IFFT but instead use the size of your properly extended and complex conjugated spectrum. In order for the time domain data to be real, the frequency spectrum must ...
Dan Boschen's user avatar
  • 52.1k
5 votes
Accepted

Is it possible to apply inverse Fourier transform (I-FFT) to the following image?

Suppose, I have this image in my hand and nothing else. Clearly, this is a Magnitude-plot of some unknown image. Sounds like you're losing the phase information in the signal; you only have the pixel ...
Scott's user avatar
  • 649
5 votes

Filter - Spatial Domain Versus Frequency Domain

It appears you need to study a bit on convolutional filtering of images, specifically on overlap add/ overlap save methods. From the links I can see your objective is to apply the filter defined in ...
PSK's user avatar
  • 109
5 votes

Implementing inverse FFT using forward FFT and time-reversal property

In your link I cannot find a reference to the time-reversal. However, here are some additions: The time reversal $y(t)$ of a continuous signal $x(t)$ is given by $y(t)=x(-t)$. Similarly, for a ...
Maximilian Matthé's user avatar
5 votes

What is the effect of the natural logarithm in the frequency domain?

First note that when you use a logarithmic function you shall avoid negative arguments if it's output should be real valued. Then consider the following relation: $$ y[n] = \ln( 1 + x[n] )$$ where ...
Fat32's user avatar
  • 28.3k
5 votes
Accepted

Frequency domain samples to time domain without knowing the sampling rate?

Generally the relationship between the sampling frequency $f_s$ and the frequency spacing of each bin $\Delta f$ is given by: $$\Delta f= f_s/N$$ For example if you have 1000 bins and the sampling ...
Dan Boschen's user avatar
  • 52.1k
5 votes
Accepted

Am I supposed to normalize FFT in Python?

Your decision to normalize or not does not change the accuracy of your answer, as it is simply a scaling factor. If you use the common scaling of $1/N$, then the output for each DFT bin will represent ...
Dan Boschen's user avatar
  • 52.1k
5 votes

Inverse complex FFTW transform

Is the backwards transform just an IFFT (for forward transform)? Yes. Compare the "what FFTW actually computes", here
Marcus Müller's user avatar
5 votes

Inverse complex FFTW transform

FFTW is a nice library. Real forward, real backward, complex forward, complex backward. Refill the input arrays when executing a new plan. Works for me, see documentation via the link graciously ...
Cedron Dawg's user avatar
  • 7,570
5 votes
Accepted

Circular Convolution and FFT of power 2

Circular convolution is just linear convolution aliased by DFT length $n$. The length of linear convolution of $a$ and $b$ will be $2n-1$. So take $FFTs$ of $a$ and $b$ , padding each of them to ...
jithin's user avatar
  • 2,263
5 votes
Accepted

What steps are necessary to get the same impulse as before a FFT + IFFT

However, I am already failing to get the same IR without changing the frequency range. Then there is something obviously wrong with your code. I suggest standard debugging procedures: Start with a ...
Hilmar's user avatar
  • 45.4k
4 votes
Accepted

Confused about DFT symmetric behavior for real-valued signals?

$N=1000$ and your signal frequency is $10000$. So there should be a peak at bin $k=10$. And another one at $N-k=1000-10=990$. However since MATLAB starts indexing at $1$ instead of zero, you see peaks ...
Atul Ingle's user avatar
  • 4,134
4 votes

Calculate IFFT using only FFT?

Alternatively to Atul's idea, you can also exploit the time-reversal property of the DFT: ...
Maximilian Matthé's user avatar
4 votes
Accepted

Inverse Fast Fourier with overlap

There are several ways. Start with taking the iFFT of $ S^{(1)} $ and $ S^{(2)} $. Let's call the results $ m^{(1)} $ and $ m^{(2)} $, since they are modified. They are back in the time domain and ...
Cedron Dawg's user avatar
  • 7,570
4 votes
Accepted

Calculate ifft using only REAL forward FFT

EDIT: This answer is basically a more detailed version of Hilmar's answer, which I noticed too late. Below there are more details about the derivation and the rearrangement of the outputs of the real ...
Matt L.'s user avatar
  • 90.4k
4 votes
Accepted

Computation of the Inverse DCT (IDCT) Using DCT Or IFFT

Have a look at Fast DCT Algorithm (PDF Version). It has both DCT and Inverse DCT using DFT (FFT). They show how to do a DCT and Inverse without the reflection trick. The standard (Less efficient ...
Royi's user avatar
  • 19.7k
4 votes

FFT showing peaks at 0Hz?

Because your data is (I assume) composed of some interesting stuff times a teeny number, plus the -- presumably uninteresting -- $k_0 + N\,k_1 + N^2\,k_2$, where $N$ is your "epoch". So the Fourier ...
TimWescott's user avatar
  • 12.8k
4 votes

FFT on a Raspberry Pi

Since you care about the time it takes, you'll want to use an optimized FFT implementation. That would be FFTw or FFTS, realistically. Historically, FFTw is way dominant in software (I mean, even ...
Marcus Müller's user avatar
4 votes
Accepted

Spectral efficiency of with OFDM vs without OFDM?

The spectral efficiency of OFDM is strictly worse than that of a pulse-shaped QAM signal with the same rate. OFDM requires a guard interval, on which no useful information is transmitted. It is ...
MBaz's user avatar
  • 15.3k

Only top scored, non community-wiki answers of a minimum length are eligible