Top Banner
M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 1 Downsampling, Upsampling, and Reconstruction A-to-D and its relation to sampling Downsampling and its relation to sampling Upsampling and interpolation D-to-A and reconstruction filtering Filters and their relation to convolution Copyright © 2007 by M.H. Perrott All rights reserved.
18

Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

Jul 19, 2018

Download

Documents

TrầnKiên
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 1

Downsampling,Upsampling, andReconstruction

• A-to-D and its relation to sampling • Downsampling and its relation to sampling• Upsampling and interpolation• D-to-A and reconstruction filtering• Filters and their relation to convolution

Copyright © 2007 by M.H. PerrottAll rights reserved.

Page 2: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 2

A-to-D

Converter

1/T Sample/s

Downsample

by N

1/(NT) Sample/s

D-to-A

Converter

M/(NT) Sample/s

Upsample

by M

M/(NT) Sample/s

Digital SignalProcessingOperations

1/(NT) Sample/s

x[n]

u[n]r[n]

xc(t)

yc(t)

Digital Processing of Analog Signals

• Digital circuits can perform very complex processing of analog signals, but require– Conversion of analog signals to the digital domain– Conversion of digital signals to the analog domain– Downsampling and upsampling to match sample rates of

A-to-D, digital processor, and D-to-A

Page 3: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 3

AnalogAnti-Alias

Filter

A-to-D

Converter

1/T Sample/s

Downsample

by 10

Anti-Alias

Filter

1/(NT) Sample/s1/T Sample/s

AnalogReconstruction

Filter

D-to-A

Converter

M/(NT) Sample/s

Upsample

by 10

Interpolate

with Filter

M/(NT) Sample/s M/(NT) Sample/s

Digital SignalProcessingOperations

1/(NT) Sample/s

x[n]

y[n]

u[n]r[n]

xc(t)

yc(t)

Inclusion of Filtering Operations

• A-to-D and downsampler require anti-alias filtering– Prevents aliasing

