Salta al contenuto
Note per Studenti Properties of Discrete-Time Convolution Report

Properties of Discrete-Time Convolution

In questa pagina 3

Convolution is defined in LTI Systems and Discrete-Time ConvolutionLTI systems are completely described by their impulse response; the output is the discrete convolution of impulse response and input, valid for convolutional LTI systems, with step response, BIBO example and the l1 existence theorem.LTI Systems and Discrete-Time Convolution →: (h∗u)(k)=∑n=−∞+∞h(k−n)u(n)(h*u)(k)=\sum_{n=-\infty}^{+\infty}h(k-n)u(n).

Properties

  • Time invariance: with the substitution m=n−k0m=n-k_0, ∑n=−∞+∞h(k−n) u(n−k0)=∑m=−∞+∞h((k−k0)−m)u(m)=(h∗u)(k−k0).\sum_{n=-\infty}^{+\infty}h(k-n)\,u(n-k_0)=\sum_{m=-\infty}^{+\infty}h\big((k-k_0)-m\big)u(m)=(h*u)(k-k_0).
  • Commutativity: with m=k−nm=k-n, h∗u=∑n=−∞+∞h(k−n)u(n)=∑m=−∞+∞u(k−m)h(m)=u∗h.h*u=\sum_{n=-\infty}^{+\infty}h(k-n)u(n)=\sum_{m=-\infty}^{+\infty}u(k-m)h(m)=u*h.
  • Associativity: h2∗h1∗u=(h2∗h1)∗u=h2∗(h1∗u)h_2*h_1*u=(h_2*h_1)*u=h_2*(h_1*u). Useful for interconnections in series.
  • Bilinearity: h∗(α1u1+α2u2)=α1(h∗u1)+α2(h∗u2),(α1h1+α2h2)∗u=α1(h1∗u)+α2(h2∗u).h*(\alpha_1u_1+\alpha_2u_2)=\alpha_1(h*u_1)+\alpha_2(h*u_2),\qquad(\alpha_1h_1+\alpha_2h_2)*u=\alpha_1(h_1*u)+\alpha_2(h_2*u). Useful for interconnections in parallel, i.e. the superposition of several systems.
  • The Kronecker δ(k)\delta(k) is the neutral element: h∗δ(k)=h(k)h*\delta(k)=h(k) by definition of impulse response, and δ∗u(k)=u(k)\delta*u(k)=u(k) by commutativity and the previous one.
  • Support: let x1(k):D1→Cx_1(k):D_1\to\mathbb{C}, x2(k):D2→Cx_2(k):D_2\to\mathbb{C} with bounded supports D1={a1,…,b1}D_1=\{a_1,\dots,b_1\}, D2={a2,…,b2}D_2=\{a_2,\dots,b_2\}. If k<a1+a2k<a_1+a_2 or k>b1+b2k>b_1+b_2 then x(k)=(x1∗x2)(k)=0x(k)=(x_1*x_2)(k)=0.

Relationship between convolution and correlation

The cross-correlation

Rx1x2(k)=∑n=−∞+∞x1(k+n) x2(n)‾R_{x_1x_2}(k)=\sum_{n=-\infty}^{+\infty}x_1(k+n)\,\overline{x_2(n)}

can be rewritten with m=−nm=-n:

Rx1x2(k)=∑nx1(k−(−n))x2(n)‾=∑m=−∞+∞x1(k−m) x2(−m)‾=(x1∗R[x2]‾)(k),R_{x_1x_2}(k)=\sum_{n}x_1\big(k-(-n)\big)\overline{x_2(n)}=\sum_{m=-\infty}^{+\infty}x_1(k-m)\,\overline{x_2(-m)}=\big(x_1*\overline{\mathcal{R}[x_2]}\big)(k),

where R[x(k)]=x(−k)\mathcal{R}[x(k)]=x(-k) is the time reversal. Correlation is therefore a convolution with the conjugated, time-reversed signal.

Exercises on convolution (discrete)

1) Classic exercise

