22-Elec-B3 Digital Communications Systems · December 2014
Question 4 of 5: Signal Detection with a Matched Filter
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
Paper format: Professional Engineers of Ontario, Annual Examinations — December 2014, 07-Elec-B3 Digital Communication Systems. Three hours, closed book, a PEO-approved non-programmable calculator permitted. Five questions are printed at 25 marks each; 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. All five questions are solved below, because the set as a whole is the study resource.
Reference texts.
S. Haykin, Communication Systems, 5th ed. — the primary reference for link budgets, digital modulation, matched-filter detection and error-control coding.
B. P. Lathi and Z. Ding, Modern Digital and Analog Communication Systems, 4th ed. — source coding, Huffman codes, Nyquist signalling and channel capacity.
J. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms and Applications, 4th ed. — convolution and discrete-time filtering background for Question 4.
Check — the parity-check matrix of Question 5(c) did not print on the paper. Page 3 reads “Consider a binary Hamming code with the following parity check matrix:” followed by a blank gap of roughly two lines, and then “Give the corresponding generator matrix.” The gap is genuinely empty: the matrix is missing from the printed paper itself. Parts (c) and (d) are therefore solved for the standard systematic binary (7,4) Hamming code, which is the only binary Hamming code that fits a matrix of the size the gap allows and is the canonical textbook example. The assumption is stated explicitly in the answer, exactly as Note 1 on the cover page instructs (“the candidate is urged to submit with the answer paper a clear statement of any assumptions made”). The method of parts (c) and (d) is independent of which particular Hamming matrix is intended.
Question 4: Signal Detection with a Matched Filter (25 marks)
Given. Antipodal binary signalling on $[0, T]$ with $s_0(t) = 1$ for $0 \le t \le T$ and zero elsewhere, and $s_1(t) = -s_0(t)$; a receive filter matched to $s_0(t)$ whose output is sampled at $t = T$; additive Gaussian noise of zero mean and variance $\sigma^2$ at that sampling instant; equiprobable symbols, $\Pr(0) = \Pr(1) = 1/2$; and the tail identity relating the Gaussian integral to the complementary error function.
Find. Sketches of $s_0$, $s_1$ and the matched-filter impulse response $m(t)$; the sketch of $s_0 * m$; the optimal (minimum-error-probability) decision rule at the sampling instant; and $\Pr(\text{error} \mid 1 \text{ sent})$ written with the complementary error function.
(a) The signals and the matched-filter impulse response (5 marks)
Approach. Sketch the two antipodal rectangles, then apply the matched-filter definition $m(t) = s_0(T - t)$, which is the time-reversal of $s_0$ delayed so that the filter is causal and peaks exactly at the specified sampling instant $t = T$.
Part (a) — the two transmitted signals. $s_0(t)$ is a unit-amplitude rectangular pulse occupying the whole symbol interval, and $s_1(t) = -s_0(t)$ is its negative — the same rectangle inverted. This is antipodal signalling: the two waveforms have identical energy
$$E = \int_0^T s_0^2(t)\,dt = \int_0^T 1^2\,dt = T$$
and correlation coefficient $-1$, which is the largest possible separation for a given energy.
Part (a) — construct the matched filter. A filter matched to a signal $s(t)$ of duration $T$, with its output to be sampled at $t = T$, has impulse response
$$m(t) = s_0(T - t) = \begin{cases} 1, & 0 \le t \le T \\ 0, & \text{elsewhere} \end{cases}$$
Because the rectangle is symmetric about $t = T/2$, time-reversing and shifting it returns the same rectangle, so $m(t) = s_0(t)$ here. This coincidence is specific to a symmetric pulse; for an asymmetric pulse the impulse response would be visibly the mirror image. The matched filter is therefore simply an integrate-over-one-symbol operation, which is why this receiver is often drawn as an integrate-and-dump correlator.
Figure 4.1 — the two antipodal signalling waveforms and the impulse response of the filter matched to $s_0(t)$ for sampling at $t = T$. All three are unit-amplitude rectangles of duration $T$; only the sign of $s_1$ differs.
(b) Convolution of $s_0(t)$ with $m(t)$ (5 marks)
Approach. Convolve two identical unit rectangles of width $T$ by sliding one past the other and measuring the overlap area, which grows linearly, peaks at full overlap and decays linearly.
Part (b) — evaluate the convolution integral by overlap. With both factors unit rectangles on $[0, T]$,
$$y(t) = (s_0 * m)(t) = \int_{-\infty}^{\infty} s_0(\tau)\, m(t - \tau)\, d\tau ,$$
and since the integrand is 1 wherever the two rectangles overlap and 0 elsewhere, $y(t)$ is simply the length of the overlap. That gives the triangular result
$$y(t) = \begin{cases} t, & 0 \le t \le T \\ 2T - t, & T \le t \le 2T \\ 0, & \text{elsewhere} \end{cases}$$
The overlap is zero at $t = 0$, complete at $t = T$, and zero again at $t = 2T$.
Part (b) — identify the peak and its meaning. The maximum occurs at exactly the specified sampling instant:
$$\boxed{y(T) = \int_0^T s_0^2(t)\,dt = E = T}$$
The convolution output at $t = T$ is therefore the signal energy, which is precisely what the matched filter is designed to deliver: it is the linear filter that maximises the output signal-to-noise ratio at one instant, and the triangular shape shows how sharply that advantage falls away if the sampler is mistimed. The full base width of $2T$ also explains why sampling must be at $T$ and not later — and why, in a continuous stream of symbols, adjacent triangles overlap and correct symbol timing is essential.
Figure 4.2 — convolving two identical rectangles of width $T$ gives a triangle of base $2T$ rising with unit slope to a peak of $T$ at $t = T$ and falling symmetrically to zero at $t = 2T$. Sampling at the apex extracts the full signal energy.
(c) The optimal decision rule (5 marks)
Approach. Write the sampled output for each transmitted symbol, then apply the maximum-a-posteriori rule, which for equiprobable symbols and equal noise variance reduces to a minimum-distance comparison against the midpoint of the two noiseless outputs.
Part (c) — write the sampled statistic under each hypothesis. Let $r$ be the matched-filter output sampled at $t = T$. From part (b) the noiseless output is $+E = +T$ when 0 is sent and, because $s_1 = -s_0$, exactly $-E = -T$ when 1 is sent. Adding the noise sample $n \sim \mathcal{N}(0, \sigma^2)$,
$$r = \begin{cases} +E + n, & \text{if } 0 \text{ was sent} \\ -E + n, & \text{if } 1 \text{ was sent} \end{cases}$$
so $r$ is Gaussian with variance $\sigma^2$ about a mean of $+E$ or $-E$.
Part (c) — form the likelihood ratio and reduce it. The rule minimising the probability of error chooses the symbol with the larger posterior probability. With equal priors this becomes the maximum-likelihood test
$$\frac{f(r \mid 1)}{f(r \mid 0)} = \frac{\exp\!\left(-\dfrac{(r + E)^2}{2\sigma^2}\right)}{\exp\!\left(-\dfrac{(r - E)^2}{2\sigma^2}\right)} \;\gtrless\; 1 .$$
Taking logarithms, the exponentials cancel down to $(r-E)^2 \gtrless (r+E)^2$, and expanding removes $r^2$ and $E^2$ to leave $-2rE \gtrless +2rE$, i.e. a comparison of $r$ against zero. Because the two means are symmetric about the origin and the noise variance is the same under both hypotheses, the optimal threshold is simply the midpoint $\bigl[(+E) + (-E)\bigr]/2 = 0$:
$$\boxed{\text{decide } \hat{b} = 0 \text{ if } r > 0, \qquad \text{decide } \hat{b} = 1 \text{ if } r < 0}$$
(the case $r = 0$ has zero probability and may be assigned either way). In words: look only at the sign of the matched-filter output. The threshold is independent of $\sigma^2$ and of the signal energy, which is what makes antipodal signalling attractive in practice — no amplitude reference or automatic gain control is needed at the decision device.
(d) Probability of error given that a 1 was sent (10 marks)
Approach. Identify the region of $r$ that the rule of part (c) misclassifies when 1 was sent, integrate the corresponding Gaussian density over that region, and match the integral to the identity supplied in the question.
Part (d) — express the error event as an integral. When 1 is sent, $r$ is Gaussian with mean $\mu = -E$ and variance $\sigma^2$. The rule of part (c) decides “0” whenever $r > 0$, so
$$\Pr(\varepsilon \mid 1) = \Pr(r > 0 \mid 1 \text{ sent}) = \int_0^\infty \frac{1}{\sqrt{2\pi\sigma^2}} \exp\!\left(-\frac{(x + E)^2}{2\sigma^2}\right) dx .$$
Geometrically, this is the area of the tail of the lower Gaussian lobe that spills across the threshold at the origin.
Part (d) — match the integral to the given identity. The identity supplied in the question,
$$\frac{1}{2}\mathrm{erfc}\!\left(\frac{t - \mu}{\sqrt{2\sigma^2}}\right) = \int_t^\infty \frac{1}{\sqrt{2\pi\sigma^2}} \exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) dx ,$$
is exactly this integral with lower limit $t = 0$ and mean $\mu = -E$. Substituting those two values,
$$\Pr(\varepsilon \mid 1) = \frac{1}{2}\mathrm{erfc}\!\left(\frac{0 - (-E)}{\sqrt{2\sigma^2}}\right),$$
$$\boxed{\Pr(\varepsilon \mid 1) = \frac{1}{2}\,\mathrm{erfc}\!\left(\frac{E}{\sqrt{2\sigma^2}}\right) = \frac{1}{2}\,\mathrm{erfc}\!\left(\frac{T}{\sigma\sqrt{2}}\right)}$$
using $E = T$ for this unit-amplitude pulse. By the symmetry of the antipodal constellation about the threshold, $\Pr(\varepsilon \mid 0)$ is identical, so with equiprobable symbols the overall bit error probability is the same expression.
Part (d) — sanity-check against the standard result. For a matched filter driven by white Gaussian noise of two-sided power spectral density $N_0/2$, the output noise variance at the sampling instant is $\sigma^2 = N_0 E/2$. Substituting,
$$\frac{E}{\sqrt{2\sigma^2}} = \frac{E}{\sqrt{N_0 E}} = \sqrt{\frac{E}{N_0}} \quad\Longrightarrow\quad \Pr(\varepsilon) = \frac{1}{2}\mathrm{erfc}\!\left(\sqrt{\frac{E_b}{N_0}}\right) = Q\!\left(\sqrt{\frac{2E_b}{N_0}}\right),$$
which is the textbook error probability for antipodal (binary phase-shift keyed) signalling — confirming the result. As a numerical illustration, $E = T = 1$ with $\sigma = 0.5$ gives $\Pr(\varepsilon \mid 1) = \tfrac{1}{2}\mathrm{erfc}(1.4142) = 2.28 \times 10^{-2}$, and halving $\sigma$ to 0.25 drops it to $3.2 \times 10^{-5}$ — the steep exponential improvement characteristic of Gaussian-channel detection.
Quantity
Result
(a) Matched-filter impulse response
$m(t) = s_0(T-t)$ = unit rectangle on $[0,T]$, identical to $s_0(t)$
(a) Signal energy
$E = \int_0^T s_0^2\,dt = T$
(b) Convolution $s_0 * m$
Triangle: $y(t)=t$ on $[0,T]$, $y(t)=2T-t$ on $[T,2T]$; peak $y(T)=T=E$
(c) Optimal decision rule
Threshold at zero: decide 0 if $r>0$, decide 1 if $r<0$