Академический Документы
Профессиональный Документы
Культура Документы
(b)
Discrete-Time Signal
26
Quantization
• Quantized discrete-time signals are called digital
signals.
• Each quantized sample is represented as a group of
zeros and ones (bits).
• The finer the quantization, the longer the word.
• Like sampling, improper quantization leads to loss of
information.
• Quantization always introduces some noise, whose
effects can be described only in statistical terms
27
Uniform Quantizers
• Quantizers are devices that operate on a signal to
produce a finite number of amplitude levels or
quantization levels.
• It is common practice to use uniform quantizers with
equal quantization levels.
• The number of levels L in most quantizers used in ADC
is invariably a power of 2.
• If L = 2B, each of the L levels is coded to a binary
number & each signal value is represented in binary
form as a B-bit word corresponding to its quantized
value
28
Uniform Quantizers
• A 4-bit quantizer is thus capable of 24 (or 16)
levels and a 12-bit quantizer yields 212 (or
4096) levels. A signal may be quantized by:
– truncation to a level smaller than the next
higher one,
– rounding to the nearest quantization level, or
– sign-magnitude truncation, which is rather like
truncating smaller absolute values and the using
the appropriate sign
Various ways of quantizing a signal
30
Example 3.5
Let consider the following discrete-time signal
0.9 , n 0
n
xn
0 , n0
31
Solution
• Obtained by sampling the analog exponential
signal x t 0.9 t , t 0 with a sampling
frequency, f = 1Hz.
32
33
Numerical Illustration of Quantization with One Significant
Digit Using Truncation or Rounding
x[n] xq[n] xq[n]
n
Discrete-time signal (Truncation) (Rounding)
0 1 1.0 1.0
1 0.9 0.9 0.9
2 0.81 0.8 0.8
3 0.792 0.7 0.8
4 0.6561 0.6 0.7
5 0.59049 0.5 0.6
6 0.531441 0.5 0.5
7 0.4782969 0.4 0.5
8 0.43046721 0.4 0.4
9 0.387420489 0.3 0.4
34
• The observed value may be set to the full-
scale value (saturation) or zero (zeroing),
leading to the overflow characteristics
Observed Value Observed Value
V V
-V V -V V
Actual Actual Value
Value
-V -V
Saturation Zeroing
35
Various Number Representations for B
= 3 bits
Decimal Sign and One’s Two’s Offset
value Magnitude complement complement Binary
+4 111
+3 011 011 011 110
+2 010 010 010 101
+1 001 001 001 100
+0 000 000 000
-0 100 111 011
-1 101 110 111 010
-2 110 101 110 001
-3 111 100 101 000
-4 100
36
Various Number Representations for
B = 4 bits
Integer Sign- magnitude One's complement Two's complement Offset binary
37
Example
• An analog signal 𝑥 𝑡 = 2 sin 4𝜋𝑡 v is
sampled at a sampling rate of 13 Hz. The
signal is then will be quantized and encoded
into 4 bits code words. Find the discrete
signal, the quantized signal (rounding and
truncation) and encoded output signal if the
quantizer dynamic range is from -2V to +2V for
the first 5 samples only.
39
• The quantization signal-to-noise ratio
(SNRQ) is defined as the ratio of the power PS
in the signal & the power PN in the error ε[n]
(or noise).
• Measured in dB
1 N 1 2 1 N 1 2
PS x n PN n
N n 0 N n 0
PN n
2
40
• The dynamic range or full-scale range of a
signal x(t) is defined as its maximum
variation
D = xmax – xmin.
• If x(t) is sampled and quantized to L levels
using a quantizer with a full-scale range of D,
the quantization step size or resolution, ,
is defined as
Δ = D/L
41
• Step size corresponds to the LSB.
• The dynamic range of a quantizer is expressed in dB.
• For a 16-bit quantizer, the dynamic range is
20 log 216 ≈ 96 dB.
• For quantization by rounding, the maximum value of
the quantization error must lie between –Δ/2 and Δ/2.
• If L is large, the error is likely to take on any value
between –Δ/2 and Δ/2
42
• Probability density function f(ε) of a signal
quantized by rounding
f(ε)
Δ/2
–Δ/2 Δ/2
43
• The noise power PN equals its variance σ2 & is
given by
2 1 2 2
2
PN f d d
2 2
2 2 12
45
Example 3.6
A sampled signal that varies between -2 V and
2 V is quantized using B bits. What value of B
will ensure an rms quantization error of less
than 5 mV?
46
Solution
The full-scale range is D = 4 V. The rms
quantization error is given by
D
2 B
12 12
D 4
2
B
230.94
12 0.005 12
47
Exercise
• Consider the ramp x(t) = 2t over (0, 1). For a
sampling interval of 0.1 s, and L = 4, obtain
i. the sampled signal
ii. quantized (by rounding) signal
iii. digital signal
iv. error signal, and compute the
v. quantization signal to noise ratio
vi. a statistical estimate of the SNR in dB
48
Answer
i. x[n]={0,0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8,2.0}
ii. xQ[n]={0,0,0.5,0.5,1.0,1.0,1.0,1.5,1.5,2.0,2.0}
iii. xc[n]={00,00,01,01,10,10,10,11,11,11}
iv. e[n]={0,0.2,-0.1,0.1,-0.2,0, 0.2, -0.1,0.1,-0.2,0}
v. SNRQ=18.9 dB
vi. SNRS=18.7 dB
49
Exercise
Telephone speech signals are sampled at 8 ksample/s and are transmitted
over a 64 kbits/s digital link. Consider the following signal, which is
transmitted over the telephone channel and then reconstructed using the
ideal DAC:
The analog range of the ADC is adjusted to avoid saturation and to minimize
the quantization error. Determine: