EE123 Digital Signal Processingee123/sp14/Notes/... · Digital Signal Processing Lecture 16. M....

21
M. Lustig, EECS UC Berkeley EE123 Digital Signal Processing Lecture 16

Transcript of EE123 Digital Signal Processingee123/sp14/Notes/... · Digital Signal Processing Lecture 16. M....

  • M. Lustig, EECS UC Berkeley

    EE123Digital Signal Processing

    Lecture 16

  • M. Lustig, EECS UC Berkeley

    Lab II - Time-Frequency

    • compute spectrograms with w/o windowing

  • M. Lustig, EECS UC Berkeley

    Lab II - Time-Frequency

    • Compute with overlapping window

  • M. Lustig, EECS UC Berkeley

    Lab II - Time-Frequency

    • Look at temporal/frequency resolution tradeoffs:

  • M. Lustig, EECS UC Berkeley

    FM Broadcast Radio - KPFA 94.1MHz

  • M. Lustig, EECS UC Berkeley

    Spectrogram of Broadcast FMNon-demodulated

    FM demodulated

  • M. Lustig, EECS UC Berkeley

    Spectrogram of Broadcast FMFM demodulated

  • M. Lustig, EECS UC Berkeley

    Filter Mono and down

    after filtering

    after decimation

    • To play we need to filter the right signal• Downsample to 48KHz so we can play on the computer

    120KHz

    24KHz

  • M. Lustig, EECS UC Berkeley

    Demodulate subcarriers: Example 92KHz

    demodulate by 92KHz

  • M. Lustig, EECS UC Berkeley

    Demodulate subcarriers: Example 92KHz

    • Filter and decimate

    • FM demodulate and filter

  • M. Lustig, EECS UC Berkeley

    Topics

    • Last time– Ideal reconstruction D/C– D.T processing of C.T signals– C.T processing of D.T signals (ha?????)

    • Today– Changing Sampling Rate via DSP– Downsampling– Upsampling

  • H(ej!) = e�j!�

    Hc(j⌦) = e�j⌦�T

    M. Lustig, EECS UC Berkeley

    Example:

    • What is the time-domain operation when Δ is not an integer (Δ=1/2)?

    Non-integer delay:

    xc(t) yc(t) y[n]x[n]D/C Hc(jΩ) C/D

    T T

    Let: delay of ΔT in time

    C.T recon delay ΔT sampling

  • =X

    k

    x[k]sinc(n� k ��)

    y[n] = yc(nT ) = xc(nT � T�)

    =X

    k

    x[k]sinc

    ✓t� kT � T�

    T

    ◆�����t=nT

    M. Lustig, EECS UC Berkeley

    Example: Non Integer Delay

    • The block diagram is only for interpretation!

    yc(t) = xc(t��)

    T’s cancel!

  • h[n] = sinc(n��)

    M. Lustig, EECS UC Berkeley

    Example: Non Integer Delay

    Example: a discrete delta is a representation of a sampled sinc

    shifted by partial samples results in many coefficients!

  • M. Lustig, EECS UC Berkeley

    DownSampling

    • Much like C/D conversion• Expect similar effects:

    –Aliasing–mitigate by antialiasing filter

    • Finely sampled signal ⇒ almost continuous–Downsample in that case is like sampling!

  • x[n]xd[n] = x[nM ]

    = xc(nT ) = xc(nMT|{z})T 0

    X(ej!) =1

    T

    X

    k

    Xc

    j

    !

    T|{z}� 2⇡

    T|{z}k

    !!

    Xd(ej!) =

    1

    MT

    X

    k

    Xc

    ✓j

    ✓!

    MT� 2⇡

    MTk

    ◆◆⌦ ⌦s

    M. Lustig, EECS UC Berkeley

    Changing Sampling-rate via D.T Processing

    MDownsampling:

    The DTFT:

  • M. Lustig, EECS UC Berkeley

    Changing Sampling-rate via D.T Processing

    X(ej!) =1

    T

    X

    k

    Xc

    j

    !

    T|{z}� 2⇡

    T|{z}k

    !!

    Xd(ej!) =

    1

    MT

    X

    k

    Xc

    ✓j

    ✓!

    MT� 2⇡

    MTk

    ◆◆⌦ ⌦s

    The DTFT:

    we would like to bypass Xc and go from X(ejω)⇒Xd (ejω)

    two counterse.g., k: hours, i: minutes

    substitute r = kM + i i=0,1,...,M-1k=-∞,...,∞

  • Xd(ej!) =

    1

    MT

    X

    k

    Xc

    ✓j

    ✓!

    MT� 2⇡

    MTk

    ◆◆

    =1

    M

    M�1X

    i=0

    1

    T

    1X

    �1Xc

    ✓j

    ✓!

    MT� 2⇡

    MTi� 2⇡

    Tk

    ◆◆

    | {z }X(ej(

    !M �

    2⇡M i))

    Xd(ej!) =

    1

    M

    M�1X

    i=0

    X(ej(!M �

    2⇡M i))

    M. Lustig, EECS UC Berkeley

    Changing Sampling-rate via D.T Processing

    stretchby M

    replicate

  • Xd(ej!) =

    1

    M

    X

    i=0

    X⇣ej(w/M�2⇡i/M)

    ⇡�⇡

    Xd

    X

    M. Lustig, EECS UC Berkeley

    Changing Sampling-rate via D.T Processing

    ⇡�⇡

    M=2

  • Xd(ej!) =

    1

    M

    X

    i=0

    X⇣ej(w/M�2⇡i/M)

    ⇡�⇡

    Xd

    X

    M. Lustig, EECS UC Berkeley

    Changing Sampling-rate via D.T Processing

    ⇡�⇡

    M=3

  • ⇡/Mx[n]

    x̃[n] x̃d[n] = x̃[nM ]

    M. Lustig, EECS UC Berkeley

    Anti-Aliasing

    LPF↓M

    ⇡�⇡

    Xd

    X

    ⇡�⇡

    M=3