Salta al contenuto
Note per Studenti Signals and Systems - Mock Exam 3 Report

Signals and Systems - Mock Exam 3

Questa pagina non ha ancora la versione ripasso: qui sotto c'è il testo completo.

In questa pagina 7

Mock exam built on the model of the written exams of the equivalent course in Italian (Segnali e Sistemi, Information Engineering, UniPD, exams of 22 January 2025, 10 February 2025 and 16 February 2026). It is a simulation, not an exam given by the course. It has the same structure as the model exams: three exercises of 7 points, two theory questions of 4 points, one Matlab question of 3 points. Time: 3 hours, as in the latest exam sheet. No documents allowed and no calculator: leave numbers such as 229\sqrt{229} or arctan⁡29\arctan\frac29 unevaluated unless the text asks for a decimal value. To pass you need at least 10 points in the exercises and at least 5 between theory and Matlab. For every question justify the answers and show all the calculations; when a sketch is requested, indicate the support (or the range) and the shape, even approximately. Compare with the results only at the end, then read the solutions and the grid.

The three exercises of this mock exam cover a continuous-time frequency response, the Z-transform and the DFT; the theory questions are on the scalar product and the Dirac impulse, the Matlab question on a moving-average filter.

Exercise 1 (points 7)

Frequency response of a continuous-time system. The causal LTI system S\mathcal S has frequency response H(jω)=200 jω106−ω2+200 jω,ω∈R  (rad/s).H(j\omega)=\frac{200\,j\omega}{10^{6}-\omega^{2}+200\,j\omega},\qquad \omega\in\mathbb R\ \ (\text{rad/s}).

  1. Compute the modulus ∣H(jω)∣\lvert H(j\omega)\rvert and the phase ∠H(jω)\angle H(j\omega) and sketch them for ω≥0\omega\ge 0, giving their values at ω=0\omega=0, at ω=1000\omega=1000 rad/s and their limits for ω→+∞\omega\to+\infty. Say whether S\mathcal S is low-pass, high-pass or band-pass.
  2. Find the poles of HH (replace jωj\omega with ss) and say whether S\mathcal S is BIBO stable.
  3. The input is x(t)=3+2cos⁡(1000 t)+cos⁡ ⁣(2000 t+π3)x(t)=3+2\cos(1000\,t)+\cos\!\left(2000\,t+\frac{\pi}{3}\right). Compute the output y(t)y(t) as a sum of sinusoids.
  4. Determine the two pulsations ωL<ωH\omega_L<\omega_H at which ∣H(jω)∣=12\lvert H(j\omega)\rvert=\frac1{\sqrt2} (the 33 dB band), the width ωH−ωL\omega_H-\omega_L of the band and the value of the phase at ωL\omega_L and at ωH\omega_H.
Show the result
  1. ∣H(jω)∣=11+25(ω1000−1000ω)2\lvert H(j\omega)\rvert=\dfrac{1}{\sqrt{1+25\left(\frac{\omega}{1000}-\frac{1000}{\omega}\right)^{2}}} and ∠H(jω)=−arctan⁡ ⁣[5(ω1000−1000ω)]\angle H(j\omega)=-\arctan\!\left[5\left(\frac{\omega}{1000}-\frac{1000}{\omega}\right)\right]. H(0)=0H(0)=0 (phase π2\frac\pi2 as ω→0+\omega\to0^+), H(j1000)=1H(j1000)=1 (phase 00), for ω→+∞\omega\to+\infty: modulus →0\to0 and phase →−π2\to-\frac\pi2. Band-pass filter.
  2. Poles s=−100±j990000≈−100±j 994.99s=-100\pm j\sqrt{990000}\approx-100\pm j\,994.99. Real part negative: S\mathcal S is BIBO stable.
  3. y(t)=2cos⁡(1000 t)+2229cos⁡ ⁣(2000 t−π6+arctan⁡215)≈2cos⁡(1000 t)+0.1322cos⁡(2000 t−0.391)y(t)=2\cos(1000\,t)+\dfrac{2}{\sqrt{229}}\cos\!\left(2000\,t-\dfrac\pi6+\arctan\dfrac{2}{15}\right)\approx2\cos(1000\,t)+0.1322\cos(2000\,t-0.391).
  4. ωL=1010000−100≈904.99\omega_L=\sqrt{1010000}-100\approx904.99 rad/s, ωH=1010000+100≈1104.99\omega_H=\sqrt{1010000}+100\approx1104.99 rad/s; width ωH−ωL=200\omega_H-\omega_L=200 rad/s (≈31.8\approx31.8 Hz); ∠H(jωL)=+π4\angle H(j\omega_L)=+\frac\pi4, ∠H(jωH)=−π4\angle H(j\omega_H)=-\frac\pi4.
Show the full solution

