T
s
=1/f
s
Discrete time, discrete
amplitude representation
Analog Signal
B. Murmann 5 EE315B  Chapter 2
Aliasing Example (1)
1
1000
101
s
s
sig
f kHz
T
f kHz
= =
=
( ) ( )
2
sig in
v t cos f t =
( )
2
101
2
1000
in
sig
s
f
v n cos n
f
cos n
 
=

\ .
 
=

\ .
s
s
n
t n T
f
=
Time
A
m
p
l
i
t
u
d
e
B. Murmann 6 EE315B  Chapter 2
Aliasing Example (2)
1
1000
899
s
s
sig
f kHz
T
f kHz
= =
=
( )
899 899 101
2 2 1 2
1000 1000 1000
sig
v n cos n cos n cos n
 
  (  
= = =
  
(
\ . \ .
\ .
Time
A
m
p
l
i
t
u
d
e
B. Murmann 7 EE315B  Chapter 2
Aliasing Example (3)
1
1000
1101
s
s
sig
f kHz
T
f kHz
= =
=
( )
1101 1101 101
2 2 1 2
1000 1000 1000
sig
v n cos n cos n cos n
 
  (  
= = =
  
(
\ . \ .
\ .
Time
A
m
p
l
i
t
u
d
e
B. Murmann 8 EE315B  Chapter 2
Consequence
Continuous
Time
Discrete
Time
0 f
s
2f
s
... f
Amplitude
0 0.5 f/f
s
f
sig
The frequencies f
sig
and Nf
s
f
sig
(N integer),
are
indistinguishable in the discrete time domain
B. Murmann 9 EE315B  Chapter 2
Sampling Theorem
In order to prevent aliasing, we need
2
s
sig,max
f
f <
The sampling rate f
s
=2f
sig,max
is called the Nyquist rate
Two possibilities
Sample fast enough to cover all spectral components,
including "parasitic" ones outside band of interest
Limit f
sig,max
through filtering
B. Murmann 10 EE315B  Chapter 2
Brick Wall AntiAlias Filter
Continuous
Time
Discrete
Time
0 f
s
2f
s
... f
Amplitude
0 0.5 f/f
s
Filter
B. Murmann 11 EE315B  Chapter 2
Practical AntiAlias Filter
Need to sample faster than Nyquist rate to get good attenuation
"Oversampling"
Continuous
Time
Discrete
Time
0 f
s
... f
Desired
Signal
0 0.5 f/f
s
f
s
/2 B f
s
B
Parasitic
Tone
B/f
s
Attenuation
B. Murmann 12 EE315B  Chapter 2
How much Oversampling?
Can tradeoff sampling speed against filter order
In high speed converters, making f
s
/f
sig,max
>10 is usually
impossible or too costly
Means that we need fairly high order filters
Alias
Rejection
f
s
/f
sig,max
Filter Order
[v.d. Plassche, p.41]
B. Murmann 13 EE315B  Chapter 2
Classes of Sampling
Nyquistrate sampling (f
s
> 2f
sig,max
)
Nyquist data converters
In practice always slightly oversampled
Oversampling (f
s
>> 2f
sig,max
)
Oversampled data converters
Antialias filtering is often trivial
Oversampling also helps reduce "quantization noise"
More later
Undersampling, subsampling (f
s
< 2f
sig,max
)
Exploit aliasing to mix RF/IF signals down to baseband
See e.g. Pekau & Haslett, JSSC 11/2005
B. Murmann 14 EE315B  Chapter 2
Subsampling
Aliasing is "nondestructive" if signal is band limited around some
carrier frequency
Downfolding of noise is a severe issue in practical subsampling mixers
Typically achieve noise figure no better than 20 dB (!)
Continuous
Time
Discrete
Time
0 f
s
2f
s
... f
Amplitude
0 0.5 f/f
s
Image Reject
BP Filter
B. Murmann 15 EE315B  Chapter 2
The Reconstruction Problem
As long as we sample fast
enough, x(n) contains all
information about x(t)
f
s
> 2f
sig,max
How to reconstruct x(t) from x(n)?
Ideal interpolation formula
A
m
p
l
i
t
u
d
e
Time
T
s
=1/f
s
Discrete time representation x(n)
Analog signal x(t)
s
n
x( t ) x( n) g( t nT )
=
=
s
s
sin( f t )
g( t )
f t
=
=
1
d
s s
n
n
X ( f ) X f
T T
=
 
=

\ .
p
j fT
p p
p
s p s n
T sin( fT )
n
X (f ) e X f
T fT T
 
=

\ .
Amplitude Envelope
B. Murmann 20 EE315B  Chapter 2
Envelope with Hold Pulse T
p
=T
s
0 0.5 1 1.5 2 2.5 3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
f/fs
a
b
s
(
H
(
f
)
)
f/f
s
p p
s p
T sin( fT )
T fT
T
p
=T
s
T
p
=0.5T
s
B. Murmann 22 EE315B  Chapter 2
Example
Spectrum of
Continuous Time
Pulse Train (Arbitrary
Example)
ZOH Transfer
Function
("Sinc Distortion")
ZOH output,
Spectrum of
Staircase
Approximation
0 0.5 1 1.5 2 2.5 3
0
0.5
1
0 0.5 1 1.5 2 2.5 3
0
0.5
1
0 0.5 1 1.5 2 2.5 3
0
0.5
1
f/f
s
original spectrum
B. Murmann 23 EE315B  Chapter 2
Reconstruction Filter
Also called
smoothing filter
Same situation
as with antialias
filter
A brick wall
filter would be
nice
Oversampling
helps reduce
filter order
0 0.5 1 1.5 2 2.5 3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
f/f
s
S
p
e
c
t
r
u
m
Filter
B. Murmann 24 EE315B  Chapter 2
Summary
Must obey sampling theorem f
s
> 2f
sig
,
max,
Usually dictates antialiasing filter
If sampling theorem is met, continuous time signal can be
recovered from discrete time sequence without loss of
information
A zero order hold in conjunction with a smoothing filter is the
most common way to reconstruct
May need to add pre or postemphasis to cancel droop due
to sinc envelope
Oversampling helps reduce order of antialiasing and
reconstruction filters
B. Murmann 25 EE315B  Chapter 2
Recap
Next, look at
Transfer functions of quantizer and DAC
Impact of quantization error
2, 7, 0, 15, ...
Antialias
Filtering
Sampling
Analog
In
Quantization
Reconstruction
Filtering
DAC Analog
Hold
Digital
In
Analog
Out
D A
Digital
Out
2, 7, 0, 15, ...
A/D
Conversion
D/A
Conversion
B. Murmann 26 EE315B  Chapter 2
Quantization of an Analog Signal
Quantization step
Quantization error has
sawtooth shape
Bounded by /2, +/2
Ideally
Infinite input range and
infinite number of
quantization levels
In practice
Finite input range and
finite number of
quantization levels
Output is a digital word
(not an analog voltage)
+/2
/2
x (input)
e
q
(
q
u
a
n
t
i
z
a
t
i
o
n
e
r
r
o
r
)
Error e
q
=qx
x (input)
V
q
(
q
u
a
n
t
i
z
e
d
o
u
t
p
u
t
)
Transfer Function
Slope=1
B. Murmann 27 EE315B  Chapter 2
Conceptual Model of a Quantizer
Encoding block determines how quantized levels are mapped
into digital codes
Note that this model is not meant to represent an actual
hardware implementation
Its purpose is to show that quantization and encoding are
conceptually separate operations
Changing the encoding of a quantizer has no interesting
implications on its function or performance
+ Encoding
V
in
e
q
D
out
V
q
B bits
B. Murmann 28 EE315B  Chapter 2
+/2
/2
x (input)
e
q
(
q
u
a
n
t
i
z
a
t
i
o
n
e
r
r
o
r
)
Encoding Example for a BBit Quantizer
Example: B=3
2
3
=8 distinct output codes
Diagram on the left shows
"straightbinary encoding"
See e.g. Analog Devices "MT
009: Data Converter Codes" for
other encoding schemes
http://www.analog.com/en/content/0
,2886,760%255F788%255F91285,
00.html
Quantization error grows out of
bounds beyond code boundaries
We define the full scale range
(FSR) as the maximum input range
that satisfies e
q
 /2
Implies that FSR=2
B
000
001
010
011
100
101
110
111
Analog Input
D
i
g
i
t
a
l
O
u
t
p
u
t
FSR
B. Murmann 29 EE315B  Chapter 2
Nomenclature
Overloading  Occurs when an input outside
the FSR is applied
Transition level Input value at the
transition between two codes. By standard
convention, the transition level T(k) lies
between codes k1 and k
Code width The difference between
adjacent transition levels. By standard
convention, the code width W(k)=T(k+1)T(k)
Note that the code width of the first and
last code (000 and 111 on previous slide)
is undefined
LSB size (or width) synonymous with
code width
[IEEE Standard 12412000]
B. Murmann 30 EE315B  Chapter 2
Implementation Specific Technicalities
So far, we avoided specifying the absolute location of the code
range with respect to "zero" input
The zero input location depends on the particular
implementation of the quantizer
Bipolar input, midrise or midtread quantizer
Unipolar input
The next slide shows the case with
Bipolar input
The quantizer accepts positive and negative inputs
Represents the common case of a differential circuit
Midrise characteristic
The center of the transfer function (zero), coincides with a
transition level
B. Murmann 31 EE315B  Chapter 2
Bipolar MidRise Quantizer
Nothing new here
000
001
010
011
100
101
110
111
Analog Input
D
i
g
i
t
a
l
O
u
t
p
u
t
0 FSR/2
+FSR/2
B. Murmann 32 EE315B  Chapter 2
Bipolar MidTread Quantizer
In theory, less sensitive to infinitesimal disturbance around zero
In practice, offsets larger than /2 (due to device mismatch)
often make this argument irrelevant
Asymmetric fullscale range, unless we use odd number of codes
000
001
010
011
100
101
110
111
Analog Input
D
i
g
i
t
a
l
O
u
t
p
u
t
0
FSR/2  /2 FSR/2 + /2
B. Murmann 33 EE315B  Chapter 2
Unipolar Quantizer
Usually define origin where first code and straight line fit intersect
Otherwise, there would be a systematic offset
Usable range is reduced by /2 below zero
000
001
010
011
100
101
110
111
Analog Input
D
i
g
i
t
a
l
O
u
t
p
u
t
0
FSR  /2
B. Murmann 34 EE315B  Chapter 2
Effect of Quantization Error on Signal
Two aspects
How much noise power does quantization add to samples?
How is this noise power distributed in frequency?
Quantization error is a deterministic function of the signal
Should be able answer above questions using a
deterministic analysis
But, unfortunately, such an analysis strongly depends on the
chosen signal and can be very complex
Strategy
Build basic intuition using simple deterministic signals
Next, abandon idea of deterministic representation and
revert to a "general" statistical model (to be used with
caution!)
B. Murmann 35 EE315B  Chapter 2
Ramp Input
Applying a ramp signal (periodic sawtooth) at the input of the
quantizer gives the following time domain waveform for e
q
What is the average power of this waveform?
Integrate over one period
2
2 2
2
1
T /
q q
T /
e e ( t )dt
T
=
q
e ( t ) t
T
=
2
2
12
q
e
=
0 50 100 150
0.4
0.2
0
0.2
0.4
0.6
Time [arbitrary units]
e
q
(
t
)
[
]
B. Murmann 36 EE315B  Chapter 2
Sine Wave Input
Integration is not straightforward
0 0.2 0.4 0.6 0.8 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
Time [arbitrary units]
[
V
o
l
t
s
]
0 0.2 0.4 0.6 0.8 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
Time [arbitrary units]
e
q
(
t
)
[
]
V
in
V
q
B. Murmann 37 EE315B  Chapter 2
Quantization Error Histogram
Sinusoidal input signal with f
sig
=101Hz, sampled at f
s
=1000Hz
8bit quantizer
0.6 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 0.6
0
20
40
60
80
100
120
Mean=0.000LSB, Var=1.034LSB
2
/12
e
q
/
C
o
u
n
t
Distribution is "almost" uniform
Can approximate average power by integrating uniform
distribution
B. Murmann 38 EE315B  Chapter 2
Statistical Model of Quantization Error
Assumption: e
q
(x) has a uniform probability density
This approximation holds reasonably well in practice when
Signal spans large number of quantization steps
Signal is "sufficiently active"
Quantizer does not overload
/2
p(e
q
)
/2
e
q
1/
2 2
2
2
2
12
/
q
q q
/
e
e de
+
= =
2
2
0
/
q
q q
/
e
e de
+
= =
Mean
Variance
B. Murmann 39 EE315B  Chapter 2
Reality Check (1)
Input sequence consists of 1000 samples drawn from Gaussian
distribution, 4=FSR
0.6 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 0.6
0
50
100
150
Mean=0.004LSB, Var=1.038LSB
2
/12
e
q
/
C
o
u
n
t
Error power close to that of uniform approximation
B. Murmann 40 EE315B  Chapter 2
Reality Check (2)
Another sine wave example, but now f
sig
/f
s
=100/1000
What's going on here?
0.6 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 0.6
0
100
200
300
400
500
Mean=0.000LSB, Var=0.629LSB
2
/12
e
q
/
C
o
u
n
t
B. Murmann 41 EE315B  Chapter 2
Analysis (1)
Sampled signal is repetitive and has only a few distinct values
This also means that the quantizer generates only a few
distinct values of e
q
; not a uniform distribution
Time
A
m
p
l
i
t
u
d
e
f
sig
/f
s
=100/1000
B. Murmann 42 EE315B  Chapter 2
Analysis (2)
( )
in
sig
s
f
v n cos 2 n
f
 
=

\ .
Signal repeats every m samples, where m is the smallest
integer that satisfies
in
s
f
m integer
f
=
101
m integer m 1000
1000
100
m integer m 10
1000
= =
= =
This means that e
q
(n) has at best 10 distinct values, even if we
take many more samples
B. Murmann 43 EE315B  Chapter 2
SignaltoQuantizationNoise Ratio
Assuming uniform distribution of e
q
and a fullscale sinusoidal
input, we have
2
B
sig
2B
2
qnoise
1 2
2 2 P
SQNR 1.5 2 6.02B 1.76 dB
P
12
 


\ .
= = = = +
B. Murmann 47 EE315B  Chapter 2
Ideal DAC
Essentially a digitally controlled voltage, current or charge source
Example below is for unipolar DAC
Ideal DAC does not introduce quantization error!
V
out
D
in
000 001 010 011 100 ...
...
= =
Now calculate DNL(k) for each code k using
avg
avg
W(k) W
DNL(k)
W
=
B. Murmann 56 EE315B  Chapter 2
Result
Positive/negative DNL implies wide/narrow code, respectively
DNL = 1 LSB implies missing code
Impossible to have DNL < 1 LSB for an ADC
But possible to have DNL > +1 LSB
Can show that sum over all DNL(k) is equal to zero
Code (k) DNL [LSB]
1 0.09
2 0.45
3 0.09
4 0.64
5 1.00
6 0.64
B. Murmann 57 EE315B  Chapter 2
A Typical ADC DNL Plot
People speak about DNL often only in terms of min/max number
across all codes
E.g. DNL = +0.63/0.91 LSB
Might argue in some cases that any code with DNL < 0.9 LSB
is essentially a missing code
Why ?
[Ahmed, JSSC 12/2005]
B. Murmann 58 EE315B  Chapter 2
Impact of Noise
In essentially all moderate to highresolution ADCs, the transition
levels carry noise that is somewhat comparable to the size of an LSB
Noise "smears out" DNL, can hide missing codes
Especially for converters whose input referred (thermal) noise is
larger than an LSB, DNL is a "fairly useless" metric
[W. Kester, "ADC Input Noise: The
Good, The Bad, and The Ugly. Is
No Noise Good Noise?" Analogue
Dialogue, Feb. 2006]
B. Murmann 59 EE315B  Chapter 2
DAC DNL
Same idea applies
Find output increments for each digital code
Find increment that divides range into equal steps
Calculate DNL for each code k using
avg
avg
Step(k) Step
DNL(k)
Step
=
One difference between ADC and DAC is that DAC DNL can be
less than 1 LSB
How ?
B. Murmann 60 EE315B  Chapter 2
NonMonotonic DAC
In a DAC, DNL < 1LSB implies nonmonotinicity
How about a nonmonotonic ADC?
V
out
[V]
D
in
0
1
2
3
4
5
0 1 2 3 4 5
avg
avg
Step(3) Step
DNL(3)
Step
0.5V 1V
1.5LSB
1V
=
= =
B. Murmann 61 EE315B  Chapter 2
NonMonotonic ADC
D
out
V
in
[V]
1 2 3 4 5 6 7 8
0
1
2
3
4
5
Code 2 has two transition levels W(2) is ill defined
DNL is illdefined!
Not a very big issue, because a nonmonotonic ADC is usually
not what we'll design for in practice
B. Murmann 62 EE315B  Chapter 2
Integral Nonlinearity (INL)
General idea
For each "relevant point" of the transfer characteristic,
quantify distance from a straight line drawn through the
endpoints
An alternative, less common definition uses a least square fit
line as a reference
Just as with DNL, the INL of a converter is by definition
independent of gain and offset errors
D
out
V
in
V
out
D
in
INL
INL
ADC DAC
B. Murmann 63 EE315B  Chapter 2
ADC INL Example (1)
D
out
V
in
0
1
2
3
4
5
6
7
T(1) T(7) ...
0
INL(4)
"Straight line" reference
is uniform staircase
between first and last
transition
INL for each code is
uniform
avg
T(k) T (k)
INL(k)
W
=
Obviously INL(1) = 0
and INL(7) = 0
INL(0) is undefined
B. Murmann 64 EE315B  Chapter 2
ADC INL Example (2)
Can show that
k 1
i 1
INL(k) DNL(i)
=
=
Means that once we computed DNL, we can easily find INL
using a cumulative sum operation on the DNL vector
Using DNL values from last lecture, we find
Code (k) DNL [LSB] INL [LSB]
1 0.09 0
2 0.45 0.09
3 0.09 0.36
4 0.64 0.27
5 1.00 0.36
6 0.64 0.64
7 undefined 0
B. Murmann 65 EE315B  Chapter 2
Result
B. Murmann 66 EE315B  Chapter 2
A Typical ADC DNL/INL Plot
DNL/INL signature often reveals architectural details
E.g. major transitions
We'll see more examples in the context of DACs
Since INL is a cumulative measure, it turns out to be less
sensitive than DNL to thermal noise "smearing"
[Ishii, Custom
Integrated Circuits
Conference, 2005]
B. Murmann 67 EE315B  Chapter 2
DAC INL
Same idea applies
Find ideal output values that lie on a straight line between
endpoints
Calculate INL for each code k using
out outuniform
avg
V (k) V (k)
INL(k)
Step
=
Interesting property related to DAC INL
If for all codes INL < 0.5 LSB, it
follows that all DNL < 1 LSB
A sufficient (but not necessary)
condition for monotonicity
+0.5 LSB
0.5 LSB
Much more than documents.
Discover everything Scribd has to offer, including books and audiobooks from major publishers.
Cancel anytime.