+ All Categories
Home > Documents > Overview of Sampling Topics • (Shannon) sampling theorem

Overview of Sampling Topics • (Shannon) sampling theorem

Date post: 09-Feb-2022
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
67
Overview of Sampling Topics (Shannon) sampling theorem Impulse-train sampling Interpolation (continuous-time signal reconstruction) Aliasing Relationship of CTFT to DTFT DT processing of CT signals DT sampling Decimation & interpolation J. McNames Portland State University ECE 223 Sampling Ver. 1.15 1
Transcript
Page 1: Overview of Sampling Topics • (Shannon) sampling theorem

Overview of Sampling Topics

• (Shannon) sampling theorem

• Impulse-train sampling

• Interpolation (continuous-time signal reconstruction)

• Aliasing

• Relationship of CTFT to DTFT

• DT processing of CT signals

• DT sampling

• Decimation & interpolation

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 1

Page 2: Overview of Sampling Topics • (Shannon) sampling theorem

Amplitude versus Time

• In this class we are working only with continuous-valued signals

• Signals with discrete values that have been quantized are calleddigital signals

• Analog-to-Digital converters (ADC) convert continuous-valuedsignals to discrete-valued signals. These often also convert fromCT to DT.

• Digital-to-analog converters (DAC) convert discrete-valuedsignals to continuous-valued signals. These often also convertfrom DT to CT.

• Signals that are both continuous-valued and continuous-time areusually called analog signals

• Signals that are both discrete-valued and discrete-time are usuallycalled digital

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 2

Page 3: Overview of Sampling Topics • (Shannon) sampling theorem

Overview of DT Processing of CT Signals

H(z)x[n] y[n]

x(t) y(t)

TsTs

CT ⇒ DT DT ⇒ CT

• Many systems (1) sample a signal, (2) process it in discrete-time,and (3) convert it back to a continuous-time signal

• Called discrete-time processing of continuous-time signals

• Most modern digital signal processing (DSP) uses this architecture

• The first step is called sampling

• The last step is called interpolation

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 3

Page 4: Overview of Sampling Topics • (Shannon) sampling theorem

Signals

x(t) → x[n] → xi(t)

X(jω) → X(ejω) → Xi(jω)

• For now, just consider the two conversions

– Sampling (CT → DT)

– Interpolation (DT → CT)

• Suppose we want xi(t) to be as close to x(t) as possible

• Need to consider relationships in both time- andfrequency-domains

• Three signals, three transforms

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 4

Page 5: Overview of Sampling Topics • (Shannon) sampling theorem

Guiding Questions and Objectives

x[n] = x(t)|t=nTs

• The operation of sampling (CT → DT conversion) is trivial

• The challenge is to understand the limits and tradeoffs

• The remainder of these slides is dedicated to answering thefollowing three questions

1. How is the CTFT of x(t), X(jω) related to the DTFT ofx[n] = x(nTs), X(ejΩ)?

2. Under what conditions can we synthesize x(t) from x[n]:x[n] → x(t)?

3. How do we perform this DT → CT conversion?

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 5

Page 6: Overview of Sampling Topics • (Shannon) sampling theorem

Need for a Bridge Signal

Consider three signals

Type Time Domain Frequency DomainOriginal Signal CT x(t) X(jω)Sampled Signal DT x[n] X(ejΩ)Bridge Signal CT xδ(t) Xδ(jω)

• Goals: to determine the relationship of x(t) to x[n] = x(nTs) inthe time and frequency domains

• In the time domain, the relationship x[n] = x(nTs) is clear

• But what is the relationship of X(jω) to X(ejΩ)?

• The transforms differ in character

– X(ejΩ) is periodic

– X(ejΩ) has units of radians per sample

• A bridge signal xδ(t) is the only way (that I know of) to determinehow X(jω) is related to X(ejΩ)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 6

Page 7: Overview of Sampling Topics • (Shannon) sampling theorem

Use of the Bridge Signal

• Define the bridge signal by relating Xδ(jω) to X(ejΩ)

• Determine how x(t) is related to xδ(t) in the time domain

• Determine how X(jω) is related to Xδ(jω)

• Use the relationships of X(ejΩ) and X(jω) to Xδ(jω) todetermine their relationship to one another

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 7

Page 8: Overview of Sampling Topics • (Shannon) sampling theorem

Defining the Bridge Signal

• The bridge signal xδ(t) is a CT representation of a DT signal x[n]

• It is defined as having the same transform, within a scale factor,as the DT signal

• Suppose x[n] = Aej(Ωn+φ)

• What is the CT equivalent?

