Lecture 6 · Digital Signal Processing · University of Klagenfurt, 2022
Lecture 6 of 6
Each paper has three exercises: Fourier analysis, the DFT, and a digital filter with a random input. 100 and 110 points; written test and assignments counted half each.
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
Let x_p(t) be the periodic version, with period T_0=2, of the signal x(t) in the figure, with 0<D\le1. (40 points)
1. One period on [-1,1], with \frac{2}{T_0}=1 and x=1 on [0,D]:
a_0=D,\qquad a_k=\int_0^D\cos(\pi kt)\,dt=\frac{\sin(\pi kD)}{\pi k},\qquad b_k=\int_0^D\sin(\pi kt)\,dt=\frac{1-\cos(\pi kD)}{\pi k}
which combine into the form of item 2, with amplitudes A_k=\frac2\pi\frac{\sin(\pi kD/2)}{k}.
2. Parseval, \frac{2}{T_0}\int|x_p|^2=\frac{A_0^2}{2}+\sum_kA_k^2, with \int_{-1}^1x^2\,dt=D:
D=\frac{D^2}{2}+\frac{4}{\pi^2}\sum_{k=1}^{\infty}\frac{\sin^2\left(\frac{\pi kD}{2}\right)}{k^2}\ \Longrightarrow\ \sum_{k=1}^{\infty}\frac{\sin^2\left(\frac{\pi kD}{2}\right)}{k^2}=\left(D-\frac{D^2}{2}\right)\frac{\pi^2}{4}
3. x(t)=\mathrm{rect}\left(\frac{t-D/2}{D}\right), so X(f)=D\,\mathrm{sinc}(Df)\,e^{-j\pi fD}: magnitude D|\mathrm{sinc}(Df)|, with zeros at f=\frac kD; phase -\pi fD, plus jumps of \pi where the sinc is negative.
4. Y(f)=X^2(f)=D^2\,\mathrm{sinc}^2(Df)\,e^{-j2\pi fD}, so y(t)=D\,\mathrm{triangle}\left(\frac{t-D}{D}\right): a triangle on [0,2D], peak D at t=D.
The DFT of an N-point signal x(n) is (10 points)
X(h)=\left[0,\ e^{j\theta},\ \underbrace{0,0,\dots,0}_{N-3\text{ values}},\ e^{-j\theta}\right],\qquad0\le h\le N-1
Find the N-point signal x(n), and simplify your answer.
Only X(1) and X(N-1) are non-zero in the inverse DFT:
x(n)=\frac1N\sum_{h=0}^{N-1}X(h)\,e^{j2\pi\frac{nh}{N}}=\frac1N\left(e^{j\theta}e^{j\frac{2\pi n}{N}}+e^{-j\theta}e^{j2\pi\frac{n(N-1)}{N}}\right)=\frac1N\left(e^{j\left(\frac{2\pi n}{N}+\theta\right)}+e^{-j\left(\frac{2\pi n}{N}+\theta\right)}\right)
x(n)=\frac2N\cos\left(\frac{2\pi n}{N}+\theta\right)
A very simple high-pass filter is the FIR filter \ y(n)=\frac1N\sum_{k=0}^{N-1}(-1)^k\,x(n-k), with N=8. (50 points)
1. h(n)=\frac18\left[\delta(n)-\delta(n-1)+\delta(n-2)-\dots-\delta(n-7)\right]: eight stems, \pm\frac18. 2. \hat H(0)=\sum_nh(n)=0.
3. H(z)=\dfrac18\sum_{k=0}^{7}\left(-z^{-1}\right)^k=\dfrac18\cdot\dfrac{1-z^{-8}}{1+z^{-1}}: zeros at the 8th roots of unity except z=-1, and 7 poles at z=0.
4. \hat H(f)=\dfrac18\,e^{-j\left(7\pi f-\frac\pi2\right)}\,\dfrac{\sin(8\pi f)}{\cos(\pi f)}: zero at f=\frac k8, except at f=\frac12, where |\hat H|=1.
5. x(n)=\frac{w(n)+w(n-1)}{2}, so R_{xx}(f)=\left|\frac12+\frac12e^{-j2\pi f}\right|^2=\cos^2(\pi f) and \ R_{yy}(f)=|\hat H(f)|^2R_{xx}(f)=\dfrac{\sin^2(8\pi f)}{64}.
6. Over one period: \ M_y=\int_0^1\dfrac{\sin^2(8\pi f)}{64}\,df=\dfrac{1}{128}.
02
Let x_p(t) be the periodic version, with period T_0=2, of the signal x(t) in the figure, with 0\le D<1. (40 points)
1. Even, so b_k=0; the falling edge on [D,1] is \frac{1-t}{1-D}:
a_0=1+D,\qquad a_k=2\left[\int_0^D\cos(\pi kt)\,dt+\int_D^1\frac{1-t}{1-D}\cos(\pi kt)\,dt\right]=\frac{2\left((-1)^{k+1}+\cos(\pi kD)\right)}{(1-D)\pi^2k^2}
2. At t=0 with D=0, the triangle, x_p(0)=1:
1=\frac12+\frac{2}{\pi^2}\left(\frac{2}{1^2}+\frac{2}{3^2}+\frac{2}{5^2}+\dots\right)\ \Longrightarrow\ \sum_{k=1}^{\infty}\frac{1}{(2k-1)^2}=\frac{\pi^2}{8}
3. The trapezoid is \frac{1}{1-D}\,\mathrm{rect}\left(\frac{t}{1+D}\right)*\mathrm{rect}\left(\frac{t}{1-D}\right), so
X(f)=(1+D)\,\mathrm{sinc}\left((1+D)f\right)\mathrm{sinc}\left((1-D)f\right)
4. The coefficients are samples of the transform: A_k=\frac{2}{T_0}X\left(\frac{k}{T_0}\right), here A_k=X\left(\frac k2\right).
An N-point signal is x_N(n)=[1,\,1,\,\underbrace{0,\dots,0}_{N-4},\,1,\,1], 0\le n\le N-1, N\ge4. (30 points)
1. x_4=[1,1,1,1]: \ Y(h)=\sum_{n=0}^{3}e^{-j2\pi\frac{nh}{4}}=e^{-j\frac34\pi h}\,\dfrac{\sin(\pi h)}{\sin\left(\frac{\pi h}{4}\right)}=[4,\,0,\,0,\,0].
2. The last two samples are the first two shifted back by N:
X(h)=e^{-j\frac{2\pi h}{N}}+1+e^{j\frac{2\pi h}{N}}+e^{j\frac{4\pi h}{N}}=\left(1+e^{j\frac{2\pi h}{N}}\right)\left(e^{-j\frac{2\pi h}{N}}+e^{j\frac{2\pi h}{N}}\right)=4\,e^{j\frac{\pi h}{N}}\cos\left(\frac{\pi h}{N}\right)\cos\left(\frac{2\pi h}{N}\right)
3. So \alpha=1, \beta=2 (or the other way round); the phase is \frac{\pi h}{N}, plus \pi where the product of the cosines is negative.
A discrete-time system is \ y(n)=y(n-1)+x(n)-x(n-2). (40 points)
1. H(z)=\dfrac{1-z^{-2}}{1-z^{-1}}=1+z^{-1}: the pole at z=1 cancels a zero; what remains is a zero at z=-1 and a pole at z=0. 2. h(n)=\delta(n)+\delta(n-1): despite the feedback, a FIR filter.
3. \hat H(f)=1+e^{-j2\pi f}=2\cos(\pi f)\,e^{-j\pi f}, |\hat H(f)|=2|\cos(\pi f)|: a low-pass filter, a two-point moving sum.
4. R_{yy}(f)=4\cos^2(\pi f)\,\mathrm{rect}(4f-1), non-zero for \frac18<f<\frac38.
5. Over one period, \ M_x=\int_{1/8}^{3/8}1\,df=\frac14 and \ M_y=\int_{1/8}^{3/8}4\cos^2(\pi f)\,df=\frac12+\frac1\pi\left(\sin\frac{3\pi}{4}-\sin\frac\pi4\right)=\frac12.
In item 4 the paper said “independent” samples, which would make the PSD flat: it is dropped here. As in lecture 5, a PSD on \left(\frac18,\frac38\right) alone is not even, so the input is complex.
This was the last lecture. The exams and simulations of all three years are on the course page, as PDFs.
letizia.tech · Digital Signal Processing · University of Klagenfurt