You are on page 1of 15

Overview

Data Converters

• Introduction
• The ideal Data Converter
Introduction • Sampling
• Amplitude quantization
• Quantization noise
• kT/C noise
Pietro Andreani
• Discrete and Fast Fourier Transform (FFT)
Dept. of Electrical and Information Technology
Lund University, Sweden • The D/A converter
• z-transform

Data Converters Introduction 2

The ideal data converter Sampling

A sampler transforms a continuous-time signal into a sampled-


data equivalent:

x∗ ( t ) = x∗ ( nT ) = ∑ x ( t ) ⋅ δ ( t − nT )

Transformation from continuous-amplitude and continuous-time to


discrete-amplitude and discrete-time (and viceversa)
Only the value at the sampling instant matters

Data Converters Introduction 3 Data Converters Introduction 4


Sampling as a non-linear process Spectrum folding – I

f ∗ ( t ) = f ( t ) ⋅ ∑ n =−∞ δ ( t − nT )

Sampled signal:

g ( t ) = ∑ n =−∞ δ ( t − nT )

We define: → f ∗ (t ) = f (t ) ⋅ g (t )

It is known that the transform of the product of two time functions is


given by the convolution of the respective transforms:
with Laplace/Fourier transform we obtain
f ( t ) ⋅ g ( t ) ↔ F (ω ) ∗ G (ω )
L ⎡⎣ ∑ δ ( t − nT ) ⎤⎦ = ∑ e − nsT
1 ∞ Train of deltas with period T Æ can be represented with Fourier series
L ⎡⎣ x∗ ( nT ) ⎤⎦ = ∑ n =−∞ x ( nT ) e − jnωT = ∑ X (ω − nωs )

as
T n =−∞

g ( t ) = ∑ n =−∞ δ ( t − nT ) = ∑ k =−∞ ak e kωs t +φk , ωs =
∞ ∞

ωs = T
T

Data Converters Introduction 5 Data Converters Specifications 6

Spectrum folding – II Is it possible to recover the original signal?


Using the complex Fourier series, we obtain:
bilateral spectrum of
1 1 T 1 continuous-time signal
∫ g (t ) e dt = ∫ δ ( t ) e jkωs t dt =
T
jkωs t
ak =
T 0 T 0 T

which means that the spectrum G(ω) of g(t) is a series of lines at


frequencies kωs , all with amplitude 1/T. This means that we can write ∑ X ( s − jnω )s
spectrum of sampled
signal, fs/2 > fB
G(ω) as
1 ∞
G (ω ) = ∑ δ ( ω − kω s )
T k =−∞
Finally:
aliasing! spectrum of sampled
1 ∞ 1 ∞ signal, fs/2 < fB
F ∗ (ω ) = F (ω ) ∗ G (ω ) = F (ω ) ∗ ∑ δ (ω − kωs ) = T ∑ k =−∞ F (ω − kωs )
T k =−∞

Data Converters Specifications 7 Data Converters Introduction 8


Aliasing Nyquist theorem

An infinite number of (higher frequency) signals can result in the


same sampled data!

A band-limited signal x(t), whose spectrum X(jω) vanishes for |ω| > ωs/2,
is fully described by a uniform sampling x(nT), where T=2π/ωs. The
band-limited signal x(t) is reconstructed by:

sin (ωs ( t − nT ) / 2 )
x ( t ) = ∑ x ( nT )
ωs ( t − nT ) / 2

Half the sampling frequency, fs/2 = 1/2T, is referred to as the Nyquist frequency.
The frequency interval 0.. fs/2 is referred to as the Nyquist band (or base-band),
while the intervals fs/2..fs, fs..3fs/2 etc are called second, third etc Nyquist zones.

Data Converters Introduction 9 Data Converters Introduction 10

Anti-aliasing filter – I Anti-aliasing filter – II

Signal folding!

• The anti-alias filter protects the information content of the


