Lecture 19 Spectrogram: Spectral Analysis via DFT & DTFT

Slides:



Advertisements
Similar presentations
DCSP-12 Jianfeng Feng
Advertisements

Islamic university of Gaza Faculty of engineering Electrical engineering dept. Submitted to: Dr.Hatem Alaidy Submitted by: Ola Hajjaj Tahleel.
Chapter 8: The Discrete Fourier Transform
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Systems: Definition Filter
Goals For This Class Quickly review of the main results from last class Convolution and Cross-correlation Discrete Fourier Analysis: Important Considerations.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Copyright © Shi Ping CUC Chapter 3 Discrete Fourier Transform Review Features in common We need a numerically computable transform, that is Discrete.
Discrete-Time and System (A Review)
1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Prof. Nizamettin AYDIN Digital Signal Processing 1.
Prof. Nizamettin AYDIN Digital Signal Processing 1.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
ECE 8443 – Pattern Recognition ECE 3163 – Signals and Systems Objectives: Introduction to the IEEE Derivation of the DFT Relationship to DTFT DFT of Truncated.
8.1 representation of periodic sequences:the discrete fourier series 8.2 the fourier transform of periodic signals 8.3 properties of the discrete fourier.
Digital Signal Processing – Chapter 10
Prof. Nizamettin AYDIN Digital Signal Processing 1.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Chapter 8 The Discrete Fourier Transform Zhongguo Liu Biomedical Engineering School of Control.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Real time DSP Professors: Eng. Julian S. Bruno Eng. Jerónimo F. Atencio Sr. Lucio Martinez Garbino.
Fourier Analysis of Discrete Time Signals
Chapter 5 Finite-Length Discrete Transform
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Digital Signal Processing
1 Prof. Nizamettin AYDIN Digital Signal Processing.
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Derivation of the DFT Relationship to DTFT DFT of Truncated Signals.
DSP First, 2/e Lecture 11 FIR Filtering Intro. May 2016 © , JH McClellan & RW Schafer 2 License Info for DSPFirst Slides  This work released.
DSP First, 2/e Lecture 7 Fourier Series Analysis.
DSP First, 2/e Lecture 5 Spectrum Representation.
DSP First, 2/e Lecture 6 Periodic Signals, Harmonics & Time-Varying Sinusoids.
1 Chapter 8 The Discrete Fourier Transform (cont.)
DSP First, 2/e Lecture 18 DFS: Discrete Fourier Series, and Windowing.
DSP-First, 2/e LECTURE #3 Complex Exponentials and Complex Numbers.
DSP First, 2/e LECTURE #1 Sinusoids Aug © , JH McClellan & RW Schafer.
DSP First, 2/e Lecture 16 DTFT Properties. June 2016 © , JH McClellan & RW Schafer 2 License Info for DSPFirst Slides  This work released under.
UNIT-II FOURIER TRANSFORM
Lecture 6 Periodic Signals, Harmonics & Time-Varying Sinusoids
Signal Processing First
DIGITAL SIGNAL PROCESSING ELECTRONICS
Digital Signal Processing
Lecture 11 FIR Filtering Intro
Spectral Analysis Spectral analysis is concerned with the determination of the energy or power spectrum of a continuous-time signal It is assumed that.
Signal Processing First
Lecture 12 Linearity & Time-Invariance Convolution
FFT-based filtering and the
Lecture 14 Digital Filtering of Analog Signals
Lecture 10 Digital to Analog (D-to-A) Conversion
Lecture 9 Sampling & Aliasing
Chapter 8 The Discrete Fourier Transform
Lecture 16a FIR Filter Design via Windowing
Lecture 13 Frequency Response of FIR Filters
Lecture 18 DFS: Discrete Fourier Series, and Windowing
Lecture 17 DFT: Discrete Fourier Transform
Lecture 15 DTFT: Discrete-Time Fourier Transform
LECTURE 18: FAST FOURIER TRANSFORM
Digital Signal Processing
Lecture 7C Fourier Series Examples: Common Periodic Signals
Lecture 20 Z Transforms: Introduction
Signal Processing First
Chapter 8 The Discrete Fourier Transform
Chapter 8 The Discrete Fourier Transform
Lecture 22 IIR Filters: Feedback and H(z)
Lecture 5A: Operations on the Spectrum
CE Digital Signal Processing Fall Discrete Fourier Transform (DFT)
LECTURE 18: FAST FOURIER TRANSFORM
Lecture 24 Time-Domain Response for IIR Systems
Lecture 21 Zeros of H(z) and the Frequency Domain
Presentation transcript:

Lecture 19 Spectrogram: Spectral Analysis via DFT & DTFT DSP First, 2/e Lecture 19 Spectrogram: Spectral Analysis via DFT & DTFT

License Info for DSPFirst Slides This work released under a Creative Commons License with the following terms: Attribution The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original authors credit. Non-Commercial The licensor permits others to copy, distribute, display, and perform the work. In return, licensees may not use the work for commercial purposes—unless they get the licensor's permission. Share Alike The licensor permits others to distribute derivative works only under a license identical to the one that governs the licensor's work. Full Text of the License This (hidden) page should be kept with the presentation Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer READING ASSIGNMENTS This Lecture: Chapter 8, Sects. 8-6 & 8-7 Other Reading: FFT: Chapter 8, Sect. 8-8 Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer LECTURE OBJECTIVES Spectrogram Time-Dependent Fourier Transform DFTs of short windowed sections Frequency Resolution To resolve closely spaced spectrum lines Need long windows Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Review & Recall Discrete Fourier Transform (DFT) DFT is frequency sampled DTFT For finite-length signals DFT computation is actually done via FFT FFT of zero-padded signalmore freq samples Transform pairs & properties (DTFT & DFT) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Recall: DFT and DTFT Discrete Fourier Transform (DFT) Inverse DFT Discrete-time Fourier Transform (DTFT) Inverse DTFT Aug 2016 © 2003-2016, JH McClellan & RW Schafer

The Transform Method (DTFT) To get the output signal y[n], given the input x[n], and the system defined by h[n]. Convolution becomes multiplication of DTFTs Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Frequency Response Method To get the output signal y[n], given the input x[n] is a sinusoid, and the system defined by h[n]. Multiply Magnitudes, Add Phases Aug 2016 © 2003-2016, JH McClellan & RW Schafer

DTFT, DFT and DFS are Tools for Analysis DTFT applies to discrete time-sequences, regardless of length (as long as x[n] is absolutely summable); Note: sinusoids are not absolutely summable N-pt DFT of a finite-length sequence is equivalent to sampling the corresponding DTFT on frequency axis at N equally spaced points, without losing any information Zero-padding when N>L If the sequence is periodic, and the DFT is performed on one period, the result is a discrete Fourier Series (DFS) which is an exact representation. Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Various Situations in Signal Analysis Signal property does not fluctuate with time Sampled signal is periodic with known period N0 – use N0-pt DFT and get the precise result (DFS) Sampled signal is aperiodic, or period is unknown, or hard to ascertain precisely. Signal characteristic is global (for the entire signal) Finite-Length, e.g., pulse Infinite-Length: e.g., right-sided exponential Sampled signal property changes with time Signal defined by math formulas over intervals Recorded signal, most likely with changing sinusoidal content, or properties – the most general case COMMON CASE  COMMON CASE  Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Examples A.1 Periodic Sequence A.2 Nonperiodic Sequence A.3 Global infinite-length sequence B.2 A general sequence Aug 2016 © 2003-2016, JH McClellan & RW Schafer

A.3: DTFT gives global spectrum A.3 sequence from formula N-pt DFT: approaching DTFT when N  infinity More about this later. Aug 2016 © 2003-2016, JH McClellan & RW Schafer

When Periodicity Is Not Precise – A.2 Periodicity is imprecise – either not known exactly or impractical to take exactly one period of data; for example: We take L data points for analysis; actual period is not L (20 for the example). Actual period of sequence Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Imprecise Period Example (2) 0 6 16 48 58 63 Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Similar Example – Changing L 0 6 16 48 58 63 Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Observations When signal property stays fixed, the longer the section of data (larger L), the sharper the frequency resolution. The larger the number of points for the DFT, N, the denser the frequency axis sampling. However, the resolution (or separation) of sinusoids w.r.t. frequency is determined by the data length L, not by length of the N-pt DFT (with zero padding). When signal properties change with time, there are other considerations that limit the size of L; see case B. Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Case B – The General Case DFT can also be used as a tool for finding the spectral composition of an arbitrary signal: In general, we observe changing signal properties Short-time analysis framework Analyze sequence one block (frame) of data at a time using DFT Successive blocks of data may overlap “SPECTROGRAM” Aug 2016 © 2003-2016, JH McClellan & RW Schafer

