Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sampling and Aliasing.

Similar presentations


Presentation on theme: "Sampling and Aliasing."— Presentation transcript:

1 Sampling and Aliasing

2 Review Sampling: Time Domain Many signals originate as continuous-time signals, e.g. conventional music or voice By sampling a continuous-time signal at isolated, equally-spaced points in time, we obtain a sequence of numbers k  {…, -2, -1, 0, 1, 2,…} Ts is the sampling period. Ts t Ts s(t) Sampled analog waveform impulse train

3 Sampling: Frequency Domain
Review Sampling: Frequency Domain Sampling replicates spectrum of continuous-time signal at integer multiples of sampling frequency Fourier series of impulse train where ws = 2 p fs Modulation by cos(s t) Modulation by cos(2 s t) w G(w) ws 2ws -2ws -ws F(w) 2pfmax -2pfmax

4 Amplitude Modulation by Cosine
Review Amplitude Modulation by Cosine Multiplication in time: convolution in Fourier domain Sifting property of Dirac delta functional Fourier transform property for modulation by a cosine

5 Amplitude Modulation by Cosine
Review Amplitude Modulation by Cosine Example: y(t) = f(t) cos(w0 t) Assume f(t) is an ideal lowpass signal with bandwidth w1 Assume w1 << w0 Y(w) is real-valued if F(w) is real-valued Demodulation: modulation then lowpass filtering Similar derivation for modulation with sin(w0 t) w 1 w1 - w1 F(w) w Y(w) - w0 - w1 - w0 + w1 -w0 w0 - w1 w0 + w1 w0 ½F(w - w0) ½F(w + w0)

6 Shannon Sampling Theorem
Continuous-time signal x(t) with frequencies no higher than fmax can be reconstructed from its samples x(k Ts) if samples taken at rate fs > 2 fmax Nyquist rate = 2 fmax Nyquist frequency = fs / 2 Example: Sampling audio signals Human hearing is from about 20 Hz to 20 kHz Apply lowpass filter before sampling to pass frequencies up to 20 kHz and reject high frequencies Lowpass filter needs 10% of maximum passband frequency to roll off to zero (2 kHz rolloff in this case) What happens if fs = 2 fmax?

7 Sampling Theorem Assumption
Continuous-time signal has no frequency content above fmax Sampling time is exactly the same between any two samples Sequence of numbers obtained by sampling is represented in exact precision Conversion of sequence to continuous time is ideal In Practice

8 Bandwidth Bandwidth is defined as non-zero extent of spectrum in positive frequencies Lowpass spectrum on right: bandwidth is fmax Bandpass spectrum on right: bandwidth is f2 – f1 Definition applies to both continuous-time and discrete-time signals Alternatives to “non-zero extent”? Lowpass Spectrum fmax -fmax f Bandpass Spectrum f1 f2 f –f2 –f1

9 Sampled Bandpass Spectrum
Bandpass Sampling Bandwidth: f2 – f1 Sampling rate fs must greater than analog bandwidth For replicas of bands to be centered at origin after sampling fcenter = ½ (f1 + f2) = k fs Lowpass filter to extract baseband Bandpass Spectrum f1 f2 f –f2 –f1 Sample at fs Sampled Bandpass Spectrum f –f2 –f1 f1 f2

10 Sampling and Oversampling
As sampling rate increases, sampled waveform looks more like original In some applications, e.g. touchtone decoding, frequency content matters not waveform shape Zero crossings: frequency content of a sinusoid Distance between two zero crossings: one half period. With sampling theorem satisfied, a sampled sinusoid crosses zero the right number of times even though its waveform shape may be difficult to recognize DSP First, Ch. 4, Sampling & interpolation demo

11 Aliasing Analog sinusoid Sample at Ts = 1/fs
x(t) = A cos(2p f0 t + f) Sample at Ts = 1/fs x[n] = x(Tsn) = A cos(2p f0 Ts n + f) Keeping the sampling period same, sample y(t) = A cos(2p (f0 + l fs) t + f) where l is an integer y[n] = y(Tsn) = A cos(2p(f0 + lfs)Tsn + f) = A cos(2pf0Tsn + 2plfsTsn + f) = A cos(2pf0Tsn + 2pln + f) = A cos(2pf0Tsn + f) = x[n] Here, fsTs = 1 Since l is an integer, cos(x + 2 p l) = cos(x) y[n] indistinguishable from x[n]

12 Aliasing Since l is any integer, a countable but infinite number of sinusoids will give same sequence of samples Frequencies f0 + l fs for l  0 are called aliases of frequency f0 with respect to fs All aliased frequencies appear to be the same as f0 when sampled by fs

13 Folding Second source of aliasing frequencies
From negative frequency component of a sinusoid, -f0 + l fs, where l is any integer fs is the sampling rate f0 is sinusoid frequency Sampling w(t) with a sampling period of Ts = 1/fs So w[n] = x[n] = x(Ts n) x(t) = A cos(2  f0 t + )

14 Aliasing and Folding Aliasing and folding of a sinusoid sin(2  finput t) sampled at fs = 2000 samples/s with finput varied Mirror image effect about finput = ½ fs gives rise to name of folding fs = 2000 samples/s 1000 Apparent frequency (Hz) 1000 2000 3000 4000 Input frequency, finput (Hz)

15 DSP First Demonstrations
Web site: Aliasing and folding (Chapter 4) Strobe demonstrations (Chapter 4) Disk attached to a shaft rotating at 750 rpm Keep strobe light flash rate Fs the same Increase rotation rate Fm (positive means counter-clockwise) Case I: Flash rate equal to rotation rate Vector appears to stand still When else does this phenomenon occur? Fm = l Fs For Fm = 750 rpm, occurs at Fs = {375, 250, 187.5, …} rpm

16 Strobe Demonstrations
Tip of vector on wheel: r is radius of disk is initial angle (phase) of vector Fm is initial rotation rate in rotations per second t is time in seconds For Fm = 720 rpm and r = 6 in, with vector initially vertical Sample at Fs = 2 Hz (or 120 rpm), so Ts = ½ s, vector stands still:

17 Strobe Demonstrations
Sampling and aliasing Sample p(t) at t = Ts n = n / Fs : No aliasing will occur if Fs > 2 | Fm | Consider Fm = Fs which could occur for any countably infinite number of Fm and Fs values: Rotation will occur at rate of  rad/flash, which appears to go counterclockwise at rate of 0.1 rad/flash

18 Strobe Movies Fixes the strobe flash rate
Increases rotation rate of shaft linearly with time Strobe initial keeps up with the increasing rotation rate until Fm = ½ Fs Then, disk appears to slow down (folding) Then, disk stops and appears to rotate in the other direction at an increasing rate (aliasing) Then, disk appears to slow down (folding) and stop And so forth


Download ppt "Sampling and Aliasing."

Similar presentations


Ads by Google