signal
• Use an anti-aliasing filter in front of every quantizer to reject
unwanted interferences from outside the band of interest

Complexity depends on band-pass ripple, transition-region steepness,


and stop-band attenuation.
Data Converters Introduction 11 Data Converters Introduction 12
Under-sampling – I Under-sampling – II

• Exploit the base-band folding of signals at frequencies higher mirrored


than the Nyquist limit (fs/2) Æ brings high-frequency spectra
into base band.

• Also known as harmonic sampling, base-band sampling, IF


sampling, RF-to-digital conversion, etc

• Attractive as RF demodulator, but: bandwidth, distortion, and


jitter performance must meet the specs at RF! Further, wide-
band noise is also sampled!
non-mirrored

Data Converters Introduction 13 Data Converters Introduction 14

Under-sampling – III Sampling-time jitter

• Any clock signal is affected by jitter


(noise on the “zero crossings”)

• Large errors with steep signal slopes


• Also under-sampling requires an anti-aliasing filter

• Removes unwanted signals occurring at base-band or in any


other Nyquist zone

• In the case of under-sampling, the anti-aliasing filter is a


band-pass filter around the signal band

Data Converters Introduction 15 Data Converters Introduction 16


Sampling error caused by jitter Maximum jitter vs. input frequency and SNR

For a sine wave xin ( t ) = A sin (ωint ) , the jitter-induced error Δx ( nT ) is

Δx ( nT ) = Aωinδ ( nT ) cos (ωin nT )


Assume that δ ( nT ) is the sampling of a random variable δ ji ( t ) ; we SNR
obtain:
A2ωin2 2
x 2ji ( t ) = ⎡⎣ Aωin cos (ωin nT ) ⎤⎦ δ 2 ( nT ) = δ ( nT )
2

The jitter-limited SNR is therefore:

SNR = 10 log
S
N
(
= −20 log ωin δ ( nT ) )
Jitter may be the limiting factor in data conversion: if SNR=90dB and
fin=100MHz, then the clock jitter must be below 50fs

Data Converters Introduction 17 Data Converters Introduction 18

Amplitude quantization - quantization error Quantization noise

• The quantization error can be viewed as a form of noise source


Y = X in + ε Q
nΔ < X in < ( n + 1) Δ • Frequent code transitions decorrelate successive samples of
the quantization error, spreading its spectrum and making it
−Δ 2 ≤ ε Q ≤ Δ 2 resemble white noise
X FS
Δ= • Necessary conditions for this very convenient assumptions are:
M
1. All quantization levels are exercised with equal probability (true if
X FS = X max − X min input signal is large)
M = # of quantization levels 2. A large number of quantization levels are used (usually true,
M =2 N
except for ΔΣ converters)
3. The quantization steps are uniform (usually true)
N = # of bits
4. The quantization error is not correlated with the input (usually
true)
The quantization error is a form of data corruption fundamentally
unavoidable in data conversion (unless N is infinite)

Data Converters Introduction 19 Data Converters Introduction 20


An example Quantization noise: properties

The quantization error is confined between -Δ/2 and Δ/2, and has a
white spectrum:

⎧ 1 Δ Δ
⎪ if - < ε Q <
p (ε Q ) = ⎨ Δ 2 2
⎩⎪ 0 otherwise

The time average power becomes:

quantized signal quantization error


(fs=150fin) ∞ Δ 2
ε Q2 Δ2
∫ ε p (ε ) dε
(10 bits)
PQ = = ∫ dε Q =
2

Δ
Q Q Q
Notice that in this case (fs multiple of fin) the quantization error is −∞ −Δ 2
12
obviously correlated with the input sine wave

Data Converters Introduction 21 Data Converters Introduction 22

Quantization noise and SNR Equivalent number of bits (ENOB)

Within a dynamic range of XFS, the power of a maximum-amplitude sine


