university of manchester school of computer science comp30291 : digital media processing

57
23 Nov'09 Comp30291 Sectn 6 1 UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing Section 6 Sampling & Reconstruction

Upload: arnold

Post on 05-Jan-2016

33 views

Category:

Documents


1 download

DESCRIPTION

UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing Section 6 Sampling & Reconstruction. Introduction. This section concerns the sampling & digitisation of analogue signals. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 1

UNIVERSITY of MANCHESTER

School of Computer Science

Comp30291 : Digital Media Processing

Section 6

Sampling & Reconstruction

Page 2: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 2

• This section concerns the sampling & digitisation of analogue signals. • The signals may then be processed digitally and/or transmitted in digital form.

• Resulting digital signals often need to be converted back to analogue form or “reconstructed”.

• Reconstruction is also considered in this section.

Introduction

Page 3: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 3

An analogue signal & its magnitude spectrum.

 

t

xa(t)

|Xa(j)|

Page 4: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 4

Sampling an analogue signal

 Measure xa(t) at intervals T to obtain {x[n]}:

  { ..., x[-1], x[0], x[1], x[2], x[3], ... }

t

xa(t)

T 2T 3T 4T 5T -T

-3T -2T

x[1]x[2]

x[-1]

x[-2]

x[5]

X[0]

x[3]

x[-3]x[1] = xa(T), x[2] = xa(2T), etc.

Page 5: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 5

xS(t)

t

T 2T 3T 4T 5T -T

-3T -2T

xa(T) xa(2T)

xa(-T)

xa(-2T)

xa(4T)

Measure xa(t) at 0, T, 2T, ... & represent by analogue impulses.

Invent a new signal xS(t) = sampleT{xa(t)}

Page 6: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 6

Analogue ‘unit impulse’

1

1

1/2

2

1/4

4

3

5

1/8

Voltage pulse of strength 11=1

Pulse of strength 20.5=1

More pulses of strength 1

As width 0, & height with strength remaining at 1 we get ‘unit impulse’

1

Volts

t

Page 7: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 7

Analogue ‘impulse’ of strength A

1

1

1/2

2

1/4

4

3

5Voltage pulse of strength 1A=A

Narrower pulse of strength 2A0.5=A

Even narrower pulse of strength A

As width 0, & height with strength remaining at A we get impulse of strength A

A

Volts

t

A

Page 8: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 8

DTFT of {x[n]}

