Professional Documents
Culture Documents
Alternative definition
X t , w t x e j d
X t , w t x e j d
Max[(t)] = 1
4
II-B Rec-STFT
Rectangular mask STFT (rec-STFT)
tB
X t, f x e j 2 f d
t B
Other types of the STFT may require more computation time than the
rec-STFT.
5
II-C Properties of the Rec-STFT
(1) Integration:
(a)
X t , f df
tB
x e j 2 f df d
tB
tB
x d
tB
x 0 when t - B 0 t B, B t B
0 otherwise
(b) X t , f e j 2 f v df x v when v B < t < v + B,
=0 otherwise
6
(2) Shifting property ( )
tB
x 0 e j 2 f d X t 0 , f e j 2 f 0
tB
B
8
(5) Linearity property
If h(t) = x(t) + y(t) and H(t, f ), X(t, f ) and Y(t, f ) are their rec-STFTs, then
X t , f df dt 2 B x d
2 2
tB
X t , f Y t , f df x y d
t B
9
:
(1) Fourier transform
(2) STFT
Shifting w t x 0 e j 2 f d
w t 0 x e j 2 f e j 2 f 0 d
X (t 0 , f ) e j 2 f 0
Modulation
tB
w t [ x e j 2 f0 ] e j 2 f d X t , f f 0
tB
10
Example: x(t) = cos(2 t) when t < 10,
x(t) = cos(6 t) when 10 t < 20,
x(t) = cos(4 t) when t 20
B=1
5
F re q u e n c y (H z )
-5
0 5 10 15 20 25
Time (Sec)
B = 0.5 11
5
Frequency (Hz)
-5
0 5 10 15 20 25
Time (Sec)
B=2
5
Frequency (Hz)
-5
0 5 10 15 20 25
Time (Sec)
12
II-D Advantage and Disadvantage
The rec-STFT has an advantage of the least computation time for digital
implementation
(1) Rectangle
(2) Triangle -B B
-B B
(3) Hanning
0.5 0.5cos t / B when t B
w t
0 otherwise
(4) Hamming
0.54 0.46cos t / B when t B
w t
0 otherwise
(5) Gaussian
w t exp t 2
15
(6) Asymmetric window
-B1 t = 0 B2 t-axis
B1 B2
(1) Are there other ways to choose the mask of the STFT?
(2) Which mask is better?
17
II-F Spectrogram
STFT Spectrogram
2
SPx t , f Gx t , f w t e x d
2
j 2 f
spectrogram STFT
spectrogram STFT
18
Matlab Show
(1) mesh
( )
(2) amplitude gray-level
y
image(abs(y)/max(max(abs(y)))*C) % C
C=400
colormap(gray(256)) % gray-level
set(gca,Ydir,normal) % , y-axis
19
set(gca,Fontsize,12) % font sizes
xlabel('Time (Sec)','Fontsize',12) % x-axis
ylabel('Frequency (Hz)','Fontsize',12) % y-axis
title(STFT of x(t)','Fontsize',12) % title
tic ( )
toc (show )