The effective SNR is the real measure of the resolution of a data
wave is
( )
2 converter. Measured in bits, it is called the ENOB:
1
T 2
X FS 2
X FS 2n Δ
Psin = ∫ sin (ωt ) dt =
2
= SNReff − 1.76
T 0
4 8 8 ENOBsin = dB
6.02
( )
2
2
X FS 2n Δ If, for example, there is a sampling jitter δji, the effective SNR becomes
and for a triangular wave is Ptrian = =
12 12 2
X FS 8 1
SNReff = 10 log = 10 log
Δ 2 12 + (ωinδ ji X FS ) 8 8 12 ⋅ 2−2 N + (ωinδ ji )
2 2
P
SNRsin = 10 ⋅ log sin = ( 6.02 ⋅ n + 1.76 ) dB
PQ
the maximum SNR becomes:
Ptrian
SNRtrian = 10 ⋅ log = ( 6.02 ⋅ n ) dB
PQ

Data Converters Introduction 23 Data Converters Introduction 24


ENOB with jitter Quantization noise: noise power spectrum

Laplace transform of the noise auto-correlation function:


∞ ∞
pε ( f ) = ∫ Rε (τ )e − j 2π f τ dτ = ∑ Rε ( nT ) e − j 2π fnT
−∞ −∞

( )
We assume that Rε τ goes rapidly to zero for |n|>0, i.e.,
( )
that only Rε 0 is different from zero. Thus, Rε (τ ) is a delta
in the time domain, and a constant-valued function in the
frequency domain. The unilateral power spectrum becomes

Δ2
pε ( f ) =
6 fs
since the total noise power Δ 12 is uniformly spread over
2

the unilateral Nyquist interval 0... f s 2 .

Data Converters Introduction 25 Data Converters Introduction 26

Bilateral noise power spectrum A remark about quantization noise

We have seen that the sampled signal is band-limited between


In a bilateral representation, we have (in order to keep the
–fs/2 and fs/2 (of course, there is an infinite number of replicas
total noise power constant):
centered around multiples of ±fs)
Δ2
pε ( f ) = After quantization, the original band-limited signal is expressed as
12 f s the sum of the quantized signal and quantization noise; therefore,
the bandwidth of the quantization noise must be the same as that
of the original sampled signal, i.e., between –fs/2 and fs/2

Data Converters Introduction 27 Data Converters Introduction 28


kT/C noise ENOB limitations from kT/C noise

An unavoidable limit to the SNR comes from the thermal noise Thermal noise vs. sampling capacitance, compared to the quantization
associated with a sampling switch, and depends only on the sampling noise Δ 12 (reference = 1V). If both noise sources have the same
capacitance (and not on the switch resistance!) power, the SNR decreases by 3dB = 0.5LSB

4kTRs
vn2,Cs (ω ) = kT
1 + (ω Rs Cs )
2

Cs
∞ ∞
4kTRs 1 kT
Pn ,Cs = ∫ df = 4kTRs ∫ df =
1 + (ω Rs Cs ) 1 + (ω Rs Cs )
2 2
0 0
Cs

Cs = 1pF → kT Cs = 64.5μ V

Data Converters Introduction 29 Data Converters Introduction 30

Thermal noise: an example – I Thermal noise: an example – II

A pipeline A/D uses a cascade of two S/H circuits in the first stage. The
Thus, the total noise power that can be tolerated by the samplers is
jitter is 1ps, XFS is 1V, fin is 5MHz. Determine the minimum Cs for
ENOB = 12 bits. vn2, samplers = 2.36 ⋅10−9 V 2
Assuming equal capacitance in both S/H circuits, the noise for each is
The q-noise power is Δ 12 . We assume that an extra 50% total noise
2