(DTFT) e ][ )( n j-

n

j nxeX

It may be shown that:

DTFT of {x[n]} = Fourier transform of xS(t)

i.e. X(ej) = XS(j) = with = T.

But how is X(ej) related to the Fourier transform of xa(t)?

Page 9: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 9

THE SAMPLING THEOREM:

• FT of sampleT{xa(t)} is (1/T)repeat2/T{Xa(j)}

xS(t) XS(j)

• 'sampleT{xa(t)}' already defined• 'repeat2/T{Xa(j)}' means (loosely speaking) Xa(j) repeated at frequency intervals of 2/T.

/T-/T 2/T 4/T-4/T -2/T

|XS(j)|(1/T)Xa(j)

Page 10: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 10

By the Sampling Theorem:

/T-/T

|Xa(j)|

Spectrum of xa(t):

/T-/T 2/T 4/T-4/T -2/T

|XS(j)|(1/T)Xa(j)Effect of sampling at 1/T Hz:

Page 11: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 11

Remember:

Sample in time-domain repeat in frequency-domain

sampleT{xa(t)} -> (1/T)repeat2/T{Xa(j)}

( 2/T is the sampling frequency in radians/second)

Page 12: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 12

n

aω njXrepeat ))( ( = ) )(j(X 0a0

Precise definition of ‘repeat’ function

repeat2/T{Xa(j)} is sum of identical copies of Xa(j) each shifted in frequency by a multiple of 2/T

Page 13: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 13

By this precise definition:

/T-/T

|Xa(j)|

Given a spectrum

/T-/T 2/T 4/T-4/T -2/T

|XS(j)|

Xa(j)

|REPEAT2/T {Xa(j)}|

Page 14: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 14

Applying precise defn to another spectrum:

/T-/T

|Xa(j)|

/T-/T 2/T 4/T-4/T -2/T

|XS(j)||REPEAT2/T {Xa(j)}|

Page 15: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 15

Observation from previous 2 slides

• In first case, Xa(j) is bandlimited between /T or FS / 2. Red images do not overlap with |Xa(j)| when copies are summed. DTFT of {x[n]} = XS(j) = FT of xa(t) for -/T /T i.e for -

• In second case, Xa(j) is not bandlimited between /T.Red images do overlap & when summed change shape of |Xa(j)|. DTFT of {x[n]} FT of xa(t) for -

• In 2nd case, ‘aliasing distortion’ has occurred.

Page 16: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 16

xa(t) bandlimited between

/T rad/s (fs/2 Hz):

|X (j)|

a

Spectrum of xS(t): |Xs(j)|

Further illustration (no aliasing)

|(1/T)Xa(j)|

Page 17: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 17

If Xa(j) not bandlimited

to /T, overlap occurs

|Xa(j)|

|Xs(j)|

Further illustration of aliasing

Page 18: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 18

Xa(j) ! XS(j) = X(ej)

t t {…, 3, -2, -2, 1, 1, -1, … }

xa(t) xS(t) {x[n]} =

/T-/T

/T-/T -

DTFT of {x[n]} related to Xa(j) when no aliasing

1/T

Page 19: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 19

Nyquist sampling criterion

• If there is no aliasing, original spectrum is seen between FS/2.

• Can filter off the red images & get back the orig spectrum.

• No information is lost despite the sampling process.

•To avoid aliasing, low-pass filter xa(t) to band-limit to FS/2.

• Sampling process then satisfies “Nyquist sampling criterion”.

Page 20: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 20

Example to illustrate aliasing

• xa(t) has sinusoidal component at 7 kHz:

|Xa(j2f )|

f 5 k -5 k 10 k -10 k

• It is sampled at 10 kHz without an antialiasing filter.

• Does it satisfy Nyquist sampling criteria?

• What happens to the sinusoid?

Page 21: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 21

Solution to example on previous slide

It becomes 3 kHz (10-7) sine-wave & distorts signal.

|XS(j2f)|

5 k -5 k --10 k 10 k f

Page 22: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 22

• Assume xa(t) has spectrum below & is sampled at fS = 2/T to obtain {x[n]}:

• How can we obtain xa(t) exactly from {x[n]} ?

|Xa(j)|

Reconstruction of xa(t) from {x[n]}

Page 23: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 23

t

xs(t)

T 2T 3T 4T 5T -T

-3T -2T

x[1] x[2]

x[-1]

x[-2]

x[5]

Ideal reconstruction (with impulses)

Firstly reconstruct: xS(t) = sampleT{xa(t)} by making each sample of {x[n]} the strength of an impulse:

Page 24: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 24

|XS(j)|

Spectrum of xS(t) is (1/T)repeat{Xa(j)}

|(1/T)Xa(j)|

if we use an ideal lowpass filter to remove everything outside /T we get:

Image(ghost)

Image(ghost)

Page 25: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 25

Ideal reconstruction

In theory, to obtain xa(t) exactly from {x[n]}:

1) Construct xS(t) with ideal impulses. 2) Ideal low-pass filter with cut-off /T to remove images. 3) Multiply by T.

In practice cannot have ideal impulses, or an ideal low-pass filter.

Each impulse approximated by pulse of finite voltage & non-zero duration:

Page 26: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 26

‘Sample & hold’ (S/H) reconstruction

• Produce a voltage x[n] at t = nT • Hold this fixed until next sample at t = (n+1)T.• Produces a “staircase waveform” xP(t) say.

t

xP(t)

T 2T 3T

t

T 2T 3T

xS(t)

4

6

9

5 4/T

6/T

9/T

5/T

Page 27: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 27

Standard ADC produces xP(t) instead of xS(t)

