Professional Documents
Culture Documents
Lecture 12
• Data Converters
– Data converter testing (continued)
• Measuring DNL & INL
– Servo-loop
– Code density testing (histogram testing)
• Dynamic tests
– Spectral testing Reveals ADC errors associated with
dynamic behavior i.e. ADC performance as a function of
frequency
• Direct Discrete Fourier Transform (DFT) based
measurements utilizing sinusoidal signals
• DFT measurements including windowing
• Relationship between: DNL & SNR, INL & SFDR
• Effective number of bits (ENOB)
Summary
ADC Differential Nonlinearity & Integral Nonlinearity
End-Point
1. Endpoints connected +0.5 LSB DNL error
7
2. Ideal characteristics 6
Digital Output Code
derived eliminating
offset & full-scale error 5
(same as for DNL) -1 LSB INL
4
3. DNL deviation of 3
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 2
How to measure DNL/INL?
• DAC:
– Simply apply digital codes and use a good voltmeter to
measure corresponding analog output
• ADC
– Not as simple as DAC need to find "decision levels", i.e.
input voltages at all code boundaries
• One way: Adjust voltage source to find exact code trip
points "code boundary servo"
• More versatile: Histogram testing
Apply a signal with known amplitude distribution and
analyze digital code distribution at ADC output
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 3
ADC
Output
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 4
Code Boundary Servo
• i1 and i2 are small,
111
010
• For a code input of
101, the ADC analog 001
input settles to the 000
code boundary shown
D 2D 3D 4D 5D 6D 7D
ADC Analog Input
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 5
ADC
Output
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 6
Code Boundary Servo
• A very good digital voltmeter (DVM)
measures the analog input voltage
corresponding to the desired code boundary
• DVMs have some interesting properties
– They can have very high resolutions (8½ decimal
digit meters are inexpensive)
– To achieve stable readings, DVMs average
voltage measurements over multiple 60Hz ac line
cycles to filter out pickup in the measurement loop
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 7
C2
• A magnified view of an
analog input glitch
follows …
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 8
Code Boundary Servo
• Just before the input is
sampled and
analog input
conversion starts, the
analog input is pretty
quiet
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 9
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 10
Code Boundary Servo
• A large C2 reduces the Good DVM
effect of kick-back
VREF fS
• At the expense of longer
measurement time R2
ADC
C2
EECS 247 Lecture 11: Intro. to Data Converters & Performance Metrics © 2010 H. K. Page 11
Histogram Testing
• Code boundary measurements are slow
– Long testing time
• Histogram testing
– Apply input with known pdf (e.g. ramp or sinusoid)
& quantize
– Measure output pdf
– Derive INL and DNL from deviation of measured
pdf from expected result
Ramp VREF
ADC PC
Time
0
1LSB =10mV
For 0.01LSB measurement
resolution: Analog
n =100 samples/code input
Digital Output
Example: Ideal ADC
Input/Output
Ramp slope: 10mV/msec
1LSB =10mV
Each ADC code1msec
Analog
input
fs =100kHz Ts=10msec
Time
Per code
Samples
n
# of
Digital
Output
Ramp Histogram
Example: Ideal 3-Bit ADC
200
ADC characteristics
ideal converter
7 180
6 160
Code Count
Digital Output Code
140
5
120
4
100
3
80
2 60
1 40
0 20
0
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7
ADC Input Voltage [D]
ADC output code
ADC characteristics
200
ideal converter
7 180
6 160
-0.4 LSB DNL
Digital Output Code
140
Code Count
5
120
4
100
3
+0.4 LSB INL 80
2
60
1 40
+0.4 LSB DNL
0 20
0 1 2 3 4 5 6 7 8 0 0 1 2 3 4 5 6 7
ADC Input Voltage [D] ADC output code
80
2- Compute average count/bin
(600/6=100 in this case) 60
40
20
0
0 1 2 3 4 5 6 7
ADC output code
3- Normalize: 1.4
- Divide histogram by 1
average count/bin
0.8
0.4
normalized code count 0.3
0.2
-0.1
-0.2
-0.3
-0.4 0 1 2 3 4 5 6 7
ADC output code
Digital Output
5
• Width of all codes derived from 4
measured DNL (Code=DNL +
1LSB) 3
2
• INL(deviation from a straight 1
line through the end points)- is
found 0
0 1 2 3 4 5 6 7
ADC Input Voltage
7 0.5
6 0
Digital Output Code
3 1
+0.4 LSB INL
INL [LSB]
2 0.5
1 0
+0.4 LSB DNL
-0.5
0
-1
0 1 2 3 4 5 6 7 1 2 3 4 5 6
ADC Input Voltage [D] Digital Output Code
• Solution: 500
Use sinusoidal test signal
(may need to filter out
harmonics)
Digital Output
At sinusoid midpoint crossings:
dv/dt max. ADC
Input/Output
least # of samples
Analog
At sinusoid amplitude peaks: input
dv/dt min.
highest # of samples
Digital
Output
Histogram Testing
Correction for Sinusoidal PDF
• Is it necessary to know the exact amplitude and offset
of sinusoidal input? No!
• References:
– [1] M. V. Bossche, J. Schoukens, and J. Renneboog,
“Dynamic Testing and Diagnostics of A/D Converters,” IEEE
Transactions on Circuits and Systems, vol. CAS-33, no. 8,
Aug. 1986.
– [2] IEEE Standard 1057
% cumulative histogram
% calculate inl
ch = cumsum(h);
inl= cumsum(dnl);
-1
0 500 1000 1500 2000 2500 3000 3500 4000
code
2 INL = +1.7 / -0.69 LSB
INL [LSB]
-1
0 500 1000 1500 2000 2500 3000 3500 4000
code
% converter model
DNL = +0.7 / -0.7 LSB
1
DNL [LSB]
B = 6; % bits
0.5
range = 2^(B-1) - 1;
% thresholds (ideal converter) 0
th = -range:range; % ideal thresholds
-0.5
th(20) = th(20)+0.7; % error
-1
-30 -20 -10 0 10 20 30
fs = 1e6;
fx = 494e3 + pi; % try fs/10!
C = round(100 * 2^B / (fs / fx));
INL = +0.7 LSB
0.8
INL [LSB]
t = 0:1/fs:C/fx;
0.4
x = (range+1) * sin(2*pi*fx.*t);
y = adc(x, th) - 2^(B-1);
0
hist(y, min(y):max(y)); -30 -20 -10 0 10 20 30
Clock
Generator
Clock
Generator
Bandpass
Signal or V in Notch
ADC DAC
Generator Lowpass Filter
Filter
Clock Spectrum
Generator Analyzer
Clock
Generator
x(t) x(k)
0 fs/2 fs
Amplitude
N = 100;
0
Magnitude [ dBFS ]
% spectrum 0
s = 20 * log10(abs(dft(y)/N/Afs*2));
-100
% drop redundant half
s = s(1:N/2); -200
% frequency vector (normalized to fs)
f = (0:length(s)-1) / N; -300
Note: Where does the -300dBFS noise 0 0.1 0.2 0.3 0.4 0.5
fx/fs Frequency [ f / fs]
floor come from?
“Another” Example …
1
Signal Amplitude
Signal Amplitude
sample blocks repeat every N 0.5
samples
0
• With a non-integer number of signal
periods within the observation -0.5
window, the input yields significant
amplitude/phase discontinuity at the -1
0 0.4 0.8 1.2 -4
block boundary Time x 10
DFT Perceived Signal
• This energy spreads into other 1
Signal Amplitude
frequency bins as “spectral leakage”
0.5
• Spectral leakage can be eliminated
0
by either
1. Choice of integer number of -0.5
sinusoids in each block
2. Windowing -1
0 0.4 0.8 1.2 -4
Time x 10
Frequency Spectrum
Integer # of Cycles versus Non-Integer # of Cycles
Integer number of cycles Non-integer number of cycles
1
1
Signal Amplitude
Signal Amplitude
0.5
0.5
0
0
-0.5
-0.5
-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 -1
0 0.2 0.4 0.6 0.8 1 1.2 1.4
Time -4 -4
x 10 Time x 10
0 -10
Amplitude [ dBFS ]
Amplitude [ dBFS ]
-20
-100
-30
-200
-40
-300
-50
-400 -60
0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5
Frequency [ f / f s] Frequency [ f / f s]
Signal Amplitude
spectrum leakage problem: 1
0.5
– Number of Cycles 0
integer
-0.5
-1
– N/cycles = fs / fx Time
non-integer (choose
prime # of cycles)
otherwise quant. noise N/cycles = fs / fx=5.55 non-integer
1
Signal Amplitude
periodic and non-random
0.5
– Preferable to have N: 0
power of 2 (FFT instead of
-0.5
DFT)
-1
Time
Amplitude [ dB ]
• Noise (this example numerical -100
quantization noise) occupies all
-150
other bins
-200
-350
0 0.1 0.2 0.3 0.4 0.5
• Alternative: windowing s]
Frequency [ f / fs]
Windowing
• Spectral leakage can be attenuated by “windowing”
time samples prior to the DFT
– Windows taper smoothly down to zero at the beginning and
the end of the observation window
– Time samples are multiplied by window coefficients on a
sample-by-sample basis
Convolution in frequency domain
1 20
0
0.8
Magnitude (dB)
Amplitude
-20
0.6
-40
0.4
-60
0.2 -80
0 -100
20 40 60 0 0.2 0.4 0.6 0.8
Samples Normalized Frequency ( rad/sample)
Windowed Data
Signal Amplitude
1
• Signal before windowing
0
0
• Windowing results Before windowing
[ dBFS ]
-20
in ~ 100dB
attenuation of -40
sidelobes -60
After windowing
“smeared” over -40
[ dBFS ]
several -80
(approximately 10) -120
bins 0 0.1 0.2 0.3 0.4 0.5
Frequency [ fx / fs]
Magnitude (dB)
0 Hann
0.8
Amplitude
0.6
0.4 -50
0.2
0 -100
20 40 60 0 0.2 0.4
Samples Normalized Frequency ( rad/sample)
Matlab code:
N=64;
wvtool(nuttallwin(N),hann(N));
• Windowing
– No restrictions on fx no need to have the signal locked to fs
Good for measurements w/o having the capability to lock f x to fs or
cases where input is not periodic
– Signal energy and its harmonics distributed over several DFT bins –
handle smeared-out harmonics with care!
– Requires more samples for a given accuracy
– Note that no windowing is equal to windowing with a rectangular
window!
– Asignal = 0dBFS
-60
-100
-120
0 0.1 0.2 0.3 0.4 0.5
f /fs
Amplitude [dbFS]
bx = N*fx/fs + 1;
-40
As = 20*log10(s(bx))
%set signal bin to 0
-60
s(bx) = 0;
An = 10*log10(sum(s.^2))
SNR = As - An -80
(Total noise)/N/2
-60
The DFT noise floor wrt total 30dB
noise: -80
-10log10(N/2) [dB]
-100
below the actual noise floor
-40
SDR = 76.4dB
• SNR=55.9dB SNDR = 55.1dB
-60 SFDR = 77.3dB
Amplitude [ dBFS ]
time) distributes the noise SNDR = 55.2dB SFDR = 78.5dB
• Signal-to-noise ratio
SNR = 10log[(Signal Power) /
(Noise Power)]
• SNDR Signal-to-(noise+distortion)
= 10log[S / (N+D)]
• Aliasing:
– fsignal = fx = 0.18 fs
– f2 = 2 f0 = 0.36 fs
– f3 = 3 f0 = 0.54 fs
0.46 fs
– f4 = 4 f0 = 0.72 fs
0.28 fs
– f5 = 5 f0 = 0.90 fs
0.10 fs
– f6 = 6 f0 = 1.08 fs
0.08 fs
Real
DNL [LSB]
0
INL [LSB]
1
-1
INLNot fully symmetric
-2 100 200 300 400 500 600 700 800 9001000
bin #
6
SNR
Degradation
4
[dB]
0
0 0.2 0.4 0.6 0.8 1
|DNL| [LSB]
Uniform DNL?
250
# of occurrences
200
150
100
50
0
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
DNL
68 1.76
11.0Bits
6.02
Above ADC is a 12bit ADC with ENOB=11bits
EECS 247 Lecture 12: Data Converters- Testing © 2010 H. K. Page 75
ENOB
• At best, we get "ideal" ENOB only for
negligible thermal noise, DNL, INL