New answers tagged

1

Probably not. Applying Z-score to an FFT is problematic. The FFT is a complex signal and you need to define exactly how to normalize. For example you could normalize the complex frequency domain signal directly. However that doesn't make much sense. Example: the FFT of a unit impulse $\delta(n)$ has a mean of 1 and a standard deviation of 0. If you time ...


1

Do you meant something like this? clear all; close all; N1 = 512; N2 = 1024; N3 = 2048; N4 = 2*max(N3, max(N2,N1)) x1 = zeros(N4); x2 = zeros(N4); x3 = zeros(N4); x1 = rand(1,N1); x2 = rand(1,N2); x3 = rand(1,N3); X1 = fft(x1, N4); X2 = fft(x2, N4); X3 = fft(x3, N4); X4 = [X1 X2 X3]; $\vec{x_1}$, $\vec{x_2}$ and $\vec{x_3}$ can have an actual data


1

The obvious reason why the DFTs of the x and y signals are different is because the signals themselves are different. Different versions of zero-padding result in different DFTs. What you probably wanted to show is that the DFTs of the two zero-padded versions of the original signal are interpolated versions of the DFT of the original, unpadded signal. And ...


0

You're plotting the real parts of your FFT results. Rather than doing that, you should plot the absolute value of your FFT results. For example, instead of 'stem(y_normal_fft)' use 'stem(abs(y_normal_ff))'.


4

The frequency response of the corresponding filters must satisfy $H^2(\omega)=H(\omega)\tag{1}$ This was already pointed out in Hilmar's answer, but the conclusion is not that the only option is $H(\omega)=1$ for all $\omega$. The correct conclusion from $(1)$ is that the frequency response $H(\omega)$ must equal either $0$ or $1$ for any frequency. One ...


0

I'm not sure that there is much there to be looked at. If $$h(t) = h(t) \circledast h(t) $$ then $$H(\omega) = H(\omega) \cdot H(\omega) $$ which has two solutions $$H(\omega) = 1, H(\omega) = 0$$ So any transfer function that consists ONLY of 0 and 1 will be idempotent. However mixing zeros and ones will create discontinuities and make the impulse response ...


1

whenever we feed N time-samples of a periodic, continuous, signal into a FFT algorithm You can't feed a continuous signal into an FFT. You need to sample it first at a specific sample rate. Sampling makes the time domain signal discrete and something that's discrete in one domain MUST be periodic in the other domain. The FFT implements the Digital Fourier ...


3

