Lecture 2 · Signal Processing for Communications · University of Klagenfurt, 2019
Lecture 2 of 7
From Signal Processing for Communications at the University of Klagenfurt, which I taught in winter 2019: this is that edition, rebuilt for the web, 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. Part of Assignment 1: solved after Ex. 3.
3. With \frac{1-\cos4t}{1+\cos4t}=\tan^22t, and \tan2t>0, \cos2t>0 for 0<t<\frac\pi4:
1+j\tan2t=\frac{\cos2t+j\sin2t}{\cos2t}=\frac{1}{\cos2t}\,e^{j2t}\ \Rightarrow\ \sqrt{1+j\tan2t}=\frac{1}{\sqrt{\cos2t}}\,e^{jt}
a magnitude \frac{1}{\sqrt{\cos2t}}, growing without bound as t\to\frac\pi4, and a phase \theta(t)=t.
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
If |A(x)|<M, then the mean value is 0; a finite-energy signal, 0<E(x)<\infty, has zero power. Periodic signals: mean and power over one period, from -\frac{T_0}{2} to \frac{T_0}{2}. 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}
and, used from the convolution on, \mathrm{triangle}(t)=1-|t| for |t|<1, 0 elsewhere.
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. Part of Assignment 1: solved on the next slides.
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
whatever the phase \varphi.
Solve the two exercises marked as assignment in the previous slides.
a. Express in polar coordinates the complex signal (j\cdot t)^j, with 0<t<2\pi (Ex. 2, item 2).
b. Evaluate the energy of x(kT)=0.5^{|k-1|}\cdot1_0(kT-5T) (Ex. 3, item 4).
a. For t>0, jt=t\,e^{j\pi/2} and t=e^{\ln t}, so jt=e^{\ln t+j\pi/2}:
(jt)^j=e^{j\left(\ln t+j\frac\pi2\right)}=e^{-\pi/2}\,e^{j\ln t}
a constant magnitude |x(t)|=e^{-\pi/2}\approx0.21 and a phase \theta(t)=\ln t: the signal runs on a circle (principal value of the complex power).
b. The step keeps only k\ge5, where |k-1|=k-1:
E(x)=T\sum_{k=5}^{+\infty}0.25^{\,k-1}=T\sum_{\ell=4}^{+\infty}0.25^{\ell}=T\,\frac{0.25^4}{1-0.25}=\frac{T}{192}
exercise a: (jt)^j in the complex plane
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.
Commutative. With \sigma=t-\tau: \displaystyle\int x(\tau)\,y(t-\tau)\,d\tau=\int y(\sigma)\,x(t-\sigma)\,d\sigma=y*x(t).
Linear. By the linearity of the integral, (\alpha x_1+\beta x_2)*y=\alpha\,x_1*y+\beta\,x_2*y.
Time invariant. With \tau'=\tau-t_0: \displaystyle x(t-t_0)*y(t)=\int x(\tau-t_0)\,y(t-\tau)\,d\tau=\int x(\tau')\,y(t-t_0-\tau')\,d\tau'=z(t-t_0).
Associative. Swap the order of integration and set \tau'=\tau-\sigma:
(x*y)*w(t)=\iint x(\sigma)\,y(\tau-\sigma)\,w(t-\tau)\,d\sigma\,d\tau=x*(y*w)(t)
Area. Integrate over t first:
A(x*y)=\iint x(\tau)\,y(t-\tau)\,d\tau\,dt=\int x(\tau)\underbrace{\int y(t-\tau)\,dt}_{A(y)}\,d\tau=A(x)\,A(y)
Swapping the integrals needs absolutely integrable signals (Fubini).
My notes have no solution to this one: it is added for the web version.
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).
Compute the convolution z=x*y for:
1. Only the instant \tau=t contributes, by the sifting property:
x*\delta(t)=\int_{-\infty}^{+\infty}x(\tau)\,\delta(t-\tau)\,d\tau=x(t)
\delta is the neutral element of the convolution; likewise x*\delta(t-t_0)=x(t-t_0).
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.
Complete the square in the exponent, -\pi\tau^2-\pi(t-\tau)^2=-\left(\sqrt{2\pi}\,\tau-\sqrt{\tfrac\pi2}\,t\right)^2-\frac{\pi}{2}t^2, and set \lambda=\sqrt{2\pi}\,\tau-\sqrt{\tfrac\pi2}\,t:
z(t)=\frac{e^{-\frac{\pi t^2}{2}}}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}e^{-\lambda^2}\,d\lambda=\frac{1}{\sqrt2}\,e^{-\frac{\pi t^2}{2}}
using \int e^{-\lambda^2}d\lambda=\sqrt\pi. Gaussians stay Gaussian, wider by \sqrt2. Check: A(z)=\frac{1}{\sqrt2}\sqrt2=1=A(x)A(y).
03
The Fourier transform decomposes a signal into its constituent frequencies:
X(f)=\int_{-\infty}^{+\infty}x(t)\,e^{-j2\pi ft}\,dt
Under some conditions it is invertible:
x(t)=\int_{-\infty}^{+\infty}X(f)\,e^{j2\pi ft}\,df
On a computer: the FFT and its inverse, the IFFT.
x(t) is defined on a group I, here the time domain, and X(f) on the dual group \hat I, the frequency domain.
| Signal | Time, I | Frequency, \hat I |
|---|---|---|
| continuous, aperiodic | \mathbb{R} | \mathbb{R} |
| continuous, periodic | \mathbb{R}/\mathbb{Z}(T_0) | \mathbb{Z}(1/T_0) |
| discrete, aperiodic | \mathbb{Z}(T) | \mathbb{R}/\mathbb{Z}(1/T) |
| discrete, periodic | \mathbb{Z}(T)/\mathbb{Z}(T_0) | \mathbb{Z}(1/T_0)/\mathbb{Z}(1/T) |
Periodic in one domain means discrete in the other. On I=\mathbb{Z}(T) the integral becomes a sum, X(f)=T\sum_kx(kT)\,e^{-j2\pi fkT}, periodic with period 1/T.
Product/convolution rule. Let z(t)=x*y(t). Then
Z(f)=X(f)\cdot Y(f)
where X(f) and Y(f) are the Fourier transforms of x(t) and y(t).
Parseval’s theorem. For x(t), y(t), t\in I:
\int_{I}x(t)\,y^*(t)\,dt=\int_{\hat I}X(f)\,Y^*(f)\,df
where \hat I is the dual domain of I. With y=x, the energy is the same in both domains.
Compute the Fourier transform X(f) of
Evaluate:
1. \displaystyle\mathcal{F}[\mathrm{rect}(t)]=\int_{-1/2}^{1/2}e^{-j2\pi ft}\,dt=\frac{e^{j\pi f}-e^{-j\pi f}}{j2\pi f}=\mathrm{sinc}(f); scaling by D and shifting by t_0: \ X(f)=D\,\mathrm{sinc}(Df)\,e^{-j2\pi ft_0}.
2. \mathcal{F}[\delta(t)]=1 and, by duality, \mathcal{F}[1]=\delta(f). Writing the cosine with exponentials:
X(f)=\frac12\delta(f-f_0)+\frac12\delta(f+f_0)
4. \mathrm{triangle}=\mathrm{rect}*\mathrm{rect}, so X(f)=\mathrm{sinc}(f)\cdot\mathrm{sinc}(f)=\mathrm{sinc}^2(f).
6. Shift the index by \frac{N-1}{2} and sum the geometric series:
X(f)=T\sum_{k=-\frac{N-1}{2}}^{\frac{N-1}{2}}e^{-j2\pi fkT}=T\,e^{j\pi f(N-1)T}\,\frac{1-e^{-j2\pi fNT}}{1-e^{-j2\pi fT}}=T\,\frac{\sin(\pi fNT)}{\sin(\pi fT)}
real, since p_N is symmetric, periodic with period \frac1T, and equal to NT at f=0: the discrete counterpart of the sinc.
Area. \mathrm{sinc}^4=\mathrm{sinc}^2\cdot\mathrm{sinc}^2 and \mathcal{F}\left[\mathrm{sinc}^2\right]=\mathrm{triangle}; by Parseval,
\int_{-\infty}^{+\infty}\mathrm{sinc}^4(t)\,dt=\int_{-1}^{1}\mathrm{triangle}^2(f)\,df=2\int_0^1(1-f)^2\,df=\frac23
Items 3 and 5 and the last integral are Assignment 2: solved on the next slides.
Solve the three exercises marked as assignment in the previous slides.
Compute the Fourier transform X(f) of
a. x(t)=\sin^2(2\pi f_0t);
b. x(kT)=(-1)^k.
Evaluate
c. \displaystyle\int_{-\infty}^{+\infty}\mathrm{sinc}(t-n)\cdot\mathrm{sinc}(t-m)\,dt, with m and n integers.
Bonus, for an extra grade:
d. the Fourier transform Y(f) of \displaystyle y(t)=\int_{t-1}^{t+1}e^{-\alpha\tau}\cdot1(\tau)\,d\tau, with \alpha>0.
a. With \sin^2\alpha=\frac{1-\cos2\alpha}{2}, the signal is a constant and a cosine at 2f_0:
\sin^2(2\pi f_0t)=\frac12-\frac14e^{j2\pi(2f_0)t}-\frac14e^{-j2\pi(2f_0)t}\ \Rightarrow\ X(f)=\frac12\delta(f)-\frac14\delta(f-2f_0)-\frac14\delta(f+2f_0)
b. On I=\mathbb{Z}(T) the transform of the constant 1 is a comb of unit lines, T\sum_ke^{-j2\pi fkT}=\sum_n\delta\left(f-\frac nT\right). And (-1)^k=e^{j\pi k}=e^{j2\pi\frac{1}{2T}kT} is a frequency shift by \frac{1}{2T}:
X(f)=T\sum_ke^{-j2\pi\left(f-\frac{1}{2T}\right)kT}=\sum_n\delta\left(f-\frac{1}{2T}-\frac nT\right)
unit lines at f=\pm\frac{1}{2T},\pm\frac{3}{2T},\dots: all the content sits at the highest frequency of the period \left[-\frac{1}{2T},\frac{1}{2T}\right).
My notes have no solution to these two: they are added for the web version.
c. \mathcal{F}[\mathrm{sinc}(t-n)]=\mathrm{rect}(f)\,e^{-j2\pi fn}, and the sinc is real, so by Parseval
\int_{-\infty}^{+\infty}\mathrm{sinc}(t-n)\,\mathrm{sinc}(t-m)\,dt=\int_{-1/2}^{1/2}e^{-j2\pi fn}\,e^{j2\pi fm}\,df=\mathrm{sinc}(n-m)=\begin{cases}1&n=m\\0&n\neq m\end{cases}
The shifted sincs are orthonormal: the basis of the sampling theorem, with T=1.
d. The integral over a window of width 2 centred at t is a convolution with \mathrm{rect}\left(\frac t2\right): y(t)=\left\{e^{-\alpha t}1(t)\right\}*\mathrm{rect}\left(\frac t2\right). With
\int_0^{\infty}e^{-(\alpha+j2\pi f)t}\,dt=\frac{1}{\alpha+j2\pi f},\qquad \mathcal{F}\left[\mathrm{rect}\left(\tfrac t2\right)\right]=2\,\mathrm{sinc}(2f)
Y(f)=\frac{2\,\mathrm{sinc}(2f)}{\alpha+j2\pi f}
My notes have no solution to c: it is added for the web version.
04
If x(t) is real, X(f)=X^*(-f) is Hermitian and its magnitude is symmetric around the origin, |X(f)|=|X(-f)|. Then the band B is defined through the interval (-B,B): X(f)=0 for |f|>B.
Let x(t) be a real band-limited signal, X(f)=0 for |f|>B. Then it can be exactly reconstructed from its samples x(nT) if the sampling frequency is
F_c=\frac{1}{T}>2B
The reconstruction formula is
x(t)=\sum_{n=-\infty}^{\infty}x(nT)\,\mathrm{sinc}\left(\frac{t-nT}{T}\right)
Sampling every T repeats the spectrum every F_c=1/T. The reconstruction filter keeps |f|<F_c/2: it gets the original spectrum back only if the copies do not overlap.
Which sampling frequencies F_c allow us to reconstruct x(t)=\sin(2\pi t)\cdot\mathrm{sinc}^2(t) from its samples?
\mathcal{F}\left[\mathrm{sinc}^2(t)\right]=\mathrm{triangle}(f), band 1 Hz; multiplying by \sin(2\pi t) moves it to \pm1 Hz: \ X(f)=\frac{1}{2j}\left[\mathrm{triangle}(f-1)-\mathrm{triangle}(f+1)\right], so B=2 Hz and F_c>4 Hz. There is no minimum, only a bound: 4 Hz is the infimum.

the reconstructions, saved from the run
The signal is simulated at 100 Hz, then one sample out of N is kept: N=20, 33, 40 give 5, about 3 and 2.5 Hz. Only 5 Hz is above 2B=4 Hz, and only that reconstruction follows the signal.
letizia.tech · Signal Processing for Communications · University of Klagenfurt