Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Digi Modulei 7: Stochastic Signal Processing and Quantization
n a
ndo 2013
ra
olo P
Module Overview:
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Quantization
l
ta
Digi doni a 13
A/D and D/A conversion
an 20
lo Pr
Pao
Module 7.2:
Module 7.2:
ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Digi doni a 13 Module 7.1: Stochastic signal processing
an 20
lo Pr
ao
Overview:
7.1
ing
i
cess Vetterl
ro in
al P
t
Power spectral density
Sign nd Mar
l
ta
D i doni a 13
Filtering a stochastic signal ig
an 20
lo Pr
Noise
Pao
A simple random signal
Overview:
7.1
ing
i
cess Vetterl
ro in
al P
t
Power spectral density
Sign nd Mar
l
ta
D i doni a 13
Filtering a stochastic signal ig
an 20
lo Pr
Noise
Pao
A simple random signal
Overview:
7.1
ing
i
cess Vetterl
ro in
al P
t
Power spectral density
Sign nd Mar
l
ta
D i doni a 13
Filtering a stochastic signal ig
an 20
lo Pr
Noise
Pao
A simple random signal
Overview:
7.1
ing
i
cess Vetterl
ro in
al P
t
Power spectral density
Sign nd Mar
l
ta
D i doni a 13
Filtering a stochastic signal ig
an 20
lo Pr
Noise
Pao
A simple random signal
7.1
e
roce
Vett
l Si
nd M
igita probabilistically
stochastic signals can be described oni a
D
3
d
201
Pran signals? Yes!
lo
can we do signal processing with random
Pao
we usually know something, though: gnal P speechin
s[n] is a art signal
will not develop stochastic signal processing rigorously but give enough intuition to deal
with things such as noise
7.1
e
roce
Vett
l Si
nd M
igita probabilistically
stochastic signals can be described oni a
D
3
d
201
Pran signals? Yes!
lo
can we do signal processing with random
Pao
we usually know something, though: gnal P speechin
s[n] is a art signal
will not develop stochastic signal processing rigorously but give enough intuition to deal
with things such as noise
7.1
e
roce
Vett
l Si
nd M
igita probabilistically
stochastic signals can be described oni a
D
3
d
201
Pran signals? Yes!
lo
can we do signal processing with random
Pao
we usually know something, though: gnal P speechin
s[n] is a art signal
will not develop stochastic signal processing rigorously but give enough intuition to deal
with things such as noise
7.1
e
roce
Vett
l Si
nd M
igita probabilistically
stochastic signals can be described oni a
D
3
d
201
Pran signals? Yes!
lo
can we do signal processing with random
Pao
we usually know something, though: gnal P speechin
s[n] is a art signal
will not develop stochastic signal processing rigorously but give enough intuition to deal
with things such as noise
7.1
e
roce
Vett
l Si
nd M
igita probabilistically
stochastic signals can be described oni a
D
3
d
201
Pran signals? Yes!
lo
can we do signal processing with random
Pao
we usually know something, though: gnal P speechin
s[n] is a art signal
will not develop stochastic signal processing rigorously but give enough intuition to deal
with things such as noise
7.1
e
roce
Vett
l Si
nd M
igita probabilistically
stochastic signals can be described oni a
D
3
d
201
Pran signals? Yes!
lo
can we do signal processing with random
Pao
we usually know something, though: gnal P speechin
s[n] is a art signal
will not develop stochastic signal processing rigorously but give enough intuition to deal
with things such as noise
x[n] =
in
r
+1 if the outcome ofcthesn-th toss islihead
o es n V
rof the n-th etteis tail
P
1 if the outcome
nal
rti toss
a
Sig
ital ni and M
ig
D
do
13
Pran 20
lo
7.1
x[n] =
in
r
+1 if the outcome ofcthesn-th toss islihead
o es n V
rof the n-th etteis tail
P
1 if the outcome
nal
rti toss
a
Sig
ital ni and M
ig
D
do
13
Pran 20
lo
7.1
every time we turn on the generator we obtain a dierent realization of the signal
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
7.1
every time we turn on the generator we obtain a dierent realization of the signal
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
0
0
10
15
20
25
30
7.1
every time we turn on the generator we obtain a dierent realization of the signal
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
0
0
10
15
20
25
30
7.1
every time we turn on the generator we obtain a dierent realization of the signal
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
0
0
10
15
20
25
30
7.1
every time we turn on the generator we obtain a dierent realization of the signal
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
0
0
10
15
20
25
30
7.1
Spectral properties?
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
7.1
Spectral properties?
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
96
|X [k]|2
80
64
48
32
16
0
0
7.1
10
15
20
25
30
Spectral properties?
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
96
|X [k]|2
80
64
48
32
16
0
0
7.1
10
15
20
25
30
Spectral properties?
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
96
|X [k]|2
80
64
48
32
16
0
0
7.1
10
15
20
25
30
Spectral properties?
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
396
|X [k]|2
330
264
198
132
66
0
0
7.1
10
20
30
40
50
60
Spectral properties?
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
798
|X [k]|2
665
532
399
266
133
0
0
7.1
21
42
63
84
105
126
Averaging
7.1
ing e i
cess andeits rl expectation
in probability theory the average is across realizations V tt called
l Pro
gna Martin
l Si
for the coin-toss signal:
igita oni and 3
D
d is tail]
1
E [x[n]] = 1 P[n-th toss 20 + 1 P[n-th toss is head] = 0
Pran
lo
Pao
so the average value for each sample is zero...
Averaging
7.1
ing e i
cess andeits rl expectation
in probability theory the average is across realizations V tt called
l Pro
gna Martin
l Si
for the coin-toss signal:
igita oni and 3
D
d is tail]
1
E [x[n]] = 1 P[n-th toss 20 + 1 P[n-th toss is head] = 0
Pran
lo
Pao
so the average value for each sample is zero...
Averaging
7.1
ing e i
cess andeits rl expectation
in probability theory the average is across realizations V tt called
l Pro
gna Martin
l Si
for the coin-toss signal:
igita oni and 3
D
d is tail]
1
E [x[n]] = 1 P[n-th toss 20 + 1 P[n-th toss is head] = 0
Pran
lo
Pao
so the average value for each sample is zero...
Averaging
7.1
ing e i
cess andeits rl expectation
in probability theory the average is across realizations V tt called
l Pro
gna Martin
l Si
for the coin-toss signal:
igita oni and 3
D
d is tail]
1
E [x[n]] = 1 P[n-th toss 20 + 1 P[n-th toss is head] = 0
Pran
lo
Pao
so the average value for each sample is zero...
7.1
sing terli
et
al P artin V
Sign
E [X [k]] = 0
ital ni and M
Dig
13
however the signal moves, soando
Pr its energy or0power must be nonzero
2
lo
Pao
... as a consequence, averaging the DFT willrnotes
oc work
7.1
sing terli
et
al P artin V
Sign
E [X [k]] = 0
ital ni and M
Dig
13
however the signal moves, soando
Pr its energy or0power must be nonzero
2
lo
Pao
... as a consequence, averaging the DFT willrnotes
oc work
7.1
sing terli
et
al P artin V
Sign
E [X [k]] = 0
ital ni and M
Dig
13
however the signal moves, soando
Pr its energy or0power must be nonzero
2
lo
Pao
... as a consequence, averaging the DFT willrnotes
oc work
ing e li
cess (2Ne+t1)r=
Ex = lim
|x[n]| r= lim V t
l P o rti
N
n=N n
g a MNn
a
l Si
igita oni and 3
D
however it has nite power over any interval: 1
d
Pran 20
lo
N
Pao
1
2
N
Px = lim
7.1
2N + 1
n=N
|x[n]| = 1
Averaging
7.1
ing
i
cess Vetterl
ro in
al P
pick a number of iterations M
t
Sign nd Mar
l
ta
run the signal generator M times and ni a M3
Digi do obtain 1 N-point realizations
20
ran
l realization
compute the DFT of each o P
Pao
pick an interval length N
10
Averaging
7.1
ing
i
cess Vetterl
ro in
al P
pick a number of iterations M
t
Sign nd Mar
l
ta
run the signal generator M times and ni a M3
Digi do obtain 1 N-point realizations
20
ran
l realization
compute the DFT of each o P
Pao
pick an interval length N
10
Averaging
7.1
ing
i
cess Vetterl
ro in
al P
pick a number of iterations M
t
Sign nd Mar
l
ta
run the signal generator M times and ni a M3
Digi do obtain 1 N-point realizations
20
ran
l realization
compute the DFT of each o P
Pao
pick an interval length N
10
Averaging
7.1
ing
i
cess Vetterl
ro in
al P
pick a number of iterations M
t
Sign nd Mar
l
ta
run the signal generator M times and ni a M3
Digi do obtain 1 N-point realizations
20
ran
l realization
compute the DFT of each o P
Pao
pick an interval length N
10
Averaging
7.1
ing
i
cess Vetterl
ro in
al P
pick a number of iterations M
t
Sign nd Mar
l
ta
run the signal generator M times and ni a M3
Digi do obtain 1 N-point realizations
20
ran
l realization
compute the DFT of each o P
Pao
pick an interval length N
10
M=1
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
P
0
0
7.1
10
15
20
25
30
11
M = 10
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
P
0
0
7.1
10
15
20
25
30
11
M = 1000
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
P
0
0
7.1
10
15
20
25
30
11
M = 5000
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
P
0
0
7.1
10
15
20
25
30
11
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
it looks very much as if P[k]git1
=a
Di
oni a 013
2 tends to the energy and
if |XN [k]|
Pr distribution2 frequency...
in
aolo
P
...|X [k]|2 /N tends to the power distribution (aka density) in frequency
the frequency-domain representation for stochastic processes is the power spectral density
7.1
12
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
it looks very much as if P[k]git1
=a
Di
oni a 013
2 tends to the energy and
if |XN [k]|
Pr distribution2 frequency...
in
aolo
P
...|X [k]|2 /N tends to the power distribution (aka density) in frequency
the frequency-domain representation for stochastic processes is the power spectral density
7.1
12
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
it looks very much as if P[k]git1
=a
Di
oni a 013
2 tends to the energy and
if |XN [k]|
Pr distribution2 frequency...
in
aolo
P
...|X [k]|2 /N tends to the power distribution (aka density) in frequency
the frequency-domain representation for stochastic processes is the power spectral density
7.1
12
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
it looks very much as if P[k]git1
=a
Di
oni a 013
2 tends to the energy and
if |XN [k]|
Pr distribution2 frequency...
in
aolo
P
...|X [k]|2 /N tends to the power distribution (aka density) in frequency
the frequency-domain representation for stochastic processes is the power spectral density
7.1
12
7.1
g
Vet
Pro
alslowlyrtinsuper-fast
i.e., we cannot predict if the signal Sign
moves
a or
ital ni and M
Dig do
this is because each sample is independent of each other: we could have a realization of all
13
Pran 20
ones or a realization in which the sign changes every other sample or anything in between
lo
Pao
13
7.1
g
Vet
Pro
alslowlyrtinsuper-fast
i.e., we cannot predict if the signal Sign
moves
a or
ital ni and M
Dig do
this is because each sample is independent of each other: we could have a realization of all
13
Pran 20
ones or a realization in which the sign changes every other sample or anything in between
lo
Pao
13
7.1
g
Vet
Pro
alslowlyrtinsuper-fast
i.e., we cannot predict if the signal Sign
moves
a or
ital ni and M
Dig do
this is because each sample is independent of each other: we could have a realization of all
13
Pran 20
ones or a realization in which the sign changes every other sample or anything in between
lo
Pao
13
7.1
sing
al P
tin V
Sign nd Mar
y [n] = (x[n] + x[n 1])/2
tal
Digi doni a 13
what is the power spectral density?
an 20
lo Pr
Pao
li
14
7.1
sing
al P
tin V
Sign nd Mar
y [n] = (x[n] + x[n 1])/2
tal
Digi doni a 13
what is the power spectral density?
an 20
lo Pr
Pao
li
14
7.1
sing
al P
tin V
Sign nd Mar
y [n] = (x[n] + x[n 1])/2
tal
Digi doni a 13
what is the power spectral density?
an 20
lo Pr
Pao
li
14
M=1
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
P
0
0
7.1
10
15
20
25
30
15
M = 10
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
P
0
0
7.1
10
15
20
25
30
15
M = 5000
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
P
0
0
7.1
10
15
20
25
30
15
M = 5000
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
|(1 + e j(2/N)k )/2|2
P
0
0
7.1
10
15
20
25
30
15
7.1
ing
i
cess Vetterl
ro in
2 , where H[k] = DFT {h[n]}
it looks like Py [k] = Px [k] |H[k]|
al P
t
Sign nd Mar
l
can we generalize these resultsita
Dig beyond ia a 1set of samples?
n nite
ndo 20 3
Pra
aolo
P
16
7.1
ing
i
cess Vetterl
ro in
2 , where H[k] = DFT {h[n]}
it looks like Py [k] = Px [k] |H[k]|
al P
t
Sign nd Mar
l
can we generalize these resultsita
Dig beyond ia a 1set of samples?
n nite
ndo 20 3
Pra
aolo
P
16
ing
i
cess Vetterl
j
ro {rxn
Px (e )al P
= DTFT ti [n]}
Sign nd Mar
al
where rx [n] = E [x[k] x[n + k]]it the autocorrelation of the process.
Dig is doni a 13
an 20
for a ltered stochastic process y [n] = H{x[n]}, it is:
lo Pr
Pao
Py (e j ) = |H(e j )|2 Px (e j )
7.1
17
ing
i
cess Vetterl
j
ro {rxn
Px (e )al P
= DTFT ti [n]}
Sign nd Mar
al
where rx [n] = E [x[k] x[n + k]]it the autocorrelation of the process.
Dig is doni a 13
an 20
for a ltered stochastic process y [n] = H{x[n]}, it is:
lo Pr
Pao
Py (e j ) = |H(e j )|2 Px (e j )
7.1
17
ing
i
cess Vetterl
j
ro {rxn
Px (e )al P
= DTFT ti [n]}
Sign nd Mar
al
where rx [n] = E [x[k] x[n + k]]it the autocorrelation of the process.
Dig is doni a 13
an 20
for a ltered stochastic process y [n] = H{x[n]}, it is:
lo Pr
Pao
Py (e j ) = |H(e j )|2 Px (e j )
7.1
17
ing
i
cess Vetterl
ro in
al P
lters designed for deterministic signals still workart magnitude) in the stochastic case
Sign nd M (in
ital i a
Digsincedondont know the shape of a realization in advance
we lose the concept of phase
we
13
Pran 20
lo
Pao
key points:
7.1
18
ing
i
cess Vetterl
ro in
al P
lters designed for deterministic signals still workart magnitude) in the stochastic case
Sign nd M (in
ital i a
Digsincedondont know the shape of a realization in advance
we lose the concept of phase
we
13
Pran 20
lo
Pao
key points:
7.1
18
Noise
noise is everywhere:
ing
i
cess Vetterl
sum of extraneous interferences
ro in
al P
t
Sign nd Mar
quantization and numerical ital
errors
Dig doni a 13
...
an 20
lo Pr
P ao
we can model noise asa stochastic signal
thermal noise
7.1
19
Noise
noise is everywhere:
ing
i
cess Vetterl
sum of extraneous interferences
ro in
al P
t
Sign nd Mar
quantization and numerical ital
errors
Dig doni a 13
...
an 20
lo Pr
P ao
we can model noise asa stochastic signal
thermal noise
7.1
19
Noise
noise is everywhere:
ing
i
cess Vetterl
sum of extraneous interferences
ro in
al P
t
Sign nd Mar
quantization and numerical ital
errors
Dig doni a 13
...
an 20
lo Pr
P ao
we can model noise asa stochastic signal
thermal noise
7.1
19
Noise
noise is everywhere:
ing
i
cess Vetterl
sum of extraneous interferences
ro in
al P
t
Sign nd Mar
quantization and numerical ital
errors
Dig doni a 13
...
an 20
lo Pr
P ao
we can model noise asa stochastic signal
thermal noise
7.1
19
Noise
noise is everywhere:
ing
i
cess Vetterl
sum of extraneous interferences
ro in
al P
t
Sign nd Mar
quantization and numerical ital
errors
Dig doni a 13
...
an 20
lo Pr
P ao
we can model noise asa stochastic signal
thermal noise
7.1
19
Noise
noise is everywhere:
ing
i
cess Vetterl
sum of extraneous interferences
ro in
al P
t
Sign nd Mar
quantization and numerical ital
errors
Dig doni a 13
...
an 20
lo Pr
P ao
we can model noise asa stochastic signal
thermal noise
7.1
19
Noise
noise is everywhere:
ing
i
cess Vetterl
sum of extraneous interferences
ro in
al P
t
Sign nd Mar
quantization and numerical ital
errors
Dig doni a 13
...
an 20
lo Pr
P ao
we can model noise asa stochastic signal
thermal noise
7.1
19
White noise
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
rw [n] = 2 [n]
Pw (e j ) = 2
7.1
20
White noise
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
rw [n] = 2 [n]
Pw (e j ) = 2
7.1
20
White noise
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
rw [n] = 2 [n]
Pw (e j ) = 2
7.1
20
White noise
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
Pw (e j )
7.1
/2
/2
21
White noise
7.1
the PSD is independent of the probability distributionng the single samples (depends only
i of
i
cess etterl
on the variance)
ro
al P artin V
Sign ndfor the signal
distribution is important to estimate bounds M
tal
Digi doni a 13
very often a Gaussian distribution models the experimental data the best
an 20
lo Pr
o
P Gaussian noise
AWGN: additive white a
22
White noise
7.1
the PSD is independent of the probability distributionng the single samples (depends only
i of
i
cess etterl
on the variance)
ro
al P artin V
Sign ndfor the signal
distribution is important to estimate bounds M
tal
Digi doni a 13
very often a Gaussian distribution models the experimental data the best
an 20
lo Pr
o
P Gaussian noise
AWGN: additive white a
22
White noise
7.1
the PSD is independent of the probability distributionng the single samples (depends only
i of
i
cess etterl
on the variance)
ro
al P artin V
Sign ndfor the signal
distribution is important to estimate bounds M
tal
Digi doni a 13
very often a Gaussian distribution models the experimental data the best
an 20
lo Pr
o
P Gaussian noise
AWGN: additive white a
22
White noise
7.1
the PSD is independent of the probability distributionng the single samples (depends only
i of
i
cess etterl
on the variance)
ro
al P artin V
Sign ndfor the signal
distribution is important to estimate bounds M
tal
Digi doni a 13
very often a Gaussian distribution models the experimental data the best
an 20
lo Pr
o
P Gaussian noise
AWGN: additive white a
22
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Module 7.2: Quantization
Digi doni a 13
n
0
Pra
2
aolo
Overview:
7.2
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Uniform quantization and errortanalysis
l
a
Digi doni a 13
Clipping, saturation, compandingn
0
a
2
lo Pr
Pao
Quantization
23
Overview:
7.2
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Uniform quantization and errortanalysis
l
a
Digi doni a 13
Clipping, saturation, compandingn
0
a
2
lo Pr
Pao
Quantization
23
Overview:
7.2
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Uniform quantization and errortanalysis
l
a
Digi doni a 13
Clipping, saturation, compandingn
0
a
2
lo Pr
Pao
Quantization
23
Quantization
7.2
sing
li
V
nal P Ma tin
Sigontona niterset of values
we need to map the range of a tsignal
d
al
Digi doni a 13
irreversible loss of information rn
0
a quantization noise
2
lo P
Pao
24
Quantization
7.2
sing
li
V
nal P Ma tin
Sigontona niterset of values
we need to map the range of a tsignal
d
al
Digi doni a 13
irreversible loss of information rn
0
a quantization noise
2
lo P
Pao
24
Quantization
7.2
sing
li
V
nal P Ma tin
Sigontona niterset of values
we need to map the range of a tsignal
d
al
Digi doni a 13
irreversible loss of information rn
0
a quantization noise
2
lo P
Pao
24
Quantization schemes
x[n]
Q{}
x [n]
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Several factors at play:
ta
ia
Digi
storage budget (bits per sample) don
n
013
Pra
2
lo
storage scheme (xed ao
Ppoint, oating point)
7.2
25
Quantization schemes
x[n]
Q{}
x [n]
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Several factors at play:
ta
ia
Digi
storage budget (bits per sample) don
n
013
Pra
2
lo
storage scheme (xed ao
Ppoint, oating point)
7.2
25
Quantization schemes
x[n]
Q{}
x [n]
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Several factors at play:
ta
ia
Digi
storage budget (bits per sample) don
n
013
Pra
2
lo
storage scheme (xed ao
Ppoint, oating point)
7.2
25
Quantization schemes
x[n]
Q{}
x [n]
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Several factors at play:
ta
ia
Digi
storage budget (bits per sample) don
n
013
Pra
2
lo
storage scheme (xed ao
Ppoint, oating point)
7.2
25
Quantization schemes
x[n]
Q{}
x [n]
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Several factors at play:
ta
ia
Digi
storage budget (bits per sample) don
n
013
Pra
2
lo
storage scheme (xed ao
Ppoint, oating point)
7.2
25
Scalar quantization
x[n]
Q{}
x [n]
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
The simplest quantizer:
0
an scalar)
each sample is encoded individually (hence2
lo Pr
Pao
7.2
26
Scalar quantization
x[n]
Q{}
x [n]
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
The simplest quantizer:
0
an scalar)
each sample is encoded individually (hence2
lo Pr
Pao
7.2
26
Scalar quantization
x[n]
Q{}
x [n]
ing
i
cess RVbpsterl
ro in et
al P
t
Sign nd Mar
l
ta
Digi doni a 13
The simplest quantizer:
an 20
each sample is encoded individually (hence scalar)
lo Pr
Pao
7.2
26
Scalar quantization
Assume input signal bounded: A x[n] B for all n:
7.2
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
27
Scalar quantization
Assume input signal bounded: A x[n] B for all n:
7.2
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
27
Scalar quantization
Assume input signal bounded: A x[n] B for all n:
7.2
x0
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an
20
lo Pr x1 x2
x3
ao
27
Scalar quantization
Example for R = 2:
A
i0
k = 10 ssing
krli 11
=
roce in Vette x
l
x0
x1
3
ax2P
t
Sign nd Mar
l
ta
i
i3
D1igi idoni a 13
2
ran 20 I
I0 olo P I1
I3
2
Pa
k = 00
k = 01
7.2
i4
28
Scalar quantization
Example for R = 2:
A
i0
k = 10 ssing
krli 11
=
roce in Vette x
l
x0
x1
3
ax2P
t
Sign nd Mar
l
ta
i
i3
D1igi idoni a 13
2
ran 20 I
I0 olo P I1
I3
2
Pa
k = 00
k = 01
7.2
i4
28
Quantization Error
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
model x[n] as a stochastic process
l
ta
Digi doni a 13
model error as a white noise sequence:
an 20
lo Pr
error samples are uncorrelated
Pao
all error samples have the same distribution
7.2
29
Quantization Error
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
model x[n] as a stochastic process
l
ta
Digi doni a 13
model error as a white noise sequence:
an 20
lo Pr
error samples are uncorrelated
Pao
all error samples have the same distribution
7.2
29
Quantization Error
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
model x[n] as a stochastic process
l
ta
Digi doni a 13
model error as a white noise sequence:
an 20
lo Pr
error samples are uncorrelated
Pao
all error samples have the same distribution
7.2
29
Quantization Error
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
model x[n] as a stochastic process
l
ta
Digi doni a 13
model error as a white noise sequence:
an 20
lo Pr
error samples are uncorrelated
Pao
all error samples have the same distribution
7.2
29
Quantization Error
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
model x[n] as a stochastic process
l
ta
Digi doni a 13
model error as a white noise sequence:
an 20
lo Pr
error samples are uncorrelated
Pao
all error samples have the same distribution
7.2
29
Uniform quantization
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
7.2
30
Uniform quantization
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
7.2
30
Uniform quantization
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
7.2
30
Uniform quantization
Mean Square Error is the variance of the error signal:
2
e = E |Q{x[n]} x[n]|2
ing
i
cess 2 Vetterl
ro} i)n d
=
fx nal P
( )(Q{ rt
ASig
Ma
l
igita 1 ni and 3
D 2 do
ran x (01 k )2 d
f 2 )(
x
lo P=
o
I
B
Pa
k=0
7.2
31
Uniform quantization
Mean Square Error is the variance of the error signal:
2
e = E |Q{x[n]} x[n]|2
ing
i
cess 2 Vetterl
ro} i)n d
=
fx nal P
( )(Q{ rt
ASig
Ma
l
igita 1 ni and 3
D 2 do
ran x (01 k )2 d
f 2 )(
x
lo P=
o
I
B
Pa
k=0
7.2
31
Uniform quantization
Mean Square Error is the variance of the error signal:
2
e = E |Q{x[n]} x[n]|2
ing
i
cess 2 Vetterl
ro} i)n d
=
fx nal P
( )(Q{ rt
ASig
Ma
l
igita 1 ni and 3
D 2 do
ran x (01 k )2 d
f 2 )(
x
lo P=
o
I
B
Pa
k=0
7.2
31
Uniform quantization
Mean Square Error is the variance of the error signal:
2
e = E |Q{x[n]} x[n]|2
ing
i
cess 2 Vetterl
ro} i)n d
=
fx nal P
( )(Q{ rt
ASig
Ma
l
igita 1 ni and 3
D 2 do
ran x (01 k )2 d
f 2 )(
x
lo P=
o
I
B
Pa
k=0
7.2
31
Uniform-input hypothesis:
fx ( ) =
1
sing terli
Brces
A
o
et
al P
tin V
Sign nd Mar
tal
Digi doni a 13
an 2 1 20 )2
(k
x
2
lo Pr =
o
d
R
Pa
7.2
k=0
Ik
B A
32
=
m
x
m
x
(k ssi )g
x n2
i
cB A Vd terl
rko e in et
al PI
2R 1
k=0
t
gn
M r
l Si2( nd ) a
ta
ia
Digi= donxm 13
nI B 2A d
0
a
lo Pr
A+m+
ao
m
7.2
(m )2
x
B A
A+m
33
=
m
x
m
x
(k ssi )g
x n2
i
cB A Vd terl
rko e in et
al PI
2R 1
k=0
t
gn
M r
l Si2( nd ) a
ta
ia
Digi= donxm 13
nI B 2A d
0
a
lo Pr
A+m+
ao
m
7.2
(m )2
x
B A
A+m
33
=
m
x
m
x
(k ssi )g
x n2
i
cB A Vd terl
rko e in et
al PI
2R 1
k=0
t
gn
M r
l Si2( nd ) a
ta
ia
Digi= donxm 13
nI B 2A d
0
a
lo Pr
A+m+
ao
m
7.2
(m )2
x
B A
A+m
33
ing
i
cess Vetterl
ro + m +
= 0 for am P A rtin 2
nx l =
m
x
l Sig nd Ma
ta
Digi doni a 13
an 20
optimal quantizationPpoint is the intervals midpoint, for all intervals
lo r
Pao
7.2
2
e
34
1.00
111
0.75
110
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
0.50
0.25
101
100
x[n]
010
001
000
0.25
0.50
0.75
1.00
0.25
0.50
0.75
1.00
7.2
35
A+k+
ng
(A + k +s/2 e2 li
e i
cBs A Vett ) r d
o
in
al Pr
n
rt
l Sig nd Ma
a
t
a2
Digi (/2 ni ) d 13
= 2R
do A 20
n
0 a B
lo Pr
Pao 2
k=0
7.2
A+k
12
36
A+k+
ng
(A + k +s/2 e2 li
e i
cBs A Vett ) r d
o
in
al Pr
n
rt
l Sig nd Ma
a
t
a2
Digi (/2 ni ) d 13
= 2R
do A 20
n
0 a B
lo Pr
Pao 2
k=0
7.2
A+k
12
36
A+k+
ng
(A + k +s/2 e2 li
e i
cBs A Vett ) r d
o
in
al Pr
n
rt
l Sig nd Ma
a
t
a2
Digi (/2 ni ) d 13
= 2R
do A 20
n
0 a B
lo Pr
Pao 2
k=0
7.2
A+k
12
36
Error analysis
error energy
2
e = 2 /12,
in dB
ing
i
cess Vetterl
roA)2/12
2
x =al P
(B
tin
Sign nd Mar
l
ta
Digi doni a 13
an 20 22R
SNR =
lo Pr
o
signal energy
= (B A)/2R
Pa
7.2
37
Error analysis
error energy
2
e = 2 /12,
in dB
ing
i
cess Vetterl
roA)2/12
2
x =al P
(B
tin
Sign nd Mar
l
ta
Digi doni a 13
an 20 22R
SNR =
lo Pr
o
signal energy
= (B A)/2R
Pa
7.2
37
Error analysis
error energy
2
e = 2 /12,
in dB
ing
i
cess Vetterl
roA)2/12
2
x =al P
(B
tin
Sign nd Mar
l
ta
Digi doni a 13
an 20 22R
SNR =
lo Pr
o
signal energy
= (B A)/2R
Pa
7.2
37
Error analysis
error energy
2
e = 2 /12,
in dB
ing
i
cess Vetterl
roA)2/12
2
x =al P
(B
tin
Sign nd Mar
l
ta
Digi doni a 13
an 20 22R
SNR =
lo Pr
o
signal energy
= (B A)/2R
Pa
7.2
37
7.2
ing
i
cess Vetterl
ro 96dB
max al P = tin
SNR
Sign nd Mar
l
ta
a DVD has 24 bits/sample: ig
D i doni a 13
an max 20= 144dB
SNR
lo Pr
ao
P
38
7.2
ing
i
cess Vetterl
ro 96dB
max al P = tin
SNR
Sign nd Mar
l
ta
a DVD has 24 bits/sample: ig
D i doni a 13
an max 20= 144dB
SNR
lo Pr
ao
P
38
Rate/Distortion Curve
2
distortion (e )
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
rate (R)
7.2
39
ing
i
cess Vetterl
ro in
lP
clip samples to [A, B]: linear distortionna be put tto good use in guitar eects!)
Sig (cand Mar
ital n an
Digsimulatesithe saturation curves of analog electronics
smoothly saturate input: this
do
13
Pran 20
lo
Pao
7.2
40
ing
i
cess Vetterl
ro in
lP
clip samples to [A, B]: linear distortionna be put tto good use in guitar eects!)
Sig (cand Mar
ital n an
Digsimulatesithe saturation curves of analog electronics
smoothly saturate input: this
do
13
Pran 20
lo
Pao
7.2
40
Clipping vs saturation
1 ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13 0
0
1
2an
2
1
2
lo Pr
ao
0
2
7.2
41
Digi doni= 2 13
n
0
Pra
7.2
lo
design optimal quantizer for input distribution, if known (Lloyd-Max algorithm)
Pao
use companders
42
Digi doni= 2 13
n
0
Pra
7.2
lo
design optimal quantizer for input distribution, if known (Lloyd-Max algorithm)
Pao
use companders
42
Digi doni= 2 13
n
0
Pra
7.2
lo
design optimal quantizer for input distribution, if known (Lloyd-Max algorithm)
Pao
use companders
42
-law compander
C{x}
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ita
ln(1 +Dig
|x[n]|) oni a
C{x[n]} = sgn(x[n])
nd
013
ln(1o Pra
+ )
2
l
Pao
7.2
43
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Digi doni a 13 Module 7.3: A/D and D/A Conversion
an 20
lo Pr
ao
Overview:
7.3
ing
i
cess Vetterl
ro in
Analog-to-digital (A/D) conversion
al P
t
Sign nd Mar
l
ta
Digital-to-analog (D/A) conversion ni a
Digi do
13
Pran 20
lo
Pao
44
Overview:
7.3
ing
i
cess Vetterl
ro in
Analog-to-digital (A/D) conversion
al P
t
Sign nd Mar
l
ta
Digital-to-analog (D/A) conversion ni a
Digi do
13
Pran 20
lo
Pao
44
7.3
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
quantization discretized amplitude
l
ta
Digi doni a 13
how is it done in practice?
an 20
lo Pr
Pao
sampling discretizes time
45
7.3
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
quantization discretized amplitude
l
ta
Digi doni a 13
how is it done in practice?
an 20
lo Pr
Pao
sampling discretizes time
45
7.3
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
quantization discretized amplitude
l
ta
Digi doni a 13
how is it done in practice?
an 20
lo Pr
Pao
sampling discretizes time
45
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
7.3
46
vp
ing
ivo
cess Vetterl
ro in
vn
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
vo = G (vp vn )
7.3
47
vp
ing
ivo
cess Vetterl
ro in
vn
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
vo = G (vp vn )
7.3
47
7.3
ing
i
cess Vetterl
ro in
innite input gain (G )
al P
t
Sign nd Mar
l
ta
zero input current
Digi doni a 13
an 20
lo Pr
Pao
48
7.3
ing
i
cess Vetterl
ro in
innite input gain (G )
al P
t
Sign nd Mar
l
ta
zero input current
Digi doni a 13
an 20
lo Pr
Pao
48
ing
i
cess Vetterl
ro in
vo
al P
t
Sign nd Mar
l
ta
vp
vn
Digi doni a 13
ran 20
lo P
Pao
Vcc
7.3
49
ing
i
cess Vetterl y
ro in
VT
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
y=
7.3
+Vcc
Vcc
if x > VT
if x < VT
50
ing
i
cess Vetterl y
ro in
VT
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
y=
7.3
+Vcc
Vcc
if x > VT
if x < VT
50
ing
iy
cess Vetterl
l Pro
gna Martin
l Si
igita oni and 3
D
d
1
Pran 20
lo
ao
y =x
7.3
51
ing
iy
cess Vetterl
l Pro
gna Martin
l Si
igita oni and 3
D
d
1
Pran 20
lo
ao
y =x
7.3
51
g
rocessin etterli
al P
tin V
y
Sign nd Mar
ital ni a +
Dig do
13
Pran 20
aolo
R1
y = (R2 /R1 )x
7.3
52
g
rocessin etterli
al P
tin V
y
Sign nd Mar
ital ni a +
Dig do
13
Pran 20
aolo
R1
y = (R2 /R1 )x
7.3
52
x(t)
k(t)
ing
i
cess Vetterl
ro in +
al P
t
+
Sign nd Mar C1
l
ta
Digi doni a 13
an 20
lo Pr
ao
T1
x[n]
P
Fs
7.3
53
ing
i
cess MSB tterl
ro in Ve
al P
t
Sign nd Mar
l
ta
01
Digi doni a 13
n
0
LSB
a
2
lo Pr
ao
+0.5V0
7.3
R
0.5V0
10
V0
11
+V0
54
D/A Converter
LSB
V0
2R
...
MSB
ing
i
cess Vetterl
ro in
2R
2R
2R al P
R t
Sign nd Mar
l
a
igita
R D R doni
13
n
0
Pra
2
lo
x(t)
Pao
+
7.3
55
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
END OF MODULE 7
P