xP(t)

T 2T 3T

4/T

6/T

9/T

5/T

{ ..., 4, 6, 9, 5, 3, .... }

t

ADC 3/T

xP(t) will be scaled.

Page 28: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 28

Effect of S/H approximation

• Energy spectral density falls off slightly as frequency increases.• Loss of ESD 4 dB as /T.• Like turning down the ‘treble’ in a tone control.• Not too serious, & can be compensated for.• e.g. include‘treble boost’ in digital signal before reconstruction.

Page 29: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 29

Example: Why must analogue signals be low-pass filtered before they are sampled?

• If {x[n]} is obtained by sampling xa(t) at intervals of T, the DTFT X(ej) of {x[n]} is (1/T)repeat2/T{Xa(j)}.

• This is equal to the FT of xS(t) = sampleT(xa(t))

• If xa(t) is bandlimited between /T then Xa(j) =0 for || > /T.

• It follows that X(ej) = (1/T)Xa(j) with =T. No overlap.

• We can reconstruct xa(t) perfectly by producing the series of weighted impulses xS(t) & low-pass filtering. No informatn is lost.

• In practice using pulses instead of impulses give good approximatn..

• Where xa(t) is not bandlimited between /T then overlap occurs & XS(j) will not be identical to Xa(j) in the frequency range fs/2 Hz.

• Lowpass filtering xS(t) produces a distorted (aliased) version of xa(t).

• So before sampling we must lowpass filter xa(t) to make sure that it is bandlimited to /T i.e. fS/2 Hz

Page 30: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 30

Quantisation• Conversion of samples of xa(t) to binary numbers produces a digital signal.• Must approximate to nearest quantisation level:-

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

11 1

V

Page 31: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 31

• ‘m-bit’ uniform ADC has 2m levels, volts apart.

• Rounding true samples {x[n]} produces:

Quantisation error (noise)

(Quantised) = (True) + (Error)

• Normally e[n] lies between -/2 & +/2 • Ideal reconstruction from quantised {x[n]} will produce: xa(t) + ea(t) • Instead of xa(t), where ea(t) arises from {e[n]}.

][ ][ ][ˆ nenxnx

Page 32: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 32

Assumptions about {e[n]} & ea(t)

i) Samples of {e[n]} random & uniformly distributed between /2.

ii) Power spectral density of ea(t) evenly spread over range Fs/2 Hz.

Page 33: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 33

Probability density of e[n]

e[n]

Power spectral density of ea(t)

Page 34: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 34

It may be be shown that power of ea(t) is

2 / 12 (quantisation noise power in watts)

• Power of a signal is loudness if it is when converted to sound.

• Strict definition: power produced when signal is applied as a voltage to a 1 Ohm resistor.

• For constant voltage V, power = V2/R = V2 watts.

• For sinusoid of amplitude A, power = A2/2 watts.

Page 35: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 35

Signal to quantisation noise ratio (SQNR)

dB. power noise quantisatn

power signallog 10 = (SQNR) 10

• To maximise SQNR, signal must be large enough to use all quantisation levels without overflow.

• Amplification required before A/D conversion.

Page 36: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 36

SQNR for sinusoid• Given m-bit ADC with step-size . • Maximum sine-wave amplitude is 2m-1.• Power of A sin(t) : A2/2.

maximum possible SQNR is:

23log 10 12/

2/2log 10 12

102

222

10

