11 votes
Accepted

FFT to spectrum in decibel

Definitely you will have to calibrate your system. You need to know what is the relationship between dBFS (Decibel Full-Scale) and dB scale you want to measure. In case of digital microphones, you ...
jojeck's user avatar
  • 11.1k
10 votes

What is first order difference?

The first-order difference operation is a technique for numerical differentiation. It is the simplest method that I know of, and consists of just treating a discrete-time signal as piecewise linear ...
Jason R's user avatar
  • 24.6k
8 votes
Accepted

Advantage of STFT over wavelet transform

Wavelet transforms and short-term/short-time Fourier transforms are broad names for classes of transformations that are not totally distinct and may overlap (pun intended). Both can be efficient for ...
Laurent Duval's user avatar
8 votes
Accepted

Equivalence between "windowed Fourier transform" and STFT as convolutions/filtering

This answer isn't fully developed (but is correct), I may update in the future. Indeed, STFT is strided convolutions, and there's many practical caveats, discussed in this answer. Standard vs improved ...
OverLordGoldDragon's user avatar
7 votes
Accepted

Is "Windowed Fourier Transform" a synonym for "STFT"?

In Chapter 2.4 Previous Work of The Short Time Fourier Transform and Local Signals, S. Okamura, 2011, one reads: The STFT is also known under many names such as the windowed Fourier Transform, ...
Laurent Duval's user avatar
6 votes
Accepted

How to interpret the effect of different windows in short time fourier transform?

A window $w[n]$ truncates and weights (tapers) an input signal $x[n]$, to produce $v[n] = x[n]. w[n]$., for subsequent spectral analysis of $x[n]$. A windows's effect on the input signal's true ...
Fat32's user avatar
  • 28.2k
6 votes

Window period(overlap) and FFT

In addition to what others have already said, I'll try to answer it from a purely practical point of view (this is also a variant of the overlap-add technique). If your FFT length is 2048, then an ...
dsp_user's user avatar
  • 921
6 votes
Accepted

STFT amplitude normalization, librosa library

I did answer a similar question a few years back, but can't find it. Basically, you are losing the energy because of the windowing. It's true to say that you should multiply the spectra by 2 in order ...
jojeck's user avatar
  • 11.1k
6 votes

How does the effect of windowing change with the phase of the input signal?

What's going on? I think the main issue is the use of detrend='constant' in the calls to signal.periodogram. If I change that to ...
Jason C's user avatar
  • 256
5 votes

FFT to spectrum in decibel

Some details to Jojek's post. Shared here for future reference. The key is to take the window in consideration and taking a reference ref which corresponds to ...
5 votes

Why is the name "Phase vocoder"?

The short-time Fourier transform (STFT) refers to the time-frequency representation of a signal, which is given by: $$X(\tau,\omega) = \int_{-\infty}^{\infty}x(t)w(t-\tau)e^{-j\omega t} \, dt$$ ...
hulappa's user avatar
  • 304
5 votes

Understanding overlapping in STFT

I understand the concept of the STFT. In order to avoid spectral leakage, you use a hann window that overlaps by 50%. I'm sorry but you have a misunderstanding of spectral leakage in addition to how ...
Fat32's user avatar
  • 28.2k
5 votes

Signal processing techniques for an accelerometer signal?

I'm wondering why the STFT pops out. To me, wouldn't a simple threshold on the signal itself or on its envelope do better / just as well, after removal of the g ...
Peter K.'s user avatar
  • 25.7k
5 votes

Signal processing techniques for an accelerometer signal?

If this graphics represents the most typical application scenario, then I would go for some simple short window variance estimation and perform thresholding afterwards; $$ \sigma_x^2 = \frac{1}{N} \...
Fat32's user avatar
  • 28.2k
4 votes

Illustration of time domain aliasing cancellation (TDAC, MDCT, lapped transform)

Edit: I have recently created two Jupyter Notebooks that illustrate this behaviour and let you play around with some actual matrices and actual signals. I find understanding MDCT easiest if we define ...
Nils Werner's user avatar
4 votes

