Professional Documents
Culture Documents
CSE466 CSE466
! Binary Numbers
! Binary Arithmetic
! Disadvantages
Sampling & Aliasing ! Disadvantages
CSE466 CSE466
Analog-
Analog-to-
to-Digital
Analog-
Analog-to-
to-Digital Conversion
Conversion
Converts analog voltages to binary
integers. Sampling • ADC calibration
Binary
Analog
ADC Integers
Voltage
(0s & 1s)
1.5 Integer
7
1 Calibration Code 6
0.5
Curve
Voltage
0 5
4
-0.5 ( 3 bit ADC) 3
-1
-1.5
2
1
0 2 4 6 8 10
0 Analog
Time
0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 Voltage
CSE466 CSE466
Analog-
Analog-to-
to-Digital Conversion Analog-
Analog-to-
to-Digital Conversion
Input Range Quantization Interval (Q)
! Unipolar: ( 0, VADCMAX ) ! n bit ADC, the input range is divided into
! Bipolar: ( -VADCMAX , +VADCMAX ) (Nominal Range) 2n-1 intervals.
! Clipping: V − VADC min
Q = ADCMAXn
If |VIN| > |VADCMAX|, then |VOUT| = |VADCMAX| 2 −1
! 3 bit ADC:
Integer Integer
VADCMAX Code
7
Code
7
6 6
time 5 5
4 4
3 3
2 2
1 1
0 Analog 0 Analog
-VADCMAX 0 0.5 1.0 1.5 2.0 2.5 3.0 3.5
Voltage
−2 −1.5 −1.0 −.5 0.0 0.5 1.0 1.5
Voltage
CSE466 CSE466
Analog-
Analog-to-
to-Digital Conversion Analog-
Analog-to-
to-Digital Conversion
Voltage to Integer Code Voltage to Integer Code (cont.)
! n bit ADC Ex: 3 bit ADC, VADCmin = −2 V and VADCMAX = 1.5 V
V Q IN
Voltage: VADCmin VADCMAX VIN = 1.25 V
Q: Find the integer code for VIN using only positive
Code: 0 2n−1
integers and using both positive and negative
−2n−1 2n−1−1 integers.
Positive Coding: Positive and Negative Coding:
V − VADC min V
Code = Round IN Code = Round IN
Q Q
CSE466 CSE466
Analog-
Analog-to-
to-Digital Conversion Analog-
Analog-to-
to-Digital Conversion
Convert Code to Estimated Voltage Convert Code to Estimated Voltage (cont.)
Q V$IN Ex: 3 bit ADC, VADCmin = 0 V and VADCMAX = 3.5 V
Voltage: VADCmin VADCMAX
Code = 2
Code: 0 2 −1
n
Q: What is the estimated input voltage VIN?
Code
2n−1 0 2n−1−1
Ex: 3 bit ADC, VADCmin = −2 V and VADCMAX = 1.5 V
Q Q
! n bits binary: represents 2n integers.
Any VIN ∈ V$IN − , V$IN + will be coded to V$IN Ex: 4 bit Binary: 24 = 16 integers, (0, 1, 2, …, 15).
2 2
! MSB: Most Significant Bit
! Maximum Quantization Error = Q/2 ! LSB: Least Significant Bit
CSE466 CSE466
CSE466 CSE466
A/D-converter Quantization
basics noise
Digital output
Dout
t t t n ⋅ TS
111
110
f f 101
f IN f IN
f IN FS / 2 FS
f
100 VQ
vIN , A (t ) vIN (t )
Sample & hold
011
δ /2
DOUT [n]
Anti-alias δ
Quantizer
filter
010
−δ / 2
Vin
001
FS Time discrete Time discrete
Time continuos 000 Analog input
Amplitude continuos Amplitude discrete
Amplitude continuos V FSR vin
Sampling
VFSR
δ=
clock
ideal
[n] = Gideal ⋅ vIN (n ⋅ Ts ) + q( n )
•N-bit converter:
DOUT
real
DOUT [n] = Gideal ⋅ (1 + ε ) ⋅ vIN (n ⋅ Ts ) + q( n ) + eoffset ( n ) + enoise ( n ) + e jitter ( n ) + edistortion ( n )
2N
CSE466 CSE466
Quantization Successive
noise (2) approximation ADC
N clock cycles
conversion
SNR for ideal Vin FCLK = FS ⋅ N
Noise energy: ADC: Vin( RMS)
S/H
_
+ Comp
+ High resolution
1 δ /2 δ2 SNR = 20log( )
VQ( RMS) = ∫ V dVQ = (selfcalibration)
2 FS Succesive
δ Q
12
VQ( RMS) DAC Approximation
Register Dout
−δ / 2 + Easy implementation
FCLK
3
• Signal energy: SNR = 20log(2 ⋅ ) N
Successive approximation – Distortion limited by
2 decision tree component matching
δ ⋅ 2N 111
Vin( RMS) = SNR = 6.02 × N + 1.76[dB]
110
101 – Need high frequency
2 2 VFSR Vin 100
011 clock
010
001
000
TConversion = N ⋅ TDAC_ settling
– Low speed
CSE466 CSE466
4 Steps of
Analog / Digital Step 1: Antialiasing
Conversion Sometimes an electronic signal will contain
a range of frequencies that is greater
than the range of frequencies contained in
the information-bearing signal.
CSE466 CSE466
Step 2: Sampling
Step 2: Sampling
Value of the analog signal
is read at evenly spaced
time intervals.
Sample rate (frequency)
is measured in
megahertz.
1 mHz=1,000,000 cps.
(Cycles per second).
CSE466 CSE466
Step 3: Quantization Step 3: Quantization
The height of
The each vertical bar
can take on only
digital certain values,
signal is shown by
defined horizontal dashed
only at lines, which are
sometimes higher
the points and sometimes
at which it lower than the
is original signal,
indicated by the
sampled. dashed curve.
CSE466 CSE466
CSE466 CSE466
Step 3: Quantization Step 3: Quantization
The difference between a quantized Using higher sampling frequency and more
representation and an original analog bits for quantization will produce better
signal is called the quantization noise. quality digital video and audio.
The more bits for quantization of a signal, But for the same length of video and audio,
the more closely the original signal is the file size will be much larger than the
reproduced. low quality signal.
CSE466 CSE466
Step 4: Encoding
Step 3: Quantization
The number of bits available to describe Conversion
sampling values determines the
resolution or accuracy of quantization. of data into
For example, if you have 8-bit analog to
digital converters, the varying analog
machine
voltage must be quantized to 1 of 256
discrete values;
readable
a 16-bit converter has 65,536 values. format.
CSE466 CSE466
Nyquist Theorem
CSE466 CSE466
CSE466 CSE466
Error Nyquist Theorem
Sampling an analog signal can By sampling at TWICE the highest
introduce ERROR. frequency:
ERROR is the difference between a ! One number can describe the
computed, estimated, or measured positive transition, and…
value and the true, specified, or
! One number can describe the
theoretically correct value.
negative transition of a single
cycle.
CSE466 CSE466
CSE466 CSE466
Nyquist Theorem Frequency aliasing
This under-sampling results in aliasing which When the highest frequency of the
shows up as noise in digitized sound. signal Finput is greater than half the
To correct the aliasing, A/D converters use sampling ( Fsampling/2).
lowpass filters to remove all signals above E.g. Finput =20KHz, Fsampling must be over
the Nyquist frequency. 40KHz.
Remedy: Use a low pass filter to cut off
To eliminate aliasing and to get high-fidelity the input high frequency content before
sound, use a high sample rate. ADC sampling.
CSE466 CSE466
output code =
Low ADC n
Pass Sampling 0110001
Filter: at 40KHz 0100010
fcorner=20KHz
0100100
0101011
e.g. Gain(dB)
0 :
Max freq
-3dB cut off :
=20KHz
Freq. :
CSE466 CSE466