22-Elec-B1 Digital Signal Processing · December 2013
Question 2 of 5: Convolution of a Rectangular Window with an Impulse Train
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
Paper format. National Exams, 07-Elec-B1 Digital Signal Processing, December 2013 — 3 hours, closed book, approved calculator plus one double-sided aid sheet. Five questions of 25 marks each; the paper states that FOUR questions constitute a complete paper, so a candidate answers any four. All five are solved here, because the set is a study resource.
Reference texts.
J. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms and Applications, 4th ed. — Ch. 2 (LTI systems and convolution), Ch. 3 (z-transform), Ch. 4 (frequency analysis), Ch. 6 (sampling and multirate), Ch. 7 (the DFT).
A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed. — §2.6–2.9 (frequency response), §4.1–4.6 (sampling and rate conversion), §5.7 (generalized linear phase), §8.6 (DFT properties).
A. V. Oppenheim and A. S. Willsky, Signals and Systems, 2nd ed. — Ch. 2 (LTI systems), Ch. 3 and 5 (Fourier analysis), Ch. 10 (z-transform).
Question 2: Convolution of a Rectangular Window with an Impulse Train (25 marks)
Given. A length-6 rectangular window $v[n] = u[n]-u[n-6]$, which equals $1$ for $0 \le n \le 5$ and $0$ elsewhere; a three-impulse train $w[n]$ with weights $1$, $2$, $1$ at $n = 2$, $4$, $6$; and their convolution $p[n] = v[n]*w[n]$.
Find. (a) the closed-form and sketch of $p[n]$; (b) the sequence $r[n]$ whose convolution with the same window reproduces the running sum of $p$ up to $n-1$; (c) whether time reversal commutes with convolution, with a proof.
Approach. Convolving with an impulse train is just shift-and-add, so build p as the superposition of three shifted copies of the window; for (b) recognise the running sum as convolution with a unit step and cancel the common window factor; for (c) substitute the reversed sequences directly into the convolution sum.
Write the convolution as shifted copies of the window. Convolution with $\delta[n-n_0]$ is a pure shift, so $$p[n] = v[n]*w[n] = v[n-2] + 2\,v[n-4] + v[n-6].$$ Each term is the same six-sample block of ones, occupying $2 \le n \le 7$, $4 \le n \le 9$ (weighted by 2) and $6 \le n \le 11$ respectively. The total support runs from $n = 2$ to $n = 11$, i.e. $6 + 6 - 1 = 11$ samples wide, as the length rule for linear convolution demands.
Add the overlapping blocks sample by sample. Summing the three staggered blocks gives $$\boxed{\,p[n] = \{\underset{n=2}{1},\,1,\,3,\,3,\,4,\,4,\,3,\,3,\,1,\,1\}\,}$$ for $2 \le n \le 11$, and $p[n]=0$ otherwise. The shape is a symmetric staircase, symmetric about $n = 6.5$, because both $v$ and $w$ are themselves symmetric.
Check the result with the area rule. For any two absolutely summable sequences $\sum_n p[n] = \bigl(\sum_n v[n]\bigr)\bigl(\sum_n w[n]\bigr)$ (equivalently $P(z)|_{z=1} = V(1)W(1)$). Here $\sum v = 6$ and $\sum w = 1+2+1 = 4$, so the area must be $24$; adding the ten values above gives $1+1+3+3+4+4+3+3+1+1 = 24$. The sketch is shown below.
Part (a): p[n] = v[n] * w[n], a symmetric staircase supported on 2 ≤ n ≤ 11 with total area 24 = 6 x 4.
Part (b) asks for a different sequence which, convolved with the same window, produces the running sum of p. The key is that accumulation is itself a convolution.
Express the running sum as a convolution with a step. For any sequence, $\sum_{k=-\infty}^{m} p[k] = (p*u)[m]$. The right-hand side of the requirement stops at $k = n-1$, so $$\sum_{k=-\infty}^{n-1} p[k] = (p*u)[n-1] = \bigl(p*u[\,\cdot-1\,]\bigr)[n] = p[n]*u[n-1].$$
Cancel the common window factor. Substituting $p = v*w$ and using associativity and commutativity, $$r[n]*v[n] = v[n]*w[n]*u[n-1] = v[n]*\bigl(w[n]*u[n-1]\bigr),$$ which is satisfied by $r[n] = w[n]*u[n-1]$. (In the z-domain: $R(z)V(z) = V(z)W(z)\,z^{-1}/(1-z^{-1})$, and $V(z)$ divides out.)
Accumulate the impulse train. Convolving $w$ with a delayed step accumulates its weights, each step starting one sample after the corresponding impulse: $$\boxed{\,r[n] = u[n-3] + 2u[n-5] + u[n-7]\,}$$ that is, $r[n] = 0$ for $n \le 2$, $r[n] = 1$ for $n = 3,4$, $r[n] = 3$ for $n = 5,6$, and $r[n] = 4$ for $n \ge 7$. It is a staircase that saturates at the total weight $\sum_n w[n] = 4$.
Verify against the required running sum. Convolving this $r[n]$ with the six-point window and comparing with the cumulative sums of $p$ gives identical sequences: at $n = 3,4,5,6,7,8,9,10,11,12$ both sides equal $1, 2, 5, 8, 12, 16, 19, 22, 23, 24$, and both saturate at $24$ for $n \ge 12$. The check is worth doing in the exam, because it catches an off-by-one shift instantly.
Part (b): r[n] = u[n-3] + 2u[n-5] + u[n-7], the running sum of w[n] delayed by one sample; it saturates at 4.
Part (c) is a property question rather than a computation, and it is answered most cleanly by manipulating the defining sum.
Substitute the reversed sequences into the convolution sum. Let $\tilde v[n] = v[-n]$ and $\tilde w[n] = w[-n]$. Then $$(\tilde v * \tilde w)[n] = \sum_{k} \tilde v[k]\,\tilde w[n-k] = \sum_{k} v[-k]\,w[k-n].$$ Changing the summation variable to $m = -k$ gives $\sum_{m} v[m]\,w[-n-m] = (v*w)[-n] = p[-n]$. Therefore $$\boxed{\,p[-n] = v[-n]*w[-n] \quad\text{is TRUE}\,}$$ for every pair of sequences, not just this one.
Confirm with the z-transform and with the numbers. Time reversal maps $x[n] \leftrightarrow X(1/z)$, so $p[-n] \leftrightarrow P(1/z) = V(1/z)W(1/z)$, which is exactly the transform of $v[-n]*w[-n]$. Numerically, $v[-n]$ occupies $-5 \le n \le 0$ and $w[-n]$ has weights $1,2,1$ at $n = -2,-4,-6$; their convolution is supported on $-11 \le n \le -2$ with values $1,1,3,3,4,4,3,3,1,1$ read in reverse — the mirror image of part (a), as required.
Question 2 — final results
Part
Quantity
Result
(a)
$p[n]$
$\{1,1,3,3,4,4,3,3,1,1\}$ for $2 \le n \le 11$; area $= 24$
(a)
Support / symmetry
$2 \le n \le 11$ (11 samples), symmetric about $n = 6.5$