• No results found

Lecture 23: Aliasing in Frequency: the Sampling Theorem

N/A
N/A
Protected

Academic year: 2021

Share "Lecture 23: Aliasing in Frequency: the Sampling Theorem"

Copied!
36
0
0

Loading.... (view fulltext now)

Full text

(1)

Lecture 23: Aliasing in Frequency: the Sampling

Theorem

Mark Hasegawa-Johnson

All content CC-SA 4.0 unless otherwise specified.

(2)

1 Review: Spectrum of continuous-time signals

2 Sampling

3 Aliasing

4 The Sampling Theorem

5 Interpolation: Discrete-to-Continuous Conversion

(3)

Outline

1 Review: Spectrum of continuous-time signals

2 Sampling

3 Aliasing

4 The Sampling Theorem

5 Interpolation: Discrete-to-Continuous Conversion

(4)

Two-sided spectrum

The spectrum of x (t) is the set of frequencies, and their associated phasors, Spectrum (x (t)) = {(f−N, a−N), . . . , (f0, a0), . . . , (fN, aN)} such that x (t) = N X k=−N akej 2πfkt

(5)

Fourier’s theorem

One reason the spectrum is useful is that any periodic signal can be written as a sum of cosines. Fourier’s theorem says that any x (t) that is periodic, i.e.,

x (t + T0) = x (t) can be written as x (t) = ∞ X k=−∞ Xkej 2πkF0t

which is a special case of the spectrum for periodic signals: fk = kF0, and ak = Xk, and

F0 =

1 T0

(6)

Fourier Series

Analysis (finding the spectrum, given the waveform):

Xk = 1 T0 Z T0 0 x (t)e−j2πkt/T0dt

Synthesis (finding the waveform, given the spectrum):

x (t) =

X

k=−∞

(7)

Outline

1 Review: Spectrum of continuous-time signals

2 Sampling

3 Aliasing

4 The Sampling Theorem

5 Interpolation: Discrete-to-Continuous Conversion

(8)

How to sample a continuous-time signal

Suppose you have some continuous-time signal, x (t), and you’d like to sample it, in order to store the sample values in a computer. The samples are collected once every Ts = F1s seconds:

(9)

Example: a 1kHz sine wave

For example, suppose x (t) = sin(2π1000t). By sampling at Fs = 16000 samples/second, we get

x [n] = sin2π1000 n 16000



(10)

Outline

1 Review: Spectrum of continuous-time signals

2 Sampling

3 Aliasing

4 The Sampling Theorem

5 Interpolation: Discrete-to-Continuous Conversion

(11)

Can every sine wave be reconstructed from its samples?

The question immediately arises: can every sine wave be reconstructed from its samples?

(12)

Can every sine wave be reconstructed from its samples?

For example, two signals x1(t) and x2(t), at 10kHz and 6kHz

respectively:

x1(t) = cos(2π10000t), x2(t) = cos(2π6000t)

Let’s sample them at Fs = 16, 000 samples/second:

x1[n] = cos  2π10000 n 16000  , x2[n] = cos  2π6000 n 16000 

Simplifying a bit, we discover that x1[n] = x2[n]. We say that the

10kHz tone has been “aliased” to 6kHz:

x1[n] = cos  5πn 4  = cos 3πn 4  x2[n] = cos  3πn 4  = cos 5πn 4 

(13)
(14)

What is the highest frequency that can be reconstructed?

The highest frequency whose cosine can be exactly reconstructed from its samples is called the “Nyquist frequency,” FN = FS/2. If

x (t) = cos(2πFNt), then x [n] = cos  2πFN n FS  = cos(πn) = (−1)n

(15)

Sampling above Nyquist ⇒ Aliasing to a frequency below

Nyquist

If you try to sample a signal whose frequency is above Nyquist (like the one shown on the left), then it gets aliased to a frequency below Nyquist (like the one shown on the right).

(16)

Outline

1 Review: Spectrum of continuous-time signals

2 Sampling

3 Aliasing

4 The Sampling Theorem

5 Interpolation: Discrete-to-Continuous Conversion

(17)

General characterization of continuous-time signals

Let’s assume that x (t) is periodic with some period T0, therefore

it has a Fourier series:

x (t) = ∞ X k=−∞ Xkej 2πkt/T0 = ∞ X k=0 |Xk| cos 2πkt T0 + ∠Xk 

(18)

Eliminate the aliased tones

We already know that ej 2πkt/T0 will be aliased if |k|/T

0 > FN. So

let’s assume that the signal is band-limited: it contains no frequency components with frequencies larger than FS/2.

That means that the only Xk with nonzero energy are the ones in

the range −N/2 ≤ k ≤ N/2, where N = FST0.

x (t) = N/2 X k=−N/2 Xkej 2πkt/T0 = N/2 X k=0 |Xk| cos 2πkt T0 + ∠Xk 

(19)

Sample that signal!

Now let’s sample that signal, at sampling frequency FS:

x [n] = N/2 X k=−N/2 Xkej 2πkn/FST0 = N/2 X k=0 |Xk| cos 2πkn N + ∠Xk 

So the highest digital frequency, when k = FST0/2, is ωk = π.

The lowest is ω0 = 0. x [n] = π X ωk=−π Xkej ωkn= π X ωk=0 |Xk| cos (ωkn + ∠Xk)

(20)
(21)

The sampling theorem

As long as −π ≤ ωk ≤ π, we can recreate the continuous-time

signal by just regenerating a continuous-time signal with the corresponding frequency: fk  cycles second  = ωk h radians sample i × FS h samples second i 2π h radians cycle i x [n] = cos(ωkn + θk) → x (t) = cos(2πfkt + θk)

(22)

The sampling theorem

A continuous-time signal x (t) with frequencies no higher than fmax can be reconstructed exactly from its samples x [n] =

x (nTS) if the samples are taken at a rate Fs = 1/Ts that is

(23)

Outline

1 Review: Spectrum of continuous-time signals

2 Sampling

3 Aliasing

4 The Sampling Theorem

5 Interpolation: Discrete-to-Continuous Conversion

(24)

How can we get x (t) back again?

We’ve already seen one method of getting x (t) back again: we can find all of the cosine components, and re-create the corresponding cosines in continuous time.

There is an easier way. It involves multiplying each of the samples, x [n], by a short-time pulse, p(t), as follows:

y (t) =

X

n=−∞

(25)

Rectangular pulses

For example, suppose that the pulse is just a rectangle,

p(t) = ( 1 −TS 2 ≤ t < TS 2 0 otherwise

(26)

Rectangular pulses = Piece-wise constant interpolation

The result is a piece-wise constant interpolation of the digital signal:

(27)

Triangular pulses

The rectangular pulse has the disadvantage that y (t) is discontinuous. We can eliminate the discontinuities by using a triangular pulse: p(t) = ( 1 −T|t| S −TS ≤ t < TS 0 otherwise

(28)

Triangular pulses = Piece-wise linear interpolation

(29)

Cubic spline pulses

The triangular pulse has the disadvantage that, although y (t) is continuous, its first derivative is discontinuous. We can eliminate discontinuities in the first derivative by using a cubic-spline pulse:

p(t) =          1 − 2T|t| S 2 +T|t| s 3 −TS ≤ t < TS −2 −T|t| S 2 +  2 −T|t| S 3 TS ≤ |t| < 2TS 0 otherwise

(30)

Cubic spline pulses

The triangular pulse has the disadvantage that, although y (t) is continuous, its first derivative is discontinuous. We can eliminate discontinuities in the first derivative by using a cubic-spline pulse:

(31)

Cubic spline pulses = Piece-wise cubic interpolation

(32)

Sinc pulses

The cubic spline has no discontinuities, and no slope discontinuities, but it still has discontinuities in its second derivative and all higher derivatives. Can we fix those?

The answer: yes! The pulse we need is the inverse transform of an ideal lowpass filter, the sinc.

(33)

Sinc pulses

We can reconstruct a signal that has no discontinuities in any of its derivatives by using an ideal sinc pulse:

p(t) = sin(πt/TS) πt/TS

(34)

Sinc pulse = ideal bandlimited interpolation

(35)

Outline

1 Review: Spectrum of continuous-time signals

2 Sampling

3 Aliasing

4 The Sampling Theorem

5 Interpolation: Discrete-to-Continuous Conversion

(36)

Summary

A continuous-time signal x (t) with frequencies no higher than fmax can be reconstructed exactly from its samples x [n] =

x (nTS) if the samples are taken at a rate Fs = 1/Ts that is

greater than 2fmax.

Ideal band-limited reconstruction is achieved using sinc pulses:

y (t) = ∞ X n=−∞ y [n]p(t − nTs), p(t) = sin(πt/TS) πt/TS

References

Related documents

As the prevalence of osteoporosis is increasing in young women, the main goal of the study was to find out the association of dietary patterns with bone health condition

3. At 12 PM, observed employee A providing patient care in dialysis station 11 with patient # 6. Observed employee A with both hands gloved, infusing clear liquid from

To explore the hypothesis that inflammation may contribute to the high risk of bone fracture in CKD we tested the relation- ship between inflammatory makers and other bone meta-

We suggest that the effect of litter quality on mineral-asso- ciated SOM is a function of the unsatisfied C storage potential (i.e., the C saturation deficit) such that (1) lit-

“In that hour Jesus rejoiced in spirit, and said, I thank thee, O Father, Lord of Heaven and earth, that thou hast hid these things from the wise and prudent, and hast revealed

We conceive of ‘‘civic learning’’ as any learning that contributes to student preparation for community or public involvement in a diverse democratic society. A loose

STAR mutations resulting in lipoid congenital adrenal hyperplasia should be considered all over the world in the differential diagnosis of newborn babies and infants with

There are several highlights apart from auto- matic threading in the entry area, such as the fully optimized galvanizing process with air knife and zinc thickness con- trol, and