is ok (SNR decreases by 1.76dB = 0.29LSB). The noise budget for vn2,C = 1.18 ⋅10−9 V 2
kT/C and jitter noise together is then:
and the minimum sampling capacitance value is
1 1 Δ2 2
X FS 1
vn2,budget = vQ2 = ⋅ = = = 2.48 ⋅10−9 V 2 kT 4.14 ⋅10−21
2 2 12 24 ⋅ 2 2N
24 ⋅ 224 Cs = = = 3.51pF
vn2,C 1.12 ⋅10−9
The jitter affects only the first stage (the second stage samples the Notice that the jitter noise establishes a maximum achievable
signal held by the first). The jitter noise is resolution independently of Cs; this limit is, in this case, 14.7 bits
2
1⎛ X ⎞
vn2, ji = ⎜ FS 2π f inδ ji ⎟ = 1.23 ⋅10−10 V 2
2⎝ 2 ⎠

Data Converters Introduction 31 Data Converters Introduction 32


Discrete and Fast Fourier Transform – I Discrete and Fast Fourier Transform – II

The spectrum of a sampled-data signal is estimated using The DFT is (of course) a complex function:

L ⎡⎣ x∗ ( nT ) ⎤⎦ = ∑ x ( nT ) ⋅ e − nsT
X ( f k ) = Re 2 ( X ( f k ) ) + Im 2 ( X ( f k ) )

F ⎡⎣ x∗ ( nT ) ⎤⎦ = X ∗ ( jω ) = ∑ x ( nT ) ⋅ e − jω nT
−∞ Im ( X ( f k ) )
ϕ ( X ( f k ) ) = arctan
Re ( X ( f k ) )
This requires an infinite number of steps; a convenient approximation is
the Discrete Fourier Transform (DFT), which assume the input to be
N-periodic: The DFT algorithm requires N2 computations. For long sample series,
N −1
X ( f k ) = ∑ x ( nT ) ⋅ e − j 2π kn ( N −1) the Fast Fourier Transform (FFT) algorithm is more effective, as it only
n =0
requires N⋅log2(N) computations. In this case, N must be a power of 2
(which is therefore the usual choice).
k
Spectrum made of N lines located at f k = , 0 ≤ k ≤ N −1
T ( N − 1)

Data Converters Introduction 33 Data Converters Introduction 34

Periodicity assumption in DFT/FFT Windowing

The DFT and FFT assume the input is N-periodic. Real signals are Windowing addresses this problem by tapering the endings of the series
never periodic, and the N-periodic assumption lead to discontinuities
between the last and first samples of successive sequences. xw ( k ) = x ( k ) ⋅ W ( k )

discontinuity

Data Converters Introduction 35 Data Converters Introduction 36


Useful tips Windowing example – time domain

Time-domain input (two sine-waves) before and after


windowing (Blackman window)

When using DFT or FFT, make sure that the sequence of the discontinuity
samples is N-periodic; otherwise use windowing

With sine-wave inputs, avoid repetitive patterns in the sequence: the


ratio between the sine-wave period and the sampling period should
be a prime number (otherwise, noise may appear concentrated in
higher-order harmonics)

Data Converters Introduction 37 Data Converters Introduction 38

Windowing example – spectra Is windowing avoidable?

The time-domain discontinuity Reduced amplitude, but


causes the spectrum to spread constant ratio (ok for SNR Windowing is an amplitude modulation of the input that produces
out where it should be zero simulations) undesired effects
A spike at the beginning/end of the sequence is completely masked
Windowing gives rise to spectral leakage (i.e., if the input is a sine
wave, the spectrum is not a pure tone)
The SNR measurement can be accurate, but see the previous point
For input sine waves Æ use coherent sampling, for which an integer
number k of signal periods fits into the sampling window; moreover, k
must be chosen with care

Data Converters Introduction 39 Data Converters Introduction 40


Constraints on k k and q-noise
If k in f in = f s ⋅ k 2 is not odd, the quantization noise repeats itself
N
sampling period signal period