mm

)]2(log)12( )3([log 10 1010 m

= 1.8 + 6m dB. ( i.e. approx 6 dB per bit)

• Formula often assumed for signals which are approx. sinusoidal.

Page 37: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 37

Example

(a) How many bits are required to achieve a SQNR of 60 dB with sinusoids amplified to occupy full range of uniformly quantising A/D converter?

(b) What SQNR is achievable with a 16-bit uniformly quantising A/D converter applied to sinusoidally shaped signals?

Solution: (a) About ten bits. (b) 97.8 dB.

Page 38: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 38

Block diag of DSP system for processing analogue sound

anti-aliasing

Analogue

filter

Analogue

sample

& hold

Analogue

to

digital converter Digital

processor

Digital to

analogue

converter

S/H

effect

compensatn

Analogue

reconstr-

-unction

filter

xa(t)

ya(t)

Control

Output

Input

Page 39: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 39

Antialiasing LPF: Analogue lowpass filter, cut-off < FS/2 to remove any spectral energy which would be aliased into signal band.Analogue S/H: Holds input steady for ADC.A/D conv: Converts voltages to binary numbers of specified word-length. Quantisation error incurred. Samples taken at FS Hz.Digital processor: Controls S/H & ADC to determine FS Reads samples from ADC, processes them & outputs to DAC. D/A conv: Converts binary numbers to analogue voltages. Stair-case waveforms normally produced.S/H compensation: Compensates S/H reconstruction loss of up to 4 dB by boosting spectrum as it approaches FS/2. Reconstruction LPF: Removes images of Fs/2 band produced by S/H reconstruction.

Page 40: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 40

Choice of sampling rate (FS )

• To process xa(t) band-limited to F with F = 20kHz. • In theory, we could choose FS = 2F Hz. e.g. 40 kHz. • There are two related problems with this choice.

(1) Need very sharp analogue input anti-aliasing filter to remove everything above F Hz.

(2) Need very sharp analogue reconstruction filter to eliminate images (ghosts)

Page 41: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 41

|Xs(j2f)|

Hz -F 2F F

REMOVE REMOVE

Fs/2-Fs/2

f

• Signal bandwidth is F, sampled at FS = 2F.

• Clearly a very sharp analog filter is needed to remove the ‘images’ (ghosts) created by the sampling process.

Reconstruction filter requirement when FS=2F

Page 42: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 42

‘Slightly’ increasing the sampling rate

• Assume signal bandwidth remains at F = 20kHz, but instead of sampling at FS = 40 kHz we ‘slightly over-sample’ at 44.1kHz.

• To avoid input aliasing, must filter out all above FS/2 = 22.05 kHz.

• Without affecting the music within 20kHz.

• We have a ‘guard-band’ from 20 to 22.05 kHz to allow the filter’s gain response to ‘roll off’ gradually.

• So filter need not be ‘brick-wall’.

• It may be argued that guardband is 4.1kHz as spectrum between 22.05 & 24.1kHz get aliased to 20-22.05kHz, i.e. above 20kHz

Page 43: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 43

Effect of slightly over-sampling on reconstruction filter requirement:

• FS = 44.1 kHz when F=20 kHz.

• Images start at 24.1 kHz so filtering requirement relaxed slightly.

|Xs(j2f)|

Hz -F 2F F

REMOVE REMOVE

FS/2

-FS/2

f

Page 44: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 44

Higher degrees of over-sampling:

• With signal band-width still at F Hz, now sample at 4F Hz.

• Anti-aliasing input filter now needs to filter out only components beyond 3F without distorting signal in F band.

• Reconstruction simplified as images start at 3F. • Images easier to remove without affecting signal in frequency

range F.

Page 45: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 45

Reconstruction filter requirement when FS = 4F

|XS(2jf)|

Hz -F 2F

F

REMOVE REMOVE

FS/2 -FS/2

-2F 4F -4F 3F

f

fS=4F

Page 46: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 46

f

fS/2

8F

fS=8F

4F-8F

Reconstruction filter requirement when FS = 8F

• Filtering task to remove red images is even easier

Page 47: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 47

f

FS/2

8F

FS=12F

4F-8F 12F

-12F -4F

Easier still when sampling rate increased to 12F Hz

Page 48: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 48

• Consider effect of increasing FS= from 2F to 4F.• As & m remain unchanged, SQNR not affected.

• But quantisation noise power is evenly distributed in frequency range FS/2.

• Same quantisation noise power now more thinly spread in frequency range 2F Hz rather than F Hz.

Effect of increasing sampling rate on SQNR

Page 49: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 49

Same quantisatn noise power, more thinly spread

Power spectral density of quantistn noise

F - F

f

FS = 2F

Power spectral density of quantisatn noise

F - F

f

2F -2F

FS = 4 F

Page 50: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 50

• Quantisation noise power unchanged, but bandwidth increased.

• Signal bandwidth does not change, • So keep analogue filter pass-band at F, not FS/2.

• Assuming quantisation noise evenly spread, this will remove half the noise power.

• Adds 3 dB to the SQNR.

Effect of doubling FS from 2F to 4F

Page 51: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 51

Advantages of over-sampling:

• Simpler analog antialiasing & reconstruction filters.

• Reduction in SQNR of 3dB per doubling of FS.

• Reduces S/H reconstructn roll-off effect.

Disadvantages:

• Increases no. of bits per second (ADC word-length x fS),

• Increases cost of processing, storage/transmission

• Faster ADC needed.

Page 52: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 52

Conclusion about over-sampling

Over-sampling simplifies analogue electronics, but is less economical with digital processing, storage & transmission resources.

Page 53: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 53

Digital anti-aliasing & reconstruction filters• Can get the best of both worlds.• Sample at higher rate, 4F say, with analogue filter to remove

components beyond 3F.• Digital filter to remove components beyond F.

• Down-sample (decimate) to reduce FS to 2F.

• Simply omit alternate samples.• To reconstruct: Up-sample by placing zeros between each

sample: e.g. { …, 1, 2, 3, 4, …} with FS = 10 kHz

becomes {…, 1, 0, 2, 0, 3, 0, 4, 0, …} at 20 kHz.• Creates images (ghosts) in the digital signal.• Removed by digital filter.

• Then reconstruct as normal but at higher FS.

Page 54: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 54

Down-sampling (decimation) & up-sampling

• Assume a signal has been sampled at Fs Hz.

• To reduce the sampling rate to Fs/N where N is an integer:

• Digitally low-pass filter to remove all components above Fs/(2N).

• Then it is safe to sample at Fs/N rather than Fs.

• Down-sample by omitting N-1 samples out of every N.

• Assume another signal has been sampled at Fs Hz.

• We wish to up-sample to a new sampling rate Fs' = N × Fs.

• Insert N zero valued samples between each sample.

• Creates ‘images’ at frequencies above Fs/2 Hz.

• Digitally low-pass filter to remove all components above Fs/2 = Fs' /(2N) Hz.

Page 55: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 55

CD format:

• 20 kHz bandwidth music sampled at 44.1 kHz • 16 bits/channel uniform quantisation (normally stereo). • Music stored at 44100 x 32=1.4112Mbytes/s (with FEC)• Recording studio will over-sample & use simple input filter.• Apply digital antialiasing filter to band-limit to 20 kHz• Down-sample to 44.1 kHz for storing on CD.• Player reads samples from CD at 44.1 kHz & up-samples to 88.2, 176.4 kHz or higher by inserting zeros.• Creates images which are removed by digital filtering.•Now have 20 kHz bandwidth music sampled at 88.2, 176.4 kHz or higher. Apply to DAC.•Simple analog reconstruction filter is now used.

Page 56: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 56

Bit-stream (delta-sigma) DAC:

• Used in many CD & MP3 players• Up-sample to such a degree (256) that a one bit DAC is all that is required.• Produces high quantisation noise, but very thinly spread in frequency-domain.• Most of it filtered off by very simple analogue filter.• 256 times over-sampling gain only 3 x 8 dB. some more tricks needed: noise-shaping.

Page 57: UNIVERSITY of MANCHESTER School of Computer Science Comp30291 : Digital Media Processing

23 Nov'09 Comp30291 Sectn 6 57

Example

A DSP system for processing sinusoidal signals in the range 0 Hz to 4 kHz samples at 20 kHz with an 8-bit ADC.

If the input signal is always amplified to use the full dynamic range of the ADC, estimate the SQNR in the range 0 to 4 kHz.

How would the SQNR be affected by decreasing FS to 10 kHz and replacing the 8-bit ADC by a 10-bit device?

Are there any disadvantages in doing this?