Ch3 2NoishapingFeb2020 PDF
Ch3 2NoishapingFeb2020 PDF
Ch3 2NoishapingFeb2020 PDF
Chapter 3:
Quantization Process with Over-Sampling
and Noise Shaping
Reference:
S J.Orfanidis, ”Introduction to Signal Processing”, Prentice –Hall , 1996,ISBN 0-13-209172-0
M. D. Lutovac, D. V. Tošić, B. L. Evans, “Filter Design for Signal Processing Using MATLAB
and Mathematica”, Prentice Hall, 2001
1. Quantization process.
2. Over sampling and Noise Shaping –
Normalized and non-normalized SNR.
3. Coding: Natural Binary code; Offset
Binary code; Two’s Complement Code
Digital to Analog conversion (DAC)
4. Analog to Digital Conversion ADC.
5. Analog and Digital Dither
2
1. Quantization Process
3
Quantized sample xQ(nT) represented by B bits take
only one of 2B possible value.
Quantization width or quantizer resolution Q
R R
Q B 2B R is the full-scale range
2 Q
4
R is in the symmetrical range:
R R
xQ (nT )
2 2
Quantization error:
In general case: e = xQ – x
where, xQ is the quantized value
Q Q
e
2 2
5
Q/2
Mean: 1
e ede 0
Q Q / 2
Q/2 2
2 1 2 Q
e e de
Q Q / 2 12
Root Mean Square error: 2 Q
erms e
12
Quantization error e can be assumed as a random
variable which is distributed uniformly over the
range [-Q/2, Q/2] then having probability density:
6
1 Q Q
, e
p ( e) Q 2 2
0, other p(e)
Normalization 1/Q needed to guarantee
Q/2
p(e)de 1
Q / 2
-Q/2 0 Q/2 e
E[e] E[e 2 ] 2
p(e)de
e
ep(e)de
Q / 2 Q / 2
Where Q; B B' 1
2
X max Q
Q B 1 and e2
2 12
then the SQNR
x2 X max
SQNR 10 log 2 6 B 4.81 20 log
e x
Thus, the practical Signal –to-Quantization-Noise increases
approximately 6dB for each bit
(can be compared to the Normalized SNR)
The average power or variance of e(n)
2
Q
e2 E e 2 (n)
12
9
Example: in digital audio application, signal sampled at
44kHz and each sample quantized using a ADC having
full scale of 10volts. Determine number of bits B if the
rms quantization error must be kept below 50 microvolts.
Then determine the actual rms error and bit rate
Sol:
11
The noise power over the entire interval f = fs
2
e 2
fs e
fs
Noise shaping quantizers reshape the spectrum of the
quantization noise into more convenient shape. This
accomplished by filtering the white noise sequence e(n)
by a noise shaping filter HNS(f).
xQ(n) = x(n) + (n)
12
Power spectral density
2 e2 2
S ( f ) H NS ( f ) S ee ( f ) H NS ( f )
fs
Noise power within a given interval
fb 2 fb
e 2
S ( f )df f H
fa s fa
NS ( f ) df
fs '
Over Sampling ratio L
fs 2
2 Q
Quantization noise powers e
12
To maintain the same quality 2 2
required the power spectral e ' e
density remain the same fs fs '
13
'e2
L 2 2 2 ( B B ') 2 2 B
e
B = B-B’, or B = 0.5 log2 L
14
The total noise power in the Nyquist interval:
15
fs / 2 2p 2 p 1
2 2p
2 ' e
2pf 2 p fs
e df 'e
f s ' fs / 2 f s ' 2 p 1 fs '
2 p 1
2p
2 p fs p 2p 1
'e 'e2 2 p 1
2 p 1 fs ' 2 p 1 L
e2 /'e2 = 2 -2(B-B’) = 2 -2B
p 2p
B ( p 0.5) log 2 L 0.5 log 2
2 p 1
16
Oversampling and noise shaping system
17
3. Digital to Analog Converter DAC
B bit 0 and 1 at input, b = [b1, b2,…, bB],
(a) unipolar natural binary,
(b) bipolar offset binary,
(c) bipolar 2’s complement.
18
Unipolar natural binary
xQ = R(b12-1 + b22-2 + … + bB2-B)
xQ = R2-B(b12B-1 + b22B-2 + … + bB-121 + bB)
Bipolar offset binary
xQ = R(b12-1 + b22-2 + … + bB2-B – 0.5)
Two’s complement
xQ = R(b12-1 + b22-2 + … + bB2-B – 0.5)
19
Converter code for B=4bits, R=10volts
20
4. Analog to Digital Converter (ADC)
21
Example: A sampled sinusoid x(n)=Acos(2pfn), A=3volts
and f=0.04 cycles/sample. The sinusoid is evaluated at the ten
Sampling times n=0,1,2…9 and x(n) is quantized using a 4-bit
ADC with R=10volts. The following table shows the sampled
and quantized values and its codes
5. Analog and Digital Dither
Dither is a low-level white noise signal added to the
input before quantization for eliminating granulation
or quantization distortion and making the total
quantization error behave like white noise
Analog dither
23
Digital dither can be added to a digital prior to a
requantization operation that reduces the number
of bits representing the signal.
24
y(n) = x(n) + v(n)
Quantization error: e(n) = yQ(n) – y(n)
Total error resulting from dithering and quantization:
(n) = yQ(n) – x(n)
(n) = (y(n) + e(n)) – x(n) = x(n) + v(n) + e(n) – x(n)
or
(n) = yQ(n) – x(n) = e(n) + v(n)
Total error noise power
1 2
Q v2
2 2
e
2
v
12
Subtractive dither
Total error
(n) = yout(n) – x(n) = (yQ(n) – v(n)) – x(n) = yQ(n) – (x(n) + v(n))
(n) = yQ(n) – y(n) = e(n)
26
Undilhered Quantization Undilhered Spectrum
1,5 240
1,0
180
0.5
(Units of Q)
Magnitude
0 120
-0.5
60
-1,0
-1,5
0 20 40 60 80 100 120 0 0,1 0,2 0,3 0,4 0,5
Quantized
Original
1,0
180
0.5
(Units of Q)
Magnitude
0 120
-0.5
60
-1,0
-1,5
0 20 40 60 80 100 120 0 0,1 0,2 0,3 0,4 0,5
Quantized
Dithered original 27