Lecture 2 · Digital Signal Processing · University of Klagenfurt, 2022
Lecture 2 of 6
From Digital Signal Processing at the University of Klagenfurt, first taught in 2020: this is the edition of summer 2022, so some of it may be a little dated. All lectures.
01
A deterministic signal is a function x:I\to\mathbb{C}, x(t)\in\mathbb{C}, where I is the time domain. In other words, a signal that a mathematical formula describes exactly.
Aperiodic signals
1. With \sin^2t=\frac{1-\cos2t}{2}, the signal repeats when \cos(2t+2T_0)=\cos2t, that is 2T_0=2\pi:
\sin^2(t)\ \Rightarrow\ T_0=\pi
With \cos^2t=\frac{1+\cos2t}{2} and \sin\alpha+\sin\beta=2\sin\frac{\alpha+\beta}{2}\cos\frac{\alpha-\beta}{2}:
4\sin t\cos^2t-\sin t=\sin t+2\sin t\cos2t=\sin t+\sin3t+\sin(-t)=\sin3t\ \Rightarrow\ T_0=\frac{2\pi}{3}
2. A discrete signal is periodic if x(kT)=x(kT+NT) for an integer N:
\cos\left(2\pi f_0kT+2\pi f_0NT\right)=\cos(2\pi f_0kT)\iff f_0NT=\frac{N}{256}\in\mathbb{Z}\ \Rightarrow\ N=256,\quad T_0=256\,T
For \sin(k), with T=1, we need N=2\pi m with m integer: impossible, since \pi is irrational. \sin(k) is not periodic, although \sin(t) is.
A complex signal has two coordinates:
The magnitude and the phase are
|x(t)|=\sqrt{\mathrm{Re}\{x(t)\}^2+\mathrm{Im}\{x(t)\}^2},\qquad \theta(t)=\arctan\left(\frac{\mathrm{Im}\{x(t)\}}{\mathrm{Re}\{x(t)\}}\right)\ \text{ if }\mathrm{Re}\{x(t)\}>0
(add \pi when \mathrm{Re}\{x(t)\}<0). Below, x(t)=\mathrm{sinc}(t)+j\,\frac{1}{1+(\pi t)^2}:
Express in polar coordinates:
1. |1+j\sqrt3|=2 and \arctan\sqrt3=\frac\pi3, so \left(1+j\sqrt3\right)^n=2^n\,e^{j\pi n/3}. It is real when \frac{\pi n}{3} is a multiple of \pi: for n=3,6,9,\dots (-8 for n=3, 64 for n=6).
2. For t>0, jt=t\,e^{j\pi/2} and t=e^{\ln t}:
(jt)^j=t^j\,e^{j\cdot j\frac\pi2}=e^{-\pi/2}\,e^{j\ln t}
a constant magnitude e^{-\pi/2}\approx0.21 and a phase \ln t: the signal runs on a circle.
3. With \frac{1-\cos4t}{1+\cos4t}=\tan^22t, and \tan2t>0, \cos2t>0 for 0<t<\frac\pi4:
1+j\tan2t=\frac{1}{\cos2t}\,e^{j2t}\ \Rightarrow\ \sqrt{1+j\tan2t}=\frac{1}{\sqrt{\cos2t}}\,e^{jt}
item 2: (jt)^j in the complex plane
Area
A(x)=\int_{-\infty}^{+\infty}x(t)\,dt
Mean value
m(x)=\lim_{T\to+\infty}\frac{1}{T}\int_{-T/2}^{T/2}x(t)\,dt
Energy
E(x)=\int_{-\infty}^{+\infty}|x(t)|^2\,dt
Power
P(x)=\lim_{T\to+\infty}\frac{1}{T}\int_{-T/2}^{T/2}|x(t)|^2\,dt
Finite area means zero mean; finite energy means zero power. Periodic signals: mean and power over one period. Discrete time: A(x)=T\sum_kx(kT), E(x)=T\sum_k|x(kT)|^2.
1(t)=\begin{cases}1&t>0\\0&t<0\end{cases}\qquad \mathrm{rect}(t)=\begin{cases}1&|t|<\frac12\\0&\text{elsewhere}\end{cases}\qquad \mathrm{sinc}(t):=\frac{\sin\pi t}{\pi t}
The Dirac impulse \delta(t) is zero for t\neq0 and has unit area; it is defined by the sifting property \int_{-\infty}^{+\infty}x(t)\,\delta(t-t_0)\,dt=x(t_0). In discrete time, 1_0(kT) is the step: 1 for k\ge0, 0 for k<0.
1. The rect is even, so \mathrm{rect}\left(\frac{-6t+7}{8}\right)=\mathrm{rect}\left(\frac{t-\frac76}{\frac43}\right): a pulse of width D=\frac43, and A(x)=\frac43.
2a. The n-th factor has width and height 2^{-n}: the product lives on the narrowest pulse and its height \prod_n2^{-n} goes to 0. So x(t)=0 and A(x)=0.
2b. The areas add up, a geometric series:
A(x)=\sum_{n=0}^{\infty}\frac{1}{2^n}\cdot\frac{1}{2^n}=\sum_{n=0}^{\infty}\left(\frac14\right)^n=\frac{1}{1-\frac14}=\frac43
a stack of pulses with peak value 1+\frac12+\frac14+\dots=2 at t=0.
3. \displaystyle A(x)=\int_0^{+\infty}e^{-\alpha t}\,dt=\left.\frac{e^{-\alpha t}}{-\alpha}\right|_0^{+\infty}=\frac1\alpha
4. The step keeps only k\ge5, so
E(x)=T\sum_{k=5}^{+\infty}0.25^{\,k-1}=T\sum_{\ell=4}^{+\infty}0.25^{\ell}=T\left(\frac{1}{1-\frac14}-\frac{1-\left(\frac14\right)^5}{1-\frac14}\right)=\frac{T}{192}
5. Over one period T_0=1/f_0, with \cos^2\alpha=\frac{1+\cos2\alpha}{2}:
\int_{-T_0/2}^{T_0/2}\cos^2(2\pi f_0t+\varphi)\,dt=\frac{T_0}{2}+\underbrace{\frac{\sin(4\pi f_0t+2\varphi)}{8\pi f_0}\bigg|_{-T_0/2}^{T_0/2}}_{0}=\frac{T_0}{2}
That is the energy of one period: the cosine itself has infinite energy, and its power is
P(x)=\frac{1}{T_0}\cdot\frac{T_0}{2}=\frac12
02
The convolution expresses how the shape of one signal modifies the other. It is the output of a linear time-invariant (LTI) system:
z(t)=x*y(t):=\int_{-\infty}^{+\infty}x(\tau)\,y(t-\tau)\,d\tau
and in discrete time z(kT)=T\sum_{\ell}x(\ell T)\,y(kT-\ell T).
Properties: it is commutative, linear, time invariant (shift the input, the output shifts by as much) and associative.
Convolve x(t)=A_1\,\mathrm{rect}\left(\frac{t}{T_1}\right) and y(t)=A_2\,\mathrm{rect}\left(\frac{t}{T_2}\right), with T_1>T_2: flip y, slide it by t, and integrate the overlap.
z(t)=\begin{cases}A_1A_2\left(t+\frac{T_1+T_2}{2}\right)&-\frac{T_1+T_2}{2}\le t<-\frac{T_1-T_2}{2}\\[2pt]A_1A_2T_2&-\frac{T_1-T_2}{2}\le t<\frac{T_1-T_2}{2}\\[2pt]A_1A_2\left(\frac{T_1+T_2}{2}-t\right)&\frac{T_1-T_2}{2}\le t<\frac{T_1+T_2}{2}\end{cases}
and 0 elsewhere. Check: the trapezoid has area \frac{(T_1+T_2)+(T_1-T_2)}{2}A_1A_2T_2=A_1T_1\cdot A_2T_2=A(x)A(y). With T_1=T_2 it becomes a triangle: A_1\mathrm{rect}\left(\frac{t}{T_1}\right)*A_2\mathrm{rect}\left(\frac{t}{T_1}\right)=A_1A_2T_1\,\mathrm{triangle}\left(\frac{t}{T_1}\right), where \mathrm{triangle}(t)=1-|t| for |t|<1, 0 elsewhere.
Compute the convolution z=x*y for:
1. Only \tau=t contributes: \ x*\delta(t)=\int x(\tau)\,\delta(t-\tau)\,d\tau=x(t). Likewise x*\frac12\delta(t-1)=\frac12x(t-1).
2. The two steps overlap for 0\le\ell\le k:
z(kT)=T\sum_{\ell}0.5^{\ell}\,1_0(\ell T)\cdot0.5^{k-\ell}\,1_0(kT-\ell T)=T\,0.5^k\sum_{\ell=0}^{k}1=(k+1)\,0.5^k\,T\cdot1_0(kT)
so z=T\,(1,\ 1,\ 0.75,\ 0.5,\ 0.3125,\dots) for k=0,1,2,\dots and 0 before.
3. Completing the square in the exponent, z(t)=\frac{1}{\sqrt2}\,e^{-\pi t^2/2}: Gaussians stay Gaussian, wider by \sqrt2.
4. \mathrm{rect}*\mathrm{rect}=\mathrm{triangle}, then one more rect:
y(t)=\mathrm{triangle}*\mathrm{rect}(t)=\begin{cases}\frac34-t^2&|t|<\frac12\\[2pt]\frac12\left(\frac32-|t|\right)^2&\frac12\le|t|<\frac32\\[2pt]0&\text{elsewhere}\end{cases}
Items 3 and 4 had no written solution in my notes for this course: item 3 follows my solution for Communications Engineering, item 4 is added for the web version.
letizia.tech · Digital Signal Processing · University of Klagenfurt