h(k)=γk1(k)h(k)=\gamma^k\mathbf{1}(k) with 0<γ<10<\gamma<1 and u(k)=1(k)u(k)=\mathbf{1}(k). Use y(k)=∑n=−∞+∞h(n)u(k−n)y(k)=\sum_{n=-\infty}^{+\infty}h(n)u(k-n), noting that u(k−n)=u(−n+k)u(k-n)=u(-n+k) (the step reflected and slid to kk). The product h(n) u(k−n)h(n)\,u(k-n) is 00 for all nn if k<0k<0, and

h(n) u(k−n)={γn,0≤n≤k0,otherwiseh(n)\,u(k-n)=\begin{cases}\gamma^n,&0\le n\le k\\0,&\text{otherwise}\end{cases}

so

y(k)=∑n=0kγn=1−γk+11−γ 1(k).y(k)=\sum_{n=0}^{k}\gamma^n=\frac{1-\gamma^{k+1}}{1-\gamma}\,\mathbf{1}(k).

2) A two-sided example

h(k)=(13)−k1(−k−1)h(k)=\left(\frac13\right)^{-k}\mathbf{1}(-k-1), u(k)=1(k−1)u(k)=\mathbf{1}(k-1). Is y∈ℓ1y\in\ell^1?

Check: ∑k∣h(k)∣=∑k=−∞−1(13)−k=∑k=1+∞(13)k<+∞\sum_k|h(k)|=\sum_{k=-\infty}^{-1}\left(\frac13\right)^{-k}=\sum_{k=1}^{+\infty}\left(\frac13\right)^k<+\infty, so h∈ℓ1h\in\ell^1. But ∑k∣u(k)∣=∑k=1+∞1=+∞\sum_k|u(k)|=\sum_{k=1}^{+\infty}1=+\infty: maybe y∈ℓ1y\in\ell^1, maybe not.

y(k)=∑n=−∞+∞(13)−(k−n)1(−(k−n)−1)1(n−1).y(k)=\sum_{n=-\infty}^{+\infty}\left(\tfrac13\right)^{-(k-n)}\mathbf{1}\big(-(k-n)-1\big)\mathbf{1}(n-1).

The first step is active for −k+n−1≥0-k+n-1\ge0, i.e. n≥k+1n\ge k+1; the second for n−1≥0n-1\ge0, i.e. n≥1n\ge1. Hence

