<< Chapter < Page Chapter >> Page >
Introduction to the Short Time Fourier Transform, which includes it's definition and methods for its use.

Short time fourier transform

The Fourier transforms (FT, DTFT, DFT, etc. ) do not clearly indicate how the frequency content of a signal changes over time.

That information is hidden in the phase - it is not revealed by the plot of the magnitude of the spectrum.

To see how the frequency content of a signal changes over time, we can cut the signal into blocks and compute thespectrum of each block.
To improve the result,
  • blocks are overlapping
  • each block is multiplied by a window that is tapered at its endpoints.
Several parameters must be chosen:
  • Block length, R .
  • The type of window.
  • Amount of overlap between blocks. ( )
  • Amount of zero padding, if any.

Stft: overlap parameter

The short-time Fourier transform is defined as

X m STFT x n DTFT x n m w n n x n m w n n n 0 R 1 x n m w n n
where w n is the window function of length R .
  • The STFT of a signal x n is a function of two variables: time and frequency.
  • The block length is determined by the support of the window function w n .
  • A graphical display of the magnitude of the STFT, X m , is called the spectrogram of the signal. It is often used in speech processing.
  • The STFT of a signal is invertible.
  • One can choose the block length. A long block length will provide higher frequency resolution (because the main-lobeof the window function will be narrow). A short block length will provide higher time resolution because lessaveraging across samples is performed for each STFT value.
  • A narrow-band spectrogram is one computed using a relatively long block length R , (long window function).
  • A wide-band spectrogram is one computed using a relatively short block length R , (short window function).

Sampled stft

To numerically evaluate the STFT, we sample the frequency axis in N equally spaced samples from 0 to 2 .

k 0 k N 1 k 2 N k
We then have the discrete STFT,
X d k m X 2 N k m n 0 R 1 x n m w n n n 0 R 1 x n m w n W N k n DFT N n 0 R 1 x n m w n 0,0
where 0,0 is N R .

In this definition, the overlap between adjacent blocks is R 1 . The signal is shifted along the window one sample at a time. That generates more points than is usuallyneeded, so we also sample the STFT along the time direction. That means we usually evaluate X d k L m where L is the time-skip. The relation between the time-skip, the number ofoverlapping samples, and the block length is Overlap R L

Match each signal to its spectrogram in .

Got questions? Get instant answers now!

Spectrogram example

The matlab program for producing the figures above ( and ).

% LOAD DATA load mtlb; x = mtlb; figure(1), clf plot(0:4000,x) xlabel('n') ylabel('x(n)') % SET PARAMETERS R = 256; % R: block length window = hamming(R); % window function of length R N = 512; % N: frequency discretization L = 35; % L: time lapse between blocks fs = 7418; % fs: sampling frequency overlap = R - L; % COMPUTE SPECTROGRAM [B,f,t] = specgram(x,N,fs,window,overlap); % MAKE PLOT figure(2), clf imagesc(t,f,log10(abs(B))); colormap('jet') axis xy xlabel('time') ylabel('frequency') title('SPECTROGRAM, R = 256')

Effect of window length r

Narrow-band spectrogram: better frequency resolution

Wide-band spectrogram: better time resolution

Here is another example to illustrate the frequency/time resolution trade-off (See figures - , , and ).

Effect of window length r

Effect of l and n

A spectrogram is computed with different parameters: L 1 10 N 32 256

  • L = time lapse between blocks.
  • N = FFT length (Each block is zero-padded to length N .)
In each case, the block length is 30 samples.

For each of the four spectrograms in can you tell what L and N are?

Got questions? Get instant answers now!

L and N do not effect the time resolution or the frequency resolution. They only affect the'pixelation'.

Effect of r and l

Shown below are four spectrograms of the same signal. Each spectrogram is computed using a different set of parameters. R 120 256 1024 L 35 250 where

  • R = block length
  • L = time lapse between blocks.

For each of the four spectrograms in , match the above values of L and R .

Got questions? Get instant answers now!

If you like, you may listen to this signal with the soundsc command; the data is in the file: stft_data.m . Here is a figure of the signal.

Questions & Answers

how do I set up the problem?
Harshika Reply
what is a solution set?
find the subring of gaussian integers?
hello, I am happy to help!
Shirley Reply
please can go further on polynomials quadratic
hi mam
I need quadratic equation link to Alpa Beta
Abdullahi Reply
find the value of 2x=32
Felix Reply
divide by 2 on each side of the equal sign to solve for x
Want to review on complex number 1.What are complex number 2.How to solve complex number problems.
yes i wantt to review
use the y -intercept and slope to sketch the graph of the equation y=6x
Only Reply
how do we prove the quadratic formular
Seidu Reply
please help me prove quadratic formula
hello, if you have a question about Algebra 2. I may be able to help. I am an Algebra 2 Teacher
Shirley Reply
thank you help me with how to prove the quadratic equation
may God blessed u for that. Please I want u to help me in sets.
what is math number
Tric Reply
x-2y+3z=-3 2x-y+z=7 -x+3y-z=6
Sidiki Reply
can you teacch how to solve that🙏
Solve for the first variable in one of the equations, then substitute the result into the other equation. Point For: (6111,4111,−411)(6111,4111,-411) Equation Form: x=6111,y=4111,z=−411x=6111,y=4111,z=-411
x=61/11 y=41/11 z=−4/11 x=61/11 y=41/11 z=-4/11
Need help solving this problem (2/7)^-2
Simone Reply
what is the coefficient of -4×
Mehri Reply
the operation * is x * y =x + y/ 1+(x × y) show if the operation is commutative if x × y is not equal to -1
Alfred Reply
An investment account was opened with an initial deposit of $9,600 and earns 7.4% interest, compounded continuously. How much will the account be worth after 15 years?
Kala Reply
lim x to infinity e^1-e^-1/log(1+x)
given eccentricity and a point find the equiation
Moses Reply
A soccer field is a rectangle 130 meters wide and 110 meters long. The coach asks players to run from one corner to the other corner diagonally across. What is that distance, to the nearest tenths place.
Kimberly Reply
Jeannette has $5 and $10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
August Reply
What is the expressiin for seven less than four times the number of nickels
Leonardo Reply
How do i figure this problem out.
how do you translate this in Algebraic Expressions
linda Reply
why surface tension is zero at critical temperature
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Fundamentals of signal processing. OpenStax CNX. Nov 26, 2012 Download for free at http://cnx.org/content/col10360/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Fundamentals of signal processing' conversation and receive update notifications?