Digital Signal Processing Reference
In-Depth Information
2
x
L
M
Step size
∆=
(4.2)
The step size can be either integer or fraction and is determined by the
number of levels
L
. For binary coding,
L is usually a power of
2, and practical
values are 256 (=2
) or greater.
8
Step 3: Quantizer implementation
Draw the input-output or staircase diagram of the quantizer, as shown in
Figure 4.3
.
The x-axis of the staircase diagram represents the input sampled
signal x (n), and the y-axis represents the quantized output
ˆ
()
.
xn
As is seen from Figure 4.3a, the input levels are in integral multiples of
∆/2
, while the output levels are in integral multiples of
∆
,
with output zero
level included
. Such a quantizer is termed a
mid-tread
quantizer
,
whereas a
mid-riser
quantizer, as shown in Figure 4.3b, does not include output zero
level and has the reverse structure of the mid-tread quantizer.
Step 4: Quantizer error and SNR
The quantizer error is calculated as
()
ˆ
()
en
=
xn
−
xn
()
,
n =
0, 1, 2
… N
- 1
A figure of merit of the quantizer is defined by the
Quantizer Signal-to-Noise
ratio
(
SNR
) given as:
⎡
⎤
2
σ
σ
⎢
⎢
x
⎥
⎥
SNR
=
10
log
(4.3)
2
⎣
⎦
e
In Equation 4.3, the
variance of the input signal
x
(
n
) is given as
2
2
2
σ
x
=
xn
() [()]
−
xn
where
2
()
, the
mse
(
mean squared value
) of the input signal is given by
xn
2
2
2
2
x
()
0
+
x
()
1
+
x
()
2
… −
x
(
N
1
)
2
xn
()
=
(4.4)
N
and, the mean value of the input signal,
, is given by
x
()
x
()
0
++ … −
x
()
1
x
()
2
x N
(
1
)
xn
()
=
(4.5)
N