NivaarExam PrepOfficial exam papers ↗

22-Elec-B3 Digital Communications Systems · May 2018

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 — May 2018, 16-Elec-B3 Digital Communications Systems. Three hours, closed book; a PEO-approved non-programmable 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 1.

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.

QuantitySymbolValue
Video signal bandwidth (part a)$B$5 MHz
PCM resolution (part b)$n$16 bits/sample
PCM resolution (part d)$n$24 bits/sample
Signal range (part d)$V_{pp}$−5 V to +5 V, i.e. 10 V peak-to-peak

Find. (a) the minimum sampling rate; (b) an explanation of PCM and the resulting bit rate; (c) a concrete example of aliasing; (d) the maximum quantisation error of the 24-bit converter; (e) one reason MPEG video needs far less rate than raw PCM.

Approach. Apply the Nyquist criterion to fix the sampling rate, multiply by the word length for the PCM rate, divide the input range by the number of quantisation levels for the step size and halve it for the worst-case error, and answer (c) and (e) from the underlying sampling theory and source-coding principles.

  1. Part (a) — Apply the Nyquist sampling criterion. A signal strictly bandlimited to $B$ can be reconstructed exactly from its samples provided the sampling rate exceeds twice that bandwidth: $$f_s \ge 2B = 2 \times 5\ \mathrm{MHz}$$ $$\boxed{f_{s,\min} = 10\ \mathrm{MHz} \;(10\ \text{Msample/s})}$$ This is the Nyquist rate; sampling at exactly $2B$ is the theoretical boundary, and any practical converter sits above it to leave room for a realisable anti-aliasing filter (studio digital video, for instance, uses 13.5 MHz for standard-definition luminance).
  2. Part (b) — Explain pulse code modulation. PCM is the standard three-stage conversion of an analogue waveform to a bit stream. The signal is first sampled at $f_s$, converting it from continuous time to a discrete-time sequence; each sample is then quantised, meaning its amplitude is rounded to the nearest of $L = 2^n$ permitted levels, which is the only irreversible step and introduces the quantisation error of part (d); finally each quantised level is encoded as an $n$-bit binary word, and the words are transmitted serially. Because the amplitude information is carried by a binary code rather than by a pulse's height or width, PCM is immune to accumulating analogue distortion — regenerative repeaters restore the bits exactly — which is what made it the foundation of digital telephony and digital audio.
  3. Compute the PCM bit rate. The rate is simply the sampling rate multiplied by the number of bits per sample: $$R_b = n f_s = 16 \times 10\times10^{6}$$ $$\boxed{R_b = 160\ \mathrm{Mbit/s}}$$ Uncompressed NTSC-quality video at 16-bit resolution therefore needs 160 Mbit/s, or 20 MB per second — about 72 GB per hour, which puts the cost of doing nothing about compression into perspective.
  4. Part (c) — Give an example of aliasing. Aliasing is what happens when a signal component above $f_s/2$ is sampled: it is indistinguishable from — and on reconstruction reappears as — a lower-frequency component at $|f - k f_s|$ for the integer $k$ that brings it into the baseband. A concrete audio example: a 7 kHz tone sampled at 8 kHz (below the 14 kHz Nyquist rate) produces exactly the same sample values as a 1 kHz tone, so the reconstructed signal contains a 1 kHz whistle that was never present in the original and cannot be filtered out afterwards.
    Aliasing: undersampling folds a high tone onto a low one — true signal, f = 7 kHz - - reconstructed alias, |f − f_s| = 1 kHz sample instants (dots) at f_s = 8 kHz — below the 14 kHz Nyquist rate; both curves fit every sample exactly
    Figure 5.1 — A 7 kHz tone sampled at 8 kHz. Every sample lies on both curves, so the reconstruction filter has no way to prefer the true 7 kHz signal over its 1 kHz alias. Once the samples are taken, the information distinguishing them is gone — which is why the anti-aliasing filter must precede the sampler.

    The everyday visual counterpart is the wagon-wheel effect in film: a wheel rotating at just under one spoke-spacing per frame appears to rotate slowly backwards, because a 24 frame/s camera undersamples the rotation. The engineering lesson in both cases is the same — aliasing must be prevented before sampling by an analogue anti-aliasing low-pass filter, because no amount of digital processing afterwards can undo it.

  5. Part (d) — Find the quantisation step size, then the worst-case error. A 24-bit converter divides the full-scale range into $$L = 2^{24} = 16\,777\,216 \text{ levels},$$ so with a range of $V_{pp} = 5 - (-5) = 10$ V the step size is $$\Delta = \frac{V_{pp}}{2^{n}} = \frac{10}{2^{24}} = 5.9605\times10^{-7}\ \mathrm{V} = 596.0\ \mathrm{nV}.$$ A rounding quantiser assigns each sample to the nearest level, so the error can never exceed half a step: $$e_{\max} = \frac{\Delta}{2} = \frac{10}{2^{25}} = 2.980\times10^{-7}\ \mathrm{V}$$ $$\boxed{e_{\max} = 0.298\ \mu\mathrm{V} \approx 298\ \mathrm{nV}}$$ For context, the resulting signal-to-quantisation-noise ratio for a full-scale sinusoid is $\mathrm{SQNR} \approx 6.02n + 1.76 = 146.2$ dB — far below the thermal noise of any real analogue front end, which is why 24-bit converters are specified for headroom rather than for audible resolution.
  6. Part (e) — Explain why MPEG needs far less rate. PCM is not compression at all: it represents every sample independently and at full precision, spending the same 16 bits on a frame of static blue sky as on a frame of fast motion. MPEG is a lossy source coder that removes the redundancy PCM ignores — spatial redundancy within a frame (the DCT concentrates most of a block's energy into a few low-frequency coefficients), temporal redundancy between frames (motion-compensated prediction transmits only the difference from a predicted frame, and consecutive video frames are highly similar), and perceptual irrelevance (coefficients are quantised coarsely where the human visual system cannot see the error, and the results entropy-coded). Discarding information the viewer will not notice is exactly what the entropy bound of Question 2(c) permits, and it is why MPEG-2 delivers broadcast-quality video at a few megabits per second against the 160 Mbit/s computed in part (b) — a compression ratio of the order of 40:1.
ResultValue
(a) Minimum sampling frequency10 MHz (10 Msample/s)
(b) PCM data rate at 16 bits/sample160 Mbit/s
(c) Aliasing example7 kHz tone sampled at 8 kHz reappears as a 1 kHz tone (also: the wagon-wheel effect on film)
(d) Quantisation step, $\Delta = 10/2^{24}$596.0 nV
(d) Maximum quantisation error, $\Delta/2$0.298 µV (298 nV)
(d) Corresponding SQNR, $6.02n + 1.76$146.2 dB
(e) Reason MPEG is smallerLossy removal of spatial, temporal and perceptual redundancy, which PCM does not exploit at all
Back to the paper →