0% found this document useful (0 votes)
78 views

Speech and Audio Signal Processing ECE554 - Lec - 5 STFT Analysis v2.1

The document discusses the short-time Fourier transform (STFT). It begins by explaining the limitations of the Fourier transform in analyzing non-stationary signals, as Fourier bases are not localized in time or frequency. The STFT solves this issue by taking the Fourier transform of short sections of the signal over time using a sliding window. This allows the STFT to show how the frequency content of a signal varies over time. Several spectrogram examples are then shown to illustrate the STFT analysis of different signal types.

Uploaded by

Nikesh Bajaj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views

Speech and Audio Signal Processing ECE554 - Lec - 5 STFT Analysis v2.1

The document discusses the short-time Fourier transform (STFT). It begins by explaining the limitations of the Fourier transform in analyzing non-stationary signals, as Fourier bases are not localized in time or frequency. The STFT solves this issue by taking the Fourier transform of short sections of the signal over time using a sliding window. This allows the STFT to show how the frequency content of a signal varies over time. Several spectrogram examples are then shown to illustrate the STFT analysis of different signal types.

Uploaded by

Nikesh Bajaj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

11/22/2013

Overview
Short-Time Fourier Transform
Window effect
Speech and Audio Signal Processing

j
Window Function
ECE554

ja
Nikesh Bajaj
[email protected]
Asst. Prof. DSP, SECE
Lovely Professional University
2 By: Nikesh Bajaj

Short Time Fourier Transform


Ba Overview


Review of Limitation of FT
Introduction to STFT
Advantage of STT over FT
sh
Spectrogram
Effect of window size
Nikesh Bajaj
Limitation of STFT
[email protected]
Digital Signal Processing Summary
Lovely Professional University
4 By: Nikesh Bajaj
ke

Limitation of FT Limitation of FT
x
Ni

1= 10
x 2= 20
3= 40
4=100

x(t)=cos( 1 t)+cos( 2t)+cos( 3t)+cos( 4t)

x1(t)=cos( 4t)
x2(t)=cos( 3t)
x3(t)=cos( 2t)
x4(t)=cos( 1t)

x1(t) x2(t) x3(t) x4(t)


By: Nikesh Bajaj 6 By: Nikesh Bajaj
5

1
11/22/2013

Why So??? Solution to The Problem


Support region In space In frequency Computing the FT of signal for every short
sin(t) 0 time duration.
(t) 0

j
The basis function sin(t) is not localized in time!
This is called as SHORT TIME FOURIER
The (t) (sample) is not localized in frequency
TRANSFORM.

ja
signal x(t)
Fourier Transform does not give any
information about occurrence of frequency window w(t)
~
x(t )w(t )e dt
it
components with time. X ( , )

7 By: Nikesh Bajaj 8 By: Nikesh Bajaj

Where we are???


Introduction to subject
Signal & System (in a glance)
Fourier Series
Ba Short Time Fourier Transform
Equidistant frequencies:

k
2
k
t
Review of Fourier Transform
sh
Limitation of Fourier Transform (FT)
Short Time Fourier Transform (STFT)

Window function
Fractional Fourier Transform t
Wavelet Transform
9 By: Nikesh Bajaj 10 By: Nikesh Bajaj
ke

Spectrogram Spectrogram 1: Sine wave at 660 Hz


Spectrogram is graphical representation of
Ni

Short-Time Fourier Transform (STFT) x(t ) e i0 t


~
X ( ) 2 ( 0 )
Frequency

y(t)=Asin(2f0t)

f0=660 Hz

Time
11 By: Nikesh Bajaj 12 By: Nikesh Bajaj

2
11/22/2013

Spectrogram 2: White noise Spectrogram 3: Chirp signal


Impulse signal white noise Q????

j
x(t ) (t )
~
X ( ) 1

ja
13 By: Nikesh Bajaj 14 By: Nikesh Bajaj

Spectrogram 4: Train whistle


Ba Spectrogram 5: Human voice Bat
sh
15 By: Nikesh Bajaj 16 By: Nikesh Bajaj
ke

Spectrogram 6: arbitary signal Match the signal with Spectrogram


Ni

17 By: Nikesh Bajaj 18 By: Nikesh Bajaj

3
11/22/2013

STFT with wide window STFT with narrow window

ja j
Signal and FT Spectrogram (STFT) Signal and FT Spectrogram (STFT)
19 By: Nikesh Bajaj 20 By: Nikesh Bajaj

STFT with medium window Ba STFT with MATLAB


spectrogram(x, window, overlap )


signals
x1=sin(2*pi*50*(0:0.001:2))
sh
x2=sin(2*pi*300*(0:0.001:2))

y1=x1+x2
y2=[x1 x2]
Check
Signal and FT Spectrogram (STFT) plot(y1), plot(y2), Plot(abs(fft(y1))) and for y2
spectrogram(y1, w) check for y2 and diff value of w
22 By: Nikesh Bajaj
ke

Effect of window size Effect of window size


t2
Ni

t2

Narrow window: a=0.01 Middle size window: a=0.001

4
11/22/2013

Effect of window size Effect of window size


t2 t2

