Introduction To Delta-Sigma Adcs: Ece1371 Advanced Analog Circuits
Introduction To Delta-Sigma Adcs: Ece1371 Advanced Analog Circuits
Lecture 1
Introduction to Delta-Sigma ADCs
Trevor Caldwell
[email protected]
Course Goals
• Deepen understanding of CMOS analog circuit
design through a top-down study of a modern
analog system – a delta-sigma ADC
• Develop circuit insight through brief peeks at
some nifty little circuits of the day
The circuit world is filled with many little gems that
every competent designer ought to know
2 ECE1371
Logistics
• Format:
Meet Tuesdays 10:00-12:00 (no class Feb 16)
Twelve 2-hr Online Lectures + Exam + Project
Presentations
• Grading:
30% Homework (5%, 7.5%, 7.5%, 10%)
40% Project
30% Exam
• References
Pavan, Schreier & Temes, “Understanding …”
Chan Carusone, Johns & Martin, “Analog IC …”
Razavi, “Design of Analog CMOS ICs”
3 ECE1371
Lecture Plan
Date Lecture (10am-12pm) Reference Homework
2021-01-12 1 MOD1 & MOD2 PST 2, 3, A 1: Matlab MOD1&2
2021-01-19 2 MODN + Toolbox PST 4, B
2: Toolbox
2021-01-26 3 SC Circuits R 12, CCJM 14
2021-02-02 4 Comparator & Flash ADC CCJM 10
3: Comparator
2021-02-09 5 Example Design 1 PST 7, CCJM 14
2021-02-16 Reading Week / ISSCC
4: SC MOD2
2021-02-23 6 Example Design 2 CCJM 18
2021-03-02 7 Amplifier Design 1
2021-03-09 8 Amplifier Design 2
2021-03-16 9 Noise in SC Circuits
2021-03-23 10 Nyquist-Rate ADCs CCJM 15, 17 Project
2021-03-30 11 Mismatch & MM-Shaping PST 6
2021-04-06 12 Continuous-Time PST 8
2021-04-13 Exam
2021-04-27 Project Presentation (Project Report Due at start of class)
4 ECE1371
What you will learn…
• MOD1: 1st-order modulator
Structure and theory of operation
• Inherent linearity of binary modulators
• Inherent anti-aliasing of continuous-time
modulators
• MOD2: 2nd-order modulator
• Good FFT practice
5 ECE1371
Background
• The Signal-to-Quantization Noise Ratio (SQNR)
of an ideal n-bit ADC with a full-scale sine-wave
input is (6.02n + 1.76) dB
“6 dB = 1 bit”
• The PSD at the output of a linear system is the
product of the input’s PSD and the squared
magnitude of the system’s frequency response
6 ECE1371
What is ?
• Simplified ADC structure
Loop Coarse
VIN + DOUT
- Filter ADC
7 ECE1371
What is Oversampling?
• Oversampling is sampling faster than required
by the Nyquist criterion
For a lowpass signal containing energy in the
frequency range (0, fB), the minimum sample rate
required for perfect reconstruction is fS = 2fB
• Oversampling Ratio 𝑺 𝑩
8 ECE1371
Oversampling Simplifies AAF
9 ECE1371
How The ADC Works
• Course quantization lots of quantization error
So how can a ADC achieve 22-bit resolution?
• A ADC spectrally separates the quantization
error from the signal through noise-shaping
10 ECE1371
A DAC System
11 ECE1371
Why Do It The Way?
• Simplified Anti-Alias Filter in ADC
Since the input is oversampled, only very high
frequencies alias to the passband
Simple RC filter is usually sufficient
If a continuous-time loop filter is used, the anti-alias
filter can often be eliminated altogether
DAC: Simplified Reconstruction Filter
Inherent Linearity
Simple structures can yield very high SNR
Robust Implementation
tolerates sizable component errors
12 ECE1371
MOD1: 1st-Order Modulator
13 ECE1371
MOD1 Analysis
• Exact analysis is intractable for all but the
simplest inputs, so treat the quantizer as an
additive noise source:
14 ECE1371
The Noise Transfer Function (NTF)
• In general, V(z) = STF(z)ꞏU(z) + NTF(z)ꞏE(z)
• For MOD1, NTF(z) = 1 – z-1
The quantization noise has spectral shape!
15 ECE1371
In-band Quantization Noise Power
• Assume the error is white with power 𝜎
i.e. 𝑺𝒆𝒆 𝝎 𝜎 /𝜋
• The in-band quatization noise power is
𝝎𝑩 𝝎𝑩
𝟐 𝝈𝟐𝒆
𝑰𝑸𝑵𝑷 𝑯 𝒆𝒋𝝎 𝑺𝒆𝒆 𝝎 𝒅𝝎 ≅ 𝝎𝟐 𝒅𝝎
𝟎 𝝅 𝟎
𝝅 𝝅𝟐 𝝈𝟐𝒆
• Since 𝑶𝑺𝑹 , 𝑰𝑸𝑵𝑷 𝑶𝑺𝑹 𝟑
𝝎𝑩 𝟑
• For MOD1, an octave increase in OSR increases
SQNR by 9 dB
1.5-bit/octave SQNR-OSR trade-off
16 ECE1371
A Simulation of MOD1 (Time)
17 ECE1371
A Simulation of MOD1 (Freq)
18 ECE1371
CT Implementation of MOD1
• Ri/Rf sets the full-scale; C is arbitrary
Ri, Rf are typically sized based on noise
Also observe that an input at fS is rejected by the
integrator – inherent anti-aliasing
19 ECE1371
MOD1-CT Waveforms
20 ECE1371
MOD1-CT STF
𝟏 𝒛 𝟏
• 𝑺𝑻𝑭 , recall 𝒛 𝒆𝒔
𝒔
21 ECE1371
MOD1-CT Frequency Responses
22 ECE1371
Summary
• works by spectrally separating the
quantization noise from the signal
Requires oversampling 𝑶𝑺𝑹 ≡ 𝒇𝑺 ⁄𝟐𝒇𝑩
• Noise-shaping is achieved by the use of filtering
and feedback
• A binary DAC is inherently linear, and thus a
binary modulator is too
𝟏
• MOD1 has 𝑵𝑻𝑭 𝒛 𝟏 𝒛
Arbitrary accuracy for DC inputs
1.5 bit/octave SQNR-OSR trade-off
• MOD1-CT has inherent anti-aliasing
23 ECE1371
MOD2: 2nd-Order Modulator
• Replace the quantizer in MOD1 with another
copy of MOD1 in a recursive fashion
24 ECE1371
Simplified Block Diagrams
25 ECE1371
NTF Comparison
26 ECE1371
In-Band Quantization Noise Power
𝒋𝝎 𝟐
• For MOD2, 𝑯 𝒆 𝝎𝟒
𝝎𝑩 𝒋𝝎 𝟐
• As before, 𝑰𝑸𝑵𝑷 𝟎
𝑯 𝒆 𝑺𝒆𝒆 𝝎 𝒅𝝎 and
𝑺𝒆𝒆 𝝎 𝝈𝟐𝒆 ⁄𝝅
𝝅𝟒 𝝈𝟐𝒆
• So now 𝑰𝑸𝑵𝑷 𝑶𝑺𝑹 𝟓
𝟓
With binary quantization to +/- 1, = 2 and thus
𝝈𝟐𝒆 ∆𝟐 ⁄𝟏𝟐 𝟏/𝟑
27 ECE1371
Simulation Example
• Input at 75% of Full Scale
28 ECE1371
Simulated MOD2 PSD
• Input at 50% of Full Scale
29 ECE1371
SQNR vs. Input Amplitude
• MOD1 & MOD2 @ OSR = 256
30 ECE1371
SQNR vs. OSR
31 ECE1371
Audio Demo: MOD1 vs. MOD2
• dsdemo4 in Matlab Toolbox
32 ECE1371
MOD1 and MOD2 Summary
• ADCs rely on filtering and feedback to
achieve high SNR despite coarse quantization
They also rely on digital signal processing
ADCs need to be followed by a digital decimation
filter and DACs need to be preceded by a digital
interpolation filter
• Oversampling eases analog filtering
requirements
Anti-alias filter in an ADC; image filter in a DAC
• Binary quantization yields inherent linearity
• MOD2 is better than MOD1
15 dB/octave vs 9 dB/octave SQNR-OSR trade-off
Quantization noise more white
Higher-order modulators are even better
33 ECE1371
Good FFT Practice
• Use coherent sampling
Have an integer number of cycles in the record
• Use windowing
A Hann window works well
𝒘 𝒏 𝟏 𝒄𝒐𝒔 𝟐𝝅𝒏⁄𝑵 /𝟐
34 ECE1371
Coherent vs Incoherent Sampling
35 ECE1371
Windowing
• data is usually not periodic
Just because the input repeats does not mean the
output does too!
• Windowing is unavoidable
A finite-length data record is equal to an infinite record
multiplied by a rectangular window 𝒘 𝒏 𝟏, 𝟎 𝒏 𝑵
• Multiplication in time is convolution in frequency
36 ECE1371
Example Spectral Disaster
• Rectangular window, N=256
37 ECE1371
Window Comparison (N=16)
38 ECE1371
Window Properties
39 ECE1371
Window Length, N
• Need to have enough in-band noise bins to
1. Make the number of signal bins a small fraction of the
total number of in-band bins
<20% signal bins >15 in-band bins 𝑵 𝟑𝟎 · 𝑶𝑺𝑹
2. Make the SNR repeatable
𝑵 𝟑𝟎 · 𝑶𝑺𝑹 yields std. dev. ~1.4 dB
𝑵 𝟔𝟒 · 𝑶𝑺𝑹 yields std. dev. ~1.0 dB
𝑵 𝟐𝟓𝟔 · 𝑶𝑺𝑹 yields std. dev. ~0.5 dB
• 𝑵 𝟔𝟒 · 𝑶𝑺𝑹 is recommended
40 ECE1371
FFT Scaling
• The FFT implemented in MATLAB is
𝑵 𝟏
𝟐𝝅𝒌𝒏
𝒋 𝑵
𝑿𝑴 𝒌 𝟏 𝒙𝑴 𝒏 𝟏 𝒆
𝒏 𝟎
• If 𝒙 𝒏 𝑨 sin 𝟐𝝅𝒇𝒏⁄𝑵 , then
𝑨𝑵
𝑿 𝒌 𝒌 𝒇 𝐨𝐫 𝑵 𝒇
𝟐
𝟎 𝐨𝐭𝐡𝐞𝐫𝐰𝐢𝐬𝐞
41 ECE1371
How To Do Smoothing
1. Average multiple FFTs
Implemented by MATLAB’s psd() function
2. Take one big FFT and “filter” the spectrum
Implemented by the Toolbox’s logsmooth()
function
logsmooth() averages an exponentially-increasing
number of bins in order to reduce the density of
points in the high-frequency regime and make a nice
log-frequency plot
42 ECE1371
Raw and Smoothed Spectra
43 ECE1371
Simulation vs Theory (MOD2)
44 ECE1371
What Went Wrong?
• We normalized the spectrum so that a full-scale
sine wave (which has a power of 0.5) comes out
at 0 dB (hence the ‘dBFS’ units)
We do the same for the error signal, use 𝑺𝒆𝒆 𝒇 𝟒⁄𝟑
But this makes the discrepancy 3 dB worse
• We tried to plot a power spectral density
together with something that we want to
interpret as a power spectrum
• Sine-wave components are located in individual
FFT bins, but broadband signals like noise have
their power spread over all FFT bins
The ‘noise floor’ depends on the length of the FFT
45 ECE1371
Spectrum of a Sine Wave + Noise
46 ECE1371
Observations
• The power of the sine wave is given by the
height of its spectral peak
• The power of the noise is spread over all bins
The greater the number of bins, the less power there is
in any one bin
• Doubling N reduces the power per bin by a
factor of 2 (i.e. 3 dB)
But the total integrated noise power does not change
47 ECE1371
How Do We Handle Noise?
• An FFT is like a filter bank
• The longer the FFT, the narrower the bandwidth
of each filter and thus the lower the power at
each output
• We need to know the noise bandwidth (NBW) of
the filters in order to convert the power in each
bin (filter output) to a power density
• For a filter with frequency response H(f),
48 ECE1371
FFT Noise Bandwidth
• Alternatively, for 𝒉 𝟏 as the L1-norm and 𝒉 𝟐
as the L2-norm
𝟐 𝟐
𝑯 𝒇 𝒅𝒇 𝒉 𝟐
𝑵𝑩𝑾 𝟐 𝟐
, 𝒇𝟎 𝟎
𝑯 𝟎 𝒉 𝟏
• Parseval’s theorem
𝟐 𝟐
𝑯 𝒇 𝒅𝒇 𝒉 𝒏
• If 𝒉 𝒏 𝟎
𝑯 𝟎 𝒉 𝒏
49 ECE1371
Better Spectral Plot
50 ECE1371
Homework #1 (Due Jan 26)
A. Create a Matlab function that computes MOD1’s
output sequence given a vector of input
samples and exercise your function in the
following ways:
1. Verify that 𝒗 𝒖 for a few random DC inputs in [-1,1]
2. Plot the output spectrum with a half-scale sine-wave
input. Use good FFT practice. Include the theoretical
quantization noise curve and list the theoretical and
simulated SQNR for OSR = 128.
51 ECE1371
MOD2 Expanded
52 ECE1371
Example Matlab Code
function [v] = simulateMOD2(u)
x1 = 0;
x2 = 0;
for i = 1:length(u)
v(i) = quantize(x2);
x1 = x1 + u(i) – v(i);
x2 = x2 + x1 – v(i);
end
return
function v = quantize(y)
if y>=0
v = 1;
else
v = -1;
end
return
53 ECE1371
What You Learned Today
• MOD1: 1st-order modulator
Structure and theory of operation
• Inherent linearity of binary modulators
• Inherent anti-aliasing of continuous-time
modulators
• MOD2: 2nd-order modulator
• Good FFT practice
54 ECE1371