45
Department of Electrical and Computer Engineering © Vishal Saxena -1- Data Converter Basics Vishal Saxena, Boise State University ([email protected])

Data Converter Basicsvsaxena/courses/ece614... · 2020. 2. 18. · SQNR= = =1.5 2 , σ Δ 12 Assume V in is sinusoidal with V p-p = V FS, SQNR=6.02 N+1.76 dB N (bits) SQNR (dB) 8

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

  • Department of Electrical and Computer Engineering

    © Vishal Saxena -1-

    Data Converter Basics

    Vishal Saxena, Boise State University([email protected])

  • © Vishal Saxena -2-

    Data Converters

    DACADC DSP/FPGAC/assembly code/

    ASIC

    Analog(real world)

    Analog(real world)

    Digital Signal Processing(simulated world)

    Interface Electronics(ADC or DAC )

    Real world: Continuous-time, continuous-amplitude signals Digital world: Discrete-time, discrete-amplitude signal

    representation Interface circuits: ADC and DACs

  • © Vishal Saxena -3-

    Data Conversion Scenarios

    Any application using a sensor and/or an actuator Wireless: RF Rx and Tx chain Twisted pair: ADSL modem Coaxial: Cable modem Serial/Optical links: 10G+ ADC for modulation and equalization Audio Recording: 24-bit stereo ADCs Audio players: stored data to speaker (audio DAC) HDD read channel: Magnetic disk to microprocessor Biomedical applications (e.g. sensing blood glucose level and

    actuating the insulin pump),......... Speed and resolution requirements vary with the

    application.

  • © Vishal Saxena -4-

    Analog-to-Digital Converter (ADC)

  • © Vishal Saxena -5-

    A/D and D/A Conversion

    S/H

    Analogin

    Digitalout

    Quantization

    DSP

    AAF

    A/D Conversion

    D/A Conversion

  • © Vishal Saxena -6-

    Quantization Error

    FSout in out inN

    Vε =D Δ - V =D - V2

    FSN

    VΔ = =LSB2

    in FSV 0, V

    Δ Δ- ε2 2

    Dout

    0

    Vin

    Δ 2Δ 3Δ

    1

    3

    5

    0

    2

    4

    6

    7

    VFS2

    -Δ-2Δ-3Δ

    VFS2

    “Random” quantization error is usually regarded as noise

    N = 3

  • © Vishal Saxena -7-

    Quantization Noise

    Δ /2 2

    2 2ε

    -Δ/2

    1 Δσ = ε dε =Δ 12

    0-Δ/2 Δ/2ε

    1/Δ

    Assumptions:• N is large• 0 ≤ Vin ≤ VFS and Vin >> Δ• Vin is active• ε is Uniformly distributed• Spectrum of ε is white

  • © Vishal Saxena -8-

    Signal-to-Quantization Noise Ratio (SQNR)

    2N22NFS

    22ε

    2 Δ / 8V / 8SQNR = = =1.5 2 ,Δσ12

    Assume Vin is sinusoidal with Vp-p = VFS,

    SQNR = 6.02 N+1.76 dB

    N(bits)

    SQNR(dB)

    8 49.910 62.012 74.014 86.0

    • SQNR depicts the theoretical performance of an ideal ADC

    • In reality, ADC performance is limited by many other factors:– Electronic noise (thermal, 1/f, coupling/substrate, etc.)– Distortion (measured by THD, SFDR, IM3, etc.)

  • © Vishal Saxena -9-

    Spectral Estimation Techniques

  • © Vishal Saxena -10-

    Spectral Estimation

    Spectral estimation of signals is performed using DFT/FFT

    For a periodic signal , sampled with frequency fs sampled signal vout[n] is periodic only when all the harmonics satisfy

    or

    which implies

    m integral cycles of signal (fin) should fit in N cycles of fs• Coherent sampling• N- FFT bins and fs/N is the FFT resolution (bin size)

    21

    0[ ] [ ] ,

    jNnk N

    N Nk

    V k v n W W e

    2( ) sin(2 ) Im inj f tin inv t A f t e

    2 ( ) 2in ins s

    j kf n N j kf nf fe e

    2 2ins

    f N mf

    in

    s

    f mf N

  • © Vishal Saxena -11-

    Coherent Sampling

    0 5 10 15 20 25 30 35 40 45 50-1

    -0.5

    0

    0.5

    1

    samples (n)x[

    n]

    100 200 300 400 500 600 700 800 900 1000-350

    -300

    -250

    -200

    -150

    -100

    -50

    0

    FFT bins (k)

    20*lo

    g 10|

    X(k

    )|, d

    B

  • © Vishal Saxena -12-

    Non-Coherent Sampling : FFT leakage

    100 200 300 400 500 600 700 800 900 1000-350

    -300

    -250

    -200

    -150

    -100

    -50

    0

    FFT bins (k)

    20*lo

    g 10|

    X(k

    )|, d

    B

    129129.01129.001

  • © Vishal Saxena -13-

    Spectral Windows

    Spectral windows for reducing FFT leakage due to temporal discontinuity Lesser emphasis on the end of FFT frame and more importance to

    the signal in the middle Several FFT windows available in MATLAB

    Triangular (Bartlett), Hann, Hanning, Blackmann-Harris, etc.

    n0

    N-1

    Triangular Window

    Hann Window

  • © Vishal Saxena -14-

    Spectral Windows – Bartlett and Hann

    5 10 15 20 25 300

    0.2

    0.4

    0.6

    0.8

    1

    Samples

    Ampl

    itude

    Time domain

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9-150

    -100

    -50

    0

    50

    Normalized Frequency ( rad/sample)M

    agni

    tude

    (dB)

    Frequency domain

    Rectangular#1BartlettHann

    % Compare Rect, Bartlett and Hann windowsL = 32;wvtool(rectwin(L), bartlett(L), ds_hann(L));

    Hann window provides larger side-lobe suppression (30 dB) Signal tone occupies 3 FFT bins

  • © Vishal Saxena -15-

    Spectral Windows contd.

    5 10 15 20 25 300

    0.2

    0.4

    0.6

    0.8

    1

    Samples

    Ampl

    itude

    Time domain

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9-140

    -120

    -100

    -80

    -60

    -40

    -20

    0

    20

    40

    Normalized Frequency ( rad/sample)M

    agni

    tude

    (dB)

    Frequency domain

    Blackman-HarrisHann

    % Compare Blackman-Harris and Hann windowsL = 32;wvtool(blackmanharris(L), ds_hann(L));

    Blackmann-Harris provides largest sidelobe suppression (50 dB) Signal tone occupies 5 FFT bins

  • © Vishal Saxena -16-

    FFT with Windowing

    100 200 300 400 500 600 700 800 900 1000-200

    -150

    -100

    -50

    0

    50

    100

    FFT bins (k)

    20*lo

    g 10|

    X(k

    )|, d

    B

    RectHannBlackman-Harris

    Hann is suitable for simulated data with exact or near coherent sampling

    Blackmann-Harris is best for experimental data where coherent sampling can’t be enforced

  • © Vishal Saxena -17-

    Quantizer Spectrum and Noise-Shaping

  • © Vishal Saxena -18-

    Quantizer Modeling

    Quantization noise modeling can be simplified with the assumptions Input (y) stays within the no-overload input range e[n] is uncorrelated with the input y Spectrum of e[n] is white Quantization noise is uniformly distributed

    Linearized quantizer model AWUN noise

    Quantization noise power:

    SQNR = 6.02·N + 1.76

    22

    12e

  • © Vishal Saxena -19-

    Quantizer Modeling Contd.

    Linear quantizer model holds true for large number of quantization levels and when the input is varying fast

    Linear quantizer model breaks down when Input (y) is not varying fast Input (y) is periodic with a frequency harmonically related to fs Quantizer overload

    With quantizer overload, the effective gain of the quantizer drops as the input amplitude increases

  • © Vishal Saxena -20-

    Mid-Rise Quantizer (even number of levels)

    Step rising at y=0 (mid-rise). In this figure, LSB= Δ= 2 M = Number of steps, (M is odd here)

    Number of levels (nLev) = M+1, (even) Input thresholds: 0, ±2, ……, ±(M–1). Output levels: ±1, ±3, ……, ±M.

  • © Vishal Saxena -21-

    Mid-Tread Quantizer (odd number of levels)

    Flat part of the step at y=0 (mid-tread). Here, LSB= Δ= 2 M = Number of steps, (M is even here)

    • Number of levels (nLev) = M+1, (odd) Input thresholds: 0, ±2, ……, ±(M–1). Output levels: 0, ±2, ±4, ……, ±M.

  • © Vishal Saxena -22-

    Quantizer Characteristics : Slow ramp input

    0 100 200 300 400 500 600 700 800-40

    -20

    0

    20

    40

    samples

    Quantization

    y[n]v[n]

    0 100 200 300 400 500 600 700 800-10

    -5

    0

    5

    10

    samples

    e[n]

  • © Vishal Saxena -23-

    Quantizer Characteristics : Sine input

    0 100 200 300 400 500 600 700 800-10

    -5

    0

    5

    10

    samples

    Quantization

    y[n]v[n]

    0 100 200 300 400 500 600 700 800-1

    -0.5

    0

    0.5

    1

    samples

    e[n]

  • © Vishal Saxena -24-

    Quantization Noise : Example 1

    5 10 15 20 25 30-20

    -10

    0

    10

    20

    samples

    Quantization

    y[n]v[n]

    5 10 15 20 25 30-1

    -0.5

    0

    0.5

    1

    E(e2) = 0.304

    samples

    e[n]

    50 100 150 200 2500

    10

    20

    30

    40

    50

    60

    70

    80

    FFT bins (k)

    20*lo

    g 10|

    V(k

    )|, d

    B

    Quantized Signal Spectrum

    V[k]

    nLev=17, Δ=2, fin/fs = 9/256 :

    •E(e2) = 0.304 ≈ Δ2/12

  • © Vishal Saxena -25-

    Quantization Noise : Example 1 contd.

    nLev=17, Δ=2, fin/fs = 9.1/256 :

    •E(e2) = 0.295 ≈ Δ2/12

    •Notice the FFT leakage.

    5 10 15 20 25 30-20

    -10

    0

    10

    20

    samples

    Quantization

    y[n]v[n]

    5 10 15 20 25 30-1

    -0.5

    0

    0.5

    1

    E(e2) = 0.295

    samples

    e[n]

    50 100 150 200 2500

    10

    20

    30

    40

    50

    60

    70

    80

    FFT bins (k)

    20*lo

    g 10|

    V(k

    )|, d

    B

    Quantized Signal Spectrum

    V[k]

  • © Vishal Saxena -26-

    Quantization Noise : Example 1 contd.

    nLev=17, Δ=2, fin/fs = 32/256 = 1/8 :

    •E(e2) = 0.235 < Δ2/12

    •Quantization noise approximation not valid

    50 100 150 200 2500

    10

    20

    30

    40

    50

    60

    70

    80

    FFT bins (k)

    20*lo

    g 10|

    V(k

    )|, d

    B

    Quantized Signal Spectrum

    V[k]

    5 10 15 20 25 30-20

    -10

    0

    10

    20

    samples

    Quantization

    y[n]v[n]

    5 10 15 20 25 30-1

    -0.5

    0

    0.5

    1

    E(e2) = 0.235

    samples

    e[n]

  • © Vishal Saxena -27-

    FFT Spectrum of Quantized Signal

    • N = 10 bits

    • 8192 samples, onlyf = [0, fs/2] shown

    • Normalized to Vin• fs = 8192, fin = 779

    • fin and fs must beincommensurate

    0 500 1000 1500 2000 2500 3000 3500 4000-120

    -100

    -80

    -60

    -40

    -20

    0

    PSD

    Frequency

    dB

    SQNR -1.76 dBENOB =6.02 dB

    SQNR = 61.93 dBENOB = 9.995 bits

  • © Vishal Saxena -28-

    Spectrum Leakage

    0 500 1000 1500 2000 2500 3000 3500 4000-120

    -100

    -80

    -60

    -40

    -20

    0

    PSD

    Frequency

    dB

    0 500 1000 1500 2000 2500 3000 3500 4000-120

    -100

    -80

    -60

    -40

    -20

    0

    PSD

    Frequency

    dB

    fs = 8192fin = 779.3

    fs = 8192fin = 779.3

    • TD samples must include integer number of cycles of input signal

    • Windowing can be applied to eliminate spectrum leakage

    • Trade-off between main-lobe width and sideband rejection for different windows

    w/Blackmanwindow

  • © Vishal Saxena -29-

    FFT Spectrum with Distortion

    0 500 1000 1500 2000 2500 3000 3500 4000-120

    -100

    -80

    -60

    -40

    -20

    0

    PSD

    Frequency

    dB

    • High-order harmonics are aliased back, visible in [0, fs/2] band

    • E.g., HD3 @ 779x3+1=2338, HD9 @ 8192-9x779+1=1182

    HD3HD9

  • © Vishal Saxena -30-

    Dynamic Performance

    • Peak SNDR limited by large-signal distortion of the converter

    • Dynamic range implies the “theoretical” SNR of the converter

    2in

    10 2 2N

    in

    SNR

    V / 2=10LOGΔ /12+σ

    V dB

  • © Vishal Saxena -31-

    Dynamic Performance Metrics

    • Signal-to-quantization-noise ratio (SQNR)

    • Total harmonic distortion (THD)

    • Signal-to-noise and distortion ratio (SNDR or SINAD)

    • Spurious-free dynamic range (SFDR)

    • Two-tone intermodulation product (IM3)

    • Aperture uncertainty (related to the frontend S/H and clock)

    • Dynamic range (DR)

  • © Vishal Saxena -32-

    Evaluating Dynamic Performance

    0 500 1000 1500 2000 2500 3000 3500 4000-120

    -100

    -80

    -60

    -40

    -20

    0

    PSD

    Frequency

    dB

    • Signal-to-noiseplus distortion ratio(SNDR)

    • Total harmonicdistortion (THD)

    • Spurious-freedynamic range(SFDR)

    SNDR = 59.16 dBTHD = 63.09 dBSFDR = 64.02 dBENOB = 9.535 bits

    HD3HD9

    SNDR -1.76 dBENOB =6.02 dB

  • © Vishal Saxena -33-

    Static Performance Metrics

    • Offset (OS)

    • Gain error (GE)

    • Monotonicity

    • Linearity– Differential nonlinearity (DNL)

    – Integral nonlinearity (INL)

  • © Vishal Saxena -34-

    Ideal ADC Transfer Characteristic

    out

    000 in

    001

    011

    101

    010

    100

    110

    111

    FSFS

    Note the systematic offset! (floor, ceiling, and round)

  • © Vishal Saxena -35-

    DNL and Missing Code

    out

    000 in

    001

    011

    101

    010

    100

    110

    111

    FSFS

    DNL = deviation of an input step width from 1 LSB (= VFS/2N = Δ)

    • DNL = ?

    • Can DNL < -1?

    th

    ii Step Size -ΔDNL =

    Δ

  • © Vishal Saxena -36-

    DNL and Nonmonotonicity

    out

    000 in

    001

    011

    101

    010

    100

    110

    111

    FSFS

    DNL = deviation of an input step width from 1 LSB (= VFS/2N = Δ)

    • DNL = ?

    • How can we even measure this?

  • © Vishal Saxena -37-

    INL

    out

    000 in

    001

    011

    101

    010

    100

    110

    111

    FSFS

    INL = deviation of the step midpoint from the ideal step midpoint

    (method I and II …)

    Any code

    • Missing?

    • Nonmonotonic?

    i

    i jj=0

    INL = DNL

  • © Vishal Saxena -38-

    10-bit ADC Example

    0 200 400 600 800 1000-2

    -1

    0

    1

    2DNL

    LSB

    0 200 400 600 800 1000-2

    -1

    0

    1

    2INL

    Code

    LSB

    • 1024 codes

    • No missing code!

    • Plotted against the digital code, not Vin

  • © Vishal Saxena -39-

    Code Density Test

    000Vin

    001 011 101010 100 110 111

    VFS0

    Uniformly distributed 0 ≤ Vin ≤ VFS

    Δ

    n

    Δ

    n

    Δ

    n

    Δ

    n

    Δ

    n

    Δ

    n

    Δ

    n

    Δ

    n

    Ball casting problem: # of balls collected by each bin (ni) is proportional to the bin size (converter step size)

    th

    i ii

    i

    n - ni Step Size -ΔDNL =Δ n

    000Vin

    001 011 101010 100 110 111

    VFS0

    Uniformly distributed 0 ≤ Vin ≤ VFS

    ni

  • © Vishal Saxena -40-

    ADC Architectures

  • © Vishal Saxena -41-

    Nyquist-Rate ADC (N-Bit, Binary)

    • Word-at-a-time (1 step)† ← fast– Flash

    • Level-at-a-time (2N steps) ← slowest– Integrating (Serial)

    • Bit-at-a-time (N steps) ← slow– Successive approximation– Algorithmic (Cyclic)

    • Partial word-at-a-time (1 < M ≤ N steps) ← medium– Subranging– Pipeline

    • Others (1 ≤ M ≤ N step)– Folding ← relatively fast– Interleaving (of flash, pipeline, or SA) ← fastest

  • © Vishal Saxena -42-

    ADC Survey: Aperture

    http://www.stanford.edu/~murmann/adcsurvey.html

  • © Vishal Saxena -43-

    ADC Survey: Energy

    http://www.stanford.edu/~murmann/adcsurvey.html

  • © Vishal Saxena -44-

    ADC Survey: Figure of Merit

    http://www.stanford.edu/~murmann/adcsurvey.html

  • © Vishal Saxena -45-

    References1. Rudy van de Plassche, “CMOS Integrated Analog-to-Digital and Digital-to-Analog

    Converters,” 2nd Ed., Springer, 2005.2. M. Gustavsson, J. Wikner, N. Tan, CMOS Data Converters for

    Communications, Kluwer Academic Publishers, 2000.