Point 1. To read the shape of HH divide numerator and denominator by 200 jω200\,j\omega (for ω≠0\omega\ne0): H(jω)=11+106−ω2200 jω=11+j ω2−106200 ω=11+j f(ω),f(ω)=ω2−106200 ω=5(ω1000−1000ω),H(j\omega)=\frac{1}{1+\dfrac{10^{6}-\omega^{2}}{200\,j\omega}}=\frac{1}{1+j\,\dfrac{\omega^{2}-10^{6}}{200\,\omega}}=\frac{1}{1+j\,f(\omega)},\qquad f(\omega)=\frac{\omega^{2}-10^{6}}{200\,\omega}=5\left(\frac{\omega}{1000}-\frac{1000}{\omega}\right), where we used 1j=−j\frac1j=-j. The function ff is real, so ∣H∣=11+f2,∠H=−arctan⁡f\lvert H\rvert=\frac1{\sqrt{1+f^{2}}},\qquad \angle H=-\arctan f (modulus and phase of 11+jf\frac1{1+jf}: the denominator has modulus 1+f2\sqrt{1+f^2} and phase arctan⁡f\arctan f, see Complex NumbersReview of complex numbers: algebraic and polar forms, Euler's formula, powers and roots, the fundamental theorem of algebra, roots of unity, and why complex numbers cannot be ordered.Complex Numbers →). Special values:

  • ω=1000\omega=1000: f=0f=0, so H=1H=1: modulus 11 (the maximum, because 1+f2≥1\sqrt{1+f^2}\ge1) and phase 00. Directly from the original formula the numerator and the denominator coincide: 200j⋅10000+200j⋅1000=1\frac{200j\cdot1000}{0+200j\cdot1000}=1.
  • ω→0+\omega\to0^+: f→−∞f\to-\infty, so ∣H∣→0\lvert H\rvert\to0 and the phase −arctan⁡f→+π2-\arctan f\to+\frac\pi2. Indeed H(0)=0H(0)=0 from the original formula (numerator 00, denominator 10610^6).
  • ω→+∞\omega\to+\infty: f→+∞f\to+\infty, so ∣H∣→0\lvert H\rvert\to0 (like 200ω\frac{200}{\omega}) and the phase tends to −π2-\frac\pi2.

The modulus is 00 at both ends and 11 in the middle, so the system rejects low and high pulsations and keeps those around 10001000 rad/s: it is a band-pass filter (Frequency-Selective FiltersA convolutional LTI system filters by multiplying the input spectrum by H(j omega); ideal low-pass and high-pass filters, first-order RC implementations, distortion-free transmission (Heaviside conditions), why the ideal low-pass filter is not realizable, and the practical design parameters.Frequency-Selective Filters →, Introduction to FiltersA filter is an LTI convolutional BIBO-stable system that reshapes or removes harmonics of a signal; the differentiator and the RC low-pass filter show how H(j omega) is read from the differential equation, and the four popular selective filters are low-pass, high-pass, band-pass and band-stop.Introduction to Filters →). The phase decreases monotonically from +π2+\frac\pi2 to −π2-\frac\pi2 crossing 00 at the centre pulsation. One more symmetry is useful: f(106ω)=−f(ω)f(\frac{10^6}{\omega})=-f(\omega), so ∣H∣\lvert H\rvert takes the same value at ω\omega and at 106ω\frac{10^6}\omega (it is symmetric on a logarithmic axis, which will be used in point 3).

Grafico interattivo: |H(jω)| per ω da 50 a 3000 rad/s: picco 1 in ω = 1000, zero agli estremi; la linea tratteggiata è il livello 1/√2 (3 dB) raggiunto in 904.99 e 1104.99 rad/s

Grafico interattivo: Fase di H(jω) in radianti: da +π/2 (ω piccolo) a −π/2 (ω grande), vale 0 in ω = 1000 e ±π/4 ai bordi della banda a 3 dB

Point 2. For a system described by H(jω)=∑mbm(jω)m∑nan(jω)nH(j\omega)=\frac{\sum_m b_m(j\omega)^m}{\sum_n a_n(j\omega)^n} (Frequency Response of LTI SystemsApplying the Fourier transform to LTI convolutional systems described by ODEs: the frequency response H(jw) is the transform of the impulse response, equals Y/U, is a ratio of polynomials in jw, and can be inverted by partial fractions to get h(t), with a warning about causality when the system is not asymptotically stable.Frequency Response of LTI Systems →) the poles are the roots of the denominator written in s=jωs=j\omega: here s2+200 s+106=0s^{2}+200\,s+10^{6}=0, so s=−100±1002−106=−100±j990000≈−100±j 994.99.s=-100\pm\sqrt{100^{2}-10^{6}}=-100\pm j\sqrt{990000}\approx-100\pm j\,994.99. The two poles are complex conjugate with real part −100<0-100<0: the modes e−100tcos⁡(994.99 t+φ)e^{-100t}\cos(994.99\,t+\varphi) decay, so the system is asymptotically and BIBO stable (Stability of LTI Systems - BIBO and Internal StabilityCharacterization of BIBO (external) stability and of internal stability of LTI convolutional systems through the mode functions: stability zones in the complex plane, asymptotic, marginal and unstable behaviour of the natural response, and an example of an externally stable but internally unstable system with a zero-pole cancellation.Stability of LTI Systems - BIBO and Internal Stability →). For an asymptotically stable system F−1[H]\mathcal F^{-1}[H] is causal, in agreement with the text. Error to avoid: the zero of HH in s=0s=0 does not matter for stability, only the poles do.

Point 3. The system is real, stable and H(jω)H(j\omega) is known, so each sinusoid is treated separately (Eigenfunctions and Frequency Response of LTI Systemsfor a BIBO stable convolutional LTI system the complex exponential e^{j w t} is an eigenfunction and the frequency response H(jw), the Fourier transform of the impulse response, is its eigenvalue; for real h the response to a cosine is a scaled and phase-shifted cosine.Eigenfunctions and Frequency Response of LTI Systems →): cos⁡(ω0t+ϕ)↦∣H(jω0)∣cos⁡(ω0t+ϕ+∠H(jω0))\cos(\omega_0t+\phi)\mapsto\lvert H(j\omega_0)\rvert\cos(\omega_0t+\phi+\angle H(j\omega_0)) and, by linearity, the output is the sum of the outputs.

  • Constant 33 (ω0=0\omega_0=0): H(0)=0H(0)=0, so the constant is removed.
  • 2cos⁡(1000 t)2\cos(1000\,t): H(j1000)=1H(j1000)=1, so it passes unchanged: 2cos⁡(1000 t)2\cos(1000\,t).
  • cos⁡(2000 t+π3)\cos(2000\,t+\frac\pi3): first the value of HH: H(j2000)=200j⋅2000106−4⋅106+200j⋅2000=j 4⋅105−3⋅106+j 4⋅105=0.4 j−3+0.4 j.H(j2000)=\frac{200j\cdot2000}{10^{6}-4\cdot10^{6}+200j\cdot2000}=\frac{j\,4\cdot10^{5}}{-3\cdot10^{6}+j\,4\cdot10^{5}}=\frac{0.4\,j}{-3+0.4\,j}. Modulus: 0.49+0.16=0.49.16=2229≈0.1322\frac{0.4}{\sqrt{9+0.16}}=\frac{0.4}{\sqrt{9.16}}=\frac{2}{\sqrt{229}}\approx0.1322 (the same value follows from f(2000)=7.5f(2000)=7.5: 11+56.25=157.25=2229\frac1{\sqrt{1+56.25}}=\frac{1}{\sqrt{57.25}}=\frac2{\sqrt{229}}). Phase: ∠(0.4 j)=π2\angle(0.4\,j)=\frac\pi2 and −3+0.4 j-3+0.4\,j is in the second quadrant, so arg⁡(−3+0.4j)=π−arctan⁡0.43=π−arctan⁡215\arg(-3+0.4j)=\pi-\arctan\frac{0.4}{3}=\pi-\arctan\frac2{15}; the phase of the ratio is the difference ∠H(j2000)=π2−(π−arctan⁡215)=−π2+arctan⁡215≈−1.438 rad.\angle H(j2000)=\frac\pi2-\left(\pi-\arctan\frac2{15}\right)=-\frac\pi2+\arctan\frac{2}{15}\approx-1.438\ \text{rad}. The phase of the output sinusoid is π3−π2+arctan⁡215=−π6+arctan⁡215≈−0.391\frac\pi3-\frac\pi2+\arctan\frac2{15}=-\frac\pi6+\arctan\frac2{15}\approx-0.391.

Putting the three terms together: y(t)=2cos⁡(1000 t)+2229cos⁡ ⁣(2000 t−π6+arctan⁡215)y(t)=2\cos(1000\,t)+\frac{2}{\sqrt{229}}\cos\!\left(2000\,t-\frac\pi6+\arctan\frac{2}{15}\right). Typical errors: using arg⁡(−3+0.4j)=−arctan⁡0.43\arg(-3+0.4j)=-\arctan\frac{0.4}{3} (wrong quadrant), forgetting that the constant is removed, or keeping the phase of the input out of the sum.

Point 4. The condition ∣H∣2=12\lvert H\rvert^2=\frac12 means 1+f2=21+f^2=2, i.e. f(ω)=±1f(\omega)=\pm1: ω2−106200 ω=±1 ⟺ ω2∓200 ω−106=0.\frac{\omega^{2}-10^{6}}{200\,\omega}=\pm1\ \Longleftrightarrow\ \omega^{2}\mp200\,\omega-10^{6}=0. The positive root of ω2−200 ω−106=0\omega^{2}-200\,\omega-10^{6}=0 (f=+1f=+1) is ωH=100+1002+106=100+1010000≈1104.99\omega_H=100+\sqrt{100^{2}+10^{6}}=100+\sqrt{1010000}\approx1104.99; the positive root of ω2+200 ω−106=0\omega^{2}+200\,\omega-10^{6}=0 (f=−1f=-1) is ωL=−100+1010000≈904.99\omega_L=-100+\sqrt{1010000}\approx904.99 (the other roots are negative and are not pulsations of the band). Between them ∣f∣<1\lvert f\rvert<1 and ∣H∣>12\lvert H\rvert>\frac1{\sqrt2}. The width is exactly ωH−ωL=2⋅100=200 rad/s  (=2002π≈31.8 Hz),\omega_H-\omega_L=2\cdot100=200\ \text{rad/s}\ \ \left(=\frac{200}{2\pi}\approx31.8\ \text{Hz}\right), and the product is ωLωH=1010000−104=106=ω02\omega_L\omega_H=1010000-10^{4}=10^{6}=\omega_0^{2} (the geometric symmetry of point 1: the two edges are mapped into each other by ω↦106ω\omega\mapsto\frac{10^6}\omega). The phase is −arctan⁡f-\arctan f: at ωL\omega_L, f=−1f=-1 gives +π4+\frac\pi4; at ωH\omega_H, f=+1f=+1 gives −π4-\frac\pi4. Reminder: 12\frac1{\sqrt2} in modulus is the level of −3-3 dB, i.e. half of the power.

Exercise 2 (points 7)

A digital filter and the Z-transform. A discrete-time LTI system has transfer function H(z)=1−z−2(1−12z−1)(1+14z−1).H(z)=\frac{1-z^{-2}}{\left(1-\frac12z^{-1}\right)\left(1+\frac14z^{-1}\right)}.

  1. Find the poles and the zeros of H(z)H(z) and the difference equation that links the input xx and the output yy.
  2. List the possible regions of convergence (ROC) of H(z)H(z) and say, for each one, whether the corresponding impulse response is causal, anticausal or two-sided. Which ROC corresponds to a causal and BIBO stable system?
  3. For the causal system, compute the impulse response h(n)h(n) with partial fractions and write h(0),h(1),h(2),h(3)h(0),h(1),h(2),h(3).
  4. For the causal system, compute the frequency response H(ejθ)H(e^{j\theta}) at θ=0\theta=0 and θ=π\theta=\pi and the output for the input x(n)=4+cos⁡(π2n)x(n)=4+\cos\left(\frac\pi2n\right), n∈Zn\in\mathbb Z.
  5. Find the sequence h2(n)h_2(n) whose transform is H(z)H(z) with ROC 14<∣z∣<12\frac14<\lvert z\rvert<\frac12. Is it causal? Is it BIBO stable?
Show the result
  1. Poles z=12z=\frac12 and z=−14z=-\frac14; zeros z=1z=1 and z=−1z=-1 (no cancellation, no pole or zero at the origin). y(n)=14y(n−1)+18y(n−2)+x(n)−x(n−2)y(n)=\frac14y(n-1)+\frac18y(n-2)+x(n)-x(n-2).
  2. Three ROCs: ∣z∣>12\lvert z\rvert>\frac12 (causal), 14<∣z∣<12\frac14<\lvert z\rvert<\frac12 (two-sided), ∣z∣<14\lvert z\rvert<\frac14 (anticausal). Causal and stable: ∣z∣>12\lvert z\rvert>\frac12.
  3. h(n)=8δ(n)−2(12)nu(n)−5(−14)nu(n)h(n)=8\delta(n)-2\left(\frac12\right)^{n}u(n)-5\left(-\frac14\right)^{n}u(n); h(0)=1h(0)=1, h(1)=14h(1)=\frac14, h(2)=−1316h(2)=-\frac{13}{16}, h(3)=−1164h(3)=-\frac{11}{64}.
  4. H(ej0)=0H(e^{j0})=0 and H(ejπ)=0H(e^{j\pi})=0. y(n)=1685cos⁡ ⁣(π2n−arctan⁡29)≈1.735cos⁡(π2n−0.2187)y(n)=\dfrac{16}{\sqrt{85}}\cos\!\left(\dfrac\pi2n-\arctan\dfrac29\right)\approx1.735\cos\left(\frac\pi2n-0.2187\right).
  5. h2(n)=8δ(n)+2(12)nu(−n−1)−5(−14)nu(n)h_2(n)=8\delta(n)+2\left(\frac12\right)^{n}u(-n-1)-5\left(-\frac14\right)^{n}u(n) (for example h2(−1)=4h_2(-1)=4, h2(0)=3h_2(0)=3, h2(1)=54h_2(1)=\frac54). Not causal, not BIBO stable.
Show the full solution

Point 1. Multiply numerator and denominator by z2z^{2} to see poles and zeros as roots of polynomials in zz: H(z)=z2−1(z−12)(z+14)=(z−1)(z+1)(z−12)(z+14).H(z)=\frac{z^{2}-1}{\left(z-\frac12\right)\left(z+\frac14\right)}=\frac{(z-1)(z+1)}{\left(z-\frac12\right)\left(z+\frac14\right)}. Zeros z=±1z=\pm1, poles z=12, −14z=\frac12,\ -\frac14. No zero cancels a pole, and numerator and denominator have the same degree, so there is no pole or zero in z=0z=0 or at infinity. The two zeros lie on the unit circle (this will matter in point 4).

Grafico interattivo: Piano z (ascissa Re z, ordinata Im z): circonferenza unitaria, poli in 1/2 e −1/4 (cerchio tratteggiato di raggio 1/2 e di raggio 1/4: i bordi delle tre ROC), zeri in 1 e −1 sulla circonferenza unitaria

For the equation, H(z)=Y(z)X(z)H(z)=\frac{Y(z)}{X(z)} with z−1z^{-1} the delay (Unilateral Z-Transform and Difference EquationsThe unilateral Z-transform X(z) = sum_{k>=0} x(k) z^{-k} handles initial conditions through its shift formulas, so it solves ARMA difference equations (natural response plus forced response H(z)U(z)); the transfer function H(z) is the Z-transform of the causal impulse response and BIBO stability means all poles inside the unit circle.Unilateral Z-Transform and Difference Equations →, Difference EquationsRecursive constant-coefficient linear difference equations (ARMA models) are the discrete-time counterpart of ODEs: the delay operator replaces the derivative, the modes are k^m lambda^k with lambda a root of the characteristic polynomial, and the solution splits into a natural and a forced response.Difference Equations →). The denominator expanded is (1−12z−1)(1+14z−1)=1−14z−1−18z−2\left(1-\frac12z^{-1}\right)\left(1+\frac14z^{-1}\right)=1-\frac14z^{-1}-\frac18z^{-2}, so (1−14z−1−18z−2)Y(z)=(1−z−2)X(z) ⟹ y(n)−14y(n−1)−18y(n−2)=x(n)−x(n−2).\left(1-\tfrac14z^{-1}-\tfrac18z^{-2}\right)Y(z)=\left(1-z^{-2}\right)X(z)\ \Longrightarrow\ y(n)-\tfrac14y(n-1)-\tfrac18y(n-2)=x(n)-x(n-2).

Point 2. The ROC of a bilateral Z-transform is an annulus bounded by the poles and contains no pole (Bilateral Z-TransformThe bilateral Z-transform X_B(z) = sum x(k) z^{-k} is the discrete-time counterpart of the Laplace transform; it converges only on a region of convergence (an annulus-type region), extends the DTFT when the unit circle is in the ROC, has an inversion formula and properties such as linearity, shift, time reversal and convolution.Bilateral Z-Transform →). The poles have moduli 14\frac14 and 12\frac12, so the plane is split into three regions:

  • ∣z∣>12\lvert z\rvert>\frac12: exterior of a circle, causal sequence (right-sided: h(n)=0h(n)=0 for n<0n<0);
  • 14<∣z∣<12\frac14<\lvert z\rvert<\frac12: annulus, two-sided sequence (one pole gives a causal part and the other an anticausal part);
  • ∣z∣<14\lvert z\rvert<\frac14: interior of a disc, anticausal sequence (h(n)=0h(n)=0 for n>0n>0).

BIBO stability is h∈ℓ1h\in\ell^{1}, which is equivalent to having the unit circle inside the ROC (Stability of LTI Systems - BIBO and Internal StabilityCharacterization of BIBO (external) stability and of internal stability of LTI convolutional systems through the mode functions: stability zones in the complex plane, asymptotic, marginal and unstable behaviour of the natural response, and an example of an externally stable but internally unstable system with a zero-pole cancellation.Stability of LTI Systems - BIBO and Internal Stability →, Bilateral Z-TransformThe bilateral Z-transform X_B(z) = sum x(k) z^{-k} is the discrete-time counterpart of the Laplace transform; it converges only on a region of convergence (an annulus-type region), extends the DTFT when the unit circle is in the ROC, has an inversion formula and properties such as linearity, shift, time reversal and convolution.Bilateral Z-Transform →). Among the three ROCs only the first contains ∣z∣=1\lvert z\rvert=1, and it is also the ROC of a causal system. So the causal system is stable, as expected: all its poles are inside the unit circle.

Point 3. Work with u=z−1u=z^{-1} and write H=1−u2(1−u2)(1+u4)H=\frac{1-u^{2}}{(1-\frac u2)(1+\frac u4)}. Numerator and denominator have the same degree in uu, so first extract the constant (the limit for u→∞u\to\infty, i.e. the ratio of the leading coefficients −1−1/8\frac{-1}{-1/8}): H=8+A1−u2+B1+u4.H=8+\frac{A}{1-\frac u2}+\frac{B}{1+\frac u4}. The coefficients are obtained by the cover-up rule: A=1−u21+u4∣u=2=1−432=−2A=\left.\frac{1-u^{2}}{1+\frac u4}\right|_{u=2}=\frac{1-4}{\frac32}=-2 and B=1−u21−u2∣u=−4=1−163=−5B=\left.\frac{1-u^{2}}{1-\frac u2}\right|_{u=-4}=\frac{1-16}{3}=-5. Check at u=0u=0: H(z→∞)=1=8−2−5H(z\to\infty)=1=8-2-5. Using 11−az−1↔anu(n)\frac1{1-az^{-1}}\leftrightarrow a^{n}u(n) for ∣z∣>∣a∣\lvert z\rvert>\lvert a\rvert and 1↔δ(n)1\leftrightarrow\delta(n): h(n)=8δ(n)−2(12)nu(n)−5(−14)nu(n).h(n)=8\delta(n)-2\left(\tfrac12\right)^{n}u(n)-5\left(-\tfrac14\right)^{n}u(n). Values: h(0)=8−2−5=1h(0)=8-2-5=1; h(1)=−1+54=14h(1)=-1+\frac54=\frac14; h(2)=−12−516=−1316h(2)=-\frac12-\frac5{16}=-\frac{13}{16}; h(3)=−14+564=−1164h(3)=-\frac14+\frac5{64}=-\frac{11}{64}. Check with the difference equation of point 1 for x=δx=\delta: h(0)=1h(0)=1, h(1)=14h(0)=14h(1)=\frac14h(0)=\frac14, h(2)=14h(1)+18h(0)−1=116+18−1=−1316h(2)=\frac14h(1)+\frac18h(0)-1=\frac1{16}+\frac18-1=-\frac{13}{16}, h(3)=14h(2)+18h(1)=−1364+264=−1164h(3)=\frac14h(2)+\frac18h(1)=-\frac{13}{64}+\frac{2}{64}=-\frac{11}{64} (the term −x(n−2)-x(n-2) acts only at n=2n=2). Check of the area: ∑nh(n)=H(1)=0\sum_nh(n)=H(1)=0 and indeed 8−2⋅2−5⋅45=08-2\cdot2-5\cdot\frac45=0. A very common error is forgetting the constant 88 and writing only the two exponentials: then h(0)=−7h(0)=-7 instead of 11.

Point 4. The unit circle is in the ROC, so H(ejθ)H(e^{j\theta}) is H(z)H(z) evaluated on z=ejθz=e^{j\theta} (Bilateral Z-TransformThe bilateral Z-transform X_B(z) = sum x(k) z^{-k} is the discrete-time counterpart of the Laplace transform; it converges only on a region of convergence (an annulus-type region), extends the DTFT when the unit circle is in the ROC, has an inversion formula and properties such as linearity, shift, time reversal and convolution.Bilateral Z-Transform →, FIR and IIR FiltersDiscrete-time (digital) filters are described by ARMA difference equations; FIR filters have finite impulse response (moving average, no auto-regression), IIR filters have auto-regression and a rational frequency response; worked examples of a first-order IIR low-pass/high-pass filter and a moving-average FIR low-pass filter.FIR and IIR Filters →): H(ejθ)=1−e−j2θ(1−12e−jθ)(1+14e−jθ).H(e^{j\theta})=\frac{1-e^{-j2\theta}}{\left(1-\frac12e^{-j\theta}\right)\left(1+\frac14e^{-j\theta}\right)}. For θ=0\theta=0 the numerator is 1−1=01-1=0; for θ=π\theta=\pi, e−j2π=1e^{-j2\pi}=1 and again 00. So the filter removes the constant component and the component at the highest frequency θ=π\theta=\pi (the denominator does not vanish there): it is band-pass.

The input is x(n)=4cos⁡(0⋅n)+cos⁡(π2n)x(n)=4\cos(0\cdot n)+\cos\left(\frac\pi2n\right), a sum of two sinusoids, and the output of a stable system is computed term by term (Eigenfunctions and Frequency Response of LTI Systemsfor a BIBO stable convolutional LTI system the complex exponential e^{j w t} is an eigenfunction and the frequency response H(jw), the Fourier transform of the impulse response, is its eigenvalue; for real h the response to a cosine is a scaled and phase-shifted cosine.Eigenfunctions and Frequency Response of LTI Systems →, discrete-time part): 4↦4 H(ej0)=04\mapsto4\,H(e^{j0})=0. For θ=π2\theta=\frac\pi2 use e−jπ/2=−je^{-j\pi/2}=-j and e−jπ=−1e^{-j\pi}=-1: H(ejπ/2)=1−(−1)(1+j2)(1−j4)=298+j4=169+2j,H(e^{j\pi/2})=\frac{1-(-1)}{\left(1+\frac j2\right)\left(1-\frac j4\right)}=\frac{2}{\frac98+\frac j4}=\frac{16}{9+2j}, since (1+j2)(1−j4)=1−j4+j2+18=98+j4\left(1+\frac j2\right)\left(1-\frac j4\right)=1-\frac j4+\frac j2+\frac18=\frac98+\frac j4. Modulus 1681+4=1685≈1.735\frac{16}{\sqrt{81+4}}=\frac{16}{\sqrt{85}}\approx1.735, phase −arctan⁡29≈−0.2187-\arctan\frac29\approx-0.2187 (the numerator 1616 is real and positive). Therefore y(n)=1685cos⁡ ⁣(π2n−arctan⁡29).y(n)=\frac{16}{\sqrt{85}}\cos\!\left(\frac\pi2n-\arctan\frac29\right). The result holds for every nn because the input is defined for all nn (for an input switched on at n=0n=0 it holds after the transient, which decays like (12)n\left(\frac12\right)^n).

Grafico interattivo: |H(e^{jθ})| per θ tra 0 e π: zero in θ = 0 e in θ = π (zeri sulla circonferenza unitaria), massimo 16/9 ≈ 1.78 vicino a θ ≈ 1.28, vale 16/√85 ≈ 1.735 in θ = π/2

Point 5. The partial fractions of point 3 do not depend on the ROC: H(z)=8−21−12z−1−51+14z−1H(z)=8-\frac{2}{1-\frac12z^{-1}}-\frac{5}{1+\frac14z^{-1}}. What changes is the inverse of each term, which must be consistent with the ROC 14<∣z∣<12\frac14<\lvert z\rvert<\frac12:

Hence h2(n)=8δ(n)+2(12)nu(−n−1)−5(−14)nu(n).h_2(n)=8\delta(n)+2\left(\tfrac12\right)^{n}u(-n-1)-5\left(-\tfrac14\right)^{n}u(n). Values: h2(−1)=2⋅2=4h_2(-1)=2\cdot2=4, h2(−2)=8h_2(-2)=8, h2(−3)=16h_2(-3)=16; h2(0)=8−5=3h_2(0)=8-5=3; h2(1)=54h_2(1)=\frac54, h2(2)=−516h_2(2)=-\frac5{16}. The sequence is not zero for n<0n<0, so it is not causal, and ∣h2(−m)∣=2⋅2m\lvert h_2(-m)\rvert=2\cdot2^{m} grows, so ∑n∣h2(n)∣=∞\sum_n\lvert h_2(n)\rvert=\infty: not BIBO stable. It is consistent with the fact that the unit circle is not in the ROC (the DTFT of h2h_2 does not exist). Same formula H(z)H(z), different sequences: the ROC is part of the transform.

Exercise 3 (points 7)

DFT of a short sequence, zero padding, resolution. Let xx be the sequence with x(0)=1x(0)=1, x(1)=2x(1)=2, x(2)=0x(2)=0, x(3)=−1x(3)=-1 and x(n)=0x(n)=0 for all other nn. Use the DFT of the course, XN(k)=1N∑n=0N−1x(n)e−j2πNknX_N(k)=\frac1N\sum_{n=0}^{N-1}x(n)e^{-j\frac{2\pi}{N}kn}, and write X(θ)X(\theta) for the DTFT of xx.

  1. Write X(θ)X(\theta) and compute X(0)X(0), X(π2)X\left(\frac\pi2\right) and X(π)X(\pi).
  2. Compute by hand the DFT on N=4N=4 points X4(k)X_4(k), k=0,1,2,3k=0,1,2,3, and check its relation with X(θ)X(\theta).
  3. The sequence is completed with four zeros (length N=8N=8). Compute X8(k)X_8(k) for k=0,…,7k=0,\dots,7 and say how X8X_8 is related to X4X_4 and to X(θ)X(\theta).
  4. Verify Parseval's relation for the DFT with N=4N=4 and with N=8N=8.
  5. Let w(n)=cos⁡(2π⋅0.20 n)+cos⁡(2π⋅0.25 n)w(n)=\cos(2\pi\cdot0.20\,n)+\cos(2\pi\cdot0.25\,n). (a) The signal is observed on N=8N=8 samples and the DFT is computed after zero padding to M=4096M=4096 points: can the two frequencies be seen as two separate peaks? (b) Using as resolution limit that two components can be told apart only if their frequencies (in cycles per sample) differ by at least 1N\frac1N, find the smallest number of samples NN that resolves them and compute the DFT WN(k)W_N(k) of those NN samples.
Show the result
  1. X(θ)=1+2e−jθ−e−j3θX(\theta)=1+2e^{-j\theta}-e^{-j3\theta}; X(0)=2X(0)=2, X(π2)=1−3jX\left(\frac\pi2\right)=1-3j, X(π)=0X(\pi)=0.
  2. X4=(12, 1−3j4, 0, 1+3j4)X_4=\left(\frac12,\ \frac{1-3j}4,\ 0,\ \frac{1+3j}4\right), and X4(k)=14X(2πk4)X_4(k)=\frac14X\left(\frac{2\pi k}4\right).
  3. X8=(14, 18 ⁣[1+3−j2], 1−3j8, 18 ⁣[1−3+j2], 0, X8(3)‾, 1+3j8, X8(1)‾)X_8=\left(\frac14,\ \frac18\!\left[1+\frac{3-j}{\sqrt2}\right],\ \frac{1-3j}8,\ \frac18\!\left[1-\frac{3+j}{\sqrt2}\right],\ 0,\ \overline{X_8(3)},\ \frac{1+3j}8,\ \overline{X_8(1)}\right), i.e. X8(1)≈0.390−0.088jX_8(1)\approx0.390-0.088j, X8(3)≈−0.140−0.088jX_8(3)\approx-0.140-0.088j. X8(k)=18X(2πk8)X_8(k)=\frac18X\left(\frac{2\pi k}8\right) and X8(2k)=12X4(k)X_8(2k)=\frac12X_4(k).
  4. ∑n∣x(n)∣2=6=4∑k∣X4(k)∣2=8∑k∣X8(k)∣2\sum_n\lvert x(n)\rvert^{2}=6=4\sum_k\lvert X_4(k)\rvert^{2}=8\sum_k\lvert X_8(k)\rvert^{2} (with ∑∣X4∣2=32\sum\lvert X_4\rvert^2=\frac32 and ∑∣X8∣2=34\sum\lvert X_8\rvert^2=\frac34).
  5. (a) No: with N=8N=8 the resolution is 18=0.125>0.05\frac18=0.125>0.05 and the two lines merge in one broad peak near ν≈0.22\nu\approx0.22; the zero padding only interpolates. (b) N=20N=20; W20(4)=W20(5)=W20(15)=W20(16)=12W_{20}(4)=W_{20}(5)=W_{20}(15)=W_{20}(16)=\frac12 and all the other values are 00.
Show the full solution

Point 1. The sequence has only four non-zero samples, so the sum of the definition (Discrete-Time Fourier TransformThe DTFT of an aperiodic discrete-time signal is the 2pi-periodic function X(e^{j theta}) = sum x(k) e^{-j theta k}; it is obtained as the envelope of the DFT of the N-periodic repetition when N tends to infinity, and has translation, modulation, convolution and Parseval properties.Discrete-Time Fourier Transform →) has four terms: X(θ)=∑nx(n)e−jθn=1+2e−jθ−e−j3θ.X(\theta)=\sum_nx(n)e^{-j\theta n}=1+2e^{-j\theta}-e^{-j3\theta}. X(0)=1+2−1=2X(0)=1+2-1=2 (the sum of the samples). For θ=π2\theta=\frac\pi2: e−jπ/2=−je^{-j\pi/2}=-j, e−j3π/2=je^{-j3\pi/2}=j, so X(π2)=1−2j−j=1−3jX\left(\frac\pi2\right)=1-2j-j=1-3j. For θ=π\theta=\pi: e−jπ=−1e^{-j\pi}=-1 and e−j3π=−1e^{-j3\pi}=-1, so X(π)=1−2+1=0X(\pi)=1-2+1=0 (the alternating sum 1−2+0−(−1)1-2+0-(-1) of the samples is zero).

Grafico interattivo: |X(θ)| nel periodo [0, 2π]: vale 2 in θ = 0 e 2π, √10 ≈ 3.16 in θ = π/2 e in 3π/2, zero in θ = π. I campioni della DFT a 4 punti sono 4|X4(k)| = |X(kπ/2)| e quelli a 8 punti 8|X8(k)| = |X(kπ/4)|

Point 2. Here the number of samples equals N=4N=4, so there is no padding. For N=4N=4 the exponential is e−j2π4kn=(−j)kne^{-j\frac{2\pi}4kn}=(-j)^{kn} and the powers of −j-j are 1,−j,−1,j1,-j,-1,j. Then X4(0)=14(1+2+0−1)=12,X_4(0)=\tfrac14(1+2+0-1)=\tfrac12, X4(1)=14(1+2(−j)+0⋅(−1)−1⋅j)=14(1−3j),X_4(1)=\tfrac14\left(1+2(-j)+0\cdot(-1)-1\cdot j\right)=\tfrac14(1-3j), X4(2)=14(1+2(−1)+0⋅1−1⋅(−1))=14(1−2+1)=0,X_4(2)=\tfrac14\left(1+2(-1)+0\cdot1-1\cdot(-1)\right)=\tfrac14(1-2+1)=0, X4(3)=14(1+2j+0⋅(−1)−1⋅(−j))=14(1+3j),X_4(3)=\tfrac14\left(1+2j+0\cdot(-1)-1\cdot(-j)\right)=\tfrac14(1+3j), where for k=3k=3 the exponents kn=0,3,6,9kn=0,3,6,9 give (−j)kn=1, j, −1, −j(-j)^{kn}=1,\ j,\ -1,\ -j. Control: xx is real, so X4(3)=X4(1)‾X_4(3)=\overline{X_4(1)} (symmetry of the DFT of a real signal). Relation with the DTFT: the DFT of the periodic repetition of xx is the DTFT sampled at θ=2πkN\theta=\frac{2\pi k}N and divided by NN (Discrete-Time Fourier TransformThe DTFT of an aperiodic discrete-time signal is the 2pi-periodic function X(e^{j theta}) = sum x(k) e^{-j theta k}; it is obtained as the envelope of the DFT of the N-periodic repetition when N tends to infinity, and has translation, modulation, convolution and Parseval properties.Discrete-Time Fourier Transform →): X4(k)=14X(2πk4)X_4(k)=\frac14X\left(\frac{2\pi k}4\right). Indeed X4(0)=14X(0)=24X_4(0)=\frac14X(0)=\frac24, X4(1)=14X(π2)=1−3j4X_4(1)=\frac14X\left(\frac\pi2\right)=\frac{1-3j}4 and X4(2)=14X(π)=0X_4(2)=\frac14X(\pi)=0. The inverse formula x(n)=∑kX4(k)ej2π4knx(n)=\sum_kX_4(k)e^{j\frac{2\pi}4kn} gives back, e.g., x(0)=12+1−3j4+0+1+3j4=1x(0)=\frac12+\frac{1-3j}4+0+\frac{1+3j}4=1 (Discrete Fourier TransformHeuristic derivation of the discrete Fourier transform for N-periodic discrete-time signals: complex exponentials with period N, the finite basis of N modes obtained from the difference equation x(k)-x(k-N)=0, orthogonality, the coefficient formula and the definition of the DFT with its periodicity and matrix form.Discrete Fourier Transform →).

Point 3. With the four extra zeros nothing changes in the sum, only the evaluation points: for N=8N=8 X8(k)=18∑n=03x(n)e−j2π8kn=18X(2πk8)=18X(πk4).X_8(k)=\frac18\sum_{n=0}^{3}x(n)e^{-j\frac{2\pi}8kn}=\frac18X\left(\frac{2\pi k}{8}\right)=\frac18X\left(\frac{\pi k}4\right). Even values of kk are points already computed (θ=0,π2,π,3π2\theta=0,\frac\pi2,\pi,\frac{3\pi}2): X8(0)=28=14X_8(0)=\frac28=\frac14, X8(2)=18(1−3j)X_8(2)=\frac18(1-3j), X8(4)=18X(π)=0X_8(4)=\frac18X(\pi)=0, X8(6)=18X(3π2)=18(1+3j)X_8(6)=\frac18X\left(\frac{3\pi}2\right)=\frac18(1+3j). The odd values are new points. For θ=π4\theta=\frac\pi4: e−jπ/4=1−j2e^{-j\pi/4}=\frac{1-j}{\sqrt2} and e−j3π/4=−1−j2e^{-j3\pi/4}=\frac{-1-j}{\sqrt2}, so X(π4)=1+2(1−j)2−−1−j2=1+3−j2 ⟹ X8(1)=18[1+3−j2]≈0.390−0.088j.X\left(\tfrac\pi4\right)=1+\frac{2(1-j)}{\sqrt2}-\frac{-1-j}{\sqrt2}=1+\frac{3-j}{\sqrt2}\ \Longrightarrow\ X_8(1)=\frac18\left[1+\frac{3-j}{\sqrt2}\right]\approx0.390-0.088j. For θ=3π4\theta=\frac{3\pi}4: e−j3π/4=−1−j2e^{-j3\pi/4}=\frac{-1-j}{\sqrt2} and e−j9π/4=e−jπ/4=1−j2e^{-j9\pi/4}=e^{-j\pi/4}=\frac{1-j}{\sqrt2}, so X(3π4)=1+2(−1−j)2−1−j2=1−3+j2 ⟹ X8(3)=18[1−3+j2]≈−0.140−0.088j.X\left(\tfrac{3\pi}4\right)=1+\frac{2(-1-j)}{\sqrt2}-\frac{1-j}{\sqrt2}=1-\frac{3+j}{\sqrt2}\ \Longrightarrow\ X_8(3)=\frac18\left[1-\frac{3+j}{\sqrt2}\right]\approx-0.140-0.088j. The last three values follow from the symmetry of the DFT of a real signal, X8(8−k)=X8(k)‾X_8(8-k)=\overline{X_8(k)}: X8(5)=X8(3)‾X_8(5)=\overline{X_8(3)}, X8(7)=X8(1)‾X_8(7)=\overline{X_8(1)}. So X8(2k)=12X4(k)X_8(2k)=\frac12X_4(k) (the factor 12\frac12 comes from 18\frac18 instead of 14\frac14) and the odd kk are 4 new samples of the same curve X(θ)X(\theta): zero padding does not add information, it only samples the same DTFT more densely (Properties of the Discrete Fourier Transformthe DFT with its inverse, translation and modulation properties, the correspondence between cyclic convolution and product, Parseval's relation, and the example of a periodic rectangular pulse train whose DFT is a Dirichlet kernel.Properties of the Discrete Fourier Transform →). Typical error: believing that the padded DFT is "more precise" and getting different values at the even points.

Point 4. The energy is ∑n∣x(n)∣2=1+4+0+1=6\sum_n\lvert x(n)\rvert^{2}=1+4+0+1=6. Parseval for the DFT with the factor 1N\frac1N in the forward formula is ∑n=0N−1∣x(n)∣2=N∑k∣XN(k)∣2\sum_{n=0}^{N-1}\lvert x(n)\rvert^{2}=N\sum_{k}\lvert X_N(k)\rvert^{2} (Properties of the Discrete Fourier Transformthe DFT with its inverse, translation and modulation properties, the correspondence between cyclic convolution and product, Parseval's relation, and the example of a periodic rectangular pulse train whose DFT is a Dirichlet kernel.Properties of the Discrete Fourier Transform →). For N=4N=4: ∑∣X4∣2=14+1016+0+1016=32\sum\lvert X_4\rvert^2=\frac14+\frac{10}{16}+0+\frac{10}{16}=\frac32 and 4⋅32=64\cdot\frac32=6. For N=8N=8: 64∣X8∣264\lvert X_8\rvert^{2} gives 44, 6+326+3\sqrt2, 1010, 6−326-3\sqrt2, 00, 6−326-3\sqrt2, 1010, 6+326+3\sqrt2 (for odd kk: ∣1+3−j2∣2=(1+32)2+12=6+32\left\lvert1+\frac{3-j}{\sqrt2}\right\rvert^{2}=\left(1+\frac3{\sqrt2}\right)^{2}+\frac12=6+3\sqrt2 and ∣1−3+j2∣2=(1−32)2+12=6−32\left\lvert1-\frac{3+j}{\sqrt2}\right\rvert^{2}=\left(1-\frac3{\sqrt2}\right)^{2}+\frac12=6-3\sqrt2), whose sum is 4848, so ∑∣X8∣2=4864=34\sum\lvert X_8\rvert^2=\frac{48}{64}=\frac34 and 8⋅34=68\cdot\frac34=6 ✓. Both give the energy 66: padding with zeros does not change the energy.

Point 5. (a) A signal observed on NN samples is the product of the infinite sinusoids and a rectangular window of length NN, so each cosine becomes a Dirichlet-like kernel in frequency (Discrete-Time Fourier TransformThe DTFT of an aperiodic discrete-time signal is the 2pi-periodic function X(e^{j theta}) = sum x(k) e^{-j theta k}; it is obtained as the envelope of the DFT of the N-periodic repetition when N tends to infinity, and has translation, modulation, convolution and Parseval properties.Discrete-Time Fourier Transform →, example of the discrete rectangle), whose main lobe extends up to the first zero at ν=±1N\nu=\pm\frac1N (in cycles per sample). For N=8N=8 the half-width of the main lobe is 18=0.125\frac18=0.125, larger than the distance 0.25−0.20=0.050.25-0.20=0.05 between the two frequencies: the two lobes overlap and sum to one broad peak (a numerical check with M=4096M=4096 gives a single maximum at ν≈0.223\nu\approx0.223). Zero padding to M=4096M=4096 makes the spacing between the computed points 14096\frac1{4096}, but it does not narrow the lobes: the resolution depends on the number of observed samples NN, not on the padded length MM.

(b) The condition 1N≤0.05\frac1N\le0.05 gives N≥20N\ge20, so the smallest NN is 2020. With N=20N=20 the frequencies are exactly bin frequencies: 0.20=4200.20=\frac4{20} and 0.25=5200.25=\frac5{20}. Writing the cosines with Euler's formulas, w(n)=12ej2π204n+12e−j2π204n+12ej2π205n+12e−j2π205n,w(n)=\tfrac12e^{j\frac{2\pi}{20}4n}+\tfrac12e^{-j\frac{2\pi}{20}4n}+\tfrac12e^{j\frac{2\pi}{20}5n}+\tfrac12e^{-j\frac{2\pi}{20}5n}, which is already a sum of the harmonics ψk(n)=ej2π20kn\psi_k(n)=e^{j\frac{2\pi}{20}kn} of the DFT, with e−j2π204n=ψ16(n)e^{-j\frac{2\pi}{20}4n}=\psi_{16}(n) and e−j2π205n=ψ15(n)e^{-j\frac{2\pi}{20}5n}=\psi_{15}(n) (index modulo 2020). By orthogonality of the harmonics (Discrete Fourier TransformHeuristic derivation of the discrete Fourier transform for N-periodic discrete-time signals: complex exponentials with period N, the finite basis of N modes obtained from the difference equation x(k)-x(k-N)=0, orthogonality, the coefficient formula and the definition of the DFT with its periodicity and matrix form.Discrete Fourier Transform →) the coefficients are read directly: W20(4)=W20(5)=W20(15)=W20(16)=12W_{20}(4)=W_{20}(5)=W_{20}(15)=W_{20}(16)=\frac12 and 00 elsewhere (there is no leakage, because both cosines complete an integer number of periods, 44 and 55, in the window). Control with Parseval: ∑n=019∣w(n)∣2=20⋅4⋅14=20\sum_{n=0}^{19}\lvert w(n)\rvert^{2}=20\cdot4\cdot\frac14=20, and the signal power is 12+12=1\frac12+\frac12=1 per sample, i.e. energy 2020 ✓.

Theory 1 (points 4)

Scalar product, orthogonality and complex exponentials. (1) Define the scalar product on a complex vector space and the associated norm and orthogonality; give the scalar product of the space L2([T])L^{2}([T]) of finite-energy signals on an interval of length TT. (2) Let ω0=2πT\omega_0=\frac{2\pi}T and ψn(t)=ejnω0t\psi_n(t)=e^{jn\omega_0t}, n∈Zn\in\mathbb Z. Prove that ⟨ψm,ψn⟩[T]=T δmn\langle\psi_m,\psi_n\rangle_{[T]}=T\,\delta_{mn}. (3) Use it to obtain the formula for the coefficients ana_n of x(t)=∑n=N1N2anψn(t)x(t)=\sum_{n=N_1}^{N_2}a_n\psi_n(t) and the energy of xx over one period. (4) State the discrete-time analogue for the signals ej2πNnke^{j\frac{2\pi}Nnk}.

Show the result

⟨f,g⟩=∫[T]f(t)g(t)‾ dt\langle f,g\rangle=\int_{[T]}f(t)\overline{g(t)}\,dt, ∥f∥=⟨f,f⟩\lVert f\rVert=\sqrt{\langle f,f\rangle}, f⊥g  ⟺  ⟨f,g⟩=0f\perp g\iff\langle f,g\rangle=0. ⟨ψm,ψn⟩[T]=Tδmn\langle\psi_m,\psi_n\rangle_{[T]}=T\delta_{mn}. an=1T⟨x,ψn⟩=1T∫[T]x(t)e−jnω0tdta_n=\frac1T\langle x,\psi_n\rangle=\frac1T\int_{[T]}x(t)e^{-jn\omega_0t}dt and E[T][x]=T∑n∣an∣2E_{[T]}[x]=T\sum_n\lvert a_n\rvert^{2}. Discrete time: ∑k=0N−1ej2πN(n−m)k=Nδnm\sum_{k=0}^{N-1}e^{j\frac{2\pi}N(n-m)k}=N\delta_{nm} (indices modulo NN).

Show the full solution

Definitions (Vector Spaces, Scalar Product and NormsReview of geometry for signals: vector spaces over a field, the scalar product and norm in complex vector spaces, p-norms, orthogonality, and the generalized Pythagorean theorem.Vector Spaces, Scalar Product and Norms →, Hilbert SpacesA Hilbert space is a complete scalar-product space; C^N, l^2 and L^2(S) are Hilbert spaces, and the scalar product in l^2 and L^2 is what engineers call mutual energy.Hilbert Spaces →). A scalar product on a complex vector space VV is a map (v,w)↦⟨v,w⟩∈C(v,w)\mapsto\langle v,w\rangle\in\mathbb C with three properties: conjugate symmetry ⟨v,w⟩=⟨w,v⟩‾\langle v,w\rangle=\overline{\langle w,v\rangle}; linearity in the first argument, ⟨α1v1+α2v2,w⟩=α1⟨v1,w⟩+α2⟨v2,w⟩\langle\alpha_1v_1+\alpha_2v_2,w\rangle=\alpha_1\langle v_1,w\rangle+\alpha_2\langle v_2,w\rangle; positivity ⟨v,v⟩≥0\langle v,v\rangle\ge0 with equality only for v=0v=0. The norm is ∥v∥=⟨v,v⟩\lVert v\rVert=\sqrt{\langle v,v\rangle} and v⊥wv\perp w means ⟨v,w⟩=0\langle v,w\rangle=0. On L2([T])L^{2}([T]) the scalar product is the mutual energy over the interval, ⟨f,g⟩[T]=∫[T]f(τ)g(τ)‾ dτ\langle f,g\rangle_{[T]}=\int_{[T]}f(\tau)\overline{g(\tau)}\,d\tau, and the norm squared is the energy E[T][f]=∫[T]∣f∣2E_{[T]}[f]=\int_{[T]}\lvert f\rvert^{2} (in CN\mathbb C^N it is ⟨v,w⟩=w∗v=∑kvkwk‾\langle v,w\rangle=w^{*}v=\sum_kv_k\overline{w_k}).

Orthogonality (Continuous-Time Fourier SeriesA periodic continuous-time signal is written as a combination of harmonics e^{jn w0 t} whose coefficients a_n are projections of the signal onto each harmonic; coefficients have symmetries that mirror those of the signal.Continuous-Time Fourier Series →). Take [T]=[0,T][T]=[0,T] (the result does not depend on the interval of length TT): ⟨ψm,ψn⟩[T]=∫0Tejmω0τ ejnω0τ‾ dτ=∫0Tej(m−n)ω0τ dτ.\langle\psi_m,\psi_n\rangle_{[T]}=\int_0^{T}e^{jm\omega_0\tau}\,\overline{e^{jn\omega_0\tau}}\,d\tau=\int_0^{T}e^{j(m-n)\omega_0\tau}\,d\tau. If m=nm=n the integrand is 11 and the integral is TT. If m≠nm\ne n, with p=m−n≠0p=m-n\ne0 the antiderivative exists because pω0≠0p\omega_0\ne0: ∫0Tejpω0τdτ=ejpω0τjpω0∣0T=ejpω0T−1jpω0=ej2πp−1jpω0=0,\int_0^{T}e^{jp\omega_0\tau}d\tau=\left.\frac{e^{jp\omega_0\tau}}{jp\omega_0}\right|_0^{T}=\frac{e^{jp\omega_0T}-1}{jp\omega_0}=\frac{e^{j2\pi p}-1}{jp\omega_0}=0, because ω0T=2π\omega_0T=2\pi and pp is an integer: the exponential completes a whole number of periods. So the ψn\psi_n are orthogonal, with ∥ψn∥2=T\lVert\psi_n\rVert^{2}=T. (Without the conjugate in the scalar product one would get 00 only for m≠−nm\ne-n: the conjugate is essential.)

Coefficients and energy. If x=∑m=N1N2amψmx=\sum_{m=N_1}^{N_2}a_m\psi_m, by linearity in the first argument ⟨x,ψn⟩[T]=∑mam⟨ψm,ψn⟩[T]=an T ⟹ an=1T∫[T]x(t)e−jnω0tdt:\langle x,\psi_n\rangle_{[T]}=\sum_ma_m\langle\psi_m,\psi_n\rangle_{[T]}=a_n\,T\ \Longrightarrow\ a_n=\frac1T\int_{[T]}x(t)e^{-jn\omega_0t}dt: ana_n is the projection of xx on the nn-th harmonic, divided by ∥ψn∥2=T\lVert\psi_n\rVert^{2}=T. For the energy, expand ⟨x,x⟩\langle x,x\rangle and keep only the terms m=nm=n: E[T][x]=∑m,naman‾⟨ψm,ψn⟩=T∑n∣an∣2E_{[T]}[x]=\sum_{m,n}a_m\overline{a_n}\langle\psi_m,\psi_n\rangle=T\sum_n\lvert a_n\rvert^{2} (the generalized Pythagorean theorem for orthogonal vectors; this is Parseval's relation for the Fourier series, Properties of the Fourier SeriesThe Fourier coefficient map is a linear isometry between L2 over a period and l2 (Parseval identity, power equals the sum of squared coefficient moduli), and it turns time shift, modulation, conjugation, reversal, scaling and product into simple operations on the coefficients.Properties of the Fourier Series →).

Discrete time (Discrete Fourier TransformHeuristic derivation of the discrete Fourier transform for N-periodic discrete-time signals: complex exponentials with period N, the finite basis of N modes obtained from the difference equation x(k)-x(k-N)=0, orthogonality, the coefficient formula and the definition of the DFT with its periodicity and matrix form.Discrete Fourier Transform →). The NN signals ψn(k)=ej2πnNk\psi_n(k)=e^{j\frac{2\pi n}Nk}, n=0,…,N−1n=0,\dots,N-1, have ⟨ψn,ψm⟩=∑k=0N−1ej2πN(n−m)k\langle\psi_n,\psi_m\rangle=\sum_{k=0}^{N-1}e^{j\frac{2\pi}N(n-m)k}. For n=mn=m every term is 11 and the sum is NN; for n≠mn\ne m the ratio q=ej2πN(n−m)≠1q=e^{j\frac{2\pi}N(n-m)}\ne1 satisfies qN=1q^{N}=1, so the finite geometric sum 1−qN1−q\frac{1-q^{N}}{1-q} is 00. Hence ⟨ψn,ψm⟩=Nδnm\langle\psi_n,\psi_m\rangle=N\delta_{nm}, and the coefficients are X(n)=1N∑kx(k)e−j2πnNkX(n)=\frac1N\sum_kx(k)e^{-j\frac{2\pi n}Nk}.

Example: with T=3T=3, ⟨ψ2,ψ5⟩=∫03e−j3ω0τdτ=0\langle\psi_2,\psi_5\rangle=\int_0^3e^{-j3\omega_0\tau}d\tau=0 while ⟨ψ3,ψ3⟩=3\langle\psi_3,\psi_3\rangle=3. Typical errors: forgetting the conjugate; forgetting that the interval must be a whole period; writing 1T\frac1T in the scalar product (it belongs to the formula of ana_n, not to the scalar product).

Theory 2 (points 4)

The Dirac impulse. (1) Define the Dirac impulse as a generalized function through the sifting property and explain why "δ(0)=+∞\delta(0)=+\infty and δ(t)=0\delta(t)=0 elsewhere" is not a definition. (2) Construct it as the limit of the rectangles fn(t)=nf_n(t)=n for ∣t∣≤12n\lvert t\rvert\le\frac1{2n} and 00 elsewhere, and prove that ∫fn(τ)x(τ)dτ→x(0)\int f_n(\tau)x(\tau)d\tau\to x(0) for every continuous xx. (3) Prove the scaling property δ(αt)=1∣α∣δ(t)\delta(\alpha t)=\frac1{\lvert\alpha\rvert}\delta(t), α≠0\alpha\ne0, in integral form, and the sampling property x(t)δ(t−T)=x(T)δ(t−T)x(t)\delta(t-T)=x(T)\delta(t-T). (4) Compute ∫−∞+∞(t2+1) δ(2t−4) dt\int_{-\infty}^{+\infty}(t^{2}+1)\,\delta(2t-4)\,dt and ddt1(2t−1)\frac{d}{dt}\mathbf 1(2t-1), where 1\mathbf 1 is the unit step.

Show the result

Sifting: ∫δ(τ)x(τ)dτ=x(0)\int\delta(\tau)x(\tau)d\tau=x(0). δ(αt)=1∣α∣δ(t)\delta(\alpha t)=\frac1{\lvert\alpha\rvert}\delta(t). x(t)δ(t−T)=x(T)δ(t−T)x(t)\delta(t-T)=x(T)\delta(t-T). ∫(t2+1)δ(2t−4)dt=52\int(t^{2}+1)\delta(2t-4)dt=\frac52 and ddt1(2t−1)=δ(t−12)\frac d{dt}\mathbf 1(2t-1)=\delta\left(t-\frac12\right).

Show the full solution

Point 1 (Continuous-Time Unit Step and Dirac Impulsethe continuous unit step and the Dirac impulse defined as a generalized function through the sifting property, three constructions as limits (rectangular, Gaussian, sinc), the convergence theorem for continuous signals and the properties of the impulse.Continuous-Time Unit Step and Dirac Impulse →, Linear Functionalsa linear functional maps a vector space of signals to numbers and respects linear combinations; examples are the scalar product, the area and the mean value, while the energy is not linear.Linear Functionals →). The Dirac impulse is not an ordinary function: it is defined by what it does inside an integral, namely by requiring, for every signal xx continuous in 00, ∫−∞+∞δ(τ) x(τ) dτ=x(0).\int_{-\infty}^{+\infty}\delta(\tau)\,x(\tau)\,d\tau=x(0). This defines the linear functional Tδ[x]=x(0)\mathcal T_\delta[x]=x(0). The naive definition is wrong because a function equal to 00 except at one point has integral 00, not 11 (no ordinary function can have the sifting property), and +∞+\infty is not a value that can be integrated.

Point 2. The rectangle fnf_n has height nn on an interval of width 1n\frac1n, so the area is 11 for every nn. For continuous xx, the mean value theorem gives a point tn∈[−12n,12n]t_n\in\left[-\frac1{2n},\frac1{2n}\right] with ∫fn(τ)x(τ)dτ=n∫−12n12nx(τ)dτ=n⋅1n⋅x(tn)=x(tn)→n→∞x(0),\int f_n(\tau)x(\tau)d\tau=n\int_{-\frac1{2n}}^{\frac1{2n}}x(\tau)d\tau=n\cdot\frac1n\cdot x(t_n)=x(t_n)\xrightarrow[n\to\infty]{}x(0), because tn→0t_n\to0 and xx is continuous. This convergence "in distribution" (limit of the integrals, not of the functions) defines δ\delta. With x≡1x\equiv1 we get the unit area, ∫δ=1\int\delta=1.

Point 3. Scaling: with α≠0\alpha\ne0 substitute s=ατs=\alpha\tau, dτ=dsαd\tau=\frac{ds}{\alpha}. If α>0\alpha>0 the limits stay ±∞\pm\infty; if α<0\alpha<0 they are swapped, and swapping them back changes the sign of dτd\tau: in both cases the factor is 1∣α∣\frac1{\lvert\alpha\rvert}: ∫−∞+∞x(τ)δ(ατ)dτ=1∣α∣∫−∞+∞x ⁣(sα)δ(s) ds=x(0)∣α∣=∫−∞+∞x(τ) δ(τ)∣α∣ dτ,\int_{-\infty}^{+\infty}x(\tau)\delta(\alpha\tau)d\tau=\frac1{\lvert\alpha\rvert}\int_{-\infty}^{+\infty}x\!\left(\frac s\alpha\right)\delta(s)\,ds=\frac{x(0)}{\lvert\alpha\rvert}=\int_{-\infty}^{+\infty}x(\tau)\,\frac{\delta(\tau)}{\lvert\alpha\rvert}\,d\tau, so δ(αt)=1∣α∣δ(t)\delta(\alpha t)=\frac1{\lvert\alpha\rvert}\delta(t) (with α=−1\alpha=-1: δ\delta is even). Sampling: for any test signal ξ\xi continuous in TT, ∫x(τ)δ(τ−T)ξ(τ)dτ=x(T)ξ(T)=∫x(T)δ(τ−T)ξ(τ)dτ,\int x(\tau)\delta(\tau-T)\xi(\tau)d\tau=x(T)\xi(T)=\int x(T)\delta(\tau-T)\xi(\tau)d\tau, that is x(t)δ(t−T)=x(T)δ(t−T)x(t)\delta(t-T)=x(T)\delta(t-T) (only the value of xx at TT matters).

Point 4. Write δ(2t−4)=δ(2(t−2))=12δ(t−2)\delta(2t-4)=\delta\bigl(2(t-2)\bigr)=\frac12\delta(t-2) by scaling and shift, and sift at t=2t=2: ∫(t2+1) 12δ(t−2) dt=12(22+1)=52.\int(t^{2}+1)\,\tfrac12\delta(t-2)\,dt=\tfrac12(2^{2}+1)=\tfrac52. The factor 12\frac12 is the typical thing to forget. For the step: 1(2t−1)=1(2(t−12))=1(t−12)\mathbf 1(2t-1)=\mathbf 1\left(2\left(t-\frac12\right)\right)=\mathbf 1\left(t-\frac12\right), because multiplying the argument of the step by a positive number does not change it, and ddt1(t−t0)=δ(t−t0)\frac d{dt}\mathbf 1(t-t_0)=\delta(t-t_0). So the result is δ(t−12)\delta\left(t-\frac12\right); with the chain rule one finds the same: 2δ(2t−1)=2⋅12δ(t−12)2\delta(2t-1)=2\cdot\frac12\delta\left(t-\frac12\right).

Matlab 1 (points 3)

Moving-average filter: design, application and frequency response. Consider x(n)=cos⁡(2π⋅0.02 n)+0.5cos⁡(2π⋅0.4 n)x(n)=\cos(2\pi\cdot0.02\,n)+0.5\cos(2\pi\cdot0.4\,n), n=0,…,99n=0,\dots,99, and the moving-average filter of length MM, y(n)=1M∑k=0M−1x(n−k)y(n)=\frac1M\sum_{k=0}^{M-1}x(n-k) (with x(n)=0x(n)=0 for n<0n<0). The component at ν2=0.4\nu_2=0.4 cycles per sample must be completely removed. Write a Matlab script that:

  1. generates x(n)x(n);
  2. computes the smallest MM that cancels the component at ν2=0.4\nu_2=0.4 (explain how MM is chosen) and applies the filter to xx;
  3. plots xx and yy in one figure;
  4. plots in a second figure the modulus of the frequency response of the filter for ν∈[−12,12)\nu\in[-\frac12,\frac12), computed with the FFT with zero padding to 10241024 points, with a correct frequency axis, together with the theoretical curve, and marks the two frequencies ν1=0.02\nu_1=0.02 and ν2=0.4\nu_2=0.4.
Show the result

M=5M=5 (the zeros of ∣H∣\lvert H\rvert are at ν=kM\nu=\frac kM and 0.4=250.4=\frac25). Output in steady state (n≥4n\ge4): y(n)=0.9843cos⁡(2π⋅0.02 (n−2))y(n)=0.9843\cos(2\pi\cdot0.02\,(n-2)): the second component is removed, the first has gain 0.98430.9843 and a delay of 22 samples. Script in the solution.

Show the full solution

Design of MM. The impulse response is h(n)=1Mh(n)=\frac1M for n=0,…,M−1n=0,\dots,M-1 (FIR and IIR FiltersDiscrete-time (digital) filters are described by ARMA difference equations; FIR filters have finite impulse response (moving average, no auto-regression), IIR filters have auto-regression and a rational frequency response; worked examples of a first-order IIR low-pass/high-pass filter and a moving-average FIR low-pass filter.FIR and IIR Filters →), so the frequency response is a geometric sum: H(ej2πν)=1M∑k=0M−1e−j2πνk=1M 1−e−j2πνM1−e−j2πν=e−jπν(M−1) sin⁡(πMν)Msin⁡(πν)H(e^{j2\pi\nu})=\frac1M\sum_{k=0}^{M-1}e^{-j2\pi\nu k}=\frac1M\,\frac{1-e^{-j2\pi\nu M}}{1-e^{-j2\pi\nu}}=e^{-j\pi\nu(M-1)}\,\frac{\sin(\pi M\nu)}{M\sin(\pi\nu)} (the trick 1−e−j2a=e−ja 2jsin⁡a1-e^{-j2a}=e^{-ja}\,2j\sin a in numerator and denominator). Its modulus vanishes at ν=kM\nu=\frac kM, k=1,…,M−1k=1,\dots,M-1. The component at ν2=0.4\nu_2=0.4 is removed exactly if Mν2=0.4 MM\nu_2=0.4\,M is an integer: M=5M=5 (0.4⋅5=20.4\cdot5=2), and M=10,15,…M=10,15,\dots also work; the smallest is M=5M=5. The gain on the useful component is ∣H(0.02)∣=sin⁡(0.1π)5sin⁡(0.02π)≈0.9843\lvert H(0.02)\rvert=\frac{\sin(0.1\pi)}{5\sin(0.02\pi)}\approx0.9843 and the phase −πν1(M−1)=−0.04π⋅4=−0.16π-\pi\nu_1(M-1)=-0.04\pi\cdot4=-0.16\pi, i.e. a delay of M−12=2\frac{M-1}2=2 samples (Eigenfunctions and Frequency Response of LTI Systemsfor a BIBO stable convolutional LTI system the complex exponential e^{j w t} is an eigenfunction and the frequency response H(jw), the Fourier transform of the impulse response, is its eigenvalue; for real h the response to a cosine is a scaled and phase-shifted cosine.Eigenfunctions and Frequency Response of LTI Systems →): after the transient of M−1=4M-1=4 samples, y(n)=0.9843cos⁡(2π⋅0.02(n−2))y(n)=0.9843\cos\bigl(2\pi\cdot0.02(n-2)\bigr).

Script.

matlab
%% MOVING-AVERAGE FILTER - DESIGN, APPLICATION, FREQUENCY RESPONSE
clear all; close all; clc;

%% 1. Signal
n   = 0:99;                          % time index
nu1 = 0.02;  nu2 = 0.4;              % normalized frequencies [cycles/sample]
x   = cos(2*pi*nu1*n) + 0.5*cos(2*pi*nu2*n);

%% 2. Design and application of the filter
% |H| vanishes at nu = k/M, so we need M*nu2 integer: nu2 = 2/5  ->  M = 5
M = 5;
b = ones(1, M)/M;                    % h(n) = 1/M, n = 0..M-1
y = filter(b, 1, x);                 % zero initial conditions (x(n) = 0, n < 0)

%% 3. Input and output
figure(1);
plot(n, x, 'o-', 'LineWidth', 1); hold on;
plot(n, y, 's-', 'LineWidth', 1.5); hold off; grid on;
xlabel('n'); ylabel('amplitude'); legend('x(n)', 'y(n)');
title('Moving average with M = 5');

%% 4. Frequency response with the FFT and zero padding
Nfft = 1024;
Hf   = fftshift(fft(b, Nfft));       % fft(b,Nfft) pads b with zeros up to Nfft
nu   = (-Nfft/2 : Nfft/2-1)/Nfft;    % axis in cycles/sample, from -1/2 to 1/2 - 1/Nfft
g    = @(v) abs(sin(pi*M*v) ./ (M*sin(pi*v)));   % theoretical modulus
Hth  = g(nu);  Hth(nu == 0) = 1;     % the formula is 0/0 in nu = 0, where H = 1

figure(2);
plot(nu, abs(Hf), 'LineWidth', 1.5); hold on;
plot(nu, Hth, '--', 'LineWidth', 1.5);
plot([nu1 nu2], g([nu1 nu2]), 'ro', 'MarkerFaceColor', 'r'); hold off; grid on;
xlabel('\nu [cycles/sample]'); ylabel('|H|');
legend('FFT', 'theory', '\nu_1 = 0.02 and \nu_2 = 0.4');

Comments on the choices. fft(b, Nfft) pads bb with zeros and returns H(ej2πν)H(e^{j2\pi\nu}) at ν=kNfft\nu=\frac k{N_{fft}} directly, without the factor 1N\frac1N of the DFT of the course, because HH is a DTFT (a sum, not an average): the check is that the value at ν=0\nu=0 is ∑nb(n)=1\sum_nb(n)=1. fftshift puts ν=0\nu=0 in the centre, and the axis (-Nfft/2:Nfft/2-1)/Nfft is the one that matches the shifted vector (without it the axis would run from 00 to 11 and the negative frequencies would appear at the end). With the Signal Processing Toolbox freqz(b,1,Nfft,'whole') gives the same values. In the figure the FFT and the theoretical curve coincide, the curve has zeros at ν=±0.2\nu=\pm0.2 and ±0.4\pm0.4 and the red circles sit at ∣H∣≈0.984\lvert H\rvert\approx0.984 for ν1\nu_1 and exactly 00 for ν2\nu_2.

Grafico interattivo: |H| del filtro a media mobile con M = 5 per ν tra −1/2 e 1/2: vale 1 in ν = 0, zeri in ±0.2 e ±0.4, lobi laterali piccoli (massimo 0.25 tra 0.2 e 0.4 e 0.2 in ν = 0.5); 0.984 in ν = 0.02 e 0 in ν = 0.4

Self-assessment grid
Exercise Points What must be there for full marks Typical errors
1 7 2: ∣H∣=11+f2\lvert H\rvert=\frac1{\sqrt{1+f^2}} and ∠H=−arctan⁡f\angle H=-\arctan f with f=5(ω1000−1000ω)f=5(\frac\omega{1000}-\frac{1000}\omega), values at 00, 10001000, ∞\infty, band-pass. 1: poles −100±j990000-100\pm j\sqrt{990000}, stable. 2: gains 00, 11, 2229\frac2{\sqrt{229}}, phase −π2+arctan⁡215-\frac\pi2+\arctan\frac2{15}, output with three terms handled separately. 2: f=±1f=\pm1, ωL,H=∓100+1010000\omega_{L,H}=\mp100+\sqrt{1010000}, width 200200, phases ±π4\pm\frac\pi4 wrong quadrant for arg⁡(−3+0.4j)\arg(-3+0.4j); the constant not removed; ∣H∣=12\lvert H\rvert=\frac12 instead of 12\frac1{\sqrt2} for the 33 dB points; stability judged from the zero of HH
2 7 1.5: poles 12,−14\frac12,-\frac14, zeros ±1\pm1, difference equation. 1: three ROCs with their meaning and the unit circle criterion. 1.5: constant 88, coefficients −2-2 and −5-5, h(0)=1h(0)=1, h(1)=14h(1)=\frac14, h(2)=−1316h(2)=-\frac{13}{16}, h(3)=−1164h(3)=-\frac{11}{64}. 1.5: zeros of H(ejθ)H(e^{j\theta}) at 00 and π\pi, H(ejπ/2)=169+2jH(e^{j\pi/2})=\frac{16}{9+2j}, output with the DC term removed. 1.5: h2h_2 with the anticausal term 2(12)nu(−n−1)2(\frac12)^nu(-n-1), not causal, not stable forgetting the constant term of the partial fractions; same inverse for every ROC; poles inside the unit circle used for the ROC without checking; H(ejπ/2)H(e^{j\pi/2}) with a sign mistake in e−jπe^{-j\pi}
3 7 1: X(θ)X(\theta), X(0)=2X(0)=2, X(π2)=1−3jX(\frac\pi2)=1-3j, X(π)=0X(\pi)=0. 1.5: X4=(12,1−3j4,0,1+3j4)X_4=(\frac12,\frac{1-3j}4,0,\frac{1+3j}4) and X4(k)=14X(2πk4)X_4(k)=\frac14X(\frac{2\pi k}4). 1.5: all the X8(k)X_8(k) with the odd values from X(π4)X(\frac\pi4), X(3π4)X(\frac{3\pi}4), and X8(2k)=12X4(k)X_8(2k)=\frac12X_4(k). 1: Parseval with N=4N=4 and N=8N=8. 2: resolution depends on NN not on MM, N=20N=20, DFT with four values 12\frac12 at k=4,5,15,16k=4,5,15,16 missing factor 1N\frac1N; sign of the exponent; X8(2k)=X4(k)X_8(2k)=X_4(k) without the factor 12\frac12; believing that zero padding improves the resolution
Theory 1 4 1: scalar product axioms, norm, orthogonality, L2([T])L^2([T]). 1.5: proof of ⟨ψm,ψn⟩=Tδmn\langle\psi_m,\psi_n\rangle=T\delta_{mn} with ω0T=2π\omega_0T=2\pi. 1: ana_n and E=T∑∣an∣2E=T\sum\lvert a_n\rvert^2. 0.5: discrete-time analogue missing conjugate; interval not a period; factor 1T\frac1T misplaced
Theory 2 4 1: sifting definition and why δ(0)=∞\delta(0)=\infty is not enough. 1: rectangles and mean value theorem. 1: scaling with 1∣α∣\frac1{\lvert\alpha\rvert} and sampling. 1: 52\frac52 and δ(t−12)\delta(t-\frac12) factor 1∣α∣\frac1{\lvert\alpha\rvert} forgotten (result 55); δ\delta treated as a function; no justification of the limit
Matlab 1 3 1: signal and filter with M=5M=5 justified by the zeros at kM\frac kM. 1: plot of xx and yy. 1: FFT with zero padding, fftshift and axis in ν\nu, theoretical curve, two marked frequencies frequency axis from 00 to 11 after fftshift; 1N\frac1N factor in the FFT of bb; MM chosen by trial; sin formula undefined in ν=0\nu=0