NivaarExam PrepOfficial exam papers ↗

22-Elec-B3 Digital Communications Systems · May 2016

Question 4 of 5: Sampling and D/A conversion

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

Notes on this paper

Paper format. Professional Engineers of Ontario annual examinations, May 2016, 07-Elec-B3 Digital Communication Systems — 3 hours, closed book, a PEO-approved non-programmable calculator permitted. Five questions of 25 marks are printed; any four constitute a complete paper worth 100 marks, and only the first four appearing in the answer book are marked. Marks are shown in the left margin. Note 1 on the cover page urges the candidate to submit a clear statement of any assumptions made. All five questions are solved below, because the set is intended as a study resource rather than a sitting.

Reference texts. J. G. Proakis and M. Salehi, Communication Systems Engineering, 2nd ed. (link budgets, source coding, PCM); S. Haykin and M. Moher, Communication Systems, 5th ed.; B. Sklar, Digital Communications: Fundamentals and Applications, 2nd ed. (spread spectrum, ch. 12); T. M. Cover and J. A. Thomas, Elements of Information Theory, 2nd ed. (entropy and Huffman codes); S. Lin and D. J. Costello, Error Control Coding, 2nd ed. (convolutional codes and the Viterbi algorithm); A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed. (sampling and quantization); T. S. Rappaport, Wireless Communications: Principles and Practice, 2nd ed. (path-loss models). In the Canadian frame, licence-exempt spread-spectrum equipment in the 2.4 GHz band is governed by ISED RSS-247, and spectrum allocations by the Canadian Table of Frequency Allocations.

