Download Quantization and Quantization Noise

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Evolving digital ecological networks wikipedia , lookup

Dither wikipedia , lookup

Animal communication wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Delta-sigma modulation wikipedia , lookup

Quantization (signal processing) wikipedia , lookup

Transcript
EEE3080F
Communication Network and System Fundamentals
http://web.uct.ac.za/depts/commnetwork/eee3080
Quantization and Quantization
Noise
Study Sklar 2.7
Do and understand exercises
H Anthony Chan; Yang Li
[email protected]; [email protected]
http://web.uct.ac.za/depts/commnetwork/achan.html
Department of Electrical Engineering
University of Cape Town
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 1 May 3, 2007
Updated
9/2004
Sampling and Quantization
♦ Sampling: An analog signal with values at continuoustime is sampled at discrete times
♦ Quantization: The amplitude of each sample is quantized
into a finite number of discrete amplitude signals.
Continuous
Continuous
signal
signal
values
values
at
continuous at discrete
times
times
Analogue
signal
Low-pass
Filter
Sampler
Discrete
signal
values
Previous topic
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Encoder;
Pulse
modulate
Communication Networks
2506 Page 2 May 3, 2007
Updated
9/2004
Quantization
♦ The quantizing operation approximates each sample
value to the nearest level in a finite set of discrete
levels/values, known as quantization levels.
♦ This approximation introduces quantization error.
Therefore, once quantized, the instantaneous values of
the signals are lost, and can never be reconstructed
exactly.
Continuous signal values
at discrete times
at discrete
times
Quantizer
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
PCM
wave
Discrete signal values
at discrete times
Quantizer
Future topic
Communication Networks
2506 Page 3 May 3, 2007
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 4 May 3, 2007
Updated
9/2004
♦ The quantization operation may be viewed as a function
on the sample values. Its input-output relation may take
the form of a midriser or a midtread:
4a
3a
2a
a
-4a -3a -2a -a
Output (L=8)
-a
-2a
-3a
-4a
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
input
a 2a 3a 4a
4a
3a
2a
a
-4a -3a -2a -a
-a
-2a
Midriser
-3a
-4a
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Output (L=9)
input
a 2a 3a 4a
Midtread
♦ The design of quantization needs to consider:
♦ the desired number, L, of different signal levels (the
resolution), and
♦ the maximum variation of the signal to be represented
(the range).
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Quantization noise
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
3.5 a
2.5 a
1.5 a
0.5 a
-0.5 a
-1.5 a
-2.5 a
-3.5 a
Vmax
Signal level
0
-Vmax
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 6 May 3, 2007
Quantization noise
♦ We can define the quantization noise, or quantization
error, as the time function that is the difference
♦ e(t) = f (t) – fq(t) ,
♦ where f (t) and fq(t) are the signals before and after
quantization.
♦ Since we are discussing discrete-time signals, the error at
each sample point is given by
♦ en = e(nTs) = f(nTs) – fq(nTs)
♦ Here fq(nTs) is the quantized signal value at the time of
the nth sample.
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
e
a
Communication Networks
2506 Page 5 May 3, 2007
Updated
9/2004
Quantization
n = 8 levels
Quantization
Communication Networks
2506 Page 7 May 3, 2007
4a
f(t)
3a
2a
a
fq(t)
Ts 2Ts 3Ts 4Ts 5Ts 6Ts 7Ts 8Ts 9Ts 10Ts
-a
a/2
-a/2
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 8 May 3, 2007
Updated
9/2004
Quantization
♦ Quantization can be uniform or non-uniform.
♦ In uniform quantization, the quantization levels are
uniformly spaced.
4a
3a
2a
a
-4a -3a -2a -a
-a
-2a
-3a
-4a
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
4a
3a
2a
a
-4a -3a -2a -a
a 2a 3a 4a
-a
-2a
-3a
-4a
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Quantization error
♦ Consider the case of uniform quantization, with a
spacing a between quantization levels. In the absence of
any further specific knowledge, a fair assumption is that
the quantizing error will be uniformly distributed
between –a/2 and a/2:
p(en)
1/a
a 2a 3a 4a
-a/2
Communication Networks
2506 Page 9 May 3, 2007
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
a/2
en
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 10 May 3, 2007
Quantization error
Peak signal SNR
♦ The average value of this error is zero, owing to the
symmetry of the probability density function. The mean
square error (MSE) is
♦ MSE = ∫-∞∞ p(en) en2 den
♦
= ∫-a/2a/2 (1/a) en2 den = a2/12
♦ It is reasonable to model this loss of accuracy as an
additive random noise process. The quantized signal can
therefore be considered to be generated as the sum of the
unquantized sample values, and a zero-mean random
noise process with power a2/12:
♦ fq(nTs) = f(nTs) + {-e(nTs)}
♦ The peak voltage in the input signal is Vpp/2 = na/2, so
the peak signal power is (na/2)2. The ratio of peak signal
power to average quantization noise power is therefore
♦ (S/N)peak quan = {(na/2)2}/(a2/12) = 3n2
♦ or, in decibels,
♦ (S/N)peak quan (dB) = 4.8 + 20 log10 n
♦ For a binary code with n = 2m this becomes
♦ (S/N)peak quan (dB) = 4.8 + 6.02 m
♦ The peak SNR therefore increases by 6dB for every
additional bit used in a binary system.
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 11 May 3, 2007
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 12 May 3, 2007
Mean signal SNR
Nonuniform quantization
♦ Essentially similar results are obtained upon defining a
mean power SNR.
♦ Under the assumption that the signal occupies each of
the n quantization levels with equal probability, the
average signal power is equal to
♦ S = (2/n) [(a/2)2 + (3a/2)2 + … + {(n-1)a/2}2 ]
♦ This sum can be written as S = (1/12){(n2-1)a2}
♦ so the mean power output SNR is given by
♦ S/N = n2-1 ≈ n2
♦ This only differs by a constant from the peak ratio
discussed before.
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 13 May 3, 2007
♦ A remedy is to use nonuniform quantization levels. This
can be achieved by using a nonuniform quantizer:
level 7
level 6
level 5
level 4
level 3
level 2
♦ In the case of uniform quantization levels, the
quantization noise power depends only on the spacing
between the levels, and is independent of the actual
signal level at any instant.
♦ The SNR decreases with a decrease in the input power
level relative to the maximum range of the quantizer,
which is undesirable in many applications.
♦ For example, in a speech system a fixed quantization
noise power will be more objectionable when a quiet
speaker is speaking than when a loud one is.
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Nonuniform quantization
Robust quantization
Nonuniform quantization
Updated
9/2004
Communication Networks
2506 Page 14 May 3, 2007
Updated
9/2004
♦ As in speech transmission, the same quantizer has to
accommodate input signals with widely varying power
levels.
♦ A nonuniform quantizer for which the SNR remains
constant over a wide range of input power levels is
called robust.
0
level 1
level 0
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 15 May 3, 2007
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 16 May 3, 2007
Nonuniform quantization
Probability density function
Updated
9/2004
♦ A uniform quantizer makes sense when the probability
distribution of the signal in the range -Vmax to Vmax is
uniform. If we have reason to believe that the
distribution is nonuniform, and we know what the actual
distribution is, then we can place nonuniform
quantization levels in an optimal manner.
Nonuniform quantization
Probability density function
♦ Recall from the discussion on information theory that the
entropy is maximized if the probability of occurrence of
each level is equal.
♦ Therefore we should choose the quantization levels such
that the probabilities of occurrence in each level are
equal.
p(x)
0a b
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Nonuniform quantization
Companding
Communication Networks
2506 Page 17 May 3, 2007
Updated
9/2004
Uniform
♦ More often, nonuniform
levels
quantization is achieved by
output
first distorting the original
4a
signal with a nonlinear
3a
compressor characteristic, and
then using a uniform quantizer
2a
on the result:
a
-4a -3a -2a -a
input
a 2a 3a 4a
-a
-2a
-3a
-4a
Nonuniform
Updated
9/2004
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
c
d
1
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Nonuniform quantization
Companding
x
Communication Networks
2506 Page 18 May 3, 2007
Updated
9/2004
♦ A given signal change at small magnitudes will then
carry the uniform quantizer through more steps than the
same change at large magnitudes. At the receiver, an
inverse compression characteristic (or expansion) is
applied, so that the overall transmission is not distorted.
The processing pair (compression and expansion) is
usually referred to as companding.
levels
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 19 May 3, 2007
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 20 May 3, 2007
Nonuniform quantization
µ-law compander
♦ The A-law compander is
characterized by
1
0.8
Vout
♦ The µ-law companding is
used for PCM telephone
systems in the USA, Canada
and Japan, with the standard
value of µ = 255
♦ Vout = A*Vin / {1+log(A)}
♦ for Vin < 1/A
♦ Vout = A*{1+log(A*Vin) /
{1+log(A)}
♦ for 1/A ≤ Vin
0.6
mu=255
0.4
mu=1
mu=10
0.2
mu=100
mu=1000
0.2
0.4
0.6
0.8
1
Vin
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 21 May 3, 2007
♦ After quantization, the PAM signal becomes a quantized
PAM signal.
♦ In PCM, the quantized signals will next be digitized and
then converted to pulse waveforms.
Continuous
Continuous
signal
signal
values
values
at
continuous at discrete
times
times
Low-pass
Filter
Sampler
Discrete
signal
values
0.8
0.6
A=1
0.4
A=10
A=100
0.2
A=1000
A=87.6
♦ The A-law companding is
used for PCM telephone
systems in Europe, with A =
87.56
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
0
0.2
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
0.4
0.6
0.8
1
Vin
Communication Networks
2506 Page 22 May 3, 2007
EEE3080F
Communication Network and System Fundamentals
Modern Society will find no solution to the ecological
problem unless it takes a serious look at its lifestyles.
(Pope John Paul II)
at discrete
times
Quantizer
Previous topic
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
1
Updated
9/2004
Encode and Pulse modulate
Analogue
signal
Updated
9/2004
0
0
0
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Nonuniform quantization
A-law compander
Vout
♦ The µ-law compander is
characterized by
♦ Vout = log(1+µVin) / log(1+µ)
Updated
9/2004
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Encoder;
Pulse
modulate
PCM
wave
© 2003-2007
Future topic
Communication Networks
2506 Page 23 May 3, 2007
What I have is only borrowed from God so
that I may serve others. H Anthony Chan
Modern Society will find no solution to the ecological problem unless it
takes a serious look at its lifestyles. (Pope John Paul II)
Communication Networks
2506 Page 24 May 3, 2007