D and D /A Conversion

Download Report

Transcript D and D /A Conversion

A/D and D/A Conversion
Quote of the Day
Science is organized knowledge. Wisdom is
organized life.
Immanuel Kant
Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer, and Buck, ©1999-2000 Prentice Hall
Inc.
Ideal Conversion
• Up to this point we assumed ideal D/C and C/D conversion
• In practice, however
– Continuous-time signals are not perfectly bandlimited
– D/C and C/D converters can only be approximated with D/A and
A/D converters
• A more realistic model for digital signal processing
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
2
Prefiltering to Avoid Aliasing
• Desirable to minimize sampling rate
– Minimizes amount of data to process
• No point of sampling high frequencies that are not of interest
– Frequencies we don’t expect any signal in only contribute as noise
• A low-pass anti-aliasing filter would improve both aspects
• An ideal anti-aliasing filter
1    c   / T
Haa j   
  c
0
• In this case the effective response is
H e jT    c
Heff j   
  c
 0
• In practice an ideal low-pass filter is not possible hence




Heff j  HaajH ejT
• This would require sharp-cutoff analog filters which are
expansive
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
3
Oversampled A/D Conversion
• The idea is
–
–
–
–
to a have a simple analog anti-aliasing filter
Use higher than required sampling rate
implement sharp anti-aliasing filter in discrete-time
Downsample to desired sampling rate
• Example
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
4
Example
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
5
Analog-to-Digital (A/D) Conversion
• Ideal C/D converters convert continuous-time signals into
infinite-precision discrete-time signals
• In practice we implement C/D converters as the cascade of
• The sample-and-hold device holds current/voltage constant
• The A/D converter converts current/voltage into finiteprecisions number
• The ideal sample-and-hold device has the output
x0 t  

 xnh0 t  nT
n  
Copyright (C) 2005 Güner Arslan
1, 0  t  T
h0 t   
else
0,
351M Digital Signal Processing
6
Sample and Hold
• An ideal sample-and-hold system
• Time-domain representation of sample-and-hold operation
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
7
A/D Converter Model
• An practical A/D converter can be modeled as
• The C/D converter represent the sample-hold-operation
• Quantizer transforms input into a finite set of numbers
ˆ
xn  Qxn
• Most of the time uniform quantizers are used
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
8
Uniform Quantizer
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
9
Two’s Complement Numbers
•
•
•
•
Representation for signed numbers in computers
 a02B  a12B1  ...  aB 20
Integer two’s-complement
0
1
B
Fractional two’s-complement  a02  a12  ...  aB 2
Example B+1=3 bit two’s-complement numbers
-a022+ a121+ a220
-a020+ a12-1+ a22-2
Binary Symbol
Numerical Value
Binary Symbol
Numerical Value
011
3
0.11
3/4
010
2
0.10
2/4
001
1
0.01
1/4
000
0
0.00
0
111
-1
1.11
-1/4
110
-2
1.10
-2/4
101
-3
1.01
-3/4
100
-4
1.00
-4/4
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
10
Example
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
11
Quantization Error
xn  xn
• Quantization error: en  ˆ
– difference between the original and quantized value
• If quantization step is  the quantization error will satisfy
  / 2  en   / 2
– As long the input does not clip
• Based on this fact we may use the following simplified model
• In most cases we can assume that
– e[n] is uniformly distributed
random variable
– Is uncorrelated with the signal x[n]
• The variance of e[n] is then
2

2e 
12
• And the signal-to-noise ratio of quantization noise for B+1 bits
 Xm 

SNR  6.02B  10.8  20 log10 
 x 
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
12
D/C Conversion
• Perfect reconstruction requires filtering with ideal LPF
Xr j   X e jT Hr j 




X e jT : DTFT of sampledsignal
Xr j  : FT of reconstructed signal
• The ideal reconstruction filter
T    / T
Hr j   
0    / T
• The time domain reconstructed signal is
xr t  

 xn
n  
sint  nT  / T 
t  nT  / T
• In practice we cannot implement an ideal reconstruction filter
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
13
D/A Conversion
• The practical way of D/C conversion is an D/A converter
• It takes a binary code and converts it into continuous-time
output


xDA t    Xmˆ
xB nh0 t  nT    ˆ
xnh0 t  nT 
n  
n  
• Using the additive noise model for quantization
xDA t  


 xnh t  nT    enh t  nT   x t   e t 
n  
0
0
n  
0
0
• The signal component in frequency domain can be written as
X0 j  X ejT H0 j
• So to recover the desired signal component we need a
compensated reconstruction filter of the form
~
H j 
Hr j   r
H0 j 

Copyright (C) 2005 Güner Arslan

351M Digital Signal Processing
14
Compensated Reconstruction Filter
• The frequency response of zero-order hold is
2 sinT / 2  jT / 2
H0 j  
e

• Therefore the compensated reconstruction filter should be
 T / 2
e jT / 2    / T
~

Hr j   sinT / 2

0
  /T

Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
15