FRAME = WINDOW of DATA Example of Non-overlapped frames Data also can be extracted from overlapped frames – overlapped characteristics provide smoother transitions from one frame to next Denote Number of Overlapping Points as Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer A very long signal Four intervals Four spectrum lines Aug 2016 © 2003-2016, JH McClellan & RW Schafer

DFT of a very Long Signal (Global) Length 10,000 signal, 16384-pt DFT Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Windowing a Long Signal Long signal is time-shifted into the domain of the window, [0,300] in this case Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Von Hann Window in Time Domain Plot of Length-20 von Hann window Aug 2016 © 2003-2016, JH McClellan & RW Schafer

DTFT of Hann Window: Change Length DTFT (magnitude) of windowed sinusoid. Length-20 Hann window vs. Length-40 Hann window Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short DFTs of Windowed Sections (L=301) 301-pt Hann window. 1024-pt DFT (zero-padded) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short DFTs of Windowed Sections (L=75) 75-pt Hann window. 1024-pt DFT (zero-padded) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer A very long signal Four intervals Four spectrum lines Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Two Spectrograms of very Long Signal Window Lengths of L=301 and L=75; overlap 90% Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer MATLAB Spectrogram In MATLAB, use Fs is the sampling frequency specified in samples/s WINDOW: if a vector, extract segments of X of equal length, and then multiply window vector and data vector, element by element; If an integer, same as above but use a Hamming window of the specified length if unspecified, use default NOVERLAP: (<WINDOW) Number of overlapping data between successive frames NFFT: Length of FFT S = spectrogram(X,WINDOW,NOVERLAP,NFFT,Fs,‘yaxis’) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Resolution Test Closely spaced frequency components How close can the lines be? Depends on window (section) length Inverse relationship Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Two Spectrograms: Resolution Test Window Lengths of L=301 and L=75, overlap 90% Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short DFTs of Windowed Sections 75-pt and 301-pt Hann windows. 1024-pt DFT (zero-padded) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Aug 2016 © 2003-2016, JH McClellan & RW Schafer

DFT of a very Long Signal (Global) Length 10,000 signal, 16384-pt DFT Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short DFTs of Windowed Sections (L=301) 301-pt Hann window. 1024-pt DFT (zero-padded) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Two Spectrograms of very Long Signal Window Lengths of L=301 and L=75; overlap 90% Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Spectrogram: Resolution Test Window Lengths of L=301 and L=75 Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short DFTs of Windowed Sections 75-pt and 301-pt Hann windows. 1024-pt DFT (zero-padded) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Windows Finite-Length signal (L) with positive values Extractor Truncator Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Von Hann Window (Time Domain) Plot of Length-20 von Hann window Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Von Hann Window (Frequency Domain) DTFT (magnitude) of Length-20 Hann window Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Window section of sinusoid, then DFT Multiply the very long sinusoid by a window Take the N-pt DFT Finite number of frequencies (N) Finite signal length (L) = window length Expectation: 2 narrow spectrum lines Aug 2016 © 2003-2016, JH McClellan & RW Schafer

DTFT of Windowed Sinusoid (with different windows) DTFT (magnitude) of windowed sinusoid Length-40 Hann window vs Length-40 Rectangular window UnWeighted Hann Window Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Change Window Length DTFT (magnitude) of windowed sinusoid. Length-20 Hann window vs. Length-40 Hann window Aug 2016 © 2003-2016, JH McClellan & RW Schafer

© 2003-2016, JH McClellan & RW Schafer Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short DFTs of Windowed Sections 301-pt Hann window. 1024-pt DFT (zero-padded) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short DFTs of Windowed Sections 301-pt Hann window. 1024-pt DFT (zero-padded) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short DFTs of Windowed Sections 301-pt Hann window. 1024-pt DFT (zero-padded) Aug 2016 © 2003-2016, JH McClellan & RW Schafer

Short time ANALYSIS of General Signal Present focus BREAK INTO FRAMES DFT: DO FOURIER ANALYSIS x(t) Amp Phase Freq Per Frame Short-time analysis Amp Phase Freq Per Frame ADD UP the SINUSOIDS add_cos( ) PUT FRAMES BACK TOGETHER SMOOTHLY y(t) Short-time synthesis Aug 2016 © 2003-2016, JH McClellan & RW Schafer