Chapter 4: Sampling and Quantization
A First Course in Digital Communications
Ha H. Nguyen and E. Shwedyk February 2009
A First Course in Digital Communications 1/41
A First Course in Digital Communications Ha H. Nguyen and E. Shwedyk - - PowerPoint PPT Presentation
Chapter 4: Sampling and Quantization A First Course in Digital Communications Ha H. Nguyen and E. Shwedyk February 2009 A First Course in Digital Communications 1/41 Chapter 4: Sampling and Quantization Introduction Though many message
Chapter 4: Sampling and Quantization
A First Course in Digital Communications 1/41
Chapter 4: Sampling and Quantization
Sampling: How many samples per second are needed to exactly represent the signal and how to reconstruct the analog message from the samples? Quantization: To represent the sample value by a digital symbol chosen from a finite set. What is the choice of a discrete set of amplitudes to represent the continuous range of possible amplitudes and how to measure the distortion due to quantization? Encoding: Map the quantized signal sample into a string of digital, typically binary, symbols.
A First Course in Digital Communications 2/41
Chapter 4: Sampling and Quantization
−∞ =
− =
n s
nT t t s ) ( ) ( δ
✁∞ −∞ =
− =
n s s s
nT t nT m t m ) ( ) ( ) ( δ ) (t m
✂ ✄ ☎A First Course in Digital Communications 3/41
Chapter 4: Sampling and Quantization
) ( f M ) ( M
✒ ✓ ✔ ✒ ✕ ✔✖ ✕ ✗ ✘ ✙ ✔ ✚ ✕ ✛ ✜ ✢ ✣ ✢ ✜ ✤ ✣ ✥ ✢ ✦ ✧ ★ ✩ ✪ ✦ ✫ ✢ ✦ ✜ ★ ✩ ✪ ✦ ✣ ✫ ✬ ✢ ✦ ✭ ✢ ✦ ✮ ✯ ✰ ✱ ✲ ✰ ✳ ✲ ✴ ✯ ✵ ✶ ✷ ✸ ✹ ✺ ✻ ✼ ✻ ✶ ✽ ✾ ✶ ✽ ✾ ✿ ✶ ✽ ✿ ✶ ✽ ❀ ❁ ❂ ❃ ❄ ❅❅ ❆ ❇ ❈ ❉ ❊❋) ( f M s
s
T M ) (
A First Course in Digital Communications 4/41
Chapter 4: Sampling and Quantization
∞
∞
A First Course in Digital Communications 5/41
Chapter 4: Sampling and Quantization
Ms(f) = F{ms(t)} =
∞
m(nTs)F{δ(t − nTs)} =
∞
m(nTs)exp(−j2πnfTs) M(f) = Ms(f) fs = 1 fs
∞
m(nTs)exp(−j2πnfTs), −W ≤ f ≤ W. m(t) = F−1{M(f)} = ∞
−∞
M(f)exp(j2πft)df = W
−W
1 fs
∞
m(nTs)exp(−j2πnfTs)exp(j2πft)df = 1 fs
∞
m(nTs) W
−W
exp[j2πf(t − nTs)]df =
∞
m(nTs)sin[2πW(t − nTs)] πfs(t − nTs) =
∞
m n 2W
A First Course in Digital Communications 6/41
Chapter 4: Sampling and Quantization
A First Course in Digital Communications 7/41
Chapter 4: Sampling and Quantization
−5 −4 −3 −2 −1 1 2 3 4 5 0.5 1
x(t) Example of Band−limited Signal Reconstruction (Interpolation)
−5 −4 −3 −2 −1 1 2 3 4 5 0.5 1
x[n]=x(nTs)
−5 −4 −3 −2 −1 1 2 3 4 5 0.5 1
Normalized time (t/Ts) xr(t)
A First Course in Digital Communications 8/41
Chapter 4: Sampling and Quantization
∞ −∞ =
n s
∞ −∞ =
n s s
A First Course in Digital Communications 9/41
Chapter 4: Sampling and Quantization
) ( f M ) ( M
❪ ❫ ❴ ❵ ❫❛ ❵ ❜ ❝τ
❞ ❡ ❢ ❡ ❢ ❣ ❤ ✐ ❥ ❦ ❣ ❧ ♠ ♥ ♦ ♣ ❧ q ❣ ❧ q r ❣ ❧ s ❣ ❧( )
D ) ( f P
( )
1
D
( )
2
D
t ✉ ✈ ✇ ① ✈ ② ① ③ ✉ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ❶ ⑩ ⑤ ❷ ❸ ⑤ ❷ ❸ ❹ ⑤ ❷ ❹ ⑤ ❷ ❺ ❻ ❼ ❽ ❾ ❿❿ ➀ ➁ ➂ ➃ ➄➅) ( f M s
➆A First Course in Digital Communications 10/41
Chapter 4: Sampling and Quantization
∞
∞
∞
∞
A First Course in Digital Communications 11/41
Chapter 4: Sampling and Quantization
τ
➍ ➎ ➌ ➎ ➌ ➉ ➏∞ −∞ =
− =
n s
nT t t s ) ( ) ( δ
➐∞ −∞ =
−
n s s
nT t nT m ) ( ) ( δ ) (t m ) (t h t
➑ ➒τ
➓∞ −∞ =
− =
n s s s
nT t h nT m t m ) ( ) ( ) (
➔ → ➣A First Course in Digital Communications 12/41
Chapter 4: Sampling and Quantization
ms(t) =
∞
δ(t − nTs)
Ms(f) = F
∞
δ(t − nTs)
Ts H(f)
∞
M(f − nfs), where H(f) = F{h(t)} = τsinc(fτ)exp(−jπfτ).
↔ ↕ ➙ ➛ ➜ ➝ ➞ ➝) ( f M
➟ ➠ ➡ ➢ ➤ ➥ ➦ ➥ ➟ ➧ ➨ ➟ ➧ ➨ ➩ ➟ ➧ ➩ ➟ ➧) ( f M s
➠ ➫ ➭ ➯➲ ➳ ➵ ➲ ➸ ➺ ➳ ➻ ➼ ➽ ➢ ➾ ➚ ➪ ➶ ➹) ( f H τ 1 τ 1 −
➘ ➴➷ ➬ ➮ ➱ ✃ ➱ ➘ ❐ ❒ ➘ ❐ ❒ ❮ ➘ ❐ ❮ ➘ ❐ ❰ Ï Ð Ñ Ò ÓÓ Ô Õ Ö × Ø Ù) ( f M s
➴ Ú Ö Ò × ❒ × Ï Ñ ÓÒ Û Ñ Ö Õ Ü Ý ➬ ÞA First Course in Digital Communications 13/41
Chapter 4: Sampling and Quantization
f
ß àW W − sinc( )
s eq
T H f τ τ = ) (t ms ) (t m
á â ã ä å æ çè é ã ç ê ä å ë ê ì ç â è í î é ï ì ê ð â è ñ ò óA First Course in Digital Communications 14/41
Chapter 4: Sampling and Quantization
PAM transmission does not improve the noise performance
sharing the same transmission media by different sources. The multiplexing advantage offered by PAM comes at the expense of a larger transmission bandwidth.
A First Course in Digital Communications 15/41
Chapter 4: Sampling and Quantization
0.2 0.4 0.6 0.8 1 −1 −0.5 0.5 1 t m(t) (a) 0.2 0.4 0.6 0.8 1 0.5 1 1.5 2 t (b) 0.2 0.4 0.6 0.8 1 0.5 1 1.5 2 t (c) 0.2 0.4 0.6 0.8 1 0.5 1 1.5 2 t (d)
A First Course in Digital Communications 16/41
Chapter 4: Sampling and Quantization
{ }
) (
s
nT m
{ }
) ( ˆ
s
nT m
✠ ✠ ✠ ✡ ☛ ☛ ✡ ☛ ✠ ✠ ✠A First Course in Digital Communications 17/41
Chapter 4: Sampling and Quantization
) (
s
nT m ) ( ˆ
s
nT m
l
D
1 + l
D
1 − l
D
2 + l
D
1 − l
T
l
T
1 + l
T ) (
s
nT m ) ( ˆ
s
nT m
A First Course in Digital Communications 18/41
Chapter 4: Sampling and Quantization
2
) (
s
nT m ) ( ˆ
s
nT m
7
D
5
D
1
D
6
D
7
T
1
T
6
T
✜✢ ✣ ✤ ✥ ✦ ✧ ★ ✧ ✦ ✩ ✤ ✥ ✣ ✤ ✥ ✦ ✧ ★ ✧ ✦2
D
3
D
4
D
8
D
2
T
3
T
5
T
✪✫ ✬∆ ) (
s
nT m ) ( ˆ
s
nT m
7
D
1
D
6
D
7
T
1
T
6
T
✭ ✮ ✯ ✰ ✱ ✲ ✳ ✴ ✳ ✲ ✵ ✰ ✱ ✯ ✰ ✱ ✲ ✳ ✴ ✳ ✲2
D
3
D
4
D
8
D
2
T
3
T
9
D
8
T
✶ ✷ ✸∆ ∆
A First Course in Digital Communications 19/41
Chapter 4: Sampling and Quantization
(sec) t
s
T 2
s
T 3 s T 4
s
T 5 s T
s
T − 2
s
T − 3 s T − 5 s T − ˆ ( ) m t ( ) m t
❅ ❁ ❆ ✽ ❇ ✽ ❈ ❉ ✼ ❁ ❊ ❁ ✼ ❋max
m
max
m −
A First Course in Digital Communications 20/41
Chapter 4: Sampling and Quantization
L
∆,
2 < q ≤ ∆ 2
q =
−∆/2
−∆/2
max
A First Course in Digital Communications 21/41
Chapter 4: Sampling and Quantization
q = m2
max
3×22R
m =
−mmax m2fm(m)dm.
m
max
A First Course in Digital Communications 22/41
Chapter 4: Sampling and Quantization
m
max
A First Course in Digital Communications 23/41
Chapter 4: Sampling and Quantization
L
Dl
A First Course in Digital Communications 24/41
Chapter 4: Sampling and Quantization
l
Dj
l
Dl
Dl
A First Course in Digital Communications 25/41
Chapter 4: Sampling and Quantization
1
2
1
1
m 1 4
1 4
T1 = D1 mfm(m)dm D1 fm(m)dm = 1/4 mdm + 1
3
D1
1/4 mdm 1 4 + D1 − 1 4
1
3
= 1 + 8D2
1
8 + 16D1 (1) T2 = 1
D1 mfm(m)dm
1
D1 fm(m)dm
= 1 − D2
1
2(1 − D1) = 1 + D1 2 , D1 = T1 + T2 2 (2) ∴ 2D1 = 1 + 8D2
1
8 + 16D1 + 1 + D1 2 ⇒ 4D2
1 − D1 + 5
4 = 0 ⇒ D1 = 0.4478 (3) T1 = 0.1717; T2 = 0.7239. (4)
A First Course in Digital Communications 26/41
Chapter 4: Sampling and Quantization
l
l
Dl
Dl
1
2
3
A First Course in Digital Communications 27/41
Chapter 4: Sampling and Quantization
A First Course in Digital Communications 28/41
Chapter 4: Sampling and Quantization
y = ymax ln [1 + µ (|m|/mmax)] ln(1 + µ) sgn(m), (µ-law) y = ymax
A(|m|/mmax) 1+lnA
sgn(m), 0 <
|m| mmax ≤ 1 A
ymax
1+ln[A(|m|/mmax)] 1+lnA
sgn(m),
1
A <
|m| mmax < 1
, (A-law)
0.5 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Input m/mmax Output y/ymax 0.5 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Input m/mmax Output y/ymax µ=0 µ=1 µ=10 µ=255 A=10 A=1 A=87.6 A=250 (a) (b) A First Course in Digital Communications 29/41
Chapter 4: Sampling and Quantization
max
y
max
m y m ) (m g y = ∆
l
m
l
∆ dm dy
max
m −
max
y −
l
y
When L ≫ 1 , ∆ and ∆l are small ⇒ fm(m) is a constant fm(ml) over ∆l and ml is at the midpoint of the lth quantization region. Nq =
L
ml+ ∆l
2
ml− ∆l
2
(m − ml)2fm(m)dm ∼ =
L
fm(ml) ml+
∆l 2
ml− ∆l
2
(m − ml)2dm =
L
∆3
l
12 fm(ml).
A First Course in Digital Communications 30/41
Chapter 4: Sampling and Quantization
max
y
max
m y m ) (m g y = ∆
l
m
l
∆ dm dy
max
m −
max
y −
l
y
∆ ∆l = dg(m) dm
⇒ Nq = ∆2 12
L
fm(ml)
dm
2 ∆l. Since L ≫ 1, approximate the summation by an integral to obtain Nq = ∆2 12 mmax
−mmax
fm(m)
dm 2 dm = y2
max
3L2 mmax
−mmax
fm(m)
dm 2 dm.
A First Course in Digital Communications 31/41
Chapter 4: Sampling and Quantization
max
max
−mmax
max
−mmax
−mmax fm(m)dm = 1,
−mmax m2fm(m)dm = σ2 m and
−mmax |m|fm(m)dm = E{|m|}, then
max
m
max
A First Course in Digital Communications 32/41
Chapter 4: Sampling and Quantization
m
m/m2 max)
m/m2 max).
n = σ2
m
m2
max , then E{|m|}
σm σm mmax = E{|m|} σm
n) =
n
E{|m|} σm
n
A First Course in Digital Communications 33/41
Chapter 4: Sampling and Quantization
−90 −80 −70 −60 −50 −40 −30 −20 −10 −40 −30 −20 −10 10 20 30 40 50 60 Relative signal level 20log10(σm/mmax) (dB) SNRq (dB) µ−law compander µ=255 Uniform quantization (no compading)
One sacrifices performance for larger input power levels to obtain a performance that remains robust over a wide range of input levels.
A First Course in Digital Communications 34/41
Chapter 4: Sampling and Quantization
−100 −80 −60 −40 −20 −20 −10 10 20 30 40 Normalized signal power 10log10(σn
2) (dB)
SNRq (dB) Gaussian Laplacian Gamma Uniform
Insensitive to variations in input signal power and also insensitive to the actual pdf model – Both desirable properties.
A First Course in Digital Communications 35/41
Chapter 4: Sampling and Quantization
1
Use the previous sample values to predict the next sample value and then transmit the difference.
2
Quantize and transmit the prediction error, e[n] = m[n] − ˜ m[n].
❣ ❤ ✐ ❥ ❦ ❧ ♠ ♥ ♦ ♣ ♦ ♥ q ❧ r ❦ s ♦ t ✐ ✉ ✈ ✇ ♥ q ① ♣ ② ③ ④ ⑤ ❧ ⑥ ❥ ✐ ✇− +
⑦ ❧ ⑧ ⑧ ♥ ♦ ♥ ❥❦ ❧ ✐ ✇ ✇ ⑨ ⑩ ❤ ✐ ❥❦ ❧ ♠ ♥ q ⑤ ❧ ⑥ ❥ ✐ ✇ ❶ ♣ ♦ ♥ q ❧ r ❦ ❧ s ❥ ♥ ♦ ♦ s ♦[ ] n m [ ] n e ˆ[ ] n e [ ] n m
❷A First Course in Digital Communications 36/41
Chapter 4: Sampling and Quantization
1 −
z
1 −
z
1 −
z
1
w
2
w
p
w
1 − p
w
❽[ ] n m [ 1] n − m [ 2] n − m [ 1] n p − + m [ ] n p − m [ ] n m
➆e
p
p
p
p
A First Course in Digital Communications 37/41
Chapter 4: Sampling and Quantization
With Rm(k) = E{m[n]m[n + k]} the autocorrelation of {m[n]}, σ2
e = Rm(0) − 2 p
wiRm(i) +
p
p
wiwjRm(i − j). Take the partial derivative of σ2
e with respect to each coefficient wi
and set the results to zero to yield: Rm(0) Rm(1) Rm(2) · · · Rm(p − 1) Rm(−1) Rm(0) Rm(1) · · · Rm(p − 2) Rm(−2) Rm(−1) Rm(0) · · · Rm(p − 3) . . . . . . . . . ... . . . Rm(−p + 1) Rm(−p + 2) Rm(−p + 3) · · · Rm(0) · w1 w2 w3 . . . wp = Rm(1) Rm(2) Rm(3) . . . Rm(p) .
A First Course in Digital Communications 38/41
Chapter 4: Sampling and Quantization
p
p
p
+
( )
1
H z− + −
➇( )
1
H z− −
+
➇[ ] n e [ ] n m [ ] n m
➈( )
1
z− e
( )
1
z− m
( )
1
z− m
➉A First Course in Digital Communications 39/41
Chapter 4: Sampling and Quantization
+ − + +
➤↔ ➥ ➟ ➡ ➏ ➢ ➍ ➌ ➜ ➝ ➌ ➠ ➦ ➦[ ] n m [ ] n e ˆ[ ] n e [ ] n m
➧ˆ [ ] n m
➨ ➩ ➫ ➭ ➯ ➩ ➲ ➳ ➲ ➩ ➯ ➵ ➫ ➸ ➭ ➲ ➺ ➩ ➫ ➭ ➻ ➼ ➸ ➲ ➽ ➫ ➸ ➩ ➯ ➳ ➾ ➚ ➼ ➵ ➪ ➻ ➶ ➹+ +
➘ ➴ ➷ ➨➳ ➬ ➚ ➼ ➵ ➪ ➻ ➶ ➹ ➮ˆ[ ] n e ˆ [ ] n m [ ] n m
➱A First Course in Digital Communications 40/41
Chapter 4: Sampling and Quantization
1
D
1
T
2
D
3
D
4
D
5
D
6
D
7
D
8
D
9
D
2
T
3
T
4
T
5
T
6
T
7
T
8
T
✃ ✃ ✃ ✃ ❐ ✃ ✃ ❐ ❒ ✃ ❐ ✃ ❮ ✃ ❐ ❐ ❰ ❐ ✃ ✃ Ï ❐ ✃ ❐ Ð ❐ ❐ ✃ Ñ ❐ ❐ ❐ Ò ÓÔ Õ Ö × Ø Ù Ú Û Ü Ù Ý ✃ ✃ ✃ ✃ ✃ ❐ ✃ ❐ ❐ ✃ ❐ ✃ ❐ ❐ ✃ ❐ ❐ ❐ ❐ ✃ ❐ ❐ ✃ ✃ Þ Ó × ß Ù ✃ ❐ ❐ ✃ ❐ ✃ ✃ ✃ ❐ ✃ ✃ ✃ ❐ ✃ ✃ ❐ ✃ ❐ ❐ ❐ ✃ ❐ ❐ ❐ àÛ Ü ÙA First Course in Digital Communications 41/41