NivaarExam PrepOfficial exam papers ↗

22-Elec-B3 Digital Communications Systems · December 2019

Question 5 of 5: Sampling and D/A Conversion

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

Notes on this paper

Paper format. National Examinations — December 2019, 16-Elec-B3 Digital Communication Systems. Three hours, closed book; an approved Casio or Sharp calculator is permitted. Five questions of 25 marks each are printed; any four constitute a complete paper worth 100 marks, and only the first four appearing in the answer book are marked. All five questions are solved here, because this set is a study resource rather than a marked script. Note 1 of the cover page invites the candidate to submit a clear statement of any assumption made where a question is open to interpretation — that licence is used explicitly in Question 3(a).

Reference texts.

Question 5: 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. An NTSC video signal band-limited to $W = 5$ MHz; PCM encoding at 16 bits per sample; separately, a 600 Hz sinusoid sampled at 1000 Hz; and separately, 8-bit PCM applied to a signal spanning −2 V to +2 V.

Find. (a) the minimum sampling frequency; (b) an explanation of PCM and the resulting bit rate; (c) the alias frequency; (d) the maximum quantization error; (e) one reason MPEG video needs far less than the PCM rate.

600 Hz (solid) 400 Hz, inverted (dashed) sample instants at fs = 1000 Hz (1 ms apart) — both curves pass through every sample
Figure 5.1 — Aliasing at $f_s = 1000$ Hz. The 600 Hz tone and a 400 Hz tone of opposite sign are indistinguishable from their samples alone, because they agree at every sampling instant.

Approach. Apply the Nyquist criterion for (a); multiply sample rate by resolution for (b); fold the signal frequency about the Nyquist frequency for (c); divide the full-scale range by the number of quantization levels and halve it for (d); and appeal to redundancy and perceptual coding for (e).

  1. Part (a) — apply the Nyquist criterion. A signal band-limited to $W$ hertz is exactly reconstructible from its samples provided the sampling rate exceeds twice that bandwidth. With $W = 5$ MHz, $$f_{s,\min} = 2W = 2 \times 5\ \text{MHz}$$ $$\boxed{f_{s,\min} = 10\ \text{MHz} = 10 \times 10^{6}\ \text{samples/s}}$$ Strictly the theorem requires $f_s > 2W$, with equality admissible only for an ideal band-limited signal reconstructed by an ideal filter; a practical video digitiser samples above this rate to leave room for a realisable anti-aliasing filter.
  2. Part (b) — explain PCM and compute its rate. Pulse code modulation converts an analogue waveform to a bit stream in three stages. Sampling takes amplitude values at the uniform rate $f_s$, which the Nyquist criterion fixes; quantization rounds each sample to the nearest of $L = 2^{n}$ discrete levels, an irreversible step that introduces quantization noise; and encoding maps each level to an $n$-bit binary codeword, which is what is finally transmitted or stored. The output is therefore a stream of fixed-length codewords, one per sample, and PCM is the baseline waveform coder against which all compressed formats are compared. Its rate follows directly: $$R_b = f_s \times n = (10\times10^{6}\ \text{samples/s}) \times (16\ \text{bits/sample})$$ $$\boxed{R_b = 160\times10^{6}\ \text{bits/s} = 160\ \text{Mbps}}$$
  3. Part (c) — fold the frequency about the Nyquist limit. With $f_s = 1000$ Hz the Nyquist frequency is $f_s/2 = 500$ Hz, and the 600 Hz tone lies above it, so it is undersampled and must alias. Sampling replicates the spectrum at every multiple of $f_s$, so the component that falls into the baseband is $$f_{\text{alias}} = |f - f_s| = |600 - 1000| = \boxed{400\ \text{Hz}}$$ That the two are genuinely indistinguishable can be shown from the samples themselves. At $t = k/f_s$, $$\sin\!\left(2\pi \times 600 \times \frac{k}{1000}\right) = \sin\!\left(2\pi k - 2\pi \times 400 \times \frac{k}{1000}\right) = -\sin\!\left(2\pi \times 400 \times \frac{k}{1000}\right),$$ so every sample of the 600 Hz tone coincides with a sample of a 400 Hz tone of opposite polarity, exactly as Figure 5.1 shows. Once sampled, no processing can separate them — which is why an anti-aliasing filter must remove the 600 Hz content before the sampler, not after it.
  4. Part (d) — size the quantization step. An $n$-bit quantizer divides the full-scale range into $L = 2^{n}$ uniform levels. Here $n = 8$, so $L = 256$, and the range is $$V_{FS} = +2 - (-2) = 4\ \text{V}, \qquad \Delta = \frac{V_{FS}}{2^{n}} = \frac{4}{256} = 15.625\ \text{mV}.$$ A rounding quantizer assigns each sample to the nearest level, so the error can never exceed half a step: $$e_{\max} = \frac{\Delta}{2} = \frac{15.625\ \text{mV}}{2}$$ $$\boxed{e_{\max} = 7.8125\ \text{mV} = 7.8125\times10^{-3}\ \text{V}}$$ For reference, the corresponding rms quantization noise is $\Delta/\sqrt{12} = 4.51$ mV, and the ideal signal-to-quantization-noise ratio for a full-scale sinusoid is $6.02n + 1.76 \approx 49.9$ dB.
  5. Part (e) — why MPEG needs far less. PCM codes every sample independently and to full precision, so it spends bits on information the viewer will never use. MPEG is a lossy, predictive coder that removes three kinds of surplus. Temporal redundancy: successive frames of natural video are nearly identical, so MPEG transmits motion-compensated differences (P- and B-frames) rather than complete pictures, which alone removes the bulk of the data. Spatial redundancy: within a frame, neighbouring pixels are strongly correlated, so a block discrete cosine transform concentrates the energy into a few low-frequency coefficients that are cheap to code, and entropy coding then exploits their skewed statistics. Perceptual irrelevance: the coefficients are quantized coarsely where the human visual system is insensitive — high spatial frequencies and chrominance, which is also subsampled — discarding detail the viewer cannot perceive. Any one of these is a sufficient answer for the five marks; together they explain compression ratios of one to two orders of magnitude, turning a 160 Mbps PCM stream into a few megabits per second at broadcast quality.
QuantityResult
(a) Minimum sampling frequency for 5 MHz video10 MHz (10 Msamples/s)
(b) PCM data rate at 16 bits/sample160 Mbps
(c) Alias of 600 Hz sampled at 1000 Hz400 Hz
(d) Quantization step, 8-bit over 4 V15.625 mV
(d) Maximum quantization error7.8125 mV
(e) Why MPEG is smallerlossy coding of temporal and spatial redundancy plus perceptual irrelevance
Back to the paper →