ja j
Middle size window: a=0.0001 Wide window: a=0.00001

Trade-off in
Time-Frequency
High time and frequency resolution
cant be achieved simultaneously
Ba Trade-off in
Time-Frequency
sh
t2

28 By: Nikesh Bajaj


ke

Problems with STFT Summery


Uncertainty Principle: t 1
Ni

4
t Limitation of FT
We cannot localize events in time and frequency Does not inform about position of frequency
simultaneously! occurrence in time.
STFT
Improved time resolutionDegraded frequency resolution Spectrogram gives time-frequency information.
Improved frequency resolution Degraded time resolution
But with limited resolution.
Solution is Wavelet Transform.
Problem : the same and t through the entire plane!

29 By: Nikesh Bajaj 30 By: Nikesh Bajaj

5
11/22/2013

Advance Transform Techniques


Course Code: ECE408

Window functions
Rectangular window /Boxcar
Hanning
Kaiser Window Functions

Bartlett
Chebyshev

ja
Hamming
Hann
Taylor
Nikesh Bajaj
[email protected]
Triangular
Asst. Prof. LSECA, ECE
Blackman
Lovely Professional University
31 By: Nikesh Bajaj

Properties of STFT


Linear
Complex valued
Ba


Where we are?
Introduction to Subject
Brief about Signal & System
Fourier Series
Time invariant Fourier Transform & Its Limitations
sh
Time shift Short Time Fourier Transform & its Limitations
Frequency shift With MATLAB

Many other properties of the FT also apply. Window Functions, with MATLAB
Fractional Fourier Transform
Introduction to Wavelet
33 By: Nikesh Bajaj 34 By: Nikesh Bajaj
ke

1
Overview Window Function t

Introduction to Window Function A mathematical function that is zero-valued outside of


Ni

some chosen interval.


Windowing is a technique used to shape the time portion
Summary of your measurement data, to minimize edge effects that
result in spectral leakage in the FFT spectrum. By using
Window Functions correctly, the spectral resolution of
your frequency-domain result will increase.
Applications of window functions include spectral
analysis, filter design, and beam-forming.
In typical applications, the window functions used are non-
negative smooth "bell-shaped" curves
35 By: Nikesh Bajaj 36
apodization function or tapering function By: Nikesh Bajaj

6
11/22/2013

Effect of Windowing Window Function


1

Spectral analysis of Cos(wt) low-dynamic-range. : excellent resolution for comparable


Use MATLAB strength signals

j
Rectangular Window: poor choice for signals of disparate
amplitudes
spectral leakage
high-dynamic-range : low-resolution, also poorest in terms
The leakage tends to be worst (highest) near
of sensitivity;

ja
and least at frequencies farthest from
waveform contains random noise, the ability to find weak
leakage can interfere sinusoids amidst the noise is diminished by a high-dynamic-range
Any window (including rectangular) affects the window, used for wideband applications
spectral estimate computed by this method. Moderate windows: They are commonly used in
narrowband applications, such as the spectrum of a
telephone channel
37 By: Nikesh Bajaj 38 By: Nikesh Bajaj

Window Function

Ba
Spectral analysis involves a tradeoff between resolving
comparable strength signals with similar frequencies and
resolving disparate strength signals with dissimilar
frequencies. That tradeoff occurs when the window
High-resolution windows
Rectangular window 1

t
Also called as Dirichlet
function is chosen.
sh
window

The first side-lobe is only 13 dB lower


than the main lobe, with the rest falling
off at about 6 dB per octave

39 By: Nikesh Bajaj 40 By: Nikesh Bajaj


ke

Moderate-resolution windows Moderate-resolution windows


Hann window Hamming window
Ni

The ends of the cosine just touch zero, so the


side-lobes roll off at about 18 dB per octave.
N represents the width, in samples, of a
discrete-time window function. Typically it is
an integer power-of-2, such as 210 = 1024.
n is an integer, with values 0 n N-
1. So these are the time-shifted forms
of the window
41 By: Nikesh Bajaj 42 By: Nikesh Bajaj

7
11/22/2013

Tukey window Triangular windows

ja j
43 By: Nikesh Bajaj 44 By: Nikesh Bajaj

Kaiser windows
Ba Low-resolution (high-dynamic-range)
windows

Nuttall window, continuous first


derivative
sh
45 By: Nikesh Bajaj 46 By: Nikesh Bajaj
ke

Low-resolution (high-dynamic-range) Low-resolution (high-dynamic-


windows range) windows
BlackmanHarris window Flat top window
Ni

47 By: Nikesh Bajaj 48 By: Nikesh Bajaj

8
11/22/2013

Window functions
Rectangular window /Boxcar
The Hann and Hamming windows, both of

Hanning
which are in the family known as "raised

j
Kaiser
cosine" windows, are respectively named Bartlett
after Julius von Hann and Richard Chebyshev

ja

Hamming. The term "Hanning window" is Hamming


sometimes used to refer to the Hann Hann
window Taylor
Triangular
Blackman
49 By: Nikesh Bajaj 50 By: Nikesh Bajaj

Ba STFT- for Speech