Coherent sampling: m ⋅ Ts = k ⋅ Tin in exactly the same way two or more times across the sampling
sequence Æ q-noise is not white, but shows repetitive patterns Æ
q-noise is concentrated at certain frequencies!
If: m = a ⋅ b and k = a ⋅ c Æ a ⋅ ( b ⋅ Ts ) = a ⋅ ( c ⋅ Tin ) The two simulations below use the same amount of samples, but
notice how in the plot to the right the q-noise is much less white, with
i.e., the q-noise sequence repeats itself a times, identically Æ much higher peaks (possibly hiding a higher harmonics)
q-noise is not white
Spectrum, 216 Spectrum, 216 samples (× 16 repetition)
0 0

To avoid this, m and k should be prime to each other; in particular, if 216 samples 212 samples,
m is a power of N, k should be odd: -20 -20
repeated 16 times

-40 -40

odd number
k sampling freq. -60 -60

sine-wave freq. fin = fs


2N -80 -80

-100 -100
# of samples
-120 -120
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000

Data Converters Introduction 41 Data Converters Introduction 42

About the FFT – I About the FFT – II

The FFT of an N-sample sequence is made of N discrete lines 2


equally spaced in the frequency interval 0..fs X FS
An M-bit quantization gives a noise power of
12 ⋅ 22 M
The spectrum in the second Nyquist zone (fs/2..fs) mirrors the base 2
X FS
band Æ only half of the FFT computations are represented (0..fs/2) Æ The power of the full-scale sine wave is
N/2 spectral lines in the base band 8
3 2M N
The FFT of the quantization noise is, on average, a factor ⋅2 ⋅
Each line gives the spectral power falling in the bandwidth fs/N and 2 2
centered around the line itself below the full scale, where N is the number of points in the FFT
Thus, the FFT operates like a spectrum analyzer with N channels series. The overall noise floor becomes
each with bandwidth fs/N
N
2
xnoise = Psig − 1.76 − 6.02 ⋅ M − 10 ⋅ log
If the number of points in the series increases, the channel bandwidth dB 2
of the equivalent spectrum analyzer decreases and each channel will N
contain less noise power The term 10 ⋅ log is called processing gain of the FFT
2

Data Converters Introduction 43 Data Converters Introduction 44


About the FFT – III Coding schemes – I

If the length of the input series increases by a factor 2, the floor of the
FFT noise spectrum diminishes by 3dB; however, tones caused by
harmonic distortion do not change. USB – Unipolar Straight Binary: simplest binary scheme, used for
unipolar signals. The lowest level (-Vref +1/2 VLSB) is represented with
A long-enough input series is able to reveal a small distortion tone
all zeros (00….0), and the highest (Vref -1/2 VLSB) with all ones (11..1).
above the noise floor.
The quantization range is (-Vref .. + Vref) .
CSB – Complementary Straight Binary: also for unipolar signals,
opposite of USB. (00..0) represents full scale, and (11..1) the first
quantization level.
BOB – Bipolar Offset Binary: for bipolar (i.e., both positive and
negative). The MSB is the sign of the signal (1 for positive and 0 for
negative). Therefore, (00…0) represents the full negative scale,
(11..1) is the full positive scale, and (01..11) is the zero crossing.

Data Converters Introduction 45 Data Converters Introduction 46

Coding schemes – II D/A conversion

waveform after DAC S&H


COB – Complementary Offset Binary: complementary to BOB. The
zero crossing is therefore at (10…00).
BTC – Binary Two’s Complement: one of the most used coding
schemes. The MSB indicates the sign in a complemented way: it is 0
for positive and 1 for negative inputs. Zero crossing is at (0..00). For The (ideal) reconstruction filter smoothes the staircase-like
positive signals, the digital code increases for increasing analog waveforms, removing the high-frequency components:
values, and the positive full scale is therefore (01….11). For negative
signals, the digital code is the two’s complement of the positive ⎧ f f In the time domain:
⎪ 1 for - s < f < s
counterpart, which means that (10…00) is the negative full scale. H R ,ideal ( f ) = ⎨ 2 2 sin (ωs t 2 )
BCT coding is standard in microprocessors and digital audio, and is ⎪⎩0 r (t ) =
in general used in the implementation of mathematical algorithms.
otherwise ωs t 2 ”sinc” function

