EE123 Digital Signal Processing Lecture 1 Time-Dependent FT
Announcements! Midterm: 2/22/216 Open everything... but cheat sheet recommended instead 1am-12pm How s the lab going?
Frequency Analysis with DFT Length of window determines spectral resolution Type of window determines side-lobe amplitude. (Some windows have better tradeo between resolution-sidelobe) Zero-padding approximates the DTFT better. Does not introduce new information! Miki Lustig UCB. Based on Course Notes by J.M Kahn Spring 214, EE123 Digital Signal Processing
Potential Problems and Solutions Potential Problems and Solutions Problem Possible Solutions 1. Spectral error a. Filter signal to reduce frequency content above s /2= /T. from aliasing Ch.4 b. Increase sampling frequency s =2 /T. 2. Insu cient frequency a. Increase L resolution. b. Use window having narrow main lobe. 3. Spectral error a. Use window having low side lobes. from leakage b. Increase L 4. Missing features a. Increase L, due to spectral sampling. b. Increase N by zero-padding v[n] to length N > L. Miki Lustig UCB. Based on Course Notes by J.M Kahn Spring 214, EE123 Digital Signal Processing
Subtleties in filtering/processing with DFT x[n] H(e j! ) y[n] System is implemented by overlap-and-save Filtering using DFT H[k] π 2π
Subtleties in filtering/processing with DFT H[k] h[n] π 2π H(e jw ) -π π
Last Time Frequency Analysis with DFT Windowing Zero-Padding Today: Time-Dependent Fourier Transform Heisenberg Boxes
Discrete Transforms (Finite) DFT is only one out of a LARGE class of transforms Used for: Analysis Compression Denoising Detection Recognition Approximation (Sparse) Sparse representation has been one of the hottest research topics in the last 15 years in sp
Example of spectral analysis Spectrum of a bird chirping Interesting,... but... Does not tell the whole story No temporal information! x[n] n 6 Spectrum of a bird chirp 5 4 3 2 1.5 1 1.5 2 2.5 Hz x 1 4
Time Dependent Fourier Transform To get temporal information, use part of the signal around every time point X[n,!) = 1X m= 1 x[n + m]w[m]e j!m *Also called Short-time Fourier Transform (STFT) Mapping from 1D 2D, n discrete, w cont. Simply slide a window and compute DTFT
Time Dependent Fourier Transform To get temporal information, use part of the signal around every time point X[n,!) = 1X m= 1 x[n + m]w[m]e j!m *Also called Short-time Fourier Transform (STFT)
Spectrogram 12 1 8 6 4 2 5 1 15 2 25 3 35 4 45 Frequency, Hz 3 25 2 15 1 5 5 1 15 2 25 3 35 4 45 Frequency, Hz 4 Frequency, Hz 3 2 1 2 4 6 8 1 12 14 16 18 Time, s
Discrete Time Dependent FT X r [k] = LX 1 m= L - Window length R - Jump of samples N - DFT length x[rr + m]w[m]e j2 km/n Tradeoff between time and frequency resolution
Heisenberg Boxes Time-Frequency uncertainty principle 1 t! 2! t http://www.jonasclaesson.com! t
DFT! = 2 N t = N X[k] =! NX 1 n= x[n]e j2 kn/n! t =2 one DFT coefficient t
DFT! = 2 N t = N X[k] =! NX 1 n= x[n]e j2 kn/n! t =2 Question: What is the effect of zero-padding? Answer: Overlapped Tiling! t
Discrete STFT X[r, k] = LX 1 m= optional x[rr + m]w[m]e j2 km/n!! = 2 L t = L one STFT coefficient t
Discrete STFT X[r, k] = LX 1 m= optional x[rr + m]w[m]e j2 km/n!! = 2 L t = L Question: What is the effect of R on tiling? what effect of N? Answer: Overlapping in time of frequency or both! t
Applications Time Frequency Analysis Spectrogram of Orca whale 4 Frequency, Hz 3 2 1 1 2 3 4 5 6 7 8 Time, s
Spectrogram Frequency, Hz 4 3 2 1 (A) Frequency, Hz 4 3 2 1 2 4 6 8 1 12 14 16 18 Time, s (B) 2 4 6 8 1 12 14 16 18 Time, s What is the difference between the spectrograms? a) Window size B<A c) Window type is different b) Window size B>A d) (A) uses overlapping window
Sidelobes of Hann vs rectangular window DTFT of Hamming Window 4 DTFT of Rectangular Window 2 35 3 15 25 W(e j T ) 1 W(e j T ) 2 15 5 1 5-2 -1 1 2 /2 (Hz) -2-1 1 2 /2 (Hz)
Spectrogram Frequency, Hz 4 3 2 1 (A) Frequency, Hz 4 3 2 1 2 4 6 8 1 12 14 16 18 Time, s (B) 2 4 6 8 1 12 14 16 18 Time, s What is the difference between the spectrograms? a) Window size B<A c) Window type is different b) Window size B>A d) (A) uses overlapping window
Spectrogram Hamming Window, L = 32 Hamming Window, L = 32 DTFT of Hamming Window 1.2 2 1.8 15 w[n].6 W(e j T ) 1.4.2 5 5 1 15 2 25 3 n Hamming Window, L = 64-2 -1 1 2 /2 (Hz) Hamming Window, L = 64 DTFT of Hamming Window 1.2 4 1 35 w[n].8.6.4.2 W(e j T ) 3 25 2 15 1 5 1 2 3 4 5 6 n -2-1 1 2 /2 (Hz)
Spectrogram of FM y c (t) =A cos 2 f c t +2 y[n] =y(nt )=A exp j2 f f Z t x( )d Z nt x( )d! 88.6 Spectrogram of FM radio 88.5 88.4 t= t=2sec
Spectrogram of FM radio Baseband y[n] =y(nt )=A exp j2 f Z nt x( )d! x(t) =(L + R) {z } mono {z } {z } {z } {z +.1 cos(2 f p t) {z } pilot +(L R) cos(2 (2f p )t) {z } stereo +.5 RBDS(t) cos(2 (3f p )t). {z } digital RBDS Spectrogram of Demodulated FM radio (Adele on 96.5 MHz) 57KHz 38KHz 19KHz
Subcarrier FM radio (Hidden Radio Stations)
Applications Time Frequency Analysis Spectrogram of digital communications - Frequency Shift Keying t= t=1sec
STFT Reconstruction x[rr + m]w L [m] = 1 N NX 1 k= X[n, k]e j2 km/n For non-overlapping windows, R=L : x[n] = x[n rl] w L [n rl] rl apple n apple (r + 1)R 1 What is the problem?
STFT Reconstruction x[rr + m]w L [m] = 1 N NX 1 k= X[n, k]e j2 km/n For non-overlapping windows, R=L : x[n] = x[n rl] w L [n rl] rl apple n apple (r + 1)R 1 For stable reconstruction must overlap window 5% (at least)
STFT Reconstruction For stable reconstruction must overlap window 5% (at least) For Hann, Bartlett reconstruct with overlap and add. No division!
Applications Noise removal Recall bird chirp x[n] n 6 Spectrum of a bird chirp 5 4 3 2 1.5 1 1.5 2 2.5 Hz x 1 4
Application Denoising of Sparse spectrograms 4 Frequency, Hz 3 2 1 2 4 6 8 1 12 14 16 18 Time, s Spectrum is sparse! can implement adaptive filter, or just threshold!
Limitations of Discrete STFT Need overlapping Not orthogonal Computationally intensive O(MN log N) Same size Heisenberg boxes
From STFT to Wavelets Basic Idea: low-freq changes slowly - fast tracking unimportant Fast tracking of high-freq is important in many apps. Must adapt Heisenberg box to frequency Back to continuous time for a bit...