<<

Nyquist Sampling Theorem Sampling and Reconstruction

Prof Alfred Hero • Consider time sampling/reconstruction without quantization: EECS206 F02 Lect 20 y(t) x(t) x[n]

Ideal Sampler Reconstruction •Special case of sinusoidal signals • (and folding) ambiguities •Shannon/Nyquist sampling theorem x[n] • sampling period (secs/sample) •Ideal reconstruction of a cts time signal x(t) • sampling rate or frequency (samples/sec)

Alfred Hero 1 Alfred Hero 2 University of Michigan University of Michigan

Q. Is there a minimum sampling rate necessary for good reconstruction? Sampling of sinusoid • For simplicity specialize to a sinusoid

where

NOTE: – frequency is unknown – frequency is known

• After sampling at frequency 6 samples/cycle

Alfred Hero 3 Alfred Hero 4 University of Michigan University of Michigan

Slower sampling of sinusoid Sampling of Sinusoid: Notes

• There are no other sinusoidal signals with fundamental frequencies less than 1KHz that have exactly the same samples as those in previous two examples.

• Thus, for these sampling rates any fundamental frequency can 3 samples/cycle be uniquely identified

Alfred Hero 5 Alfred Hero 6 University of Michigan University of Michigan

1 Under sampled sinusoid

2 samples/cycle

Alfred Hero 7 Alfred Hero 8 University of Michigan University of Michigan

Poorly sampled sinusoid Poorly sampled sinusoid (ctd) Sinusoid at • With only 2 samples/cycle we may confuse x(t) ½ the frequency with a sinusoid at lower frequency (0Hz). • Further reduction in sampling rate • Sampled signal is “aliased” to the all zero signal. produces even more ambiguity!

2 samples/cycle • ½ sample/cycle

Alfred Hero 9 Alfred Hero 10 University of Michigan University of Michigan

What is really going on? Specialize to periodic DT sinusoid • CT sinusoid at frequency sampled at rate • First we assume relation gives DT sinusoid:

• DT sinusoid with period N • Observe: this signal is indistinguishable from a • Compare to generic periodic sinusoid DT sinusoid at any of the frequencies

• Recognize DT fundamental frequency

Alfred Hero 11 Alfred Hero 12 University of Michigan University of Michigan

2 Recall CT and DT spectra Spectrum of CT Sinusoid • Real sinusoidal signal • CT spectrum (FS):

• DT spectrum (DFT):

0

Alfred Hero 13 Alfred Hero 14 University of Michigan University of Michigan Note: Conjugate symmetry

Spectrum of periodic DT sinusoid Sampling Spectrum with fundamental:

Spectrum • CT and DT spectra of sinusoid are both line spectra but with lines located at

0

Double sided spectrum Single sided spectrum Spectrum Spectrum • Define the sampling spectrum of as its DT spectrum with replaced by or

0 0 Alfred Hero 15 Alfred Hero 16 University of Michigan University of Michigan

If x[n] is a sampled sinusoid with sampling Compare sampling spectrum of CT frequency and Then its sampling spectrum is: sinusoid to spectrum of DT sinusoid Spectrum Spectrum Spectrum of cts time sinusoid

0 0 Double sided spectrum Single sided spectrum Spectrum Spectrum Double sided Sampling spectrum or Sampling spectrum

0 0 Alfred Hero 17 Alfred Hero 0 18 University of Michigan University of Michigan

3 Next consider DFT spectrum for case:

Conclude Spectrum •For

– The sampling spectrum of x[n] is identical to the spectrum of the input x(t) to digitizer. – Therefore the fundamental frequency can be recovered (along with sinusoidal amplitude Double sided spectrum Single sided spectrum and phase) from the DT spectrum (DFT) of Spectrum Spectrum the sampled signal via the formula or

Alfred Hero 19 Alfred Hero 20 University of Michigan University of Michigan

Finally, consider DT spectrum for:

Conclude Spectrum •For – The cts sinusoidal frequency is no longer recoverable from DFT spectrum since cannot tell deifference between

Double sided spectrum Single sided spectrum – The negative frequency component has been Spectrum Spectrum folded into the range or – The folded amplitude is complex conjugated – This phenomenon is called (case II) ALIASING

Alfred Hero 21 Alfred Hero 22 University of Michigan University of Michigan

Conclude Summarizing

•For • When can recover from DFT – The cts sinusoidal frequency is no longer recoverable since cannot tell the difference between • Otherwise have aliasing and recovery is impossible – if

– A higher positive frequency has been aliased into the frequency range –if – Complex amplitude of the positive frequency component is preserved

Alfred Hero– This phenomenon is called (case I) ALIASING23 Alfred Hero 24 University of Michigan University of Michigan

4 Sampling arbitrary periodic signals Periodic Bandlimited Signal • Let be the highest frequency component (bandwidth) in Spectrum of a periodic signal x(t) with maximum FS of a periodic signal x(t) having frequency = B Hz

fundamental frequency Spectrum

f (Hz) • Such a signal is said to be -B 0 B bandlimited to bandwidth

AlfredQ. Hero What is minimum sampling freq ?25 Alfred Hero 26 University of Michigan University of Michigan

No aliasing occurs when exceed Nyquist Sampling Rate Nyquist sampling rate • Can uniquely recover a periodic signal bandlimited to bandwidth B when is chosen Original Spectrum such that

-B 0 B f

Sampled Spectrum • The rate 2B is called the Nyquist sampling rate and it guarantees that no aliasing will occur f -2B -B 0 B 2B Alfred Hero 27 Alfred Hero 28 University of Michigan University of Michigan

Aliasing occurs when sample below Ideal Reconstruction Nyquist sampling rate • Q. Can we implement a reconstruction Original Spectrum algorithm to recover periodic input signal from its Nyquist samples? • A. Yes. By interpolating between samples -B 0 B f with (non-truncated) sinc interpolation Sampled function Spectrum

f -B 0 B Alfred Hero 29 Alfred Hero 30 University of Michigan University of Michigan

5 Ideal Sinc Interpolation Function Shannon Sampling Theorem

• If periodic x(t) is bandlimited to bandwidth and samples x[n] are obtained from x(t) by sampling at greater than then can exactly reconstruct x(t) from samples using sinc interpolation formula

• This is also called the cardinal series for x(t)

Alfred Hero 31 Alfred Hero 32 University of Michigan University of Michigan

How to avoid aliasing if signal is not Q. Why does sinc interpolation bandlimited? work? • Must first apply a “Anti- aliasing filter” to eliminate all frequency components above on half the sampling frequency. • This may destroy some small features of signal A. The FS of the cardinal series is but is usually better than aliasing . identical to the FS of x(t) •Anti-aliasing filter can be implemented in the frequency domain as a truncation operation See EECS306 which only lets low frequency components pass through.

Alfred Hero 33 Alfred Hero 34 University of Michigan University of Michigan

Anti-Alias (Lowpass) Filtering Anti-Alias (Lowpass) Filtering

Only retain these coefficients bandwidth =

Filter passes these freqs

Set these coeffs to 0 Set these coeffs to 0 Filter blocks these Filter blocks these freqs freqs

f f 0

Truncated spectrum Spectrum of filter output

f f 0 Alfred Hero 35 Alfred Hero 36 University of Michigan University of Michigan

6 Practical Sampling System

x(t) z(t) z[n]

Anti-alias filter Sampler

In this course we will not further elaborate on CT filters like the anti-alias filter. We will, however, soon treat DT filters in great detail!

Alfred Hero 37 University of Michigan

7