A First Course in Digital Communications Ha H. Nguyen and E. Shwedyk - - PowerPoint PPT Presentation

a first course in digital communications
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

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

slide-2
SLIDE 2

Chapter 4: Sampling and Quantization

Introduction

Though many message sources are inherently digital in nature, two of the most common message sources, audio and video, are analog, i.e., they produce continuous time signals. To make analog messages amenable for digital transmission sampling, quantization and encoding are required.

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

slide-3
SLIDE 3

Chapter 4: Sampling and Quantization

Ideal (or Impulse) Sampling

−∞ =

− =

n s

nT t t s ) ( ) ( δ

∞ −∞ =

− =

n s s s

nT t nT m t m ) ( ) ( ) ( δ ) (t m

✂ ✄ ☎

Ts is the period of the impulse train, also referred to as the sampling period. The inverse of the sampling period, fs = 1/Ts, is called the sampling frequency or sampling rate. It is intuitive that the higher the sampling rate is, the more accurate the representation of m(t) by ms(t) is. What is the minimum sampling rate for the sampled version ms(t) to exactly represent the original analog signal m(t)?

A First Course in Digital Communications 3/41

slide-4
SLIDE 4

Chapter 4: Sampling and Quantization

Illustration of Ideal Sampling

✆ ✝ ✞ ✟ ✝ ✠ ✟ ✡ ☛ ☞ ✌ ✍ ✎ ✏ ✑ ✏

) ( f M ) ( M

✒ ✓ ✔ ✒ ✕ ✔✖ ✕ ✗ ✘ ✙ ✔ ✚ ✕ ✛ ✜ ✢ ✣ ✢ ✜ ✤ ✣ ✥ ✢ ✦ ✧ ★ ✩ ✪ ✦ ✫ ✢ ✦ ✜ ★ ✩ ✪ ✦ ✣ ✫ ✬ ✢ ✦ ✭ ✢ ✦ ✮ ✯ ✰ ✱ ✲ ✰ ✳ ✲ ✴ ✯ ✵ ✶ ✷ ✸ ✹ ✺ ✻ ✼ ✻ ✶ ✽ ✾ ✶ ✽ ✾ ✿ ✶ ✽ ✿ ✶ ✽ ❀ ❁ ❂ ❃ ❄ ❅❅ ❆ ❇ ❈ ❉ ❊❋

) ( f M s

s

T M ) (

❇ ❍ ■ ❏

A First Course in Digital Communications 4/41

slide-5
SLIDE 5

Chapter 4: Sampling and Quantization

Spectrum of the Sampled Waveform

ms(t) = m(t)s(t) ↔ Ms(f) = M(f) ∗ S(f) Ms(f) = M(f) ∗

  • 1

Ts

  • n=−∞

δ(f − nfs)

  • S(f)

= 1 Ts

  • n=−∞

M(f − nfs). If the bandwidth of m(t) is limited to W Hertz, m(t) can be completely recovered from ms(t) by an ideal lowpass filter of bandwidth W if fs ≥ 2W. When fs < 2W (under-sampling), the copies of M(f) overlap and it is not possible to recover m(t) by filtering ⇒ aliasing.

A First Course in Digital Communications 5/41

slide-6
SLIDE 6

Chapter 4: Sampling and Quantization

Reconstruction of m(t)

Ms(f) = F{ms(t)} =

  • n=−∞

m(nTs)F{δ(t − nTs)} =

  • n=−∞

m(nTs)exp(−j2πnfTs) M(f) = Ms(f) fs = 1 fs

  • n=−∞

m(nTs)exp(−j2πnfTs), −W ≤ f ≤ W. m(t) = F−1{M(f)} = ∞

−∞

M(f)exp(j2πft)df = W

−W

1 fs

  • n=−∞

m(nTs)exp(−j2πnfTs)exp(j2πft)df = 1 fs

  • n=−∞

m(nTs) W

−W

exp[j2πf(t − nTs)]df =

  • n=−∞

m(nTs)sin[2πW(t − nTs)] πfs(t − nTs) =

  • n=−∞

m n 2W

  • sinc(2Wt − n)

A First Course in Digital Communications 6/41

slide-7
SLIDE 7

Chapter 4: Sampling and Quantization

Sampling Theorem

Theorem A signal having no frequency components above W Hertz is completely described by specifying the values of the signal at periodic time instants that are separated by at most 1/2W seconds. fs ≥ 2W is known as the Nyquist criterion, the sampling rate fs = 2W is called the Nyquist rate and its reciprocal called the Nyquist interval. Ideal sampling is not practical ⇒ Need practical sampling methods.

A First Course in Digital Communications 7/41

slide-8
SLIDE 8

Chapter 4: Sampling and Quantization

Bandlimited Interpolation

−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

slide-9
SLIDE 9

Chapter 4: Sampling and Quantization

Natural Sampling

∞ −∞ =

− =

n s

nT t h t p ) ( ) (

∞ −∞ =

− =

n s s

nT t h t m t m ) ( ) ( ) ( ) (t m

▼ ◆ ❖

In the above, h(t) = 1 for 0 ≤ t ≤ τ and h(t) = 0 otherwise. The pulse train p(t) is also known as the gating waveform. Natural sampling requires only an on/off gate.

A First Course in Digital Communications 9/41

slide-10
SLIDE 10

Chapter 4: Sampling and Quantization

Illustration of Natural Sampling

P ◗ ❘ ❙ ◗ ❚ ❙ ❯ ❱ ❲ ❳ ❨ ❩ ❬ ❭ ❬

) ( 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

slide-11
SLIDE 11

Chapter 4: Sampling and Quantization

Signal Reconstruction in Natural Sampling

Write the periodic pulse train p(t) in a Fourier series as: p(t) =

  • n=−∞

Dnexp(j2πnfst), Dn = τ Ts sinc nτ Ts

  • e−jπnτ/Ts.

The sampled waveform and its Fourier transform are ms(t) = m(t)

  • n=−∞

Dnexp(j2πnfst). Ms(f) =

  • n=−∞

DnF{m(t)exp(j2πnfst)} =

  • n=−∞

DnM(f − nfs). The original signal m(t) can still be reconstructed using a lowpass filter as long as the Nyquist criterion is satisfied.

A First Course in Digital Communications 11/41

slide-12
SLIDE 12

Chapter 4: Sampling and Quantization

Flat-Top Sampling

Flat-top sampling is the most popular sampling method and involves two simple operations: sample and hold.

➇ ➈ ➉ ➊ ➋ ➇➌ ➈ ➉ ➊

τ

➍ ➎ ➌ ➎ ➌ ➉ ➏

∞ −∞ =

− =

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

slide-13
SLIDE 13

Chapter 4: Sampling and Quantization

Spectrum of ms(t) in Flat-Top Sampling

ms(t) =

  • m(t)

  • n=−∞

δ(t − nTs)

  • ∗ h(t).

Ms(f) = F

  • m(t)

  • n=−∞

δ(t − nTs)

  • F{h(t)} = 1

Ts H(f)

  • n=−∞

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

slide-14
SLIDE 14

Chapter 4: Sampling and Quantization

Equalization

Not possible to reconstruct m(t) using an lowpass filter, even when the Nyquist criterion is satisfied. The distortion due to H(f) can be corrected by connecting an equalizer in cascade with the lowpass reconstruction filter. Ideally, the amplitude response of the equalizer is |Heq| = Ts |H(f)| = Ts τsinc(fτ)

f

ß à

W W − sinc( )

s eq

T H f τ τ = ) (t ms ) (t m

á â ã ä å æ çè é ã ç ê ä å ë ê ì ç â è í î é ï ì ê ð â è ñ ò ó

A First Course in Digital Communications 14/41

slide-15
SLIDE 15

Chapter 4: Sampling and Quantization

Pulse Modulation

In pulse modulation, some parameter of a pulse train is varied in accordance with the sample values of a message signal. Pulse-amplitude modulation (PAM): amplitudes of regularly spaced pulses are varied.

PAM transmission does not improve the noise performance

  • ver baseband modulation, but allows multiplexing, i.e.,

sharing the same transmission media by different sources. The multiplexing advantage offered by PAM comes at the expense of a larger transmission bandwidth.

Pulse-width modulation (PWM): widths of the individual pulses are varied. Pulse-position modulation (PPM): position of a pulse relative to its original time of occurrence is varied. Pulse modulation techniques are still analog modulation. For digital communications of an analog source, quantization of sampled values is needed.

A First Course in Digital Communications 15/41

slide-16
SLIDE 16

Chapter 4: Sampling and Quantization

PWM & PPM Waveforms with a Sinusoidal Message

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

slide-17
SLIDE 17

Chapter 4: Sampling and Quantization

Quantization

ô õ ö ÷ ø ù ú û ü õ ýþÿ
  • ù
ú ✁ ý ✂ ✄ ☎ ù ú ✆ ✝ ✞ ✟

{ }

) (

s

nT m

{ }

) ( ˆ

s

nT m

✠ ✠ ✠ ✡ ☛ ☛ ✡ ☛ ✠ ✠ ✠

Quantization is to transform m(nTs) into a discrete amplitude ˆ m(nTs) taken from a finite set. If the spacing between two adjacent amplitude levels is sufficiently small, then ˆ m(nTs) can be made practically indistinguishable from m(nTs). There is always a loss of information associated with the quantization process, no matter how fine one may choose the finite set of the amplitudes ⇒ Not possible to completely recover the sampled signal from the quantized signal.

A First Course in Digital Communications 17/41

slide-18
SLIDE 18

Chapter 4: Sampling and Quantization

Memoryless 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

Quantization of current sample value is independent of earlier/later samples. The lth interval is determined by the decision levels (also called the threshold levels) Dl and Dl+1: Il : {Dl < m ≤ Dl+1}, l = 1, . . . , L. Signal amplitudes in Il are all represented by one amplitude Tl ∈ Il (target level or reconstruction level).

A First Course in Digital Communications 18/41

slide-19
SLIDE 19

Chapter 4: Sampling and Quantization

Uniform Quantizer

Step-size is the same and the target level is in the middle of the interval: Tl = Dl+Dl+1

2

. Midtread and midrise input/output characteristics:

) (

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

slide-20
SLIDE 20

Chapter 4: Sampling and Quantization

Input and Output of A Midrise Uniform Quantizer

✹ ✺ ✻ ✼ ✽ ✾ ✿ ❀ ❁ ❂ ❃ ❄

(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

slide-21
SLIDE 21

Chapter 4: Sampling and Quantization

Signal-to-Quantization Noise Ratio (SNRq)

Model the input as a zero-mean random variable m with some pdf fm(m). Assume the amplitude range of m is −mmax ≤ m ≤ mmax ⇒ the quantization step-size is ∆ = 2mmax

L

. Let q = m − ˆ m be the quantization error, then −∆/2 ≤ q ≤ ∆/2. If ∆ is sufficiently small (L is sufficiently large), q is approximately uniform over [−∆/2, ∆/2]: fq(q) =

  • 1

∆,

− ∆

2 < q ≤ ∆ 2

0,

  • therwise

. The mean of q is zero, while its variance is: σ2

q =

∆/2

−∆/2

q2fq(q)dq = ∆/2

−∆/2

q2 1 ∆

  • dq = ∆2

12 = m2

max

3L2 .

A First Course in Digital Communications 21/41

slide-22
SLIDE 22

Chapter 4: Sampling and Quantization

With L = 2R, where R is the number of bits needed to represent each target level, then σ2

q = m2

max

3×22R

The average message power is σ2

m =

mmax

−mmax m2fm(m)dm.

The signal-to-quantization noise ratio is SNRq = 3σ2

m

m2

max

  • 22R = 3 × 22R

F 2 . F is called the crest factor of the message, defined as, F = Peak value of the signal RMS value of the signal = mmax σm . SNRq increases exponentially with the number of bits per sample R and decreases with the square of the message’s crest factor.

A First Course in Digital Communications 22/41

slide-23
SLIDE 23

Chapter 4: Sampling and Quantization

Expressed in decibels, SNRq is 10 log10 SNRq = 6.02R + 10 log10 σ2

m

m2

max

  • + 4.77

= 6.02R − 20 log10 F + 4.77 An additional 6-dB improvement in SNRq is obtained for each bit added to represent the continuous signal sample (6-dB rule).

A First Course in Digital Communications 23/41

slide-24
SLIDE 24

Chapter 4: Sampling and Quantization

Optimal Quantizer

Uniform quantizer is not optimal in terms of minimizing the signal-to-quantization noise ratio. In general, the decision levels are constrained to satisfy: D1 = −mmax, DL+1 = mmax, Dl ≤ Dl+1, for l = 1, 2, . . . L. The average quantization noise power is Nq =

L

  • l=1

Dl+1

Dl

(m − Tl)2fm(m)dm. To obtain the optimal quantizer that maximizes the SNRq,

  • ne needs to find the set of 2L − 1 variables

{D2, D3, . . . , DL, T1, T2, . . . , TL} to minimize Nq.

A First Course in Digital Communications 24/41

slide-25
SLIDE 25

Chapter 4: Sampling and Quantization

Differentiate Nq with respect to Dj and set the result to 0: ∂Nq ∂Dj = fm(Dj)

  • (Dj − Tj−1)2 − (Dj − Tj)2

= 0, j = 2, 3, . . . L. Dopt

l

= Tl−1 + Tl 2 , l = 2, 3, . . . L. ⇒ The decision levels are the midpoints of the target values! Differentiate Nq with respect to Tj and set the result to 0: ∂Nq ∂Tj = −2 Dj+1

Dj

(m − Tj)fm(m)dm = 0, j = 1, 2, . . . L. T opt

l

= Dl+1

Dl

mfm(m)dm Dl+1

Dl

fm(m)dm , l = 1, 2, . . . , L. ⇒ The target value for a quantization region should be chosen to be the centroid of that region.

A First Course in Digital Communications 25/41

slide-26
SLIDE 26

Chapter 4: Sampling and Quantization

Example of Optimal Quantizer Design (Problem 4.6)

1

1/3

1

D

2

T

1

T

1

D − 1 (volts) m ( ) (1/volts) f m

m 1 4

1 4

1 −

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

slide-27
SLIDE 27

Chapter 4: Sampling and Quantization

Lloyd-Max Conditions and Iterative Algorithm

Dopt

l

= Tl−1 + Tl 2 , (5) T opt

l

= Dl+1

Dl

mfm(m)dm Dl+1

Dl

fm(m)dm . (6) l = 2, 3, . . . L

1

Start by specifying an arbitrary set of decision levels (for example the set that results in equal-length regions) and then find the target values using (6).

2

Determine the new decision levels using (5).

3

The two steps are iterated until the parameters do not change significantly from one step to the next. The optimal quantizer needs to know pdf fm(m) and is designed for a specific mmax ⇒ Prefer quantization methods that are robust to source statistics and changes in the signal’s power level.

A First Course in Digital Communications 27/41

slide-28
SLIDE 28

Chapter 4: Sampling and Quantization

Robust Quantizers

When the message signal is uniformly distributed, the optimal quantizer is a uniform quantizer ⇒ As long as the distribution

  • f the message signal is close to uniform, the uniform

quantizer works fine. For a voice signal, there exists a higher probability for smaller amplitudes and a lower probability for larger amplitudes ⇒ it is more efficient to design a quantizer with more quantization regions at lower amplitudes and less quantization regions at larger amplitudes (i.e., nonuniform quantization). Robust method for performing nonuniform quantization is to use compander=compressor+ expander.

❏❑ ▲ ▼ ◆ ❖ P P ❑ ◆ ◗ ❘ ❙ ❚ ❯ ❱ ❲ ❳ ❑ ◆ ▲ ❨ ❩ ❬ ❱ ❭ ❲ ❪ ❖ ◆ ❙ ❫ ❫ ❫ ❴ ❖ ❵ ❑ ❱ P ❭ ◆ ❩ ❵ ❭❲ ❑ ❱ ❳ ❲ ❛ ❭ ❖ ◆ ❜ ❝ ▼ ❬ ❱ ❞ ❖ ◆ ◗ ❡ ❢ ❘ ❙ ❚

A First Course in Digital Communications 28/41

slide-29
SLIDE 29

Chapter 4: Sampling and Quantization

µ-law and A-law Companders

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

slide-30
SLIDE 30

Chapter 4: Sampling and Quantization

SNRq of Non-Uniform Quantizers

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

  • l=1

ml+ ∆l

2

ml− ∆l

2

(m − ml)2fm(m)dm ∼ =

L

  • l=1

fm(ml) ml+

∆l 2

ml− ∆l

2

(m − ml)2dm =

L

  • l=1

∆3

l

12 fm(ml).

A First Course in Digital Communications 30/41

slide-31
SLIDE 31

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

  • m=ml

⇒ Nq = ∆2 12

L

  • l=1

fm(ml)

  • dg(m)

dm

  • m=ml

2 ∆l. Since L ≫ 1, approximate the summation by an integral to obtain Nq = ∆2 12 mmax

−mmax

fm(m)

  • dg(m)

dm 2 dm = y2

max

3L2 mmax

−mmax

fm(m)

  • dg(m)

dm 2 dm.

A First Course in Digital Communications 31/41

slide-32
SLIDE 32

Chapter 4: Sampling and Quantization

SNRq of µ-law Compander

dg(m) dm = ymax ln(1 + µ) µ(1/mmax) 1 + µ(|m|/mmax). Nq = y2

max

3L2 ln2(1 + µ) y2

max

  • µ

mmax 2 mmax

−mmax

  • 1 + µ

|m| mmax 2 fm(m)dm = m2

max

3L2 ln2(1 + µ) µ2 mmax

−mmax

  • 1 + 2µ

|m| mmax

  • + µ2

|m| mmax 2 fm(m)dm. Since mmax

−mmax fm(m)dm = 1,

mmax

−mmax m2fm(m)dm = σ2 m and

mmax

−mmax |m|fm(m)dm = E{|m|}, then

Nq = m2

max

3L2 ln2(1 + µ) µ2

  • 1 + 2µE{|m|}

mmax + µ2 σ2

m

m2

max

  • .

A First Course in Digital Communications 32/41

slide-33
SLIDE 33

Chapter 4: Sampling and Quantization

SNRq = σ2

m

Nq = 3L2µ2 ln2(1 + µ) (σ2

m/m2 max)

1 + 2µ(E{|m|}/mmax) + µ2(σ2

m/m2 max).

Define σ2

n = σ2

m

m2

max , then E{|m|}

σm σm mmax = E{|m|} σm

σn. Therefore, SNRq(σ2

n) =

3L2µ2 ln2(1 + µ) σ2

n

1 + 2µσn

E{|m|} σm

+ µ2σ2

n

. If µ ≫ 1 then the dependence of SNRq on the message’s characteristics is very small and SNRq can be approximated as SNRq = 3L2 ln2(1 + µ). For practical values of µ = 255 and L = 256, SNRq = 38.1dB.

A First Course in Digital Communications 33/41

slide-34
SLIDE 34

Chapter 4: Sampling and Quantization

8-bit Quantizer for the Gaussian-Distributed Message

−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

slide-35
SLIDE 35

Chapter 4: Sampling and Quantization

SNRq with 8-bit µ-law quantizer (L = 256, µ = 255)

−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

slide-36
SLIDE 36

Chapter 4: Sampling and Quantization

Differential Quantizers

Most message signals (e.g., voice or video) exhibit a high degree of correlation between successive samples. Redundancy can be exploited to obtain a better SNRq for a given L, or conversely for a specified SNRq the number of levels L can be reduced:

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

If |emax| = |mmax − kmmax| = |1 − k|mmax is less than mmax then the quantization noise power is reduced!

A First Course in Digital Communications 36/41

slide-37
SLIDE 37

Chapter 4: Sampling and Quantization

Linear Predictor

❸ ❹ ❺ ❻ ❼

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

Select {wi} to minimize the variance of prediction error: σ2

e

= E   

  • m[n] −

p

  • i=1

wim[n − i] 2   = E{m2[n]} − 2

p

  • i=1

wiE{m[n]m[n − i]} +

p

  • i=1

p

  • j=1

wiwjE{m[n − i]m[n − j]}.

A First Course in Digital Communications 37/41

slide-38
SLIDE 38

Chapter 4: Sampling and Quantization

Normal Equations (or the Yule-Walker Equations)

With Rm(k) = E{m[n]m[n + k]} the autocorrelation of {m[n]}, σ2

e = Rm(0) − 2 p

  • i=1

wiRm(i) +

p

  • i=1

p

  • j=1

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

slide-39
SLIDE 39

Chapter 4: Sampling and Quantization

Reconstruction of m[n] from the Differential Samples

Ignore the quantization error and look at the reconstruction of m[n] from the differential samples e[n]. e[n] = m[n] −

p

  • i=1

wim[n − i]. e(z−1) = m(z−1) −

p

  • i=1

wiz−im(z−1) = m(z−1) − m(z−1)

p

  • i=1

wiz−i = m(z−1) − m(z−1)H(z−1) ⇒ m(z−1) = 1 1 − H(z−1)e(z−1).

+

( )

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

slide-40
SLIDE 40

Chapter 4: Sampling and Quantization

Under quantization noise error, use DPCM to eliminate the effect

  • f previous quantization noise samples.
➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓ ➍ ➔ → ➣ ➑ ➒ ↔ ➒ ➑ ➣ ➏ ➔ ➎ → ➒ ↕ ➌ ➙ ➛ ➜ ➑ ➣ ➝ ↔ ➞ ➟ ➠ ➡ ➏ ➢ ➍ ➌ ➜

+ − + +

➤↔ ➥ ➟ ➡ ➏ ➢ ➍ ➌ ➜ ➝ ➌ ➠ ➦ ➦

[ ] n m [ ] n e ˆ[ ] n e [ ] n m

ˆ [ ] n m

➨ ➩ ➫ ➭ ➯ ➩ ➲ ➳ ➲ ➩ ➯ ➵ ➫ ➸ ➭ ➲ ➺ ➩ ➫ ➭ ➻ ➼ ➸ ➲ ➽ ➫ ➸ ➩ ➯ ➳ ➾ ➚ ➼ ➵ ➪ ➻ ➶ ➹

+ +

➘ ➴ ➷ ➨➳ ➬ ➚ ➼ ➵ ➪ ➻ ➶ ➹ ➮

ˆ[ ] n e ˆ [ ] n m [ ] n m

ˆ m[n] =

  • m[n] + ˆ

e[n] = m[n] + (e[n] − q[n]) = ( m[n] + e[n]) − q[n] = m[n] − q[n].

A First Course in Digital Communications 40/41

slide-41
SLIDE 41

Chapter 4: Sampling and Quantization

Pulse-Code Modulation (PCM)

A PCM signal is obtained from the quantized PAM signal by encoding each quantized sample to a digital codeword. In binary PCM each quantized sample is digitally encoded into an R-bit binary codeword, where R = ⌈log2 L⌉ + 1. Binary digits of a PCM signal can be transmitted using many efficient modulation schemes. There are several mappings: Natural binary coding (NBC), Gray mapping, foldover binary coding (FBC), etc.

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