Read Downsampling, Upsampling, and Reconstruction text version

Downsampling, Upsampling, and Reconstruction

· · · · ·

M.H. Perrott©2007

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.

Downsampling, Upsampling, and Reconstruction, Slide 1

Digital Processing of Analog Signals

xc(t) A-to-D Converter

1/T Sample/s

x[n]

Downsample by N

1/(NT) Sample/s

r[n]

Digital Signal Processing Operations

1/(NT) Sample/s

u[n]

Upsample by M

M/(NT) Sample/s

D-to-A Converter

M/(NT) Sample/s

yc(t)

· 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

M.H. Perrott©2007

Downsampling, Upsampling, and Reconstruction, Slide 2

Inclusion of Filtering Operations

xc(t) Analog Anti-Alias Filter A-to-D Converter

1/T Sample/s

x[n]

Anti-Alias Filter

1/T Sample/s

Downsample by 10

1/(NT) Sample/s

r[n]

Digital Signal Processing Operations

1/(NT) Sample/s

u[n]

Upsample by 10

Interpolate with Filter

y[n]

D-to-A Converter

M/(NT) Sample/s

yc(t) Analog Reconstruction Filter

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

· A-to-D and downsampler require anti-alias filtering · D-to-A and upsampler require interpolation (i.e., reconstruction) filtering

M.H. Perrott©2007

­ Prevents aliasing

­ Provides `smoothly' changing waveforms

Downsampling, Upsampling, and Reconstruction, Slide 3

Summary of Sampling Process (Review)

p(t) 1 t p(t) xc(t) xc(t) T xp(t) xp(t) Impulse Train to Sequence x[n] x[n]

t T Xc(f) A f 0 Xp(f)

t 1 X(ej2)

n

A T -2 T -1 T

A T 1 T 2 T f -2 -1

0

0

1

2

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

M.H. Perrott©2007

Downsampling, Upsampling, and Reconstruction, Slide 4

The Sampling Theorem (Review)

xc(t) 1 t T t T t p(t) xp(t)

Xc(f) A

P(f) 1 T f -2 T -1 T 0 1 T 2 T f

A T -2 T -1 T

Xp(f)

-fbw fbw

0

-f f 1 + f bw bw 1 - fbw bw T T

1 T

2 T

f

· 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

M.H. Perrott©2007

Downsampling, Upsampling, and Reconstruction, Slide 5

A-to-D Converter

xc(t) xc(t) Analog Anti-Alias Filter 1 t p(t) xc(t) t T xp(t) Quantize xp(t) Value t T 1 Impulse Train to Sequence x[n] A-to-D Converter

1/T Sample/s

x[n]

n

· Operates using both a sampler and quantizer

M.H. Perrott©2007

­ 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

Downsampling, Upsampling, and Reconstruction, Slide 6

Frequency Domain View of A-to-D

xc(t) xc(t) Analog Anti-Alias Filter 1/T A-to-D Converter

1/T Sample/s

x[n]

P(f)

Xc(f) 1 0

f -1/T 0 1/T p(t) xp(t) Quantize xp(t) xc(t) Value f Xp(f) 1/T -2/T -1/T 0 1/T 2/T f

Impulse Train to Sequence 1/T -2 -1

x[n] X(ej2)

0

1

2

· 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

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

Downsampling

Anti-Alias Filter x[n] Downsample r[n] by N

1 N x[n] n 1 n N 1 n p[n] xs[n] r[n] Remove Zero Samples

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

M.H. Perrott©2007

­ Multiply input by impulse sequence of period N samples ­ Remove all samples of xs[n] associated with the zerovalued samples of the impulse sequence, p[n] · Amounts to scaling of time axis by factor 1/N

Downsampling, Upsampling, and Reconstruction, Slide 8

Frequency Domain View of Downsampling

Anti-Alias Filter x[n] Downsample r[n] by N

P(ej2) 1/N -1 -2/N -1/N 0 1/N 2/N p[n] j2) X(e xs(t) x[n] 0 1/N 1 Xs(ej2) 1 -1 1 r[n] Remove Zero Samples R(ej2) 1/N 0 1

1 -1

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

· 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

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

The Need for Anti-Alias Filtering

Anti-Alias Filter x[n] Downsample r[n] by N

P(ej2)

Undesired Signal or Noise

1/N 1 r[n] Remove Zero Samples R(ej2) 1/N 1 -1 0 1

1 -1

-1 -2/N -1/N 0 1/N 2/N p[n] j2) X(e xs(t) x[n] 1 1/N Xs(ej2)

0

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

· 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?

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

Upsampler

u[n] Upsample by N up[n] Interpolate with Filter y[n]

u[n] n 1

Add Zero Samples

up[n]

Interpolate with Filter n

y[n]

n 1 N

1

N

· Consists of two operations

M.H. Perrott©2007

­ 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)

Downsampling, Upsampling, and Reconstruction, Slide 11

Frequency Domain View of Upsampling

u[n] Upsample by N up[n] Interpolate with Filter y[n]

u[n] U(ej2) 1/N -1 0

Add Zero Samples

up[n]

Interpolate with Filter

y[n] Y(ej2)

1 1 1/N Up(ej2) 1 -1

0

1

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

· 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

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

D-to-A Converter

y[n] n 1 yc(t) D-to-A Converter

1/T Sample/s

yc(t)

Analog Reconstruction Filter

n 1 y[n] Sequence to Impulse Train yc(t) T

t

· 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

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

Frequency Domain View of D-to-A

Y(ej2) 1/T -2 -1 0 1 2 y[n] yc(t) D-to-A Converter

1/T Sample/s

yc(t)

1

Yc(f) f

Analog Reconstruction Filter

0

Y(ej2) 1/T -2 -1 0 1 2 y[n] Sequence to Impulse Train 1/T yc(t) -2/T -1/T

Y(f) f

0

1/T

2/T

· Conversion from sequence to impulse train amounts to scaling the frequency axis by sample rate of Dto-A (1/T) · Reconstruction filter removes all replicas of the signal transform except for the baseband copy

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

A Common Reconstruction Filter

y[n] n 1 yc(t) D-to-A Converter

1/T Sample/s

Hzoh(f) Zero-Order Hold

yc(t) t T

n 1 y[n] Sequence to Impulse Train yc(t) T

t

· 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?

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

Filtering is Convolution in Time

yc(t) t T Zero-Order Hold hzoh(t) t T T Hzoh(f) yc(t) t

yc(t) t T

hzoh(t) t T

yc(t) t T

· Recall that multiplication in frequency corresponds to convolution in time

M.H. Perrott©2007

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

Downsampling, Upsampling, and Reconstruction, Slide 16

Frequency Domain View of Filtering

yc(t) t T Zero-Order Hold hzoh(t) t T T Hzoh(f) yc(t) t

yc(t) t T

hzoh(t) t T

yc(t) t T

Yc(f)

-2 T -2 T -1 T 0 1 T 2 T

Hzoh(f)

2 T

Yc(f)

f

-1 T 0 1 T

f

-2 T -1 T 0 1 T 2 T

f

M.H. Perrott©2007

· Zero-order hold is not a great filter, but it's simple...

Downsampling, Upsampling, and Reconstruction, Slide 17

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

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

Information

Downsampling, Upsampling, and Reconstruction

18 pages

Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

509178