y(k)=∑n=max⁡(k+1,1)+∞(13)−k+n={(13)−k∑n=1+∞(13)n,k+1≤1, i.e. k≤0∑n=k+1+∞(13)n−k,k>0y(k)=\sum_{n=\max(k+1,1)}^{+\infty}\left(\tfrac13\right)^{-k+n}=\begin{cases}\left(\frac13\right)^{-k}\displaystyle\sum_{n=1}^{+\infty}\left(\frac13\right)^n,&k+1\le1,\ \text{i.e. }k\le0\\[3mm]\displaystyle\sum_{n=k+1}^{+\infty}\left(\frac13\right)^{n-k},&k>0\end{cases}

  • Case k≤0k\le0: ∑n=1+∞(13)n=∑n=0+∞(13)n−(13)0=11−13−1=32−1=12\sum_{n=1}^{+\infty}\left(\frac13\right)^n=\sum_{n=0}^{+\infty}\left(\frac13\right)^n-\left(\frac13\right)^0=\frac1{1-\frac13}-1=\frac32-1=\frac12, so y(k)=(13)−k⋅12=3k2y(k)=\left(\frac13\right)^{-k}\cdot\frac12=\frac{3^k}2.
  • Case k>0k>0: with m=n−km=n-k, ∑m=1+∞(13)m=12\sum_{m=1}^{+\infty}\left(\frac13\right)^m=\frac12.

y(k)={3k2,k≤012,k>0 = 3k21(−k)+121(k−1) = 3k21(−k−1)+121(k) ∉ℓ1.y(k)=\begin{cases}\dfrac{3^k}{2},&k\le0\\[2mm]\dfrac12,&k>0\end{cases}\ =\ \frac{3^k}{2}\mathbf{1}(-k)+\frac12\mathbf{1}(k-1)\ =\ \frac{3^k}{2}\mathbf{1}(-k-1)+\frac12\mathbf{1}(k)\ \notin\ell^1 .

(The two forms agree because 30/2=1/23^0/2=1/2 at k=0k=0.) So convolving h∈ℓ1h\in\ell^1 with u∉ℓ1u\notin\ell^1 may give a result outside ℓ1\ell^1, even though y(k)y(k) is finite for every kk.

3) Two rectangular signals (graphical method)

h(k)={1,4≤k≤150,otherwiseu(k)={1,3≤k≤80,otherwiseh(k)=\begin{cases}1,&4\le k\le15\\0,&\text{otherwise}\end{cases}\qquad u(k)=\begin{cases}1,&3\le k\le8\\0,&\text{otherwise}\end{cases}

Both are absolutely summable, so yy exists and y∈ℓ1y\in\ell^1. The direct sum is a mess; it is drawing time.

Fix kk and draw, as nn varies, both h(k−n)h(k-n) and u(n)u(n). The signal h(0−n)=R[h(n)]h(0-n)=\mathcal{R}[h(n)] is the rectangle of hh flipped, supported on [−15,−4][-15,-4] (left end LhL_h, right end RhR_h); it slides to the right as kk grows. The rectangle u(n)u(n) is supported on [3,8][3,8] (ends LuL_u, RuR_u). For k=7k=7 the flipped rectangle h(7−n)h(7-n) has support [−8,3][-8,3] and touches the support of uu at one point (Rh=Lu=3R_h=L_u=3).

Critical points:

kk event
77 Rh=LuR_h=L_u (first overlap)
7+5=127+5=12 Rh=RuR_h=R_u
7+11=187+11=18 Lh=LuL_h=L_u
7+11+5=237+11+5=23 Lh=RuL_h=R_u (last overlap)

Since h(k−n)u(n)∈{0,1}h(k-n)u(n)\in\{0,1\}, y(k)y(k) equals the number of points in the intersection of the two rectangles:

  • for k<7k<7 or k>23k>23 the intersection is empty and y(k)=0y(k)=0;
  • at k=7k=7: only 11 point; at k=8k=8: 22 points; and so on up to k=12k=12: 66 points;
  • from k=12k=12 to k=18k=18 there are 66 points in the intersection (note that 18−12+1=7=11−5+118-12+1=7=11-5+1), so y(k)=6y(k)=6 on a plateau;
  • at k=19k=19: 55 points; at k=20k=20: 44 points; …\dots; at k=23k=23: 11 point.
 k    :  <7   7  8  9  10 11 12 ... 18  19 20 21 22 23  >23
 y(k) :   0   1  2  3   4  5  6 ...  6   5  4  3  2  1    0

The graph of y(k)y(k) is a trapezoid: it rises by 11 per step from y(7)=1y(7)=1 to y(12)=6y(12)=6, stays at 66 up to k=18k=18, and falls by 11 per step to y(23)=1y(23)=1.

A closed expression. An important trick for rectangles in discrete time:

rect⁡ ⁣(k−k02Kˉ)=1  ⟺  ∣k−k02Kˉ∣≤12  ⟺  ∣k−k0∣≤Kˉ  ⟺  −Kˉ+k0≤k≤Kˉ+k0,\operatorname{rect}\!\left(\frac{k-k_0}{2\bar K}\right)=1\iff\left|\frac{k-k_0}{2\bar K}\right|\le\frac12\iff|k-k_0|\le\bar K\iff-\bar K+k_0\le k\le\bar K+k_0,

where k0k_0 is the center of the rectangle base and 2Kˉ2\bar K the rectangle width. Then

rect⁡ ⁣(k−k02Kˉ):=1(k−(k0−Kˉ))−1(k−(k0+Kˉ+1))(discrete).\operatorname{rect}\!\left(\frac{k-k_0}{2\bar K}\right):=\mathbf{1}\big(k-(k_0-\bar K)\big)-\mathbf{1}\big(k-(k_0+\bar K+1)\big)\quad\text{(discrete)}.

Caveat: in continuous time rect⁡(t)=1 ⁣(t+12)−1 ⁣(t−12)\operatorname{rect}(t)=\mathbf{1}\!\left(t+\frac12\right)-\mathbf{1}\!\left(t-\frac12\right) only if 1\mathbf{1} is not defined at t=0t=0.

Hence h(k)=1(k−4)−1(k−16)h(k)=\mathbf{1}(k-4)-\mathbf{1}(k-16) and u(k)=1(k−3)−1(k−9)u(k)=\mathbf{1}(k-3)-\mathbf{1}(k-9), and

y(k)=∑n=−∞+∞[1(k−n−4)−1(k−n−16)][1(n−3)−1(n−9)].y(k)=\sum_{n=-\infty}^{+\infty}\big[\mathbf{1}(k-n-4)-\mathbf{1}(k-n-16)\big]\big[\mathbf{1}(n-3)-\mathbf{1}(n-9)\big].

The second bracket is active for 3≤n≤83\le n\le8, so

y(k)=∑n=38[1(k−n−4)−1(k−n−16)].y(k)=\sum_{n=3}^{8}\big[\mathbf{1}(k-n-4)-\mathbf{1}(k-n-16)\big].

With l=k−nl=k-n (so n=3⇒l=k−3n=3\Rightarrow l=k-3 and n=8⇒l=k−8n=8\Rightarrow l=k-8):

y(k)=∑l=k−8k−3[1(l−4)−1(l−16)].y(k)=\sum_{l=k-8}^{k-3}\big[\mathbf{1}(l-4)-\mathbf{1}(l-16)\big].

With m=l+8m=l+8 (so l=k−8⇒m=kl=k-8\Rightarrow m=k and l=k−3⇒m=k+5l=k-3\Rightarrow m=k+5):

y(k)=∑m=kk+5[1(m−12)−1(m−24)]={0,k+5−12<0 ∨ k−24≥0  (i.e. k<7 ∨ k≥24)∑m=kk+5rect⁡ ⁣(m−17.511),otherwisey(k)=\sum_{m=k}^{k+5}\big[\mathbf{1}(m-12)-\mathbf{1}(m-24)\big]=\begin{cases}0,&k+5-12<0\ \lor\ k-24\ge0\ \ (\text{i.e. }k<7\ \lor\ k\ge24)\\[1mm]\displaystyle\sum_{m=k}^{k+5}\operatorname{rect}\!\left(\frac{m-17.5}{11}\right),&\text{otherwise}\end{cases}

that is,

y(k)=rect⁡ ⁣(k−1516)⋅∑m=kk+5rect⁡ ⁣(m−17.511).y(k)=\operatorname{rect}\!\left(\frac{k-15}{16}\right)\cdot\sum_{m=k}^{k+5}\operatorname{rect}\!\left(\frac{m-17.5}{11}\right).

The lecturer notes this is correct: it was checked with MATLAB.

4) Area of a convolution

Compute the area of y(k)=(h∗u)(k)y(k)=(h*u)(k) as a function of AhA_h, AuA_u (assume Ah,Au<+∞A_h,A_u<+\infty). By Tonelli's theorem:

Ay=∑m=−∞+∞y(m)=∑m∑nh(m−n)u(n)=(∑n=−∞+∞u(n))(∑m=−∞+∞h(m−n))=(∑l=−∞+∞h(l))(∑n=−∞+∞u(n))=AhAu.A_y=\sum_{m=-\infty}^{+\infty}y(m)=\sum_{m}\sum_{n}h(m-n)u(n)=\left(\sum_{n=-\infty}^{+\infty}u(n)\right)\left(\sum_{m=-\infty}^{+\infty}h(m-n)\right)=\left(\sum_{l=-\infty}^{+\infty}h(l)\right)\left(\sum_{n=-\infty}^{+\infty}u(n)\right)=A_hA_u.

5) Rogue exercise: find hh and uu given their convolution

There may be multiple valid answers.

  • 5a) y(k)=∑n=0+∞(12)k−nsin⁡(n+2)=∑n=−∞+∞(12)k−n⏟h(k−n)sin⁡(n+2) 1(n)⏟u(n)y(k)=\sum_{n=0}^{+\infty}\left(\frac12\right)^{k-n}\sin(n+2)=\sum_{n=-\infty}^{+\infty}\underbrace{\left(\tfrac12\right)^{k-n}}_{h(k-n)}\underbrace{\sin(n+2)\,\mathbf{1}(n)}_{u(n)}, so h(k)=(12)kh(k)=\left(\frac12\right)^k and u(k)=sin⁡(k+2) 1(k)u(k)=\sin(k+2)\,\mathbf{1}(k).
  • 5b) y(k)=∑n=−∞k−1(12)n=∑n=−∞+∞(12)n⏟u(n)1(k−1−n)⏟h(k−n) with h(k)=1(k−1)y(k)=\sum_{n=-\infty}^{k-1}\left(\frac12\right)^n=\sum_{n=-\infty}^{+\infty}\underbrace{\left(\tfrac12\right)^n}_{u(n)}\underbrace{\mathbf{1}(k-1-n)}_{h(k-n)\text{ with }h(k)=\mathbf{1}(k-1)}, so h(k)=1(k−1)h(k)=\mathbf{1}(k-1) and u(k)=(12)ku(k)=\left(\frac12\right)^k.