• D-to-A and upsampler require interpolation (i.e., reconstruction) filtering– Provides `smoothly’ changing waveforms

Page 4: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 4

Summary of Sampling Process (Review)

• Sampling leads to periodicity in frequency domain

We need to avoid overlap of replicated signals in frequency domain (i.e., aliasing)

p(t)

xp(t) x[n]xc(t) Impulse Train

to Sequence

t

p(t)

T

1

t

T

t

xc(t) xp(t)

n

x[n]

1

Xp(f)

f0

T1

T2

T-1

T-2

TA

X(ej2πλ)

λ

0 1 2-1-2

TA

Xc(f)

f0

A

Page 5: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 5

The Sampling Theorem (Review)

• Overlap in frequency domain (i.e., aliasing) is avoided if:

• We refer to the minimum 1/T that avoids aliasing as the Nyquist sampling frequency

t

p(t)

T

1

P(f)

f0

T1

T2

T-1

T-2

T1

t

T

t

xc(t) xp(t)

Xp(f)

f0

T1

T2

T-1

T-2

TA

Xc(f)

f

A

fbw-fbw

fbw-fbw- fbw

T1- + fbw

T1

Page 6: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 6

A-to-D Converter

• Operates using both a sampler and quantizer– Sampler converts continuous-time input signal into a

discrete-time sequence– Quantizer converts continuous-valued signal/sequence into

a discrete-valued signal/sequence• Introduces quantization noise as discussed in Lab 4

A-to-D

Converter

1/T Sample/s

x[n]xc(t)

p(t)

xp(t)

T

1

Quantize

Value

xp(t) Impulse Train

to Sequence

x[n]

T 1

t n

t

t

AnalogAnti-Alias

Filter

xc(t)

xc(t)

Page 7: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 7

Frequency Domain View of A-to-D

• Analysis of A-to-D same as for sampler– For simplicity, we will ignore the influence of quantization

noise in our picture analysis• In lab 4, we will explore the influence of quantization noise

using Matlab

A-to-D

Converter

1/T Sample/s

x[n]xc(t)

1/T

1/T

Quantize

Value

Impulse Train

to Sequence

f

f

AnalogAnti-Alias

Filter

0-1/T

0

1/T

1/T

f0-1/T 2/T-2/T 1

1/T

λ0-1 2-2

P(f)

Xp(f) X(ej2πλ)

p(t)

xp(t) xp(t) x[n]1

Xc(f)

xc(t)

xc(t)

Page 8: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 8

Downsampling

• Similar to sampling, but operates on sequences• Analysis is simplified by breaking into two steps

– Multiply input by impulse sequence of period N samples– Remove all samples of xs[n] associated with the zero-

valued samples of the impulse sequence, p[n]• Amounts to scaling of time axis by factor 1/N

p[n]

xs[n] Remove

Zero Samples

r[n]

1

n

1

N

x[n]

n

1

n

N

Downsample

by N

Anti-Alias

Filter

x[n] r[n]

Page 9: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 9

Downsample

by N

Anti-Alias

Filter

x[n] r[n]

p[n]

xs(t) Remove

Zero Samples

r[n]x[n]

1/N

1/N

λ0-1/N 2/N-2/N

Xs(ej2πλ)

1-1

1/N

1/N

λ0-1/N 2/N-2/N

P(ej2πλ)

1-1

1

λ0

X(ej2πλ)

1-1

λ0

R(ej2πλ)

1-1

1/N

Frequency Domain View of Downsampling

• Multiplication by impulse sequence leads to replicas of input transform every 1/N Hz in frequency

• Removal of zero samples (i.e., scaling of time axis) leads to scaling of frequency axis by factor N

Page 10: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 10

Downsample

by N

Anti-Alias

Filter

x[n] r[n]

p[n]

xs(t) Remove

Zero Samples

r[n]x[n]

1/N

1/N

λ0-1/N 2/N-2/N

Xs(ej2πλ)

1-1

1/N

1/N

λ0-1/N 2/N-2/N

P(ej2πλ)

1-1

1

λ0

X(ej2πλ)

1-1

λ0

R(ej2πλ)

1-1

1/N

Undesired

Signal or

Noise

The Need for Anti-Alias Filtering

• Removal of anti-alias filter would allow undesired signals or noise to alias into desired signal band

What is the appropriate bandwidth of the anti-alias lowpass filter?

Page 11: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 11

Upsampler

• Consists of two operations– Add N-1 zero samples between every sample of the input

• Effectively scales time axis by factor N– Filter the resulting sequence, up[n], in order to create a

smoothly varying set of sequence samples• Proper choice of the filter leads to interpolation between

the non-zero samples of sequence up[n] (discussed in Lab 5)

Upsample

by N

Interpolate

with Filter

y[n]u[n] up[n]

Add

Zero Samples

1

n

1

n

1

n

Interpolate

with Filter

y[n]u[n] up[n]

N N

Page 12: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 12

Frequency Domain View of Upsampling

• Addition of zero samples (scaling of time axis) leads to scaling of frequency axis by factor 1/N

• Interpolation filter removes all replicas of the signal transform except for the baseband copy

1/N

1/N

λ0-1/N 2/N-2/N

Up(ej2πλ)

1-1

1

λ0

Y(ej2πλ)

1-1λ

0

U(ej2πλ)

1-1

1/N

Upsample

by N

Interpolate

with Filter

y[n]u[n] up[n]

Add

Zero Samples

Interpolate

with Filter

y[n]u[n] up[n]

Page 13: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 13

D-to-A Converter

• Simple analytical model includes two operations– Convert input sequence samples into corresponding impulse

train– Filter impulse train to create a smoothly varying signal

• Proper choice of the reconstruction filter leads to interpolation between impulse train values

D-to-A

Converter

1/T Sample/s

y[n] yc(t)

Sequence to

Impulse Train

AnalogReconstruction

Filter

yc(t)

1

n

y[n] yc(t)1

n

T

t

Page 14: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 14

Frequency Domain View of D-to-A

• Conversion from sequence to impulse train amounts to scaling the frequency axis by sample rate of D-to-A (1/T)

• Reconstruction filter removes all replicas of the signal transform except for the baseband copy

D-to-A

Converter

1/T Sample/s

y[n] yc(t)

Sequence to

Impulse Train

AnalogReconstruction

Filter

yc(t)

y[n] yc(t)

1

1/T

λ0-1 2-2

Y(ej2πλ)

f0

1Yc(f)

1

1/T

λ0-1 2-2

Y(ej2πλ)

1/T

1/T

f0-1/T 2/T-2/T

Y(f)

Page 15: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 15

A Common Reconstruction Filter

• Zero-order hold circuit operates by maintaining the impulse value across the D-to-A sample period– Easy to implement in hardware

How do we analyze this?

D-to-A

Converter

1/T Sample/s

y[n] yc(t)

Sequence to

Impulse Train

Zero-OrderHold

yc(t)

1

n

y[n] yc(t)1

n

T

t

T

t

Hzoh(f)

Page 16: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 16

Filtering is Convolution in Time

• Recall that multiplication in frequency corresponds to convolution in time

• Filtering corresponds to convolution in time between the input and the filter impulse response

yc(t)yc(t)

T

t

T

t

Hzoh(f)

T

t

hzoh(t)

Zero-OrderHold

T

t

T

t

hzoh(t)

T

t

yc(t) yc(t)

Page 17: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 17

Frequency Domain View of Filtering

• Zero-order hold is not a great filter, but it’s simple…

yc(t)yc(t)

T

t

T

t

Hzoh(f)

T

t

hzoh(t)

Zero-OrderHold

T

t

T

t

hzoh(t)

T

t

f

T1

T-1

0

T2

T-2

Hzoh(f)Yc(f)

f

T1

T-1 0

T2

T-2

Yc(f)

f

T1

T-1 0

T2

T-2

yc(t) yc(t)

Page 18: Downsampling, Upsampling, and Reconstruction - Sharifce.sharif.edu/courses/90-91/2/ce342-1/resources/root/Problem... · M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction,

M.H. Perrott©2007 Downsampling, Upsampling, and Reconstruction, Slide 18

Summary• A-to-D converters convert continuous-time signals

into sequences with discrete sample values– Operates with the use of sampling and quantization

• D-to-A converters convert sequences with discrete sample values into continuous-time signals– Analyzed as conversion to impulse train followed by

reconstruction filtering• Zero-order hold is a simple but low performance filter

• Upsampling and downsampling allow for changes in the effective sample rate of sequences– Allows matching of sample rates of A-to-D, D-to-A, and

digital processor– Analysis: downsampler/upsampler similar to A-to-D/D-to-A

• Up next: digital modulation