Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
University of Toronto
slide 1 of 56
D.A. Johns, K. Martin, 1997
Motivation
Popular approach for medium-to-low speed A/D and D/A applications requiring high resolution Easier Analog reduced matching tolerances relaxed anti-aliasing specs relaxed smoothing filters More Digital Signal Processing Needs to perform strict anti-aliasing or smoothing filtering Also removes shaped quantization noise and decimation (or interpolation)
University of Toronto
slide 2 of 56
D.A. Johns, K. Martin, 1997
Quantization Noise
e(n) x(n) y(n)
y(n)
Quantizer
Model
Above model is exact approx made when assumptions made about e(n) Often assume e(n) is white, uniformily distributed number between 2 is difference between two quantization levels
University of Toronto slide 3 of 56
D.A. Johns, K. Martin, 1997
Quantization Noise
T
time
White noise assumption reasonable when: fine quantization levels signal crosses through many levels between samples sampling rate not synchronized to signal frequency Sample lands somewhere in quantization interval leading to random error of 2
University of Toronto
slide 4 of 56
D.A. Johns, K. Martin, 1997
Quantization Noise
Quantization noise power shown to be 12 and is independent of sampling frequency If white, then spectral density of noise, S e(f) , is constant.
S e(f) 1 - --Height k = --------x 12 f s 2
fs --2
fs --2
University of Toronto
slide 5 of 56
D.A. Johns, K. Martin, 1997
Oversampling Advantage
Oversampling occurs when signal of interest is bandlimited to f 0 but we sample higher than 2 f 0 Define oversampling-rate OSR = f s ( 2 f 0 ) After quantizing input signal, pass it through a brickwall digital filter with passband up to f 0
u(n)
N-bit quantizer
(1)
y 1(n)
H(f)
y 2(n)
H(f)
1
fs --2
f0 0 f0
fs --2
University of Toronto
slide 6 of 56
D.A. Johns, K. Martin, 1997
Oversampling Advantage
Output quantization noise after filtering is: Pe =
2 S f 2 e (f) s fs 2
H(f) df =
2 k f x 0
f0
(2)
Doubling OSR reduces quantation noise power by 3dB (i.e. 0.5 bits/octave) Assuming peak input is a sinusoidal wave with a peak value of 2 ( 2 ) leading to P s = ( ( 2 ) ( 2 2 ) ) Can also find peak SNR as: SNR max P s 3 2 N = 10 log ----- = 10 log --2 + 10 log ( OSR ) P e 2
(3) N N 2
University of Toronto
slide 7 of 56
D.A. Johns, K. Martin, 1997
Oversampling Advantage
Example A dc signal with 1V is combined with a noise signal uniformily distributed between 3 giving 0 dB SNR. {0.94, 0.52, 0.73, 2.15, 1.91, 1.33, 0.31, 2.33}. Average of 8 samples results in 0.8875 Signal adds linearly while noise values add in a squareroot fashion noise filtered out. Example 1-bit A/D gives 6dB SNR. To obtain 96dB SNR requires 30 octaves of oversampling ( (96-6)/3 dB/octave ) If f 0 = 25 kHz , f s = 2
University of Toronto
30
University of Toronto
slide 9 of 56
D.A. Johns, K. Martin, 1997
H(z)
Quantizer Delta-Sigma Modulator
e(n) x(n)
u(n)
H(z)
Linear model
University of Toronto
y(n)
slide 10 of 56
D.A. Johns, K. Martin, 1997
(5) (6)
University of Toronto
slide 11 of 56
D.A. Johns, K. Martin, 1997
University of Toronto
slide 12 of 56
D.A. Johns, K. Martin, 1997
y(n)
Quantizer
If stable, average input of integrator must be zero Average value of u(n) must equal average of y(n)
University of Toronto
slide 13 of 56
D.A. Johns, K. Martin, 1997
Example
The output sequence and state values when a dc input, u(n) , of 1 3 is applied to a 1st order modulator with a two-level quantizer of 1.0 . Initial state for x ( n ) is 0.1.
n 0 1 2 3 4 5 x(n) 0.1000 0.5667 0.7667 0.1000 0.5667 x(n + 1) 0.5667 0.7667 0.1000 0.5667 0.7667 y(n) 1.0 1.0 1.0 1.0 1.0 e(n) 0.9000 0.4333 0.2333 0.9000 0.4333
University of Toronto
slide 14 of 56
D.A. Johns, K. Martin, 1997
Transfer-Functions
Signal and Noise Transfer-Functions Y(z) 1 (z 1) 1 - = z S TF(z) = --------- = ------------------------------U(z) 1 + 1 (z 1) Y(z) 1 1 - = (1 z ) - = ------------------------------N TF(z) = --------E(z) 1 + 1 (z 1) Noise transfer-function is a discrete-time differentiator (i.e. a highpass filter) N TF(f) = 1 e
j 2 f fs j f fs e e = ------------------------------------ 2 j e 2j j f fs j f fs (8)
(9)
j f fs f = sin ---- 2j e fs
(10)
University of Toronto
slide 15 of 56
D.A. Johns, K. Martin, 1997
df
(12)
Assuming f 0 << f s (i.e., OSR >> 1 ) 2 f 0 P e ----- ---- ----- 12 3 f s 1 3 = ----------- --------- 36 OSR
2 2 (13)
University of Toronto
slide 16 of 56
D.A. Johns, K. Martin, 1997
Max SNR
Assuming peak input is a sinusoidal wave with a peak value of 2 ( 2 ) leading to P s = ( ( 2 ) ( 2 2 ) ) Can find peak SNR as: SNR max P s = 10 log ---- P e 3 2 N 3 3 = 10 log --2 + 10 log ---- ( OSR ) 2 2 or, equivalently, SNR max = 6.02 N + 1.76 5.17 + 30 log ( OSR ) Doubling OSR gives an SNR improvement 9 dB or, equivalently, a benefit of 1.5 bits/octave
University of Toronto slide 17 of 56
D.A. Johns, K. Martin, 1997
(14)
(15)
SC Implementation
Quantizer
u(n)
y(n)
H(z)
1-bit D/A Analog Digital
C V in
1
2
C omparator
1
L atch on 2 falling 1, 2 V out high ( 1 ), ( 2 ) V out low
V out
V ref 2
2, ( 1 ) C 1, ( 2 )
University of Toronto
slide 18 of 56
D.A. Johns, K. Martin, 1997
y(n)
S TF(f) = z
1 1 2
N TF(f) = ( 1 z )
SNR max = 6.02 N + 1.76 12.9 + 50 log ( OSR ) Doubling OSR improves SNR by 15 dB (i.e., a benefit of 2.5 bits/octave)
University of Toronto
slide 19 of 56
D.A. Johns, K. Martin, 1997
f0
fs --2
fs
Out-of-band noise increases for high-order modulators Out-of-band noise peak controlled by poles of noise transfer-function Can also spread zeros over band-of-interest
University of Toronto
slide 20 of 56
D.A. Johns, K. Martin, 1997
Example
90 dB SNR improvement from A/D with f 0 = 25 kHz Oversampling with no noise shaping From before, straight oversampling requires a sampling rate of 54,000 GHz. First-Order Noise Shaping Lose 5 dB (see (15)), require 95 dB divided by 9 dB/ 10.56 octave, or 10.56 octaves f s = 2 2 f 0 75 MHz Second-Order Noise Shaping Lose 13 dB, required 103 dB divided by 15 dB/octave, f s = 5.8 MHz (does not account for reduced input range needed for stability).
University of Toronto
slide 21 of 56
D.A. Johns, K. Martin, 1997
University of Toronto
slide 22 of 56
D.A. Johns, K. Martin, 1997
H(z)
x(n)
y(n)
Quantizer
Write H(z) as N(z) H(z) = --------D(z) NTF is given by: 1 D(z) NTF(z) = ------------------- = -------------------------1 + H(z) D(z) + N(z)
(20) (19)
University of Toronto
slide 23 of 56
D.A. Johns, K. Martin, 1997
Error-Feedback Structure
Alternate structure to interpolative
u(n) x(n) y(n)
G(z) 1 e(n)
Signal transfer-function equals unity while noise transferfunction equals G(z) First element of G(z) equals 1 for no delay free loops First-order system G(z) 1 = z More sensitive to coefficient mismatches
University of Toronto slide 24 of 56
D.A. Johns, K. Martin, 1997
x c(t)
Sampleandhold Analog
x sh(t) fs
Mod
x dsm(n)
Digital low-pass filter
x lp(n) OSR
x s(n)
fs
fs
2f 0
x c(t)
x sh(t) t
X c(f)
f 0
X sh(f)
f 0
fs
f f
fs Frequency
Time
University of Toronto
slide 25 of 56
D.A. Johns, K. Martin, 1997
n
2 f0 fs 2
x lp(n)
123
X lp() n
2 f0 fs 2
x s(n) 1 2 3 n
X s()
2 4 6 8 10 12
Time
Frequency
University of Toronto
slide 26 of 56
D.A. Johns, K. Martin, 1997
University of Toronto
slide 27 of 56
D.A. Johns, K. Martin, 1997
x dsm(n)
1-bit Mod
x da(t)
Analog low-pass filter Analog
x c(t)
2f 0
OSR
fs
Interpolation
fs
fs
Digital
D/A
f s ------OSR 2f 0
x s(n)
1 2 3( 1 ) (2)
x s2(n)
(3)
X s() n
2 4 6 8 10 12
X s2()
( 2 f0 ) fs
Time
University of Toronto
Frequency
slide 28 of 56
D.A. Johns, K. Martin, 1997
X lp()
( 2 f0 ) fs 2
(n) dsm
x da(t) n, t
X dsm()
( 2 f0 ) fs 2
f
0 f s
X c(f)
f 0
Frequency
f
f s
University of Toronto
slide 29 of 56
D.A. Johns, K. Martin, 1997
University of Toronto
slide 30 of 56
D.A. Johns, K. Martin, 1997
Rate = 2f 0 T IIR(z)
IIR filter
Rate = 8f 0
Rate = 4f H 1(z)
0 Rate = 2f 0 H 3(z)
modulator
Lth-order Sinc
Rate = 2f 0
T sinc(z) L+1
FIR filter
H 2(z)
Sinc filter removes much of quantization noise Following filter(s) anti-aliasing filter and noise
University of Toronto
slide 31 of 56
D.A. Johns, K. Martin, 1997
Sinc Filter
sinc is a cascade of L+1 averaging filters Averaging filter Y(z) 1 i - = ---- z T avg(z) = --------U(z) M
i=0 M1 (21) L+1
M is integer ratio of f s ( 8 f 0 ) It is a linear-phase filter (symmetric coefficients) If M is power of 2, easy division (shift left) Can not do all decimation filtering here since not sharp enough cutoff
University of Toronto
slide 32 of 56
D.A. Johns, K. Martin, 1997
Sinc Filter
Consider x in(n) = { 1, 1, 1, 1, 1, 1 , . . . } applied to M = 4 averaging filters in cascade x 1(n) x 2(n) x 3(n) T avg(z) T avg(z) T avg(z) x in(n) sinc filter x 1(n) = { 0.5, 0.5, 0.0, 0.5, 0.5, 0.0, . . . } x 2(n) = { 0.38, 0.38, 0.25, 0.38, 0.38, 0.25, . . . } x 3(n) = { 0.34, 0.34, 0.31, 0.34, 0.34, 0.31, . . . } Converging to sequence of all 1/3 as expected
3
University of Toronto
slide 33 of 56
D.A. Johns, K. Martin, 1997
Use L + 1 cascade to roll off quantization noise faster than it rises in L th order modulator
University of Toronto
slide 34 of 56
D.A. Johns, K. Martin, 1997
(24)
0
University of Toronto
slide 35 of 56
D.A. Johns, K. Martin, 1997
Sinc Implementation
1 L + 1 M L+1 1 T sinc(z) = --------------(1 z ) ------------ 1 L+1 1z M
In
z 1 z 1 z M
(25)
Out
(Integrators)
(Differentiators)
f s ---M
In
z 1 z 1 f s ---M z 1
Out
fs
fs
fs M
fs M
Higher-Order Modulators
An Lth order modulator improves SNR by 6L+3 dB/octave Interpolative Architecture
u(n) c1 c2 c4 f2 c5 f1 c3
a1 a2
a3
a4
a5
Can spread zeros over freq of interest using resonators with f 1 and f 2 Need to worry about stability (more later)
University of Toronto
slide 37 of 56
D.A. Johns, K. Martin, 1997
MASH Architecture
Multi-stAge noise SHaping - MASH Use multiple lower order modulators and combine outputs to cancel noise of first stages
u(n)
z 1
z e1
u(n) + ( 1 z
) e 1(n)
1-bit D/A
e 1(n)
z
e2
1
y(n)
2
z 1
e 1(n) + ( 1 z
) e 2(n)
slide 38 of 56
University of Toronto
MASH Architecture
Output found to be: Y(z) = z U(z) ( 1 z ) E 2(z) Multibit Output Output is a 4-level signal though only single-bit D/As if D/A application, then linear 4-level D/A needed if A/D, slightly more complex decimation A/D Application Mismatch between analog and digital can cause first-order noise, e 1 , to leak through to output Choose first stage as higher-order (say 2nd order)
2 1 2 (26)
University of Toronto
slide 39 of 56
D.A. Johns, K. Martin, 1997
z-plane zero
f s 4 = 1 MHz
z-plane zero
dc
2f o fs 2 f s = 4 MHz f 0 = 10 kHz fs OSR = ------- = 200 2f 0 fs 2
dc
Lowpass
Bandpass
University of Toronto
slide 40 of 56
D.A. Johns, K. Martin, 1997
Quantizer
Above H(z) has poles at j (which are zeros of NTF) H(z) is a resonator with infinite gain at f s 4 H(z) = z ( z + 1 ) Note one zero at +j and one zero at -j similar to lowpass first-order modulator only 9 dB/octave For 15 dB/octave, need 4th order BP modulator
University of Toronto slide 41 of 56
D.A. Johns, K. Martin, 1997
Modulator Stability
Since feedback involved, stability is an issue Considered stable if quantizer input does not overload quantizer Non-trivial to analyze due to quantizer There are rigorous tests to guarantee stability but they are too conservative For a 1-bit quantizer, heuristic test is: N TF(e ) 1.5
j
for 0
(27)
Peak of NTF should be less than 1.5 Can be made more stable by placing poles of NTF closer to its zeros Dynamic range suffers since less noise power pushed outof-band
University of Toronto slide 42 of 56
D.A. Johns, K. Martin, 1997
Modulator Stability
NTF
less stable same area under two curves more stable
2 f0 fs 2
Stability Detection Might look at input to quantizer Might look for long strings of 1s or 0s at comp output When instability detected ... reset integrators Damp some integrators to force more stable
University of Toronto
slide 43 of 56
D.A. Johns, K. Martin, 1997
University of Toronto
slide 44 of 56
D.A. Johns, K. Martin, 1997
V2 V1
Binary Area for symbol
1 A + 1 1 1 A 1 1 A + 0 2
Ideal
1 A 0
1 A + 1 1
1 A + 0 2
1 A + 1 1
Nonreturn-to-zero (NRZ)
Ideal
Typical
V2
V1
1 A 1
1 A 1
1 A 0
1 A 0
1 A 1
1 A 0
1 A 1
Return-to-zero (RTZ)
University of Toronto
slide 45 of 56
D.A. Johns, K. Martin, 1997
Idle Tones
1/3 into 1st order modulator results in output y(n) = { 1, 1, 1, 1, 1, 1, 1, 1, . . . } Fortunately, tone is out-of-band at f s 3 ( 1 3 + 1 24 ) = 3 8 into modulator has tone at f s 16 Similar examples can cause tones in band-of-interest and are not filtered out say f s 256 Also true for higher-order modulators Human hearing can detect tones below noise floor Tones might not lie at single frequency but be short term periodic patterns. could be a tone varying between 900 and 1100 Hz varying in a random-like pattern
University of Toronto slide 46 of 56
D.A. Johns, K. Martin, 1997
(28)
Dithering
Dither signal
u(n)
H(z)
y(n)
Quantizer
Add pseudo-random signal into modulator to break up idle tones (not just mask them) If added before quantizer, it is noise shaped and large dither can be added. A/D: few bit D/A converter needed D/A: a few bit adder needed Might affect modulator stability
slide 47 of 56
D.A. Johns, K. Martin, 1997
University of Toronto
Opamp Gain
Finite opamp gain, A , moves pole at z = 1 left by 1 A
z-plane zero
NTF
1A 2 f0 fs
Flattens out noise at low frequency only 3 dB/octave for high OSR Typically, require A > OSR
(29)
University of Toronto
slide 48 of 56
D.A. Johns, K. Martin, 1997
University of Toronto
slide 49 of 56
D.A. Johns, K. Martin, 1997
b1 b2 b3
C C C C C C
Analog output
Find D(z) such that NTF(e ) < 1.4 Use Matlab to find a Butterworth highpass filter with peak gain near 1.4 If passband edge at f s 20 then peak gain = 1.37 (z 1) NTF(z) = ------------------------------------------------------------------------------3 2 z 2.3741 z + 1.9294 z 0.5321
3 (31)
University of Toronto
slide 51 of 56
D.A. Johns, K. Martin, 1997
= 0
1 1
=
Butterworth poles
(33)
University of Toronto
slide 52 of 56
D.A. Johns, K. Martin, 1997
Quantizer
y(n)
u(n)
i coefficients included for dynamic-range scaling initially 2 = 3 = 1 last term, 1 , initially set to 1 so input is stable for a reasonable input range Initial i found by deriving transfer function from 1-bit D/ A output to V 3 and equating to H(z)
University of Toronto slide 53 of 56
D.A. Johns, K. Martin, 1997
(35)
University of Toronto
slide 54 of 56
D.A. Johns, K. Martin, 1997
University of Toronto
slide 55 of 56
D.A. Johns, K. Martin, 1997
+VDAC 1 2 1
2 CA = 1
2 CA = 1
CA = 1 2 1 2
+ V in
2a 1a
2 1 2 CA = 1
2a 1a
1a 2a 1a CA = 1
2a
2a CA = 1
V3
2 1 +V DAC
2 1
2 1
DAC
V ref
+V V
DAC
DAC
V3
+
1
University of Toronto
slide 56 of 56
D.A. Johns, K. Martin, 1997