Bài giảng Digital signal processing - Chapter 2: Quantization - Nguyễn Thanh Tuấn
Chapter 2
Quantization
Nguyen Thanh Tuan,M.Eng.
Department of Telecommunications (113B3)
Ho Chi Minh City University of Technology
Email: [email protected]om
1. Quantization process
Fig: Analog to digital conversion
The quantized sample xQ(nT) is represented by B bit, which can take
2B possible values.
An A/D is characterized by a full-scale range R which is divided
into 2B quantization levels. Typical values of R in practice are
between 1-10 volts.
Digital Signal Processing
2
Quantization
1. Quantization process
Fig: Signal quantization
Quantizer resolution or quantization width (step)
R
2B
Q
R
R
xQ (nT)
A bipolar ADC
2
2
0 xQ (nT) R
A unipolar ADC
Digital Signal Processing
3
Quantization
1. Quantization process
Quantization by rounding: replace each value x(nT) by the nearest
quantization level.
Quantization by truncation: replace each value x(nT) by its below
nearest quantization level.
e(nT) xQ (nT) x(nT)
Quantization error:
Q
Q
e
Consider rounding quantization:
2
2
Fig: Uniform probability density of quantization error
Digital Signal Processing
4
Quantization
1. Quantization process
Q/2
Q/2
1
e ep(e)de e de 0
The mean value of quantization error
Q
Q/2
Q/2
Q/2
Q/2
1
Q2
q e2 (e e)2 p(e)de e2 de
2
The mean-square error
Q
12
Q/2
Q/2
(power)
Q
erms q e2
Root-mean-square (rms) error:
12
R and Q are the ranges of the signal and quantization noise, then
the signal to noise ratio (SNR) or dynamic range of the quantizer
is defined as
2
x
R
Q
SNR dB 10log
20log
20log10(2B ) 6B dB
10
10
2
q
which is referred to as 6 dB bit rule.
Digital Signal Processing
5
Quantization
Example 1
In a digital audio application, the signal is sampled at a rate of 44
KHz and each sample quantized using an A/D converter having a
full-scale range of 10 volts. Determine the number of bits B if the
rms quantization error must be kept below 50 microvolts. Then,
determine the actual rms error and the bit rate in bits per second.
Digital Signal Processing
6
Quantization
2. Digital to Analog Converters (DACs)
We begin with A/D converters, because they are used as the building
blocks of successive approximation ADCs.
Fig: B-bit D/A converter
Vector B input bits : b=[b1, b2,…,bB]. Note that bB is the least
significant bit (LSB) while b1 is the most significant bit (MSB).
For unipolar signal, xQ є [0, R); for bipolar xQ є [-R/2, R/2).
Digital Signal Processing
7
Quantization
2. DACs
Rf
Full scale R=VREF, B=4 bit
I
i
xQ=V
out
2Rf
4Rf
8Rf 16Rf
MSB
bB
b1
LSB
Fig: DAC using binary weighted resistor
-VREF
b3
b
b2
b4
1
I V
REF
2Rf 4Rf 8Rf 16Rf
b3
b b
b4
2
x V I R V
1
Q
OUT
f
REF
2 4 8 16
x R24 b 23 b 22 b 21 b 20 Q b 23 b 22 b 21 b 20
Q
1
2
3
4
1
2
3
4
Digital Signal Processing
8
Quantization
2. DACs
xQ R(b 21 b2 22 ...bB 2B ) Qm
Unipolar natural binary
1
where m is the integer whose binary representation is b=[b1, b2,…,bB].
m b 2B1 b2 2B2 ...bB 20
1
Bipolar offset binary: obtained by shifting the xQ of unipolar natural
binary converter by half-scale R/2:
R
R
xQ R(b 21 b2 22 ...bB 2B ) Qm
1
2
2
Two’s complement code: obtained from the offset binary code by
complementing the most significant bit, i.e., replacing b by
.
b 1b
1
1
1
R
xQ R(b 21 b2 22 ...bB 2B )
1
2
Digital Signal Processing
9
Quantization
Example 2
A 4-bit D/A converter has a full-scale R=10 volts. Find the quantized
analog values for the following cases ?
a) Natural binary with the input bits b=[1001] ?
b) Offset binary with the input bits b=[1011] ?
c) Two’s complement binary with the input bits b=[1101] ?
Digital Signal Processing
10
Quantization
3. A/D converters
A/D converters quantize an analog value x so that is is represented
by B bits b=[b1, b2,…,bB].
Fig: B-bit A/D converter
Digital Signal Processing
11
Quantization
3. A/D converters
One of the most popular converters is the successive approximation
A/D converter
Fig: Successive approximation A/D converter
After B tests, the successive approximation register (SAR) will hold
the correct bit vector b.
Digital Signal Processing
12
Quantization
3. A/D converters
Successive approximation algorithm
1 if x 0
0 if x 0
where the unit-step function is defined by
u(x)
This algorithm is applied for the natural and offset binary with
truncation quantization.
Digital Signal Processing
13
Quantization
Example 3
Consider a 4-bit ADC with the full-scale R=10 volts. Using the
successive approximation algorithm to find offset binary of
truncation quantization for the analog values x=3.5 volts and x=-1.5
volts.
Test b1b2b3b4
b1
xQ
C = u(x – xQ)
1000 0,000 1
1100 2,500 1
1110 3,750 0
1101 3,125 1
1101 3,125
b2
b3
b4
Digital Signal Processing
14
Quantization
3. A/D converter
For rounding quantization, we
For the two’s complement
code, the sign bit b1 is treated
separately.
shift x by Q/2:
Digital Signal Processing
15
Quantization
Example 4
Consider a 4-bit ADC with the full-scale R=10 volts. Using the
successive approximation algorithm to find offset and two’s
complement of rounding quantization for the analog values x=3.5
volts.
Digital Signal Processing
16
Quantization
Oversampling noise shaping
e2
fs
Pee(f)
e'2
fs'
e(n)
HNS(f)
f
-f’s/2
f’s/2
-fs/2 0
fs/2
e2 e'2
fs
e'2
xQ(n)
x(n)
ε(n)
e2 fs
fs'
fs'
Digital Signal Processing
17
Quantization
Oversampling noise shaping
Digital Signal Processing
18
Quantization
Dither
Digital Signal Processing
19
Quantization
Uniform and non-uniform quantization
Digital Signal Processing
20
Quantization
Tải về để xem bản đầy đủ
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Digital signal processing - Chapter 2: Quantization - Nguyễn Thanh Tuấn", để tải tài liệu gốc về máy hãy click vào nút Download ở trên
File đính kèm:
bai_giang_digital_signal_processing_chapter_2_quantization_n.pdf