Question 4: Sampling and D/A conversion (25 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. A baseband NTSC video signal of bandwidth $W = 6$ MHz, to be digitised by 24-bit PCM; in part (c) the converter's input is restricted to the range $-3$ V to $+3$ V.

Find. (a) the minimum sampling frequency; (b) an explanation of PCM and the resulting bit rate; (c) the maximum quantization error; (d) why real video standards run far below that bit rate.

fbaseband0image at 1 fs1 fsimage at 2 fs2 fs6 MHzguard band (no aliasing)sampling at 12 MHz places the images clear of the baseband copy
Sampling replicates the 6 MHz baseband spectrum at every multiple of the sampling frequency; 12 MHz is the lowest rate that leaves the images clear of the baseband copy.

Approach. Apply the Nyquist criterion to fix the sampling rate, multiply by the word length for the bit rate, divide the input range by the number of levels for the quantization step, and then explain the gap to practice in terms of redundancy and irrelevancy removal.

  1. Part (a) — apply the Nyquist sampling criterion. A signal band-limited to $W$ can be reconstructed exactly from samples taken faster than twice that bandwidth, because sampling at $f_s$ replicates the baseband spectrum at every multiple of $f_s$ and the replicas must not overlap. The minimum rate is therefore $$f_s \ge 2W = 2(6\ \text{MHz})$$ $$\boxed{f_{s,\min} = 12\ \text{MHz} = 12\ \text{Msample/s}}$$ Strictly the inequality is strict for a signal with energy at exactly $W$, and any real converter is preceded by an anti-aliasing filter that needs a transition band, so a practical design samples somewhat above 12 MHz. The figure shows why: the guard band between the baseband copy and the first image is what the filter has to work in.
  2. Part (b) — what pulse code modulation is. PCM is the canonical waveform-to-bitstream conversion and consists of three operations in sequence. The signal is first sampled at $f_s$, converting a continuous-time waveform into a sequence of amplitudes. Each amplitude is then quantized, that is, rounded to the nearest of a finite set of $2^{b}$ levels spanning the converter's input range; this step is irreversible and is the sole source of the error computed in part (c). Finally each level is encoded as a fixed-length b-bit binary word, and the words are transmitted serially. PCM carries no model of the signal at all: every sample costs the same number of bits regardless of how predictable it was.
  3. Part (b) — compute the resulting data rate. With one 24-bit word per sample and 12 million samples per second, $$R_b = f_s \times b = (12\times10^{6})(24)$$ $$\boxed{R_b = 288\ \text{Mbit/s}}$$ For scale, that is 36 MB every second, or about 130 GB per hour of video — a figure worth carrying into part (d).
  4. Part (c) — find the quantization step size. A uniform quantizer divides the full-scale range into $2^{b}$ equal intervals: $$\Delta = \frac{V_{FS}}{2^{b}} = \frac{+3 - (-3)}{2^{24}} = \frac{6\ \text{V}}{16\,777\,216} = 3.576\times10^{-7}\ \text{V} = 0.3576\ \mu\text{V}.$$
  5. input vquantizer outputideal (no quantization)Δ = 0.358 µVerror band ±Δ/2 = 0.179 µVevery sample is rounded to the nearest level, so the error never exceeds half a step
    Uniform rounding quantizer: the staircase departs from the ideal straight line by at most half a step, which bounds the error.
  6. Part (c) — convert the step to a worst-case error. A rounding quantizer assigns each sample to the nearest level, so the input can never be more than half a step away from the reproduction level: $$|e|_{\max} = \frac{\Delta}{2} = \frac{3.576\times10^{-7}}{2}$$ $$\boxed{|e|_{\max} = 1.788\times10^{-7}\ \text{V} = 0.179\ \mu\text{V} = 179\ \text{nV}}$$ As a signal-to-quantization-noise figure this is $\mathrm{SQNR} \approx 6.02b + 1.76 = 6.02(24)+1.76 = 146.2$ dB for a full-scale sine wave — far beyond the noise floor of any real video front end, which is the first hint that 24 bits per sample is extravagant. Had the quantizer been a truncating rather than a rounding type, the worst-case error would be a full step, $0.358\ \mu\text{V}$; the rounding convention is assumed here and is the standard one.
  7. Part (d) — why real standards need far less than 288 Mbit/s. The gap is entirely down to what PCM refuses to exploit. Video is enormously redundant: adjacent pixels within a frame are strongly correlated (spatial redundancy), successive frames are nearly identical except where objects move (temporal redundancy), and the colour components are correlated with luminance (spectral redundancy). A modern codec removes all three — motion-compensated prediction subtracts a shifted version of a previous frame and codes only the residual, a block transform such as the DCT concentrates the residual energy into a few coefficients, and an entropy coder then spends bits in proportion to the actual information content, exactly the argument of Question 1.
  8. Part (d) — add the perceptual and representational arguments. Beyond redundancy there is irrelevancy: the human visual system is far less sensitive to fine chroma detail and to high-frequency error than to luminance structure, so codecs subsample the chroma channels (4:2:0) and quantize transform coefficients coarsely where the eye will not notice, discarding information that PCM faithfully and pointlessly preserved. There is also a representational point specific to this question: 24 bits per sample buys 146 dB of dynamic range against a camera that delivers perhaps 60 dB, and sampling the 6 MHz composite bandwidth ignores that digital video is normally sampled component-wise at rates matched to each component. Taken together, a broadcast-quality stream of the same perceived quality runs at roughly 15 to 25 Mbit/s under H.264 or H.265, an order of magnitude below the 288 Mbit/s PCM figure. Note the essential difference from Question 1: that compression was lossless and bounded below by the entropy, whereas this one is lossy by design, which is what allows it to go so much further.
Question 4 — final results
QuantityResult
(a) Minimum sampling frequency12 MHz (12 Msample/s)
(b) PCM data rate at 24 bits/sample288 Mbit/s
(c) Quantization step $\Delta$$0.3576\ \mu$V
(c) Maximum quantization error$0.179\ \mu$V (179 nV)
(c) Equivalent SQNR146.2 dB
(d) Reason for the lower practical rateLossy removal of spatial, temporal and spectral redundancy plus perceptual irrelevancy