NivaarExam PrepOfficial exam papers ↗

22-Elec-A3 Signals and Communications · May 2017

Question 4 of 5: Non-Uniform PCM Quantizer Design for a Voice Signal

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format. Professional Engineers Ontario / Engineers Canada national examination 16-Elec-A3 — Signals and Communications, May 2017. Closed book (one non-programmable calculator permitted), 3 hours, 4 pages. Five questions, all compulsory, all of equal value (20 marks each). All five are solved in full below.

Reference texts. B. P. Lathi & Z. Ding, Modern Digital and Analog Communication Systems, 5th ed. (AM/DSB power and efficiency, PCM, FM/Carson); B. P. Lathi, Linear Systems and Signals, 2nd ed. (Fourier series, filtering, average power); A. V. Oppenheim & A. S. Willsky, Signals and Systems, 2nd ed. (LTI convolution, BIBO stability); J. G. Proakis & D. G. Manolakis, Digital Signal Processing, 4th ed. (FIR structures, transfer functions); C. K. Alexander & M. N. O. Sadiku, Fundamentals of Electric Circuits, 7th ed. (first-order RC response).

Question 4: Non-Uniform PCM Quantizer Design for a Voice Signal (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given.

QuantityValue
Signal bandwidthW = 10 kHz
Signal peakmp (all thresholds expressed as fractions of mp)
Inner zone |ms| < mp/2maximum error 0.1 % of mp = 0.001 mp
Outer zone mp/2 ≤ |ms| ≤ mpmaximum error 0.4 % of mp = 0.004 mp
Oversampling above Nyquist20 %

Find. The two step sizes and the complete set of decision thresholds and output levels; the number of bits per sample; and the resulting bit rate.

Approach. For a mid-riser uniform quantizer the worst-case error is half a step, so each zone's error specification fixes its step size directly; count the levels each zone needs, add them, and round the total up to the next power of two.

  1. Step size in the fine (inner) zone. With rounding to the nearest level the maximum error is $\Delta/2$, so $$\frac{\Delta_1}{2}\lt 0.001\,m_p \ \Longrightarrow\ \boxed{\Delta_1 = 0.002\,m_p}$$ The inner zone spans $-m_p/2$ to $+m_p/2$, a width of $m_p$, so it needs $$L_1=\frac{m_p}{0.002\,m_p}=500\ \text{levels}$$ (250 on each side of the origin).
  2. Step size in the coarse (outer) zones. Similarly $\Delta_2/2\lt 0.004\,m_p$ gives a nominal $\Delta_2=0.008\,m_p$. Each outer zone spans $m_p/2$ to $m_p$, a width of $0.5\,m_p$, which would require $0.5/0.008=62.5$ steps — not an integer, so we round up to keep the error inside the specification: $$L_2 = \lceil 62.5\rceil = 63\ \text{levels per side},\qquad \boxed{\Delta_2 = \frac{0.5\,m_p}{63}=0.0079365\,m_p}$$ giving a worst-case error of $0.003968\,m_p \lt 0.004\,m_p$. Rounding down to 62 steps would give $\Delta_2=0.008065\,m_p$ and an error of $0.004032\,m_p$, which violates the specification — the direction of rounding is the graded point here.
  3. (a) Quantizer characteristic and threshold list. The characteristic is the odd, staircase-shaped mapping sketched below. Written out explicitly, with all values in units of $m_p$:
    ZoneDecision thresholdsOutput (reconstruction) levelsCount
    Inner, 0 to +1/20, 0.002, 0.004, …, 0.500 (i.e. 0.002k, k = 0…250)0.001, 0.003, …, 0.499 (0.002k + 0.001)250
    Inner, −1/2 to 0mirror image: −0.002k−(0.002k + 0.001)250
    Outer, +1/2 to +10.500, 0.507937, 0.515873, …, 1.000 (0.5 + 0.0079365j, j = 0…63)0.503968, 0.511905, …, 0.99603263
    Outer, −1 to −1/2mirror image: −(0.5 + 0.0079365j)−(0.503968 + 0.0079365j)63
    Total number of quantization levels626

    A sample is assigned the output level at the midpoint of whichever interval it falls in; samples at exactly $\pm m_p/2$ belong to the outer zone by the wording of the specification. The characteristic is therefore a mid-tread staircase that is fine near the origin and four times coarser near the peaks — the same idea that A-law and µ-law companding implement with a smooth compressor curve.

m_s / m_pquantized level / m_p-1-1/21/21-1-1/21/21fine zone: step 0.002 mpcoarse zone: step 0.00794 mp
Figure Q4.1 - Quantizer characteristic (schematic; step sizes exaggerated for clarity).
  1. (b) Bits per sample. A binary code must address all 626 levels, and the number of codewords available with $n$ bits is $2^{n}$: $$2^{n}\ge 626\ \Longrightarrow\ n\ge \log_2 626 = 9.29\ \Longrightarrow\ \boxed{n = 10\ \text{bits/sample}}$$ Ten bits provide 1024 codewords, so 398 remain spare (they can be used for signalling, or the zones can be made slightly finer than required). Nine bits would give only 512 — not enough.
  2. (c) Bit rate. The Nyquist rate for a 10 kHz bandwidth is 20 kHz; a 20 % oversampling allowance to ease the anti-aliasing filter gives $$f_s = 1.2\times 2W = 1.2\times 20\ \text{kHz} = \boxed{24\ \text{kHz}}$$ and therefore $$R_b = n f_s = 10 \times 24\times10^{3} = \boxed{240\ \text{kbit/s}}$$ The oversampling costs 40 kbit/s but relaxes the anti-aliasing filter's transition band from zero width to 4 kHz, which is the whole point of the allowance.
ResultValue
Inner step sizeΔ1 = 0.002 mp (500 levels)
Outer step sizeΔ2 = 0.0079365 mp (63 levels per side)
Total levels (a)L = 500 + 126 = 626
Bits per sample (b)n = 10 (210 = 1024 ≥ 626)
Sampling rate (c)fs = 24 kHz
Bit rate (c)Rb = 240 kbit/s

Check: the specification is stated as a strict inequality ("less than 0.1 %"), so the step sizes are taken as the largest values that satisfy it with rounding-to-nearest, i.e. maximum error $\Delta/2$. If the examiner intended a truncating quantizer (maximum error $\Delta$), every step size halves, the level count doubles to 1252 and 11 bits are required, giving 264 kbit/s. The rounding convention should be stated with the answer.