BTC – Complementary Two’s Complement: complementary to It is well known that this transfer function is not implementable, as
BTC. Negative full scale is (01..11) and positive full scale is (10..00). it is not causal (it is different from zero for t<0)

Data Converters Introduction 47 Data Converters Introduction 48


Real reconstruction Spectrum after S/H

The S&H transfer function is: Rule of thumb: the reconstruction must use an in-band x/sin(x)
compensation if the signal band is above ¼ of Nyquist
1 − e − sT T sin (ωT 2 )
HS /H (s) = → H S / H ( jω ) = j e − jωT 2
sτ τ ωT 2
τ = gain factor
phase
distortion

-3.9dB

Data Converters Introduction 49 Data Converters Introduction 50

Attenuation of images z-transform

The transmission zeros of the sinc function shape the signal


images at multiples of fs. As an example, if the signal band is
Time-discrete counterpart of the Laplace transform:
fB=fs/20, the value of the sinc at f=19/20fs is 0.0498, yielding a
26dB suppression, alleviating the requirements on the ∞
reconstruction filter. Z { x ( nT )} = ∑ x ( nT ) z − n
−∞

Linear:

Z {a1 ⋅ x1 ( nT ) + a2 ⋅ x2 ( nT )} = a1 ⋅ Z { x1 ( nT )} + a2 ⋅ Z { x2 ( nT )}

The z-transform of a delayed signal is:



Z { x ( nT − kT )} = ∑ x ( nT − kT ) z −( n − k ) z − k = X ( z ) z − k
−∞

Data Converters Introduction 51 Data Converters Introduction 52


Mapping between s-plane and z-plane z-domain integration (I)

A sampled-date system is stable if all the poles of its z transfer


Time-continuous integration:
function are inside the unity circle. The frequency response of the
system is the z transfer function calculate on the unity circle. 1
HI (s) =

z → e sT
Approximate integration Æ the time-continuous equation is replaced
by a finite increment; the equation
nT +T
y ( nT + T ) = y ( nT ) + ∫ x ( t )dt
nT

can be discretized in three (actually more) ways:

1) y ( nT + T ) = y ( nT ) + x ( nT ) ⋅ T
2) y ( nT + T ) = y ( nT ) + x ( nT + T ) ⋅ T
x ( nT ) + x ( nT + T )
3) y ( nT + T ) = y ( nT ) + T
2

Data Converters Introduction 53 Data Converters Introduction 54

z-domain integration (II) z-domain integration (III)

Via the z-transform, we obtain:


The corresponding mappings between s-plane and z-plane are
1) zY = Y + X ⋅ T
2) zY = Y + zX ⋅ T z −1
sTForward →
1+ z T
to be compared
3) zY = Y + X T z −1 1
2 sTBackward = with the ideal s→ ln ( z )
Tz mapping T
Which results in three different approximate expressions for the z
z −1
transfer function of the integral: sTBilinear =
1 2T ( z + 1)
H I , Forward = T
z −1 Forward Æ critical for stability (a stable system can become unstable)
z
H I , Backward = T Backward Æ problematic for conserving performance (and an
z −1 unstable system can become stable)
z +1
H I , Bilinear = T Bilinear Æ best (stable Æ stable; unstable Æ unstable), but rarely
2 ( z − 1) used in data conversion

Data Converters Introduction 55 Data Converters Introduction 56


Remarks about s-to-z plane mappings

• Euler forward is never used because of the instability hazard

• In general, the mentioned mapping have been relevant in the


design of sampled-data circuits such as switched-capacitor
(SC) circuits

• Nowadays, the issue of s-plane to z-plane mapping is most


relevant in ΔΣ converters, which merge filtering with data
conversion

• A very popular modern approach is to equate the impulse


response of the sampled-data circuit with the impulse
response of the analog filter we wish to implement in the
converter

Data Converters Introduction 57

You might also like