• Let us pick x(t) = Aej(ωt+φ)

• How do we relate the DT frequency Ω to the CT frequency ω?

– ω has units of radians/second

– Ω has units of radians/sample

• Let us use the conversion factor of Ts = f−1s seconds/sample

Ω (radians/sample) = ω (radians/second) × Ts (seconds/sample)

ω (radians/second) = Ω (radians/sample) × fs (samples/second)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 8

Page 9: Overview of Sampling Topics • (Shannon) sampling theorem

Defining the Bridge Signal

Xδ(jω) = X(ejΩ)∣∣Ω=ωTs

= X(ejωTs)

• The bridge signal is a CT representation of a DT signal

• We define it by equating the CTFT and DTFT with anappropriate scaling factor for frequency

• Note that this is a highly unusual CT signal

– The CTFT is periodic

– What does this tell us about xδ(t)?

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 9

Page 10: Overview of Sampling Topics • (Shannon) sampling theorem

Solving for the Bridge Signal

X(ejΩ) =∞∑

n=−∞x[n] e−jΩn

Xδ(jω) = X(ejΩ)∣∣Ω=ωTs

=∞∑

n=−∞x[n] e−jωTsn

xδ(t)FT⇐⇒ Xδ(jω)

δ(t − to)FT⇐⇒ e−jωto

δ(t − Tsn) FT⇐⇒ e−jωTsn

∞∑n=−∞

x[n] δ(t − Tsn) FT⇐⇒∞∑

n=−∞x[n] e−jωTsn

xδ(t) =∞∑

n=−∞x[n] δ(t − Tsn)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 10

Page 11: Overview of Sampling Topics • (Shannon) sampling theorem

Why Isn’t the Inverse Transform Similar to x(t)?

DTFT x[n] =12π

∫2π

X(ejω) ejΩn dΩ

CTFT x(t) =12π

∫ +∞

−∞X(jω) ejωt dω

• We generated xδ(t) from x[n] by equating a CTFT to the DTFTof x[n]

• This seems reasonable at first

• But consider the range of the CTFT and DTFT synthesisequations

• The DTFT synthesizes x[n] out of a finite range of frequencies

• The CTFT synthesizes x(t) out of all frequencies

• This is why, if x[n] = x(nTs), that

xδ(t) = F−1 {Xδ(jω)} = F−1{X(ejωTs)

} �= x(t)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 11

Page 12: Overview of Sampling Topics • (Shannon) sampling theorem

Impulse Sampling

Ts 2Ts 3Ts 4Ts 5Ts0-Ts-2Ts-3Ts-4Ts

p(t)1

p(t) =∞∑

n=−∞δ(t − nTs)

xδ(t) =∞∑

n=−∞x(nTs) δ(t − Tsn) = x(t) p(t)

• xδ(t) can also be formed from a CT signal

• This is called impulse sampling

• We can model sampling by use of the periodic impulse train

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 12

Page 13: Overview of Sampling Topics • (Shannon) sampling theorem

Rectangular Window and Impulse Train Notation

Ts 2Ts 3Ts 4Ts 5Ts0-Ts-2Ts-3Ts-4Ts

p(t)1

• Note that a similar symbol was used for rectangular windows

pT (t) =