Versione ripasso

  • Definition: (h∗u)(k)=∑n=−∞+∞h(k−n)u(n)(h*u)(k)=\sum_{n=-\infty}^{+\infty}h(k-n)u(n).
  • Properties: time invariance (h∗u(⋅−k0))(k)=(h∗u)(k−k0)(h*u(\cdot-k_0))(k)=(h*u)(k-k_0); commutative h∗u=u∗hh*u=u*h (substitute m=k−nm=k-n); associative h2∗h1∗u=(h2∗h1)∗uh_2*h_1*u=(h_2*h_1)*u (series connection); bilinear (parallel connection, superposition); neutral element δ\delta: h∗δ=hh*\delta=h.
  • Support: if x1x_1 lives on {a1,…,b1}\{a_1,\dots,b_1\} and x2x_2 on {a2,…,b2}\{a_2,\dots,b_2\}, then x1∗x2=0x_1*x_2=0 for k<a1+a2k<a_1+a_2 or k>b1+b2k>b_1+b_2.
  • Area: Ah∗u=AhAuA_{h*u}=A_hA_u (Tonelli).
  • Correlation: Rx1x2(k)=∑nx1(k+n)x2(n)‾=(x1∗R[x2]‾)(k)R_{x_1x_2}(k)=\sum_nx_1(k+n)\overline{x_2(n)}=(x_1*\overline{\mathcal{R}[x_2]})(k).
  • Rectangle trick: rect⁡ ⁣(k−k02Kˉ)=1(k−(k0−Kˉ))−1(k−(k0+Kˉ+1))\operatorname{rect}\!\left(\frac{k-k_0}{2\bar K}\right)=\mathbf{1}(k-(k_0-\bar K))-\mathbf{1}(k-(k_0+\bar K+1)) (discrete only).
  • Graphical method: flip hh, slide it by kk, multiply with uu, sum. Critical points occur when an edge of the flipped hh meets an edge of uu. Example: h=1h=1 on [4,15][4,15], u=1u=1 on [3,8][3,8]: critical k=7,12,18,23k=7,12,18,23; yy is a trapezoid, rising from 11 at k=7k=7 to the plateau 66 on 12≤k≤1812\le k\le18 and falling to 11 at k=23k=23, zero outside [7,23][7,23].
  • Worked results: γk1(k)∗1(k)=1−γk+11−γ1(k)\gamma^k\mathbf{1}(k)*\mathbf{1}(k)=\frac{1-\gamma^{k+1}}{1-\gamma}\mathbf{1}(k); (13)−k1(−k−1)∗1(k−1)=3k2\left(\frac13\right)^{-k}\mathbf{1}(-k-1)*\mathbf{1}(k-1)=\frac{3^k}2 for k≤0k\le0, 12\frac12 for k>0k>0 (not in ℓ1\ell^1).
  • Typical mistakes: wrong active ranges in the sums; mixing up the flipped and the fixed signal; assuming y∈ℓ1y\in\ell^1 when only one of h,uh,u is in ℓ1\ell^1 (the theorem needs both).

Teoria collegata