Downsampling Section 6, Nick Antipa, 3/9/2018 Based on slides by Jon Tamir

Some notes from Giulia Fanti, Frank Ong, Michael Lustig, Al Midterm 1

()*+ */0%1/) • ! " = ∑%&' , - . )*+ 5)*+ ()*+ = 3 , - .*/0%1/) + 3 , - .*/0%1/) + 3 , - .*/0%1/) %&' %&) %&5) • What is the problem with this? My favorite example of And

• http://i.imgur.com/8X8Fcoy.gifv Downsampling

x[n] N y[n]=x[nN]

• Compresses in the time domain • Expands in the frequency domain Alternative derivation of downsampling DTFT • Recall: A N-periodic sequence has a discrete (DFS):

N 1 1 s˜(m)= S˜ ej2⇡mk/N DFS Representation N k kX=0 N 1 ˜ j2⇡km/N Sk = s˜(m)e DFS Coefficients m=0 X Alternative derivation of downsampling DTFT • Impulse train: s˜(m)= (m kN) k X2Z • DFS Coefficients (check):

S˜k =1

• DFS Representation: N 1 1 s˜(m)= ej2⇡mk/N N kX=0 Alternative derivation of downsampling DTFT

x[n] N y[n]=x[nN] Alternative derivation of downsampling DTFT

x[n] N y[n]=x[nN] Downsampling x[n] y[n] N

&' 1. Stretch ! "#$ to !(" ( ) 2. Create (N-1) copies of the stretched versions 3. Shift each copy by successive multiples of 2+ and add 4. Divide by N Decimation (filtering and downsampling) Chirp

Q: for a chirp of length L seconds, ranging from !" to !#, what is the expression for $% & , the continuous-time ? ! − ! A: $ & = sin 2. ! + # " & & % " 1

Q: How fast do we need to sample this signal?

A: !2 > 2!#

Q: What is 45 6Ω ? (ignore effects of windowing)

Ω A: 9:;& 2Ω" Chirp

* − * ! # = sin 2) * + - + # # " + / Q: What is x[n] if we sample exactly at Nyquist? * − * ! 0 = sin 2) * + - + 10 10 + / Ω 0 0 = sin 0) + 1 − + Ω- 4 4 omega Q: Plot the frequency vs n ) Ω ) + Ω-

n 4 Downsample by 2 (without AA filter)

( - - Recall: ! " = sin "' ) 1 − + (* . .

( 1- 1- A: ! 2" = sin 2"' ) 1 − + (* . .

Q: What is the frequency vs n now? 2' Ω 2" 2" 2' 3 1 − + Ω4 5 5 Ω 2' 3 ' Ω4 Ω ' 3 Ω4 n 5 5 2 Chirp demo Imaging example

image of an important plot 144

146 ......

148 ......

150 ......

152 ......

154 ......

156 ......

158 ......

160 ......

162 ......

164 90 92 94 96 98 100 Decimated by 2

decimated by 2 decimated by 2 72 . . .

73

74 . . .

75

76 . . .

77

78 . . .

79

80 . . .

81

82 45 46 47 48 49 50 Decimated by 2 again (4 total)

decimated by 4 decimated by 4 36

36.5

37

37.5

38

38.5

39

39.5

40

40.5

41 22.5 23 23.5 24 24.5 25 Lowpass filter first

blurred image of an important plot 144

146 . . .

148

150 . . .

152

154 . . .

156

158 . . .

160

162 . . .

164 90 92 94 96 98 100 Resampling looks fine!

properly resampled image properly resampled image 36

36.5

37

37.5

38

38.5

39

39.5

40

40.5

41 22.5 23 23.5 24 24.5 25 Upsampling

x[n] N y[n]

• Expands in the time domain • Compresses in the frequency domain

Y (ej!)=X(ej!N ) Interpolation (Upsampling and filtering) Interpolation

1. Smooth discrete-time signal • Low frequency content

2. Upsample by 3 • No longer smooth! Contains high frequencies

3. LPF • Removes high frequencies