EE123 Digital Signal Processing Lecture 5A Time-Frequency Tiling
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 ) -π π
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.
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! t =2 X[k] = N 1 X n=! x[n]e j2 kn/n one DFT coefficient t
DFT X[k] =! N 1 X n= x[n]e j2 kn/n! = 2 N t = N! t =2 Question: What is the effect of zero-padding? Answer: Overlapped Tiling! t
Discrete STFT X[r, k] =! = 2 L t = L LX 1 m= x[rr + m]w[m]e j2 km/n! optional one STFT coefficient t
Discrete STFT X[r, k] =! = 2 L t = L LX 1 m= x[rr + m]w[m]e j2 km/n! optional 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 or 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 a) Window size B<A b) Window size B>A c) Window type is different 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 a) Window size B<A b) Window size B>A c) Window type is different 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 Spectrogram of FM radio 88.6 f Z t x( )d Z nt x( )d! 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) 92KHz spelled wrong! 7KHz 7KHz 57KHz spelled wrong! 8KHz 9KHz
Applications Time Frequency Analysis Spectrogram of digital communications - Frequency Shift Keying JT65 https://gm7something.wordpress.com/212/12/9/nov-radio-days/ Signal Wiki: http://www.sigidwiki.com/wiki/category:active
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!
n Applications Noise removal Recall bird chirp x[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...
From STFT to Wavelets Continuous time t t!! t t! u t!! u