Hilmar has presented a quite nice answer here which, in my opinion is a very good way to approach your problem. Nevertheless, if you already have an FFT algorithm it should be trivial to use it with an arbitrary number of samples. All you have to do is make sure the number is a power of two (if I am not mistaken though there exist algorithms that allow the ...


1

So, let's take this from the top down: Thanks to Fourier, we know we can describe all signals as combination of harmonic oscillations. For a harmonic oscillation sent at frequency $f_t$, you know the received frequency is $f_r=\left(1+\frac{\Delta v}c\right)f_t$. So $\left(1+\frac{\Delta v}c\right)=:d$ is a constant (for any fixed speed) that you multiply ...


0

Observing a ship via radar waves is exactly analogous to observing a fire truck via sound waves. If a moving sound source (it doesn't matter if the source or the observer is moving, the relative velocity is what counts) passes your ear; do you hear more tones than when it's at rest? No. The Doppler shift changes the frequency of the signal, it does not add ...


2

It is well-known that Doppler effect shifts the received frequencies compared with the emitting frequencies. On the other hand, the time period of the sound signal is often ignored. Say a sound source is approaching you. For the sound source itself, it emits a sound signal for $T$ seconds, but you will hear a sound less than $T$ seconds, causing an increase ...


0

The OP mentions both “noisy source” and “clean signals” and that alone would be one distinction on the use of the Welch method which I will demonstrate below. Another motivation would be to use tools that already have all the correct scaling done for an estimate of the power spectral density, but if we are just interested in a proportional result rather than ...


4

Is this a completely wrong approach to this? Yes. and then doing FFT on the whole audio file. There is really no reason to do this. You end up with a frequency resolution that's way more than you would ever need. For 3 minute long file, your frequency resolution would be about 0.005 Hz. How can I use my 1024 sample FFT function to transform all the ...


1

DFT-based methods If you can't have more data coming into your estimator, which maps one input sample to one output bin per definition, you need to pad your data. So, zero-padding is the method you should investigate Non-DFT-based methods You want more resolution than you have samples – that calls for so-called superresolution spectral estimation, of which ...


4

You may follow the answers to the following questions which implements the paper you linked above: Kernel Convolution in Frequency Domain - Cyclic Padding (Exact same paper). 2D Frequency Domain Convolution Using FFT (Convolution Theorem). Applying 2D Image Convolution in Frequency Domain with Replicate Border Conditions in MATLAB. Replicate MATLAB's conv2()...


4

Simply keep the first 1049 samples of the IFFT result and throw the rest away. You don't have to do a fftshift y1 = conv(s,h); y2 = ifft(fft(s, 2048) .* fft(h, 2048)); figure; plot(y1); hold on; plot(y2(1:length(y1)), '--'); BTW, compared to linear convolution, it is more efficient to use FFT when s and h have similar lengths. In your case uniformly ...


1

There are a few problems here. Now when I try to obtain the result numerically: In order to do this you have to translate a problem from continuous time to discrete time. This requires sampling and choosing a sampling rate. According to the Nyquist criteria the sample rate needs to be at least twice the highest frequency in the signal. Since a Hilbert ...


2

The easiest way to demonstrate this increasing error with noise is to pick a frequency almost, but not quite exactly between two FFT bin centers for your synthetic testing. In zero noise, you will always get the nearest bin as the magnitude maximum. Add noise, and the probability of getting the bin on the other side increases, thus increasing your average ...


1

This FFTW paper explains it a bit. More details can be found in reference 2 in the linked paper.


4

You're doing two systematic errors: you're not simulating enough realizations. Sure, during the couple thousand noise realizations you saw, none of these white noise realizations had a harmonic content large enough to cause an FFT peak higher than your peak of interest. This just means you've tested an extremely high SNR against an absurdly high SNR and ...


0

It's not quite clear what you're asking, but I think this does something like it. Regarding how magnitude relates to dB: decibels are a relative scale, so you need to decide what it's relative to. Since you agreed in the comments that it was dBFS, I took the largest value in the data (e.g. np.max(data)). With that in mind, then the dB scale is: fft_db = 20*...


1

The package FFTW will work on vectors of any length. According to this presentation it uses both Rader's and Bluestein's algorithms. See also "prime factor FFT". I found this out by doing a brief web search on the terms "fast fourier transform with vectors of prime length". Algorithms for doing this sort of thing appear to have been ...


3

Let's take a closer look how the FFT butterflies actually work (we stick with decimation in time for simplicity) For Radix N, you take N samples, multiply these with N twiddle factors and than multiply the resulting vector with a N by N "recombination" matrix to get N output samples. This covers $\log_2(N)$ stages. The first twiddle factor is ...


2

I believe that there are diminishing returns beyond radix 4. While arithmetic complexity probably continues to decrease (?) that decrease is too slow to compensate for «other factors». Finding new factorizations that have lower arithmetic complexity is an interesting venture, but in practical applications, stuff like cache organization, simd instructions, ...


2

Fixed point FFT is tricky. Unfortunately this depends a lot on the class of signals that you are dealing with. how can we explain it theoretically? Let's start with the energy conserving definition of the FFT $$X[k] = \frac{1}{\sqrt{N}}\sum_{n=0}^{N-1}x[n] \cdot e^{-j2\pi\frac{kn}{N}}$$ This preserves the energy in both domains, i.e. $\sum x^2[n] = \sum |X[...


0

Basically, DFS is used for periodic and infinite sequence. Whereas, DFT is used for non-periodic and finite sequence. Although, They are same Mathematically. But they differ in properties. Practically, we do not have infinite signal. We can say that DFT is extraction of one period from DFS. In other words, DFS is sampling of DFT equally spaced at integer ...


0

To see this, it's best to look at the discrete-time Fourier transform of the window. $$\begin{align} W[e^{j\omega}] &= \sum_{n=0}^{N-1} w[n] e^{-j\omega n} \\ &= \sum_{n=0}^{N-1} e^{-j\omega n} \\ &= \left( \frac{1 - e^{-j \omega N}}{1 - e^{-j\omega}} \right)\\ &= \frac{e^{-j\omega N/2}}{e^{-j\omega/2}} \left( \frac{e^{j\omega N/2} - e^{-j \...


2

Answering part 2: The phase is the arctangent of the two components of the complex result of a FFT, or atan2(imaginary_part,real_part). If both components are scaled equally by any value (other than zero), the atan2() will remain unchanged.


1

To get a good approximation (approximate because of the use of a finite length FFT) to the Sinc function, you have to zero-pad your rectangle to a large multiple in size (try 16*N, or more), use an FFT of that longer length, and circularly center your rectangle at x[0] (the first element of your FFT input array).


0

This question, I believe, really requires an "it depends" answer. I think you need to get some example images and work with them for different values of r. I've adapted your code to do this and applied it to this image: and then some of the different r values: Python code below import cv2 import numpy as np import matplotlib.pyplot as plt # ...


1

Sometimes (very rare), circular convolution may be more complexity efficient when compared to FFT. Let us say we circ-convolve to two arrays with lengths of $N$ and $K$, respectively. Recall that circular convolution can be performed with $N\times K$ operations. On the other hand, to perform circular convolution with the help of FFT, you need to run the FFT ...


0

If you can't find anything in the literature about a threshold, you can develop your own with the following procedure: Generate $$N=\frac{ln(1-M)}{R}$$ random matrices $\boldsymbol{A}$ that you are certain ares sparse using your current method. Here, $M$ is the margin of error and $R$ is the maximum error resolution to be able to detect. Let's assume ...


0

% Assume your data sequence is stored on a 2D MATLAB matrix as follows: % % X = [ 1, 2, 3 ] % [ 4, 5, 6 ] X(i,j) is the i-th row ,j-th column. % [ 7, 8, 9 ] % [10, 11,12] % % MATLAB treats the i-rows as the first dimension, n1; whereas the % j-columns as the second dimension, n2. And Top-Left is the first % element (origin of n1-n2 axes). % %...


0

Try the following code. Note that you need to make the second half of the phase data negative of the first half put in reverse order, such that the second FFT half is a complex conjugate mirror of the first half. clear clc % time history Fs = 1000; t = 0:1/Fs:1-1/Fs; x = randn(size(t)); % one-sided periodogram using fft, rectangular window N = length(x);...


0

There is a dedicated software to do that : audiodiffmaker


0

The FFT itself is an exact transformation from the sample-time domain to the frequency domain -- but only for a signal that is either bounded in time or periodic, and is in discrete time. When you take a continuous signal of infinite extent and sample it into a finite-length vector, then you are approximating that continuous, infinite extent signal. If you ...


0

Waveform Generator + IQ Transmitter + Attenuator + Real Downconversion mixer + Oscilloscope Here are some initial comments and considerations and I can add more details once these points are clarified / confirmed: Your approach is a valid way to capture the signal if you are down-converting a real digital IF frequency, and that IF frequency is ideally ...


Top 50 recent answers are included