{1 |t| < T

0 Otherwise

but p(t) �= pT (t)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 13

Page 14: Overview of Sampling Topics • (Shannon) sampling theorem

Impulse Sampling Conceptual Example

Ts 2Ts 3Ts 4Ts 5Ts0-Ts-2Ts-3Ts-4Ts

1

Ts 2Ts 3Ts 4Ts 5Ts0-Ts-2Ts-3Ts-4Ts

1

Ts 2Ts 3Ts 4Ts 5Ts0-Ts-2Ts-3Ts-4Ts

1

x(t)

p(t)

x(t)p(t)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 14

Page 15: Overview of Sampling Topics • (Shannon) sampling theorem

Impulse Sampling Terminology

H(z)x[n] y[n]

x(t) y(t)

TsTs

CT ⇒ DT DT ⇒ CT

xδ(t) = x(t) p(t) =∞∑

n=−∞x(nTs)δ(t − nTs)

• The impulse train p(t) is called the sampling function

• p(t) is periodic with fundamental period Ts

• Ts, the fundamental period of p(t), is called the sampling period

• fs ≡ 1Ts

and ωs = 2πTs

are called the sampling frequency

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 15

Page 16: Overview of Sampling Topics • (Shannon) sampling theorem

Fourier Transforms of Periodic Signals Overview

xδ(t) =∞∑

n=−∞x(nTs) δ(t − Tsn) = x(t) p(t)

Xδ(jω) =12π

X(jω) ∗ P (jω)

• To determine how Xδ(jω) is related to X(jω), we need tocalculate P (jω)

• p(t) is a periodic function with infinite energy

• The CTFT clearly doesn’t converge

• Is easier to

– Calculate the Fourier series coefficients P [k] for p(t)– Solve for P (jω) from P [k] using the general relationship

between the CTFS and the CTFT

• Since periodic signals have infinite energy, the CTFT of thesesignals consists of impulses

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 16

Page 17: Overview of Sampling Topics • (Shannon) sampling theorem

Fourier Transforms of Periodic Signals

Recall the Fourier series representations of periodic signals

x(t) =∞∑

k=−∞X[k] ejkωt

ejωot FT⇐⇒ 2π δ(ω − ωo)

x(t) =∞∑

k=−∞X[k] ejkωot FT⇐⇒ 2π

∞∑k=−∞

X[k] δ(ω − kωo)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 17

Page 18: Overview of Sampling Topics • (Shannon) sampling theorem

Example 1: CT Fourier Transform of an Impulse Train

Solve for the Fourier transform of the impulse train

p(t) =∞∑

n=−∞δ(t − nTs)

Hint: the impulse train is periodic.

X[k] =1T

∫T

x(t)e−jkωot dt X(jω) =∫ +∞

−∞x(t) e−jωt dt

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 18

Page 19: Overview of Sampling Topics • (Shannon) sampling theorem

Example 1: Workspace

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 19

Page 20: Overview of Sampling Topics • (Shannon) sampling theorem

The Relationship of X(jω) to Xδ(jω)

x(t) p(t) FT⇐⇒ 12π

X(jω) ∗ P (jω)

P (jω) FT⇐⇒ 2π

Ts

∞∑k=−∞

δ(ω − k 2π

Ts

)

ωs � 2π

Ts

x(t) p(t) FT⇐⇒ 12π

X(jω) ∗ 2π

Ts

∞∑k=−∞

δ(ω − kωs)

X(jω) ∗ δ(ω − ωo) = X (j(ω − ωo))

x(t) p(t) FT⇐⇒ 1Ts

∞∑k=−∞

X (j(ω − kωs))

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 20

Page 21: Overview of Sampling Topics • (Shannon) sampling theorem

Summary

Sampling: x[n] = x(nTs)

Definition: Xδ(jω) = X(ejω)∣∣Ω=ωTs

Inverse CTFT: xδ(t) =∞∑

n=−∞x[n]δ(t − nTs)

Impulse Sampling: xδ(t) =∞∑

n=−∞x(nTs)δ(t − nTs)

CTFT: P (jω) =2π

Ts

∞∑k=−∞

δ (t − kωs)

Multiplication Property: Xδ(jω) =12π

X(jω) ∗ P (jω)

=1Ts

∞∑k=−∞

X (j(ω − kωs))

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 21

Page 22: Overview of Sampling Topics • (Shannon) sampling theorem

Conceptual Diagram of the Relationship

0

0

0

1

0

2πTs

1Ts

1Ts

-ωs-ωx -ωs+ωx ωs-ωx ωs+ωxωx

ωx

ωx

-ωx

-ωx

-ωx

ωs

ωs

ωs

-ωs

-ωs

-ωs

-Ωs-Ωx -Ωs+Ωx Ωs-Ωx Ωs+ΩxΩx-Ωx Ωs-Ωs

X(jω)

P (jω)

Xδ(jω)

X(ejω)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 22

Page 23: Overview of Sampling Topics • (Shannon) sampling theorem

Observations

x(t) p(t) FT⇐⇒ 1Ts

∞∑k=−∞

X (j(ω − kωs))

X(ejωTs) =1Ts

∞∑k=−∞

X (j(ω − kωs))

• What is Ωs?

Ωs = ωsTs =2π

TsTs = 2π

• Thus ωs in CT corresponds to 2π radians/sample in DT

• Recall that the fastest DT signal is ejπn = (−1)n and oscillates atπ radians/sample

• This is the fastest signal we can observe due to ejΩn = ej(Ω±�2π)n

• What is this frequency in the CT domain?

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 23

Page 24: Overview of Sampling Topics • (Shannon) sampling theorem

Expressing DT Transform in Terms of CT Transform

X(ejωTs) =1Ts

∞∑k=−∞

X (j(ω − kωs))

Ω = ωTs

ω =ΩTs

X(ejΩ) =1Ts

∞∑k=−∞

X(j( Ω

Ts− kωs)

)

ωs =Ωs

Ts=

Ts

X(ejΩ) =1Ts

∞∑k=−∞

X

(j

(Ω − k2π

Ts

))

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 24

Page 25: Overview of Sampling Topics • (Shannon) sampling theorem

What Does this Mean?

x(t) p(t) FT⇐⇒ 1Ts

∞∑k=−∞

X (j(ω − kωs))

• Sampling with an impulse train results in a signal with a CTFT ofXδ(jω) that is a periodic function of ω

• There are replicas of X(jω) at each multiple of ωs

• Note that the replicas will not overlap if ωx < ωs

2

• In this case, X(jω) could be recovered from Xδ(jω) by applying alowpass filter with gain Ts and a cutoff frequency ωc such thatωx < ωc < ωs − ωx

• This is a surprising result

• This is the sampling theorem

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 25

Page 26: Overview of Sampling Topics • (Shannon) sampling theorem

The Sampling Theorem

Let x(t) be a bandlimited signal with X(jω) = 0 for |ω| > ωx. Thenx(t) is uniquely determined by its samples x(nT ), n = 0,±1,±2, . . . ,if ωs > 2 ωx where ωs = 2π

Ts.

• Thus, we can reconstruct any bandlimited signal x(t) exactly bycreating a scaled impulse train and lowpass filtering

• This theorem is sometimes called the Shannon samplingtheorem

• min ωs = 2ωx is called the Nyquist rate

• max ωx = ωs

2 is called the Nyquist frequency

• In other words, we must obtain at least two samples per a cycle ofthe fastest sinusoidal component

• This should sound familiar

• Recall that the fastest perceivable frequency in discrete-timesignals is π radians per sample (i.e. 0.5 cycles per sample)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 26

Page 27: Overview of Sampling Topics • (Shannon) sampling theorem

Signal Relationships Summary

x[n] = x(nTs) X(ejωTs) =1Ts

∞∑k=−∞

X (j(ω − kωs))

xδ(t) =∞∑

n=−∞x(nTs) δ(t − Tsn) Xδ(jω) =

1Ts

∞∑k=−∞

X (j(ω − kωs))

xδ(t) =∞∑

n=−∞x[n] δ(t − Tsn) Xδ(jω) = X

(ejωTs

)• We now know the relationships between all of the three signals

• Note that xδ(t) was just a means to determining the relationshipof X(ejω) to X(jω)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 27

Page 28: Overview of Sampling Topics • (Shannon) sampling theorem

Guiding Questions and Objectives Revisited

x[n] = x(nTs) X(ejωTs) =1Ts

∞∑k=−∞

X (j(ω − kωs))

• Recall our guiding questions

– How is the CTFT of x(t) related to the DTFT ofx[n] = x(nTs)?

– Under what conditions can we synthesize x(t) from x[n]?– How do we do this DT ⇒ CT conversion?

• Only the last remains

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 28

Page 29: Overview of Sampling Topics • (Shannon) sampling theorem

Example 2: Equivalent Sinusoids

Suppose x[n] is a DT sinusoidal signal,

x[n] = cos(Ωn + θ)

Solve for all of the CT sinusoids

x(t) = cos(ωt + φ)

that satisfy the relationship

x(t)|t=nTs= x[n].

Which of these CT sinusoids satisfy the sampling theorem criterion?

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 29

Page 30: Overview of Sampling Topics • (Shannon) sampling theorem

Example 2: Workspace

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 30

Page 31: Overview of Sampling Topics • (Shannon) sampling theorem

Example 2: Equivalent Sinusoids

−3 −2 −1 0 1 2 3−1

0

1

cos(

ω t+

θ

Equivalent DT Sinusoids

−3 −2 −1 0 1 2 3−1

0

1

cos(

(2π

− ω

)t −

θ)

−3 −2 −1 0 1 2 3−1

0

1

cos(

(ω t+

2π)t

+ θ

)

Time (s)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 31

Page 32: Overview of Sampling Topics • (Shannon) sampling theorem

Example 2: MATLAB Codefunction [] = EquivalentSinusoids();close all;

t = -3:6/1000:3;n = floor(min(t)):ceil(max(t));ph = 2*pi*rand;w = 0.6*pi;

figure;FigureSet(1,’LTX’);subplot(3,1,1);

h = plot(t,cos(w*t + ph),n,cos(w*n + ph),’k.’);set(h,’MarkerSize’,12);box off;ylabel(’cos(\omega t+\theta’);title(’Equivalent DT Sinusoids’);ylim([-1.05 1.05]);AxisLines;

subplot(3,1,2);h = plot(t,cos((2*pi-w)*t - ph),n,cos(w*n + ph),’k.’);set(h,’MarkerSize’,12);box off;ylabel(’cos((2\pi - \omega)t - \theta)’);ylim([-1.05 1.05]);AxisLines;

subplot(3,1,3);h = plot(t,cos((w+2*pi)*t + ph),n,cos(w*n + ph),’k.’);set(h,’MarkerSize’,12);box off;ylabel(’cos((\omega t+2\pi)t + \theta)’);xlabel(’Time (s)’);ylim([-1.05 1.05]);AxisLines;

AxisSet(8);

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 32

Page 33: Overview of Sampling Topics • (Shannon) sampling theorem

print -depsc EquivalentSinusoids;

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 33

Page 34: Overview of Sampling Topics • (Shannon) sampling theorem

Interpolation Introduction

• CT ⇒ DT conversion is trivial: x[n] = x(nTs)

• We now know that we can reconstruct x(t) from x[n] exactly

• This should be surprising

• There are many signals x(t) that satisfy the constraintx[n] = x(nTs)

• Which one is the original x(t)?

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 34

Page 35: Overview of Sampling Topics • (Shannon) sampling theorem

Interpolation Possibilities

−3 −2 −1 0 1 2 3−0.2

0

0.2

0.4

0.6

0.8

1

Time (s)

Sign

al (

scal

ed)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 35

Page 36: Overview of Sampling Topics • (Shannon) sampling theorem

Bandlimited Interpolation

X y(t)x(t)

xp(t)

p(t) =

�∞n=−∞ δ(t − nTs)

H(jω)

• Intuitively there are ∞ signals that are equal to x(t) and evenlyspaced samples

• However, if

– The samples were taken from a bandlimited signal: X(jω) = 0for ω > ωx

– The conditions of the sampling theorem are satisfied:ωs > 2 ωx

then there is only one bandlimited signal that passes exactlythrough the samples!

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 36

Page 37: Overview of Sampling Topics • (Shannon) sampling theorem

DT Processing of CT Signals

H(z)x[n] y[n]

x(t) y(t)

TsTs

CT ⇒ DT DT ⇒ CT

• Since x[n] completely represents x(t), we can process x[n] indiscrete-time

• However, once we process the discrete-time signal and generate adiscrete-time output, y[n] we need to create a continuous-timeoutput y(t)

• We assume that y[n] represent samples from a continuous-timesignal y(t) that is bandlimited the same as x(t)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 37

Page 38: Overview of Sampling Topics • (Shannon) sampling theorem

Interpolation

X xr(t)x(t)

xδ(t)

p(t) =

�∞n=−∞ δ(t − nTs)

H(jω)

• There are many forms of interpolation

– Piecewise constant

– Linear (point to point)

– Splines (piecewise cubic)

• For bandlimited signals, a lowpass filter can be used to exactlyrecover the signal

• Called bandlimited interpolation

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 38

Page 39: Overview of Sampling Topics • (Shannon) sampling theorem

Interpolation Simplified

xδ(t) =∞∑

n=−∞x(nTs) δ(t − nT )

xr(t) = xδ(t) ∗ h(t)

=∫ ∞

−∞xδ(t − τ) h(τ) dτ

=∫ +∞

−∞

[ ∞∑n=−∞

x(nTs) δ(t − τ − nTs)

]h(τ) dτ

=∞∑

n=−∞x(nT )

∫ ∞

−∞δ(t − τ − nTs) h(τ) dτ

=∞∑

n=−∞x(nTs) h(t − nTs)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 39

Page 40: Overview of Sampling Topics • (Shannon) sampling theorem

Interpolation with Ideal Filters

x[n] = x(nTs) Xδ(jω) =1Ts

∞∑k=−∞

X (j(ω − kωs))

• If the terms of the sum do not overlap, an ideal lowpass filter canextract X(jω) from Xδ(jω)

• The passband gain must be Ts

• Recall that the ideal lowpass filter with cutoff frequency ωc andgain Ts has an impulse response given by

h(t) =Tsωc

π

sin(ωct)ωct

=Tsωc

πsinc

(ωct

π

)

• Thus, for ideal interpolation

xr(t) =Tsωc

π

∞∑n=−∞

x(nTs) sinc(

ωc(t − nTs)π

)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 40

Page 41: Overview of Sampling Topics • (Shannon) sampling theorem

Notes on Bandlimited Interpolation

x[n] = x(nTs)

xr(t) =Tsωc

π

∞∑n=−∞

x(nTs) sinc(

ωc(t − nTs)π

)

• If the sampling theorem criterion is satisfied, xr(t) = x(t)

• However, this assumes that the frequency components of x[n] arebetween −π/2 and +π/2

• If the sampling criterion is not satisfied, high-frequencycomponents will appear as low-frequency components

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 41

Page 42: Overview of Sampling Topics • (Shannon) sampling theorem

Bandlimited Interpolation Example

−5 −4 −3 −2 −1 0 1 2 3 4 5

0

0.5

1

Time (s)

x r(t)

−5 −4 −3 −2 −1 0 1 2 3 4 5

0

0.5

1

x[n]

−5 −4 −3 −2 −1 0 1 2 3 4 5

0

0.5

1

x(t)

Example of Band−limited Signal Reconstruction (Interpolation)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 42

Page 43: Overview of Sampling Topics • (Shannon) sampling theorem

Introduction to Aliasing

x(t) · p(t) FT⇐⇒ 1Ts

+∞∑k=−∞

X (j(ω − kωs))

• If the sampling theorem is not satisfied (ωx > ωs

2 ), the sum ofreplicated spectral components X(j(ω − kωs)) will overlap

• This is called aliasing

• In this case xr(t) �= x(t), though the two will be equal at t = nTs

• When aliasing occurs with pure tones (sinusoidal signals), signalswith frequencies above ωs

2 are reflected to lower frequencies

• You should have experienced this in the lab with audio

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 43

Page 44: Overview of Sampling Topics • (Shannon) sampling theorem

Example 3:Aliasing of Pure Tones

0 1 2 3 4 5 6 7 8 9 10

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time (ms)

Sign

als

(sca

led)

Aliasing of Pure Tones Example Tone Frequency:500 Hz Sample Rate:2000 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 44

Page 45: Overview of Sampling Topics • (Shannon) sampling theorem

Example 3:Aliasing of Pure Tones

0 1 2 3 4 5 6 7 8 9 10

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time (ms)

Sign

als

(sca

led)

Aliasing of Pure Tones Example Tone Frequency:900 Hz Sample Rate:2000 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 45

Page 46: Overview of Sampling Topics • (Shannon) sampling theorem

Example 3:Aliasing of Pure Tones

0 1 2 3 4 5 6 7 8 9 10

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time (ms)

Sign

als

(sca

led)

Aliasing of Pure Tones Example Tone Frequency:1100 Hz Sample Rate:2000 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 46

Page 47: Overview of Sampling Topics • (Shannon) sampling theorem

Example 3:Aliasing of Pure Tones

0 1 2 3 4 5 6 7 8 9 10

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time (ms)

Sign

als

(sca

led)

Aliasing of Pure Tones Example Tone Frequency:1500 Hz Sample Rate:2000 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 47

Page 48: Overview of Sampling Topics • (Shannon) sampling theorem

Example 3:Aliasing of Pure Tones

0 1 2 3 4 5 6 7 8 9 10

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time (ms)

Sign

als

(sca

led)

Aliasing of Pure Tones Example Tone Frequency:1800 Hz Sample Rate:2000 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 48

Page 49: Overview of Sampling Topics • (Shannon) sampling theorem

Example 3:Aliasing of Pure Tones

0 1 2 3 4 5 6 7 8 9 10

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time (ms)

Sign

als

(sca

led)

Aliasing of Pure Tones Example Tone Frequency:2200 Hz Sample Rate:2000 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 49

Page 50: Overview of Sampling Topics • (Shannon) sampling theorem

Example 3: MATLAB Codefunction [] = AliasingTones();close all;

fs = 2e3; % 2 kHz sample ratefx = [500 900 1.1e3 1.5e3 1.8e3 2.2e3];t = 0:10e-3/500:10e-3; % Span of 5 msts = -15e-3:1/fs:25e-3; % Sampled times

T = 1/fs;ws = 2*pi*fs;wc = ws/2;

for c1 = 1:length(fx),

xt = cos(2*pi*fx(c1)*t); % True signalxs = cos(2*pi*fx(c1)*ts); % True signal sampledxr = zeros(size(t)); % Reconstructed signal memory allocationfor c2 = 1:length(ts),

st = (wc*T/pi)*xs(c2)*sinc(wc*(t-ts(c2))/pi); % Band-limited interpolationxr = xr + st;end;

figure;FigureSet(1,’LTX’);h = plot(t*1e3,xt,’b’,t*1e3,xr,’g’,ts*1e3,xs,’ko’);set(h(1),’LineWidth’,1.5);set(h(2),’LineWidth’,0.8);set(h(3),’MarkerFaceColor’,’k’);set(h(3),’MarkerSize’,4);xlim([min(t*1e3) max(t*1e3)]);ylim([-1.1 1.1]);box off;xlabel(’Time (ms)’);ylabel(’Signals (scaled)’);title(sprintf(’Aliasing of Pure Tones Example Tone Frequency:%d Hz Sample Rate:%d Hz’,fx(c1),fs));

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 50

Page 51: Overview of Sampling Topics • (Shannon) sampling theorem

AxisSet(8);legend(’True Signal’,’Reconstructed Signal’);eval(sprintf(’print -depsc AliasingTones%04d;’,fx(c1)));end;

return;

n = -15:15;t = -5.5:0.01:5.5;xp = rand(size(n)); % Sampled signalwc = pi;T = 1;xr = zeros(size(t)); % Reconstructed signal

subplot(3,1,3);for cnt = 1:length(n),

st = (wc*T/pi)*xp(cnt)*sinc(wc*(t-n(cnt)*T)/pi);plot(t,st,’g’);hold on;xr = xr + st;end;

h = plot(t,xr,’b’,n,xp,’ro’);set(h(2),’MarkerFaceColor’,’r’);set(h(2),’MarkerSize’,2);hold off;xlim([min(t) max(t)]);ylim([-0.2 1.2]);xlabel(’Time (s)’);ylabel(’Signal’);box off;

subplot(3,1,2);plot([min(t) max(t)],[0 0],’k:’);hold on;

h = stem(n,xp,’r’);set(h(1),’MarkerFaceColor’,’r’);set(h(1),’MarkerSize’,2);

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 51

Page 52: Overview of Sampling Topics • (Shannon) sampling theorem

hold off;

ylabel(’Sampled Signal’);

subplot(3,1,1);

h = plot(t,xr,’b’,n,xp,’ro’);

set(h(2),’MarkerFaceColor’,’r’);

set(h(2),’MarkerSize’,2);

ylabel(’Reconstructed Signal’);

xlim([min(t) max(t)]);

ylim([-0.2 1.2]);

box off;

title(’Example of Band-limited Siganl Reconstruction (Interpolation)’);

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 52

Page 53: Overview of Sampling Topics • (Shannon) sampling theorem

Example 4:Aliasing of Speech

The following slides show a segment of speech for Regis Philbinstating part of the word “Your”. The signal was sampled at variousrates and then interpolated. The difference between the true signaland the reconstructed signal demonstrates the hazard of undersampling. The original signal was sampled at 44.1 kHz.

Why isn’t the aliasing apparent at 22 kHz?

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 53

Page 54: Overview of Sampling Topics • (Shannon) sampling theorem

Example 4:Aliasing of Speech

30 32 34 36 38 40 42 44 46 48 50

−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time (ms)

Sign

als

(sca

led)

Regis "Your" Sample Rate:22050.0 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 54

Page 55: Overview of Sampling Topics • (Shannon) sampling theorem

Example 4:Aliasing of Speech

30 32 34 36 38 40 42 44 46 48 50

−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time (ms)

Sign

als

(sca

led)

Regis "Your" Sample Rate:8820.0 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 55

Page 56: Overview of Sampling Topics • (Shannon) sampling theorem

Example 4:Aliasing of Speech

30 32 34 36 38 40 42 44 46 48 50

−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time (ms)

Sign

als

(sca

led)

Regis "Your" Sample Rate:4410.0 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 56

Page 57: Overview of Sampling Topics • (Shannon) sampling theorem

Example 4:Aliasing of Speech

30 32 34 36 38 40 42 44 46 48 50

−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time (ms)

Sign

als

(sca

led)

Regis "Your" Sample Rate:2205.0 Hz

True SignalReconstructed Signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 57

Page 58: Overview of Sampling Topics • (Shannon) sampling theorem

Effect of Aliasing in the Frequency Domain

1

0

1

0

1

0

1

0

2

-2ws 2wsω

ω

ω

ω

ωx

ωx

ωx

−ωx

−ωx

−ωx

ωs

ωs

ωs

ωs

−ωs

−ωs

−ωs

−ωs

Xδ(jω)

Xδ(jω)

Xδ(jω)

Xδ(jω)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 58

Page 59: Overview of Sampling Topics • (Shannon) sampling theorem

Aliasing Comments

• In discrete-time, one of the key concepts of this class is thatcomplex exponentials with frequencies that differ by a multiple of2π are indistinguishable: ej(ω+�2π)n = ejωn

• When we sample a signal, we convert a continuous-time signal toa discrete-time signal

• Sinusoidal components that are above ωs

2 are reflected down tolower frequencies

• You have experienced aliasing before

– Spoked wheels in street lights that strobe at 120 Hz

– Spoked wagon wheels or helicopter blades in movies andtelevision

– Strobe lights applied to rapidly oscillating objects

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 59

Page 60: Overview of Sampling Topics • (Shannon) sampling theorem

Preventing Aliasing

x[n]C/D

Conversion

T

H(s)x(t)

Anti-AliasingFilter

• In practice, most data acquisition systems that convert CT signalsto DT signals take two measures to prevent aliasing

– Apply an analog (continuous-time) lowpass filter prior tosampling to ensure the signal is bandlimited

– Use a higher sampling rate than required by the samplingtheorem (e.g. ωs = 2.2 · ωx)

• These lowpass filters are often called anti-aliasing filters

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 60

Page 61: Overview of Sampling Topics • (Shannon) sampling theorem

Anti-aliasing Filter Tradeoffs

x[n]C/D

Conversion

T

H(s)x(t)

Anti-AliasingFilter

Over-sampling also has a number of benefits for the anti-aliasing filter(AAF).

• The transition band can be wider

• If the filter order is fixed, the passband and stopband attenuationcan be improved

• If the passband and stopband attenuation are fixed, a lower orderfilter can be used (easier and less expensive to design and build)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 61

Page 62: Overview of Sampling Topics • (Shannon) sampling theorem

Discrete-Time Processing of Continuous-Time Signals

H(z)x[n] y[n]

x(t) y(t)

TsTs

CT ⇒ DT DT ⇒ CT

X(ejΩ) =1Ts

∞∑k=−∞

X

(j

(Ω − k2π

Ts

))

• Most electronic “systems” that process signals do so indiscrete-time

• There are many advantages to this approach

– Digital technology is cheap to manufacture and very advanced

– Digital systems do not drift over time

– Parameter tuning (expensive) is not necessary; repeatable

– More flexible

• The sampling theorem is the theoretical basis for DT processing ofCT signals

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 62

Page 63: Overview of Sampling Topics • (Shannon) sampling theorem

Fourier Example of CTFT & DTFT Relationship

1

0

1

0

0

ω

ω

Ω

1T

−2π 2π

ωs

ωs

−ωs

−ωs

X(jω)

Xδ(jω)

X(ejΩ)

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 63

Page 64: Overview of Sampling Topics • (Shannon) sampling theorem

CT to DT Conversion Comments

X(ejΩ) =1Ts

∞∑k=−∞

X

(j

(Ω − k2π

Ts

))

• If the sampling theorem is satisfied, the DTFT is a scaled versionof the CTFT

– The amplitude of the DTFT is scaled by 1Ts

– The frequency ωs is mapped to Ωs = 2π

• This means we can theoretically calculate the CTFT of aband-limited signal exactly using the DTFT of the sampled signalx(nT )

• For spectral estimation, the signal must first be windowed andthen the FFT is used to calculate the DTFT

• This is exactly how the sampling oscilloscopes use the FFT toestimate the Fourier transform of a CT signal

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 64

Page 65: Overview of Sampling Topics • (Shannon) sampling theorem

CT to DT Conversion Comments

1

0

1

0

ω

Ω−π π−2π 2π

ωs−ωs12 ωs− 1

2 ωs

H(jω)

H(ejΩ)

• This also means we can process band-limited CT signals with DTsystems without any loss

• As long as the sampling theorem is satisfied, we simply designH(z) such that

H(ejΩ) = H(jω)|ω=

ΩTs

for |Ω| < π

• In this case, the DT & CT systems are equivalent

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 65

Page 66: Overview of Sampling Topics • (Shannon) sampling theorem

DT to CT Conversion Comments

InterpolationFilter

Impulse TrainDT to CT

y(t)yδ(t)

y[n]

yδ(t) =∞∑

n=−∞y[n] δ(t − nTs)

• The interpolation filter is just a lowpass filter with a passbandgain of Ts and a cutoff frequency of ωs

2

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 66

Page 67: Overview of Sampling Topics • (Shannon) sampling theorem

Summary of Key Concepts

• If a signal is bandlimited, we can sample the signal without losingany information

• The original signal can be reconstructed from its samples exactly

• The sampling theorem is the basis for discrete-time processing ofcontinuous-time signals

• If the sampling theorem is satisfied, the CTFT can be calculatedexactly from the DTFT

• There are many advantages to using this type of architecture

• If the sampling theorem is not satisfied, sampling will result inaliasing

• If a signal is bandlimited, we can theoretically build an equivalentDT system for any CT system

J. McNames Portland State University ECE 223 Sampling Ver. 1.15 67


Recommended