STFT
sh
51 By: Nikesh Bajaj 52 By: Nikesh Bajaj
ke

STFT for Speech STFT for Speech


.
Ni

53 By: Nikesh Bajaj 54 By: Nikesh Bajaj

9
11/22/2013

Linear Filtering Linear Filtering

ja j
55 By: Nikesh Bajaj 56 By: Nikesh Bajaj

Spectrogram
Every salt breeze comes from sea
Formant Freq.
Ba Spectrogram
sh
57 By: Nikesh Bajaj 58 By: Nikesh Bajaj
ke

Pitch Detection Pitch Detection


Harmonic Product Spectrum Log|xnexpj2*pi*FT)|
Ni

59 By: Nikesh Bajaj 60 By: Nikesh Bajaj

10
11/22/2013

Harmonic Product Spectrum


Log
Resistive to Noise

ja
61 By: Nikesh Bajaj 62 By: Nikesh Bajaj

Analysis by Synthesis


Speech waveform with representation
Speech Model
Analysis by synthesis
Ba Digital Speech Model
System
sh
Pitch Synchronous spectrum analysis Vocal Tract
Pole-Zero Analysis

63 By: Nikesh Bajaj 64 By: Nikesh Bajaj


ke

Digital Model of Speech (Ref 3.4) Digital Model of Speech


Vocal Tract as Linear System (Time invariant for short Radiation Model
Ni


duration)

Transfer Function

65 By: Nikesh Bajaj 66 By: Nikesh Bajaj

11
11/22/2013

Digital Model of Speech Digital Model of Speech


Excitation Complete Model

ja j
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 10 20 30 40 50 60 70 80 90

67 By: Nikesh Bajaj 68 By: Nikesh Bajaj

Pitch Synchronous spectrum analysis


Short-Segment of voiced
Ba Pitch Synchronous spectrum analysis

Ref: 3.4 Digital Model of Speech

Transfer Function of Vocal Tract


sh
Glottal Pulse Ng<Np

Radiation Effect

69 By: Nikesh Bajaj 70 By: Nikesh Bajaj


ke

Pitch Synchronous spectrum analysis Pitch Synchronous spectrum analysis


Ni

Analysis
For narrow band/long window: information is
obscured by pitch peaks
For wide band/narrow window: formant peaks
smeared out

Pitch synchronous analysis


Also can be computed as one period of x(n)

71 By: Nikesh Bajaj 72 By: Nikesh Bajaj

12
11/22/2013

Pitch Synchronous spectrum analysis Spectrum of Voiced Speech


Same as STFT with slight modification
Dependent on voiced pitch period

j
Issues
Pitch varies with time non uniform sampling
# of Freq. Comp depends on pitch, sampling rate in freq

ja

domain also depend upon time


Window used is rectangular of length Np
W(exp(jw)) has zeros at multiple of 2*pi/Np

73 By: Nikesh Bajaj 74 By: Nikesh Bajaj

Pole-Zero Analysis
using analysis-by-synthesis

Pole-Zero Analysis


Poles of V(z) and zeros of G(z)
Guess parameters of H(jw)
Ba Pole-Zero Analysis

Error
sh
Q(k)= weighting function

75 By: Nikesh Bajaj 76 By: Nikesh Bajaj


ke

Analysis-Synthesis System Over View


Computation of STFT What is Vocoder
Ni


The Phase Vocoder Working
The Channel Vocoder

Phase Vocoder

77 By: Nikesh Bajaj 78 By: Nikesh Bajaj

13
11/22/2013

Filter Design Computation of STFT


Overview
Window effects

j
Filters

ja
79 By: Nikesh Bajaj 80 By: Nikesh Bajaj

Ba
Computing STFT in MATLAB Phase Vocoder
STFT
sh
81 By: Nikesh Bajaj 82 By: Nikesh Bajaj
ke

Single channel phase vocoder Analyzer


Ni

Variation of phase, Sampling, restriction on phase,


Quatized,
83 By: Nikesh Bajaj 84 By: Nikesh Bajaj

14
11/22/2013

Reconstruction of Phase Transform Block

j
Initial Condition
Zero will result error, reverberant

ja
85 By: Nikesh Bajaj 86 By: Nikesh Bajaj

Single channel phase vocoder Synthesizer


Ba Inverse transform block
sh
87 By: Nikesh Bajaj 88 By: Nikesh Bajaj
ke

Alternate Approach Phase Vocoder


Time-Frq alterration
Ni

Flanagan Phase Vocoder Bell Syst Tech J. Vol


45, pp 14 93-1509 1966 (link)
Dividing Wk and by factor q

89 By: Nikesh Bajaj 90 By: Nikesh Bajaj

15
11/22/2013

Time Expansion Time Compression

ja j
91 By: Nikesh Bajaj 92 By: Nikesh Bajaj

Ba
sh
93 By: Nikesh Bajaj 94 By: Nikesh Bajaj
ke

Channel Vocoder
Ni

95 By: Nikesh Bajaj 96 By: Nikesh Bajaj

16
11/22/2013

ja j
97 By: Nikesh Bajaj

Ba
sh
ke
Ni

17

You might also like