Choosing the right overlap for a window function

I tried my best but I couldn't find a resource that would list the "good" overlap factors for common and less common windows. Here's a list of window functions and overlap factors that have constant ...
endolith's user avatar
  • 15.8k
4 votes

Issue with the time vector returned by $\tt signal.spectrogram$ function

The default parameters of signal.spectrogram are: nperseg = 256 noverlap = nperseg/8 = 32 This means that: The length of ...
jojeck's user avatar
  • 11.1k
4 votes

Welch spectrogram

Reading the documentation for scipy.signal.spectrogram I noticed that it does not do any kind of periodogram averaging. It simply splits up the signal into (...
Atul Ingle's user avatar
  • 4,134
4 votes

Is "Windowed Fourier Transform" a synonym for "STFT"?

This is just an attempt to state quantitatively what the STFT might be. Current discrete time is $n$, hop is $H$, (non-zero) length of window, $w[n]$, and frame is $F$. Fraction of overlap is $\tfrac{...
robert bristow-johnson'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,560
4 votes
Accepted

Is it possible to recover a waveform from spectrograms of magnitude *and* phase?

Real/imaginary or modulus/phase are two representations of a complex number that carry the same level of information. Then, a STFT is a redundant mapping from a space of functions over a 1D variable (...
Laurent Duval's user avatar
4 votes
Accepted

How to calculate the PSD from the complex calculated STFT?

In general, if you have complex spectrum and need PSD in dB the mathematical equation is $$P_{xx} = 20\cdot\log_{10}|X_{x}|,$$ where $P_{xx}$ is your PSD in dB and $X_{x}$ is your complex STFT ...
Lukas Krauz's user avatar
4 votes

Does it make sense to use a wavelet that is equal to a sine of one period?

With all due caution, no in both cases (title and body question). I'll start with the second one. Continuous wavelets use all dilations of the mother wavelet, which are not accessed with the STFT ...
Laurent Duval's user avatar
4 votes

Advantage of STFT over wavelet transform

STFT is frequency-shift equivariant - same absolute shift has same effect on representation regardless of original frequency${}^1$: $$ \hat x(\omega) \rightarrow \hat x(\omega - c) \Leftrightarrow \...
OverLordGoldDragon's user avatar
4 votes

What is the cause of STFT artifacts when different signals overlap?

Why does the STFT magnitude of this signal not equal the sum of the magnitudes of the individual parts? Because magnitude, i.e. complex modulus, is a nonlinearity: $$ |X| + |Y| = |a + jb| + |c + jd| \...
OverLordGoldDragon's user avatar
4 votes

Amplitude extraction using STFT

Firstly, STFT is fundamentally a time-frequency transform: convolutions with windowed complex sinusoids (i.e. bandpass filtering). You aren't going to "frequency", and "windowed Fourier ...
OverLordGoldDragon's user avatar
4 votes

Scipy and Matlab Spectrogram not matching

It’s a scaling problem, for which there are two options: Option 1: Use PSD scaling for both Python and Matlab Use mode='psd' in the ...
Jdip's user avatar
  • 6,030
4 votes
Accepted

How does the effect of windowing change with the phase of the input signal?

Summary The problem is caused by detrend='constant' in the call to periodogram, which subtracts the mean of the input before ...
OverLordGoldDragon's user avatar
4 votes

How would you compute Fourier transform of a real world signal where the signal keeps getting updated (not a static one)?

The most common method for time frequency analysis is the Short Term Fourier Transform (or STFT for short). Basically the input signal is chopped up into small chunks and then you perform a Fourier ...
Hilmar's user avatar
  • 44.6k
4 votes
Accepted

Overall spectrum computation from Short-Time-Fourier-Transform

You're almost there. Your data should be scaled with dBFS reference (see the "reference" box in cool edit pro). Cool Edit Pro probably computes the average power spectrum: Modify ...
Jdip's user avatar
  • 6,030

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