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

Signals and Systems - Mock Exam 1

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

In questa pagina 7

This is a mock exam (a simulation, not a real paper), built on the model of the exams of the equivalent course taught in Italian ("Segnali e Sistemi", Information Engineering, UniPD: papers of 22 January 2025, 10 February 2025 and 16 February 2026). Time: 3 hours. No documents allowed. Structure: 3 exercises of 7 points, 2 theory questions of 4 points and 1 Matlab question of 3 points (total 32). To pass, at least 10 points in the exercises and at least 5 between theory and Matlab are needed. For every question justify the answer and show the computations; when asked to sketch a signal, give its support and an approximate plot.

Conventions: rect⁡(u)=1\operatorname{rect}(u)=1 for ∣u∣<12\lvert u\rvert<\frac12 and 00 otherwise; u(t)u(t) is the unit step; ω\omega is the angular frequency in rad/s; for a continuous-time LTI system H(jω)=∫h(t)e−jωtdtH(j\omega)=\int h(t)e^{-j\omega t}dt; for a discrete-time one H(ejθ)=∑nh(n)e−jθnH(e^{j\theta})=\sum_nh(n)e^{-j\theta n}, with θ\theta in rad per sample.

Exercise 1 (points 7)

Exercise 1: Fourier series and filtering. The periodic signal x(t)x(t) has period T=6T=6 and, over one period, x(t)=3x(t)=3 for 0<t<20<t<2 and x(t)=−1x(t)=-1 for 2<t<62<t<6. It is the input of a continuous-time LTI system L\mathcal L with frequency response H(jω)=2rect⁡(ω7)H(j\omega)=2\operatorname{rect}\left(\frac{\omega}{7}\right). Let y=L[x]y=\mathcal L[x].

  1. Sketch x(t)x(t) for t∈[−6,12]t\in[-6,12]. Compute its mean value and its power PxP_x.
  2. Compute the fundamental angular frequency ω0\omega_0 and the exponential Fourier series coefficients aka_k of xx. For which kk is ak=0a_k=0? Sketch the line spectrum ∣ak∣\lvert a_k\rvert for ∣k∣≤7\lvert k\rvert\le7.
  3. Using the Parseval identity, compute the fraction of the power of xx carried by the harmonics with ∣k∣≤2\lvert k\rvert\le2 (DC term included).
  4. What kind of filter is L\mathcal L? Which harmonics of xx pass through it? Write the output y(t)y(t) in trigonometric form and compute its power. Is yy periodic? With which period?
  5. The filter is replaced by H2(jω)=2rect⁡(ω2)H_2(j\omega)=2\operatorname{rect}\left(\frac{\omega}{2}\right). What is the new output?
Show the result
  1. Mean value 13\frac13; Px=113P_x=\frac{11}3.
  2. ω0=π3\omega_0=\frac\pi3 rad/s; a0=13a_0=\frac13 and, for k≠0k\ne0, ak=4kπsin⁡(kπ3)e−jkπ/3=43sinc⁡(k3)e−jkπ/3a_k=\frac{4}{k\pi}\sin\left(\frac{k\pi}3\right)e^{-jk\pi/3}=\frac43\operatorname{sinc}\left(\frac k3\right)e^{-jk\pi/3}. ak=0a_k=0 for k=±3,±6,…k=\pm3,\pm6,\dots (k≠0k\ne0). ∣a1∣=23π≈1.103\lvert a_1\rvert=\frac{2\sqrt3}\pi\approx1.103, ∣a2∣=3π≈0.551\lvert a_2\rvert=\frac{\sqrt3}\pi\approx0.551, ∣a4∣≈0.276\lvert a_4\rvert\approx0.276, ∣a5∣≈0.221\lvert a_5\rvert\approx0.221, ∣a7∣≈0.158\lvert a_7\rvert\approx0.158.
  3. ∑∣k∣≤2∣ak∣2=19+30π2≈3.151\sum_{\lvert k\rvert\le2}\lvert a_k\rvert^2=\frac19+\frac{30}{\pi^2}\approx3.151, that is about 85.9%85.9\% of PxP_x.
  4. Ideal low-pass filter with cutoff ωc=72\omega_c=\frac72 and gain 22; the harmonics ∣k∣≤3\lvert k\rvert\le3 pass (with a±3=0a_{\pm3}=0). y(t)=23+83πcos⁡(π3(t−1))+43πcos⁡(2π3(t−1))y(t)=\frac23+\frac{8\sqrt3}\pi\cos\left(\frac\pi3(t-1)\right)+\frac{4\sqrt3}\pi\cos\left(\frac{2\pi}3(t-1)\right); Py=49+120π2≈12.60P_y=\frac49+\frac{120}{\pi^2}\approx12.60; yy is periodic with period 66.
  5. Only the DC term passes: y(t)=23y(t)=\frac23 for all tt.
Show the full solution

Point 1. Support: xx is nonzero everywhere (it is 33 or −1-1), so the support is all of R\mathbb R. The signal is a train of rectangular pulses of height 33 and width 22 centred at t=1+6mt=1+6m, on a baseline at level −1-1:

Grafico interattivo: x(t): periodic with T = 6, equal to 3 on (0,2), (6,8), (-6,-4) and to -1 elsewhere

Mean value over one period (Energy and Power of SignalsEnergy and average power of continuous- and discrete-time signals over finite and infinite horizons, finite-energy signals, mutual energy as a scalar product, and the Lebesgue spaces L2 and l2 of finite-energy signals.Energy and Power of Signals →): 1T∫0Tx(t)dt=16(3⋅2+(−1)⋅4)=26=13\frac1T\int_0^Tx(t)dt=\frac16\left(3\cdot2+(-1)\cdot4\right)=\frac26=\frac13. A periodic signal has infinite energy; its power is the mean of x2x^2 over one period: Px=16(32⋅2+(−1)2⋅4)=18+46=113.P_x=\frac16\left(3^2\cdot2+(-1)^2\cdot4\right)=\frac{18+4}6=\frac{11}3.

Point 2. The period is T=6T=6 (it is the distance between equal jumps, not the width 22 of the pulse), so ω0=2πT=π3\omega_0=\frac{2\pi}T=\frac\pi3 (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 →). Write x(t)=−1+4p(t)x(t)=-1+4p(t), with pp the periodic repetition of the indicator of (0,2)(0,2). The constant −1-1 only changes a0a_0 (the series of a constant is the constant itself). For pp and k≠0k\ne0: ak(p)=16∫02e−jkπ3tdt=16⋅1−e−jk2π3jkπ3=16⋅e−jkπ3 2jsin⁡(kπ3)jkπ3=sin⁡(kπ3)kπe−jkπ3,a_k^{(p)}=\frac16\int_0^2e^{-jk\frac\pi3t}dt=\frac16\cdot\frac{1-e^{-jk\frac{2\pi}3}}{jk\frac\pi3}=\frac16\cdot\frac{e^{-jk\frac\pi3}\,2j\sin\left(k\frac\pi3\right)}{jk\frac\pi3}=\frac{\sin\left(k\frac\pi3\right)}{k\pi}e^{-jk\frac\pi3}, where 1−e−jα=e−jα/2 2jsin⁡α21-e^{-j\alpha}=e^{-j\alpha/2}\,2j\sin\frac\alpha2 with α=2kπ3\alpha=\frac{2k\pi}3 was used. Multiplying by 44: ak=4kπsin⁡(kπ3)e−jkπ3=43sinc⁡(k3)e−jkπ3(k≠0).a_k=\frac{4}{k\pi}\sin\left(\frac{k\pi}3\right)e^{-jk\frac\pi3}=\frac43\operatorname{sinc}\left(\frac k3\right)e^{-jk\frac\pi3}\quad(k\ne0). For k=0k=0: the mean of pp is 26=13\frac26=\frac13, so a0=−1+4⋅13=13a_0=-1+4\cdot\frac13=\frac13, which agrees with Point 1. Note that a0≠43sinc⁡(0)a_0\ne\frac43\operatorname{sinc}(0): the formula of the sinc holds only for k≠0k\ne0, because the offset −1-1 changes the DC term.

Cross-check with the time-shift property (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 →): xx is even around t=1t=1, so x(t)=x~(t−1)x(t)=\tilde x(t-1) with x~\tilde x even; the coefficients of x~\tilde x are real, 43sinc⁡(k3)\frac43\operatorname{sinc}\left(\frac k3\right), and the delay of 11 second multiplies them by e−jkω0⋅1=e−jkπ3e^{-jk\omega_0\cdot1}=e^{-jk\frac\pi3} ✓.

Zeros: sin⁡(kπ3)=0\sin\left(\frac{k\pi}3\right)=0 for kk multiple of 33. The pulse width 22 is a third of the period, so the sinc has its zeros at the multiples of Twidth=3\frac{T}{\text{width}}=3. Since xx is real, a−k=ak‾a_{-k}=\overline{a_k} and ∣a−k∣=∣ak∣\lvert a_{-k}\rvert=\lvert a_k\rvert. Values:

kk 00 11 22 33 44 55 66 77
∣ak∣\lvert a_k\rvert 0.3330.333 1.1031.103 0.5510.551 00 0.2760.276 0.2210.221 00 0.1580.158
∠ak\angle a_k (degrees) 00 −60-60 −120-120 - −60-60 −120-120 - −60-60

(phases for +k+k; those of −k-k have the opposite sign. When sin⁡(kπ3)<0\sin\left(\frac{k\pi}3\right)<0, as for k=4,5k=4,5, the factor −1-1 adds 180∘180^\circ to −k⋅60∘-k\cdot60^\circ: −240∘+180∘=−60∘-240^\circ+180^\circ=-60^\circ and −300∘+180∘=−120∘-300^\circ+180^\circ=-120^\circ.) The line spectrum has lines at ω=kπ3\omega=k\frac\pi3 with heights ∣ak∣\lvert a_k\rvert, a main lobe up to k=3k=3 (first zero), smaller lobes between multiples of 33 and an envelope 43∣sinc⁡k3∣\frac43\left\lvert\operatorname{sinc}\frac k3\right\rvert decaying like 1k\frac1k, except the line at k=0k=0 which is 13\frac13 and not 43\frac43.

Point 3. Parseval (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 →): Px=∑k∈Z∣ak∣2P_x=\sum_{k\in\mathbb Z}\lvert a_k\rvert^2. The harmonics ±k\pm k carry 2∣ak∣22\lvert a_k\rvert^2 together. With ∣a1∣2=12π2\lvert a_1\rvert^2=\frac{12}{\pi^2} and ∣a2∣2=3π2\lvert a_2\rvert^2=\frac{3}{\pi^2}: ∑∣k∣≤2∣ak∣2=19+2⋅12π2+2⋅3π2=19+30π2≈0.1111+3.0396=3.1507.\sum_{\lvert k\rvert\le2}\lvert a_k\rvert^2=\frac19+2\cdot\frac{12}{\pi^2}+2\cdot\frac3{\pi^2}=\frac19+\frac{30}{\pi^2}\approx0.1111+3.0396=3.1507. Fraction: 3.150711/3=311(19+30π2)=133+9011π2≈0.859\frac{3.1507}{11/3}=\frac3{11}\left(\frac19+\frac{30}{\pi^2}\right)=\frac1{33}+\frac{90}{11\pi^2}\approx0.859. The DC term alone is 19≈0.111\frac19\approx0.111, only 3%3\% of the power: most of the power is in the two first harmonics. (A numerical sum of ∑∣ak∣2\sum\lvert a_k\rvert^2 over many harmonics gives 113\frac{11}3 as it must.)

Typical error: forgetting the factor 22 for the pair ±k\pm k, or the DC term.

Point 4. H(jω)=2H(j\omega)=2 for ∣ω∣<72\lvert\omega\rvert<\frac72 and 00 otherwise: ideal low-pass filter with cutoff ωc=72\omega_c=\frac72 and gain 22 (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 →). The harmonic kk has angular frequency kω0=kπ3k\omega_0=k\frac\pi3: k=1→1.047k=1\to1.047, k=2→2.094k=2\to2.094, k=3→3.142<3.5k=3\to3.142<3.5 (passes, but a3=0a_3=0), k=4→4.189>3.5k=4\to4.189>3.5 (blocked). The output coefficients are bk=H(jkω0)ak=2akb_k=H(jk\omega_0)a_k=2a_k for ∣k∣≤3\lvert k\rvert\le3 and 00 otherwise (Fourier Series Applied to LTI SystemsA BIBO-stable convolutional LTI system maps a T-periodic finite-energy input to a T-periodic finite-energy output whose Fourier coefficients are the input coefficients multiplied by the frequency response sampled at n omega_0, which is why such systems act as filters.Fourier Series Applied to LTI Systems →). Since b−k=bk‾b_{-k}=\overline{b_k}: y(t)=b0+2Re⁡[b1ejπ3t]+2Re⁡[b2ej2π3t]=23+4∣a1∣cos⁡(π3t−π3)+4∣a2∣cos⁡(2π3t−2π3),y(t)=b_0+2\operatorname{Re}\left[b_1e^{j\frac\pi3t}\right]+2\operatorname{Re}\left[b_2e^{j\frac{2\pi}3t}\right]=\frac23+4\lvert a_1\rvert\cos\left(\frac\pi3t-\frac\pi3\right)+4\lvert a_2\rvert\cos\left(\frac{2\pi}3t-\frac{2\pi}3\right), and with ∣a1∣=23π\lvert a_1\rvert=\frac{2\sqrt3}\pi, ∣a2∣=3π\lvert a_2\rvert=\frac{\sqrt3}\pi: y(t)=23+83πcos⁡(π3(t−1))+43πcos⁡(2π3(t−1))≈0.667+4.411cos⁡(π3(t−1))+2.205cos⁡(2π3(t−1)).y(t)=\frac23+\frac{8\sqrt3}\pi\cos\left(\frac\pi3(t-1)\right)+\frac{4\sqrt3}\pi\cos\left(\frac{2\pi}3(t-1)\right)\approx0.667+4.411\cos\left(\frac\pi3(t-1)\right)+2.205\cos\left(\frac{2\pi}3(t-1)\right). Both cosines are delayed by 11: the filter has zero phase and xx is symmetric around t=1t=1. The power is Py=∑∣bk∣2=4(19+30π2)=49+120π2≈12.603P_y=\sum\lvert b_k\rvert^2=4\left(\frac19+\frac{30}{\pi^2}\right)=\frac49+\frac{120}{\pi^2}\approx12.603; check with the sinusoids: (23)2+4.41122+2.20522=0.444+9.727+2.432=12.603\left(\frac23\right)^2+\frac{4.411^2}2+\frac{2.205^2}2=0.444+9.727+2.432=12.603 ✓. The output is periodic with period 66 (the fundamental harmonic is present), smooth (no jumps: the jumps of xx at t=0,2t=0,2 are rounded off by the removal of high harmonics), with maximum y(1)=23+123π≈7.28y(1)=\frac23+\frac{12\sqrt3}\pi\approx7.28.

Point 5. H2(jω)=2H_2(j\omega)=2 for ∣ω∣<1\lvert\omega\rvert<1. The first harmonic is at ω0=π3≈1.047>1\omega_0=\frac\pi3\approx1.047>1, so it is blocked (an ideal filter is sharp: being close to the cutoff does not help). Only the DC term passes: y(t)=2a0=23y(t)=2a_0=\frac23 for every tt.

Typical errors in this exercise: using the width 22 of the pulse instead of the period 66 (ω0\omega_0 would be π\pi); forgetting the 1T\frac1T in aka_k; applying the sinc formula at k=0k=0 and ignoring the offset; forgetting the phase e−jkπ/3e^{-jk\pi/3} (the pulse is not centred at t=0t=0); writing yy with the amplitudes ∣ak∣\lvert a_k\rvert instead of 2∣ak∣2\lvert a_k\rvert for the real cosines and the gain 22 of the filter. More examples in Fourier Series ExercisesWorked Fourier-series exercises for a shifted rectangular wave, the pulse train, a power bound for a derivative, a generic square wave, the sawtooth and a triangular wave, ending with the sum of 1/n^2 equal to pi^2/6.Fourier Series Exercises → and Fourier Series of the Square Wave and the Gibbs PhenomenonThe even square wave of duty cycle d has Fourier coefficients a_0 = d and a_n = d sinc(d n), decaying like 1/n, and its truncated series overshoots by about 9 percent near each jump (Gibbs phenomenon).Fourier Series of the Square Wave and the Gibbs Phenomenon →.

Exercise 2 (points 7)

Exercise 2: Discrete-time systems. A causal LTI discrete-time system S\mathcal S (initially at rest) is described by the difference equation y(n)−14y(n−1)−18y(n−2)=x(n)+x(n−1).y(n)-\frac14y(n-1)-\frac18y(n-2)=x(n)+x(n-1).

  1. Find the modes of the system and discuss BIBO stability.
  2. Using the recursion, compute h(0),h(1),h(2),h(3)h(0),h(1),h(2),h(3), then find h(n)h(n) for every nn. Compute ∑n∣h(n)∣\sum_n\lvert h(n)\rvert.
  3. Compute the frequency response H(ejθ)H(e^{j\theta}) and its values at θ=0,π2,π\theta=0,\frac\pi2,\pi. Sketch ∣H(ejθ)∣\lvert H(e^{j\theta})\rvert for θ∈[0,π]\theta\in[0,\pi] and say what kind of filter this is.
  4. Compute the output y(n)y(n), for all nn, to the input x(n)=3+2cos⁡(π2n)+5cos⁡(πn)x(n)=3+2\cos\left(\frac\pi2n\right)+5\cos(\pi n).
  5. Compute the step response s(n)s(n) in closed form. What is its limit for n→+∞n\to+\infty and how is it related to HH?
Show the result
  1. Characteristic polynomial λ2−14λ−18=0\lambda^2-\frac14\lambda-\frac18=0, roots 12\frac12 and −14-\frac14 (modes (12)n\left(\frac12\right)^n and (−14)n\left(-\frac14\right)^n); both inside the unit circle, so the system is BIBO stable.
  2. h(0)=1h(0)=1, h(1)=54h(1)=\frac54, h(2)=716h(2)=\frac7{16}, h(3)=1764h(3)=\frac{17}{64}; h(n)=[2(12)n−(−14)n]u(n)h(n)=\left[2\left(\frac12\right)^n-\left(-\frac14\right)^n\right]u(n); ∑∣h∣=165\sum\lvert h\rvert=\frac{16}5.
  3. H(ejθ)=1+e−jθ(1−12e−jθ)(1+14e−jθ)H(e^{j\theta})=\dfrac{1+e^{-j\theta}}{\left(1-\frac12e^{-j\theta}\right)\left(1+\frac14e^{-j\theta}\right)}; H(ej0)=165H(e^{j0})=\frac{16}5, H(ejπ/2)=56−88j85H\left(e^{j\pi/2}\right)=\frac{56-88j}{85} with modulus 8285≈1.227\frac{8\sqrt2}{\sqrt{85}}\approx1.227 and phase ≈−1.004\approx-1.004 rad, H(ejπ)=0H(e^{j\pi})=0. Low-pass shape, decreasing from 3.23.2 to 00.
  4. y(n)=485+16285cos⁡(π2n−1.004)≈9.6+2.454cos⁡(π2n−1.004)y(n)=\frac{48}5+\frac{16\sqrt2}{\sqrt{85}}\cos\left(\frac\pi2n-1.004\right)\approx9.6+2.454\cos\left(\frac\pi2n-1.004\right) (the component at θ=π\theta=\pi is cancelled).
  5. s(n)=[165−2(12)n−15(−14)n]u(n)s(n)=\left[\frac{16}5-2\left(\frac12\right)^n-\frac15\left(-\frac14\right)^n\right]u(n), with s(0)=1s(0)=1, s(1)=94s(1)=\frac94, s(2)=4316s(2)=\frac{43}{16}; s(n)→165=H(ej0)s(n)\to\frac{16}5=H(e^{j0}).
Show the full solution

Point 1. The characteristic polynomial of the homogeneous part y(n)−14y(n−1)−18y(n−2)=0y(n)-\frac14y(n-1)-\frac18y(n-2)=0 comes from the ansatz y(n)=λny(n)=\lambda^n (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 →): λ2−14λ−18=0 ⇒ λ=14±116+122=14±342∈{12,−14}.\lambda^2-\frac14\lambda-\frac18=0\ \Rightarrow\ \lambda=\frac{\frac14\pm\sqrt{\frac1{16}+\frac12}}2=\frac{\frac14\pm\frac34}2\in\left\{\frac12,-\frac14\right\}. The modes are (12)n\left(\frac12\right)^n and (−14)n\left(-\frac14\right)^n. A causal LTI system described by an ARMA equation is BIBO stable if and only if all the poles (after cancellations with zeros) are inside the unit circle (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 →). Here ∣12∣<1\left\lvert\frac12\right\rvert<1 and ∣−14∣<1\left\lvert-\frac14\right\rvert<1, and the zero of the numerator (z=−1z=-1, from 1+z−11+z^{-1}) cancels none of them: stable. The two modes decay, one of them alternating in sign.

Point 2. Recursion with x=δx=\delta, h(n)=0h(n)=0 for n<0n<0 (Recursive Construction MethodIn discrete time the causal impulse response h_+ of an ARMA model is built recursively from the Kronecker impulse for k from 0 to M, and then written as modes plus a few impulses by solving an N by N linear system.Recursive Construction Method →): h(n)=14h(n−1)+18h(n−2)+δ(n)+δ(n−1)h(n)=\frac14h(n-1)+\frac18h(n-2)+\delta(n)+\delta(n-1).

  • h(0)=0+0+1+0=1h(0)=0+0+1+0=1.
  • h(1)=14⋅1+0+0+1=54h(1)=\frac14\cdot1+0+0+1=\frac54.
  • h(2)=14⋅54+18⋅1=516+216=716h(2)=\frac14\cdot\frac54+\frac18\cdot1=\frac5{16}+\frac2{16}=\frac7{16}.
  • h(3)=14⋅716+18⋅54=764+1064=1764h(3)=\frac14\cdot\frac7{16}+\frac18\cdot\frac54=\frac7{64}+\frac{10}{64}=\frac{17}{64}.

For n≥2n\ge2 the right-hand side has no input terms, so the recursion is homogeneous and, starting from n≥2n\ge2, h(n)=A(12)n+B(−14)nh(n)=A\left(\frac12\right)^n+B\left(-\frac14\right)^n with A,BA,B fixed by the two values h(0),h(1)h(0),h(1) (the formula therefore holds from n=0n=0): {A+B=1A2−B4=54 ⇒ {A+B=12A−B=5 ⇒ A=2, B=−1.\begin{cases}A+B=1\\ \frac A2-\frac B4=\frac54\end{cases}\ \Rightarrow\ \begin{cases}A+B=1\\2A-B=5\end{cases}\ \Rightarrow\ A=2,\ B=-1. So h(n)=[2(12)n−(−14)n]u(n)h(n)=\left[2\left(\frac12\right)^n-\left(-\frac14\right)^n\right]u(n). Check: h(2)=24−116=716h(2)=\frac24-\frac1{16}=\frac7{16} ✓ and h(3)=28+164=1764h(3)=\frac28+\frac1{64}=\frac{17}{64} ✓. For n≥0n\ge0, 2(12)n≥(14)n2\left(\frac12\right)^n\ge\left(\frac14\right)^n, so h(n)>0h(n)>0 and ∑n∣h(n)∣=∑n≥0h(n)=2⋅11−12−11+14=4−45=165<∞,\sum_n\lvert h(n)\rvert=\sum_{n\ge0}h(n)=2\cdot\frac1{1-\frac12}-\frac1{1+\frac14}=4-\frac45=\frac{16}5<\infty, which confirms stability (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 →).

Point 3. The system is stable, so H(ejθ)H(e^{j\theta}) exists. Taking the DTFT of both sides, with w=e−jθw=e^{-j\theta} (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 →, 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 →): H(ejθ)=1+w1−14w−18w2=1+w(1−12w)(1+14w).H(e^{j\theta})=\frac{1+w}{1-\frac14w-\frac18w^2}=\frac{1+w}{\left(1-\frac12w\right)\left(1+\frac14w\right)}. Cross-check from hh: 21−12w−11+14w=2(1+14w)−(1−12w)(1−12w)(1+14w)=1+w…\frac2{1-\frac12w}-\frac1{1+\frac14w}=\frac{2\left(1+\frac14w\right)-\left(1-\frac12w\right)}{\left(1-\frac12w\right)\left(1+\frac14w\right)}=\frac{1+w}{\dots} ✓.

  • θ=0\theta=0 (w=1w=1): H=212⋅54=25/8=165H=\frac2{\frac12\cdot\frac54}=\frac2{5/8}=\frac{16}5, which is ∑h\sum h ✓.
  • θ=π2\theta=\frac\pi2 (w=−jw=-j): numerator 1−j1-j; denominator (1+j2)(1−j4)=98+j4\left(1+\frac j2\right)\left(1-\frac j4\right)=\frac98+\frac j4. Then H=(1−j)(98−j4)8164+116=78−118j8564=56−88j85≈0.659−1.035jH=\frac{(1-j)\left(\frac98-\frac j4\right)}{\frac{81}{64}+\frac1{16}}=\frac{\frac78-\frac{11}8j}{\frac{85}{64}}=\frac{56-88j}{85}\approx0.659-1.035j. Modulus 252⋅174=8285≈1.227\frac{\sqrt2}{\frac{\sqrt5}2\cdot\frac{\sqrt{17}}4}=\frac{8\sqrt2}{\sqrt{85}}\approx1.227; phase −π4−arctan⁡12+arctan⁡14≈−1.004-\frac\pi4-\arctan\frac12+\arctan\frac14\approx-1.004 rad (−57.5∘-57.5^\circ).
  • θ=π\theta=\pi (w=−1w=-1): the numerator 1+w1+w vanishes, so H(ejπ)=0H(e^{j\pi})=0: the zero z=−1z=-1 lies on the unit circle.

The modulus is ∣H∣=2∣cos⁡θ2∣(54−cos⁡θ)(1716+12cos⁡θ)\lvert H\rvert=\dfrac{2\lvert\cos\frac\theta2\rvert}{\sqrt{\left(\frac54-\cos\theta\right)\left(\frac{17}{16}+\frac12\cos\theta\right)}}, even in θ\theta and 2π2\pi-periodic; on [0,π][0,\pi] it decreases monotonically: 3.23.2 at 00, 2.112.11 at π4\frac\pi4, 1.231.23 at π2\frac\pi2, 0.650.65 at 3π4\frac{3\pi}4, and 00 at π\pi.

Grafico interattivo: |H| of y(n) - y(n-1)/4 - y(n-2)/8 = x(n) + x(n-1): 3.2 at theta = 0, about 1.23 at pi/2, zero at pi

It is a low-pass IIR filter (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 →): high gain at low frequencies and a null at the highest one.

Point 4. The input is a sum of three complex-exponential pairs at θ=0,π2,π\theta=0,\frac\pi2,\pi, defined for all nn, so there is no transient and the output is simply the sum of the responses (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 →). The system is real, so hh is real, and for Acos⁡(θ0n+φ)A\cos(\theta_0n+\varphi) the output is A∣H(ejθ0)∣cos⁡(θ0n+φ+∠H(ejθ0))A\lvert H(e^{j\theta_0})\rvert\cos(\theta_0n+\varphi+\angle H(e^{j\theta_0})): y(n)=3H(ej0)+2∣H(ejπ/2)∣cos⁡(π2n+∠H(ejπ/2))+5H(ejπ)cos⁡(πn)=485+16285cos⁡(π2n−1.004)+0.y(n)=3H(e^{j0})+2\left\lvert H\left(e^{j\pi/2}\right)\right\rvert\cos\left(\frac\pi2n+\angle H\left(e^{j\pi/2}\right)\right)+5H\left(e^{j\pi}\right)\cos(\pi n)=\frac{48}5+\frac{16\sqrt2}{\sqrt{85}}\cos\left(\frac\pi2n-1.004\right)+0. So y(n)≈9.6+2.454cos⁡(π2n−1.004)y(n)\approx9.6+2.454\cos\left(\frac\pi2n-1.004\right). The alternating component 5cos⁡(πn)=5(−1)n5\cos(\pi n)=5(-1)^n is completely removed by the zero at θ=π\theta=\pi. Typical errors: forgetting that cos⁡(πn)\cos(\pi n) is at θ=π\theta=\pi and not 2π2\pi; using H(0)H(0) with the wrong value (165\frac{16}5, not 11); forgetting the phase of HH.

Point 5. s(n)=∑m=0nh(m)s(n)=\sum_{m=0}^nh(m) (the step is the running sum of the impulse response). With ∑m=0nqm=1−qn+11−q\sum_{m=0}^nq^m=\frac{1-q^{n+1}}{1-q}: s(n)=2⋅1−(12)n+112−1−(−14)n+154=4−2(12)n−45+45(−14)n+1=165−2(12)n−15(−14)n,n≥0.s(n)=2\cdot\frac{1-\left(\frac12\right)^{n+1}}{\frac12}-\frac{1-\left(-\frac14\right)^{n+1}}{\frac54}=4-2\left(\tfrac12\right)^n-\frac45+\frac45\left(-\tfrac14\right)^{n+1}=\frac{16}5-2\left(\tfrac12\right)^n-\frac15\left(-\tfrac14\right)^n,\quad n\ge0. Checks: s(0)=165−2−15=1=h(0)s(0)=\frac{16}5-2-\frac15=1=h(0); s(1)=165−1+120=94=h(0)+h(1)s(1)=\frac{16}5-1+\frac1{20}=\frac94=h(0)+h(1) ✓; directly from the equation with x=ux=u, y(1)=14⋅1+x(1)+x(0)=94y(1)=\frac14\cdot1+x(1)+x(0)=\frac94 ✓. The limit is 165=H(ej0)=∑h\frac{16}5=H(e^{j0})=\sum h: a constant input has frequency θ=0\theta=0 and the stable system multiplies it by the DC gain. The transient is made by the two decaying modes.

Exercise 3 (points 7)

Exercise 3: Differential equation and Laplace transform. A causal LTI continuous-time system is described by y′′(t)+2y′(t)+5y(t)=x′(t)+5x(t).y''(t)+2y'(t)+5y(t)=x'(t)+5x(t). Initial conditions, when present, are given at t=0−t=0^-.

  1. Compute the transfer function H(s)H(s), its poles and zeros, and discuss stability. Does the frequency response H(jω)H(j\omega) exist?
  2. Compute the impulse response h(t)h(t).
  3. Let x(t)=u(t)x(t)=u(t) and y(0−)=2y(0^-)=2, y′(0−)=0y'(0^-)=0. Compute the natural (free) response, the forced response and the total response for t≥0t\ge0. Check the result against the equation (initial values and final value).
  4. With zero initial conditions, compute the response at steady state to x(t)=cos⁡(2t)x(t)=\cos(2t).
Show the result
  1. H(s)=s+5s2+2s+5H(s)=\dfrac{s+5}{s^2+2s+5}; poles −1±2j-1\pm2j, zero −5-5; both poles in the open left half-plane, so the system is BIBO stable and H(jω)=H(s)∣s=jωH(j\omega)=H(s)\big|_{s=j\omega} exists.
  2. h(t)=e−t[cos⁡(2t)+2sin⁡(2t)]u(t)h(t)=e^{-t}\left[\cos(2t)+2\sin(2t)\right]u(t) (with h(0+)=1h(0^+)=1, no impulse).
  3. Natural: yn(t)=e−t[2cos⁡(2t)+sin⁡(2t)]y_n(t)=e^{-t}\left[2\cos(2t)+\sin(2t)\right]; forced: yf(t)=1−e−tcos⁡(2t)y_f(t)=1-e^{-t}\cos(2t); total: y(t)=1+e−t[cos⁡(2t)+sin⁡(2t)]y(t)=1+e^{-t}\left[\cos(2t)+\sin(2t)\right], t≥0t\ge0 (with y(0+)=2y(0^+)=2, y′(0+)=1y'(0^+)=1, y(∞)=1=H(0)y(\infty)=1=H(0)).
  4. H(2j)=13−18j17H(2j)=\frac{13-18j}{17}, modulus 2917≈1.306\sqrt{\frac{29}{17}}\approx1.306, phase arctan⁡25−arctan⁡4≈−0.945\arctan\frac25-\arctan4\approx-0.945 rad; yss(t)≈1.306cos⁡(2t−0.945)y_{ss}(t)\approx1.306\cos(2t-0.945).
Show the full solution

Point 1. With the unilateral transform and xx null before 00, L[y′]=sY−y(0−)\mathcal L[y']=sY-y(0^-), L[y′′]=s2Y−sy(0−)−y′(0−)\mathcal L[y'']=s^2Y-sy(0^-)-y'(0^-), L[x′]=sX\mathcal L[x']=sX (Laplace TransformWhy more transforms are needed beyond the Fourier transform (non-stable poles and initial conditions), and the definition of the bilateral and unilateral Laplace transform with the reason for the lower limit 0-; the Laplace transform is the continuous-time tool for differential equations and the Z-transform is its discrete-time counterpart.Laplace Transform →, Linear Constant-Coefficient Differential EquationsContinuous-time LTI convolutional systems are described by linear constant-coefficient ODEs whose general solution is a homogeneous part, a combination of modes t^m e^{pt} built from the roots of the characteristic polynomial, plus a particular part; boundary conditions pick one solution of the family.Linear Constant-Coefficient Differential Equations →). With zero initial conditions (s2+2s+5)Y(s)=(s+5)X(s) ⇒ H(s)=Y(s)X(s)=s+5s2+2s+5,(s^2+2s+5)Y(s)=(s+5)X(s)\ \Rightarrow\ H(s)=\frac{Y(s)}{X(s)}=\frac{s+5}{s^2+2s+5}, that is, the coefficients of the equation are the coefficients of the polynomials (denominator from y′′,y′,yy'',y',y; numerator from x′,xx',x). Poles: s2+2s+5=0⇒s=−1±1−5=−1±2js^2+2s+5=0\Rightarrow s=-1\pm\sqrt{1-5}=-1\pm2j. Zero: s=−5s=-5 (no cancellation: −5-5 is not a pole). Both poles have real part −1<0-1<0: the system is asymptotically (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 →) and the region of convergence Re⁡s>−1\operatorname{Re}s>-1 contains the imaginary axis, so H(jω)=jω+55−ω2+2jωH(j\omega)=\frac{j\omega+5}{5-\omega^2+2j\omega} is defined. The poles are complex conjugates: the modes are damped oscillations e−tcos⁡2te^{-t}\cos2t, e−tsin⁡2te^{-t}\sin2t (decay with time constant 11 s, angular frequency 22 rad/s, period π\pi s).

Point 2. Complete the square, s2+2s+5=(s+1)2+4s^2+2s+5=(s+1)^2+4, and split the numerator, s+5=(s+1)+4s+5=(s+1)+4: H(s)=s+1(s+1)2+4+2⋅2(s+1)2+4 ⇒ h(t)=e−t[cos⁡2t+2sin⁡2t]u(t).H(s)=\frac{s+1}{(s+1)^2+4}+2\cdot\frac2{(s+1)^2+4}\ \Rightarrow\ h(t)=e^{-t}\left[\cos2t+2\sin2t\right]u(t). Check: HH is strictly proper (degree 1<21<2), so hh has no impulse, and by the initial value theorem h(0+)=lim⁡s→∞sH(s)=1h(0^+)=\lim_{s\to\infty}sH(s)=1; indeed h(0+)=cos⁡0+2sin⁡0=1h(0^+)=\cos0+2\sin0=1 ✓. (The same hh can be found with the Impulse Matching MethodThe impulse matching method finds the causal impulse response h_+(t) of a continuous-time ODE system by writing h_+ as modes times a step plus impulses, then matching the impulse terms of the equation at t = 0 through a linear system for the coefficients q.Impulse Matching Method →.)

Point 3. Transform the whole equation, with x=ux=u so X=1sX=\frac1s and x(0−)=0x(0^-)=0: (s2+2s+5)Y−[(s+2)y(0−)+y′(0−)]=(s+5)X ⇒ Y=(s+2)y(0−)+y′(0−)s2+2s+5⏟natural+H(s)X(s)⏟forced(s^2+2s+5)Y-\left[(s+2)y(0^-)+y'(0^-)\right]=(s+5)X\ \Rightarrow\ Y=\underbrace{\frac{(s+2)y(0^-)+y'(0^-)}{s^2+2s+5}}_{\text{natural}}+\underbrace{H(s)X(s)}_{\text{forced}} (Natural and Forced Response of Causal LTI SystemsThe solution of a causal ODE with boundary conditions at t_0 splits uniquely into a natural response, a homogeneous solution fixed by the boundary conditions through the Wronskian matrix, and a forced response, the convolution of a causal impulse response with a switch-on input, which is zero before t_0.Natural and Forced Response of Causal LTI Systems →).

Natural response (y(0−)=2y(0^-)=2, y′(0−)=0y'(0^-)=0): Yn=2(s+2)(s+1)2+4=2(s+1)(s+1)2+4+2(s+1)2+4Y_n=\frac{2(s+2)}{(s+1)^2+4}=\frac{2(s+1)}{(s+1)^2+4}+\frac2{(s+1)^2+4}, hence yn(t)=e−t[2cos⁡2t+sin⁡2t]y_n(t)=e^{-t}\left[2\cos2t+\sin2t\right].

Forced response (x=ux=u): Yf=s+5s[(s+1)2+4]=As+Bs+C(s+1)2+4Y_f=\frac{s+5}{s\left[(s+1)^2+4\right]}=\frac As+\frac{Bs+C}{(s+1)^2+4}. Equating s+5=A(s2+2s+5)+s(Bs+C)s+5=A(s^2+2s+5)+s(Bs+C): s=0s=0 gives A=1A=1; the s2s^2 terms give A+B=0⇒B=−1A+B=0\Rightarrow B=-1; the ss terms give 2A+C=1⇒C=−12A+C=1\Rightarrow C=-1. So Yf=1s−s+1(s+1)2+4Y_f=\frac1s-\frac{s+1}{(s+1)^2+4} and yf(t)=1−e−tcos⁡2ty_f(t)=1-e^{-t}\cos2t.

Total: y=yn+yf=1+e−t[cos⁡2t+sin⁡2t]y=y_n+y_f=1+e^{-t}\left[\cos2t+\sin2t\right] for t≥0t\ge0.

Grafico interattivo: Forced response (dashed) and total response with y(0-) = 2 and y'(0-) = 0, for t >= 0: both tend to 1 = H(0) as the oscillations decay like e^(-t)

Checks. (i) Initial values. y(0+)=1+1=2=y(0−)y(0^+)=1+1=2=y(0^-): yy is continuous because the right-hand side x′+5x=δ(t)+5u(t)x'+5x=\delta(t)+5u(t) has an impulse, which can only be balanced by a jump of y′y'. Indeed y′(t)=e−t[−cos⁡2t−sin⁡2t−2sin⁡2t+2cos⁡2t]y'(t)=e^{-t}\left[-\cos2t-\sin2t-2\sin2t+2\cos2t\right] gives y′(0+)=1=y′(0−)+1y'(0^+)=1=y'(0^-)+1 ✓ (a jump of 11, the coefficient of the impulse). (ii) The equation for t>0t>0: x′=0x'=0, x=1x=1, so the right-hand side is 55; substituting yy gives 55 ✓. (iii) Final value: y(∞)=1=H(0)=55y(\infty)=1=H(0)=\frac55 ✓. The natural response alone vanishes for t→∞t\to\infty (stable system), and the whole transient is made by modes with rate e−te^{-t}.

Typical errors: forgetting the term y(0−)y(0^-) in L[y′]\mathcal L[y'] and the 2y(0−)2y(0^-) it brings into the natural part; writing the forced response with the initial conditions inside it; losing the factor 22 when inverting 4(s+1)2+4\frac{4}{(s+1)^2+4} (it is 2e−tsin⁡2t2e^{-t}\sin2t, because the transform of e−tsin⁡2te^{-t}\sin2t is 2(s+1)2+4\frac{2}{(s+1)^2+4}).

Point 4. The system is stable, so for cos⁡(2t)\cos(2t) the output at steady state is ∣H(2j)∣cos⁡(2t+∠H(2j))\lvert H(2j)\rvert\cos(2t+\angle H(2j)) (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 →): H(2j)=5+2j(2j)2+2⋅2j+5=5+2j1+4j=(5+2j)(1−4j)17=13−18j17,∣H(2j)∣=2917≈1.306,H(2j)=\frac{5+2j}{(2j)^2+2\cdot2j+5}=\frac{5+2j}{1+4j}=\frac{(5+2j)(1-4j)}{17}=\frac{13-18j}{17},\qquad\lvert H(2j)\rvert=\sqrt{\frac{29}{17}}\approx1.306, ∠H(2j)=arctan⁡25−arctan⁡4≈0.380−1.326=−0.945 rad.\angle H(2j)=\arctan\frac25-\arctan4\approx0.380-1.326=-0.945\text{ rad}. So yss(t)≈1.306cos⁡(2t−0.945)y_{ss}(t)\approx1.306\cos(2t-0.945); the transient dies out like e−te^{-t}. The input frequency 22 is exactly the oscillation frequency of the modes, but the system is not resonant because the poles are well inside the left half-plane. Typical error: using H(2)H(2) instead of H(j2)H(j2).

Theory 1 (points 4)

Theory 1: Properties of systems. (a) Define linearity, time invariance, causality and BIBO stability for a continuous-time system y=S[x]y=\mathcal S[x]. (b) For the system y(t)=cos⁡(2t) x(t)y(t)=\cos(2t)\,x(t) establish, with a proof or a counterexample, whether each of the four properties holds. (c) Is the system LTI? Does it have an impulse response?

Show the result

Definitions: linear if S[ax1+bx2]=aS[x1]+bS[x2]\mathcal S[ax_1+bx_2]=a\mathcal S[x_1]+b\mathcal S[x_2]; time-invariant if shifting the input by τ\tau shifts the output by τ\tau; causal if y(t0)y(t_0) depends only on x(t)x(t) with t≤t0t\le t_0; BIBO stable if every bounded input gives a bounded output. For y(t)=cos⁡(2t)x(t)y(t)=\cos(2t)x(t): linear yes; time-invariant NO (counterexample: constant input and shift τ=π4\tau=\frac\pi4); causal yes (it is memoryless); BIBO stable yes (∣y∣≤∣x∣\lvert y\rvert\le\lvert x\rvert). The system is not LTI, so it has no impulse response and no frequency response (it is a modulator).

Show the full solution

(a) Definitions (Properties of Systemsdefinitions of static, dynamic, time-invariant, causal, anticausal, acausal, omnicausal, linear and BIBO-stable systems, with examples, counterexamples and a long set of worked classification exercises.Properties of Systems →).

  • Linear: for all signals x1,x2x_1,x_2 and constants a,ba,b, S[ax1+bx2]=aS[x1]+bS[x2]\mathcal S[ax_1+bx_2]=a\mathcal S[x_1]+b\mathcal S[x_2] (superposition: additivity and homogeneity).
  • Time-invariant: if y=S[x]y=\mathcal S[x] then for every τ\tau, S[x(⋅−τ)]=y(⋅−τ)\mathcal S[x(\cdot-\tau)]=y(\cdot-\tau) (the system does not change with time).
  • Causal: if two inputs coincide up to the instant t0t_0 (x1(t)=x2(t)x_1(t)=x_2(t) for t≤t0t\le t_0) then the outputs coincide up to t0t_0: the output at t0t_0 does not depend on the future.
  • BIBO stable: if there is M<∞M<\infty with ∣x(t)∣≤M\lvert x(t)\rvert\le M for all tt, then there is M′<∞M'<\infty with ∣y(t)∣≤M′\lvert y(t)\rvert\le M' for all tt.

(b) The system y(t)=cos⁡(2t)x(t)y(t)=\cos(2t)x(t).

  • Linear: S[ax1+bx2](t)=cos⁡(2t)[ax1(t)+bx2(t)]=acos⁡(2t)x1(t)+bcos⁡(2t)x2(t)=aS[x1](t)+bS[x2](t)\mathcal S[ax_1+bx_2](t)=\cos(2t)\left[ax_1(t)+bx_2(t)\right]=a\cos(2t)x_1(t)+b\cos(2t)x_2(t)=a\mathcal S[x_1](t)+b\mathcal S[x_2](t) ✓.
  • Time-invariant: no. Let xτ(t)=x(t−τ)x_\tau(t)=x(t-\tau). Then S[xτ](t)=cos⁡(2t)x(t−τ)\mathcal S[x_\tau](t)=\cos(2t)x(t-\tau), while the delayed output is y(t−τ)=cos⁡(2(t−τ))x(t−τ)y(t-\tau)=\cos\left(2(t-\tau)\right)x(t-\tau). They differ unless cos⁡(2t)=cos⁡(2t−2τ)\cos(2t)=\cos(2t-2\tau) for all tt, which holds only for τ\tau multiple of π\pi. Counterexample: x(t)=1x(t)=1 for all tt and τ=π4\tau=\frac\pi4: then xτ=xx_\tau=x and S[xτ](t)=cos⁡2t\mathcal S[x_\tau](t)=\cos2t, but y(t−τ)=cos⁡(2t−π2)=sin⁡2t≠cos⁡2ty(t-\tau)=\cos\left(2t-\frac\pi2\right)=\sin2t\ne\cos2t.
  • Causal: y(t0)=cos⁡(2t0)x(t0)y(t_0)=\cos(2t_0)x(t_0) depends only on the present value x(t0)x(t_0) (the system is memoryless, hence causal): if x1=x2x_1=x_2 up to t0t_0 then y1(t0)=y2(t0)y_1(t_0)=y_2(t_0) ✓.
  • BIBO stable: if ∣x(t)∣≤M\lvert x(t)\rvert\le M then ∣y(t)∣=∣cos⁡2t∣∣x(t)∣≤M\lvert y(t)\rvert=\lvert\cos2t\rvert\lvert x(t)\rvert\le M ✓, with M′=MM'=M.

(c) The system is linear but time-varying, so it is not LTI: the theory of convolution does not apply, there is no hh such that y=x∗hy=x*h (the response to δ(t−τ)\delta(t-\tau) is cos⁡(2τ)δ(t−τ)\cos(2\tau)\delta(t-\tau), which depends on τ\tau, not only on t−τt-\tau) and no frequency response: a cosine in input produces an output with different frequencies (product of two cosines). It is the modulation used in AM transmission.

Typical errors: declaring time invariance because "the cosine is periodic" (it holds only for shifts multiple of π\pi); proving a negative property with an example that does not break it (the counterexample must use a shift for which the two expressions differ); confusing memoryless (static) with time-invariant; saying that a stable system must have y→0y\to0 (BIBO stability only requires bounded outputs). For contrast, the integrator y(t)=∫−∞tx(τ)dτy(t)=\int_{-\infty}^tx(\tau)d\tau is linear, time-invariant and causal but not BIBO stable (the constant input 11 for t>0t>0 gives the unbounded ramp).

Theory 2 (points 4)

Theory 2: Convergence of the Fourier series. (a) Define the truncated Fourier series of a TT-periodic signal and the pointwise and the mean-square (L2L^2) convergence. (b) State the Dirichlet theorem and the Riesz-Fischer theorem. (c) Let x(t)x(t) be 22-periodic with x(t)=tx(t)=t for −1<t<1-1<t<1. Compute its coefficients aka_k, say to which value the series converges at t=12t=\frac12 and at t=1t=1 and which kind of convergence holds, and use the Parseval identity to compute ∑k≥11k2\sum_{k\ge1}\frac1{k^2}. What happens to the partial sums near t=1t=1?

Show the result

(a) x^N(t)=∑k=−NNakejkω0t\hat x_N(t)=\sum_{k=-N}^Na_ke^{jk\omega_0t}; pointwise: x^N(t)→x(t)\hat x_N(t)\to x(t) for each tt; L2L^2: 1T∫[T]∣x−x^N∣2→0\frac1T\int_{[T]}\lvert x-\hat x_N\rvert^2\to0. (b) Dirichlet (finite number of bounded jumps, piecewise differentiable): x^N(t)→x(t+)+x(t−)2\hat x_N(t)\to\frac{x(t^+)+x(t^-)}2 for all tt. Riesz-Fischer: if x∈L2([T])x\in L^2([T]) then x^N→x\hat x_N\to x in L2L^2 and {ak}∈ℓ2\{a_k\}\in\ell^2. (c) a0=0a_0=0, ak=j(−1)kkπa_k=\frac{j(-1)^k}{k\pi}; the series converges to 12\frac12 at t=12t=\frac12 and to 00 at t=1t=1 (midpoint of the jump from 11 to −1-1); the convergence is pointwise and in L2L^2, not uniform; ∑k≥11k2=π26\sum_{k\ge1}\frac1{k^2}=\frac{\pi^2}6; near the jump the partial sums overshoot by about 9%9\% of the jump (peak ≈1.18\approx1.18) for every NN (Gibbs phenomenon).

Show the full solution

(a) For a TT-periodic xx with ω0=2πT\omega_0=\frac{2\pi}T and coefficients ak=1T∫[T]x(t)e−jkω0tdta_k=\frac1T\int_{[T]}x(t)e^{-jk\omega_0t}dt, the truncated series is x^N(t)=∑k=−NNakejkω0t\hat x_N(t)=\sum_{k=-N}^Na_ke^{jk\omega_0t} (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 →). Pointwise convergence: lim⁡N→∞∣x(t)−x^N(t)∣=0\lim_{N\to\infty}\lvert x(t)-\hat x_N(t)\rvert=0 for every tt. Mean-square convergence: lim⁡N→∞1T∫[T]∣x(τ)−x^N(τ)∣2dτ=0\lim_{N\to\infty}\frac1T\int_{[T]}\lvert x(\tau)-\hat x_N(\tau)\rvert^2d\tau=0, that is, the average power of the error tends to 00 (Convergence of the Fourier SeriesThe truncated Fourier series converges pointwise under the Dirichlet conditions (to the midpoint at jumps) and in the mean square sense for every finite-energy periodic signal (Riesz-Fischer theorem), which makes L2 over a period and l2 isometric.Convergence of the Fourier Series →).

(b) Theorems. Dirichlet (sufficient conditions): if xx has a finite number of discontinuities of the first kind (bounded jumps) in a period and is differentiable elsewhere (with finite one-sided derivatives at the jumps), then x^N(t)→lim⁡ε→0x(t−ε)+x(t+ε)2\hat x_N(t)\to\lim_{\varepsilon\to0}\frac{x(t-\varepsilon)+x(t+\varepsilon)}2 for all tt: to x(t)x(t) where xx is continuous, to the midpoint of the jump at a jump. Riesz-Fischer: if x∈L2([T])x\in L^2([T]) (finite power) then x^N→x\hat x_N\to x in the L2L^2 sense, and ∑k∣ak∣2<∞\sum_k\lvert a_k\rvert^2<\infty; conversely every sequence in ℓ2\ell^2 is the sequence of coefficients of a signal in L2([T])L^2([T]). Dirichlet implies x∈L2x\in L^2, so the mean-square convergence is the weaker requirement and always follows.

(c) The sawtooth. T=2T=2, ω0=π\omega_0=\pi. The signal is odd, so a0=0a_0=0. For k≠0k\ne0, integrating by parts with e∓jkπ=(−1)ke^{\mp jk\pi}=(-1)^k and ∫−11e−jkπtdt=0\int_{-1}^1e^{-jk\pi t}dt=0: ak=12∫−11te−jkπtdt=12{[te−jkπt−jkπ]−11+1jkπ∫−11e−jkπtdt}=12⋅2(−1)k−jkπ=j(−1)kkπ.a_k=\frac12\int_{-1}^1te^{-jk\pi t}dt=\frac12\left\{\left[\frac{te^{-jk\pi t}}{-jk\pi}\right]_{-1}^{1}+\frac1{jk\pi}\int_{-1}^1e^{-jk\pi t}dt\right\}=\frac12\cdot\frac{2(-1)^k}{-jk\pi}=\frac{j(-1)^k}{k\pi}. In real form x(t)∼∑k≥12(−1)k+1kπsin⁡(kπt)x(t)\sim\sum_{k\ge1}\frac{2(-1)^{k+1}}{k\pi}\sin(k\pi t). The coefficients decay like 1k\frac1k, slowly, because xx has a jump (Properties of the Fourier Series - Convolution, Differentiation and IntegrationFor T-periodic finite-energy signals, periodic convolution becomes a product of Fourier coefficients, even and odd parts map to real and imaginary parts, differentiation multiplies the n-th coefficient by j omega_0 n, and integration divides by it (only for zero-mean signals).Properties of the Fourier Series - Convolution, Differentiation and Integration →: continuous signals with a continuous derivative decay faster).

Convergence values. xx is bounded, continuous except at the jumps t=±1+2mt=\pm1+2m (from 11 to −1-1) and piecewise differentiable: Dirichlet holds, so the series converges at every point. At t=12t=\frac12 (continuity point) it converges to x(12)=12x\left(\frac12\right)=\frac12. At t=1t=1 it converges to 1+(−1)2=0\frac{1+(-1)}2=0, the midpoint of the jump, and not to the value 11 taken from the left; indeed every term sin⁡(kπ)=0\sin(k\pi)=0. x∈L2([2])x\in L^2([2]) so the convergence also holds in the mean-square sense. The convergence is not uniform on the whole period: uniform limits of continuous functions (the partial sums) are continuous, while xx has jumps.

Parseval (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 →): Px=12∫−11t2dt=13P_x=\frac12\int_{-1}^1t^2dt=\frac13 and ∑k≠0∣ak∣2=2∑k≥11k2π2=13 ⇒ ∑k≥11k2=π26.\sum_{k\ne0}\lvert a_k\rvert^2=2\sum_{k\ge1}\frac1{k^2\pi^2}=\frac13\ \Rightarrow\ \sum_{k\ge1}\frac1{k^2}=\frac{\pi^2}6.

Gibbs phenomenon (Fourier Series of the Square Wave and the Gibbs PhenomenonThe even square wave of duty cycle d has Fourier coefficients a_0 = d and a_n = d sinc(d n), decaying like 1/n, and its truncated series overshoots by about 9 percent near each jump (Gibbs phenomenon).Fourier Series of the Square Wave and the Gibbs Phenomenon →). Near each jump the partial sums overshoot the limit values by about 9%9\% of the jump height (≈0.0895⋅2=0.18\approx0.0895\cdot2=0.18 here): the peak is about 1.181.18 for every large NN; increasing NN squeezes the oscillations towards the jump but does not reduce their height (numerically the maximum of x^N\hat x_N near t=1t=1 is 1.1591.159, 1.1741.174, 1.1781.178 for N=50,200,800N=50,200,800).

Typical errors: saying that the series converges to x(t)x(t) at the jump (it converges to the midpoint); not stating the hypotheses of the theorems; confusing pointwise and uniform convergence; forgetting that L2L^2 convergence says nothing about each single point.

Matlab 1 (points 3)

Matlab question: convolution of two sequences. The system of Exercise 2 has impulse response h(n)=[2(12)n−(−14)n]u(n)h(n)=\left[2\left(\frac12\right)^n-\left(-\frac14\right)^n\right]u(n). The input is x(n)=1x(n)=1 for −2≤n≤3-2\le n\le3 and 00 elsewhere. Write a Matlab script that:

  1. builds xx on n=−2,…,3n=-2,\dots,3 and hh truncated to n=0,…,19n=0,\dots,19, keeping the index vectors;
  2. computes y=x∗hy=x*h with conv and builds the correct index vector of yy;
  3. plots xx, hh and yy in three subplots with stem, with labelled axes;
  4. prints the length of yy, the value y(0)y(0), and the maximum of yy with the instant where it occurs;
  5. checks that hh coincides with the response of the difference equation y(n)−14y(n−1)−18y(n−2)=x(n)+x(n−1)y(n)-\frac14y(n-1)-\frac18y(n-2)=x(n)+x(n-1) to a unit impulse, using filter.
Show the result

y has 6+20−1=256+20-1=25 samples, with index vector from −2-2 to 2222. y(0)=h(0)+h(1)+h(2)=4316=2.6875y(0)=h(0)+h(1)+h(2)=\frac{43}{16}=2.6875. The maximum of yy is 3.13773.1377 at n=3n=3. The difference between h and the output of filter is zero (or of the order of the machine precision).

Show the full solution
matlab
nx = -2:3;                          % support of x: n = -2,...,3
x  = ones(size(nx));                % x(n) = 1 on its support
nh = 0:19;                          % h truncated to 20 samples
h  = 2*(1/2).^nh - (-1/4).^nh;      % elementwise power (.^) on the vector nh

y  = conv(x, h);                    % 6 + 20 - 1 = 25 samples
ny = nx(1) + nh(1) + (0:length(y)-1);   % first index = -2 + 0 = -2, up to 22

figure
subplot(3,1,1); stem(nx, x, 'filled'); grid on; xlabel('n'); ylabel('x(n)')
subplot(3,1,2); stem(nh, h, 'filled'); grid on; xlabel('n'); ylabel('h(n)')
subplot(3,1,3); stem(ny, y, 'filled'); grid on; xlabel('n'); ylabel('y(n) = (x*h)(n)')

fprintf('length of y: %d\n', length(y));
fprintf('y(0) = %.4f\n', y(ny == 0));          % logical indexing on the index vector
[ymax, imax] = max(y);
fprintf('max y = %.4f at n = %d\n', ymax, ny(imax));

b  = [1 1];  a = [1 -1/4 -1/8];                % coefficients of the difference equation
hf = filter(b, a, [1 zeros(1, 19)]);           % response to the unit impulse
fprintf('max |h - hf| = %.2e\n', max(abs(h - hf)));

Comment (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 →, Properties of Discrete-Time Convolutionalgebraic properties of the discrete convolution (time invariance, commutativity, associativity, bilinearity, neutral element, support), its link with correlation and a set of worked examples including the rectangle-by-rectangle graphical method.Properties of Discrete-Time Convolution →).

  • conv of two vectors of lengths Nx=6N_x=6 and Nh=20N_h=20 returns Nx+Nh−1=25N_x+N_h-1=25 elements. In discrete time the convolution sum is exactly what conv computes: no scaling factor (contrary to the continuous-time case where a sampling step multiplies the result).
  • The index vector. conv does not know the instants. If xx starts at nxn_x and hh at nhn_h, then yy starts at nx+nhn_x+n_h: here −2+0=−2-2+0=-2 and ends at −2+0+24=22-2+0+24=22. Using ny = 0:24 (or plotting against 1:25) shifts the plot by 22 and reads the wrong values. Also, Matlab indices start at 11, so y(0) is an error: the value at n=0n=0 is y(ny == 0), i.e. the element 33.
  • y(0)=∑kx(k)h(−k)y(0)=\sum_kx(k)h(-k) with k=−2,−1,0k=-2,-1,0 contributing (h(n)=0h(n)=0 for n<0n<0): h(2)+h(1)+h(0)=716+54+1=4316=2.6875h(2)+h(1)+h(0)=\frac7{16}+\frac54+1=\frac{43}{16}=2.6875, which is also the step response s(2)s(2) of Exercise 2 (since x=u(n+2)−u(n−4)x=u(n+2)-u(n-4), y(n)=s(n+2)−s(n−4)y(n)=s(n+2)-s(n-4)).
  • Since x=u(n+2)−u(n−4)x=u(n+2)-u(n-4), y(n)=s(n+2)−s(n−4)y(n)=s(n+2)-s(n-4). For n≤3n\le3 the second term is zero and y(n)=s(n+2)y(n)=s(n+2) keeps growing, so the maximum is at n=3n=3: y(3)=s(5)=165−232+15⋅1024≈3.1377y(3)=s(5)=\frac{16}5-\frac2{32}+\frac1{5\cdot1024}\approx3.1377. From n=4n=4 on the term s(n−4)s(n-4) starts to be subtracted and yy drops (for instance y(4)=s(6)−s(0)≈2.169y(4)=s(6)-s(0)\approx2.169).
  • .^ is the elementwise power; (-1/4)^nh without the dot gives an error. For the base (−14)\left(-\frac14\right) the powers alternate in sign, as they must.
  • Truncating hh to 2020 samples changes yy only in the last samples (the discarded tail is of the order 2⋅2−20≈2⋅10−62\cdot2^{-20}\approx2\cdot10^{-6}; the largest difference with the exact yy is about 4⋅10−64\cdot10^{-6} at n=22n=22). As a further check, ∑y=(∑x)(∑h)≈6⋅165=19.2\sum y=\left(\sum x\right)\left(\sum h\right)\approx6\cdot\frac{16}5=19.2.
  • The command filter(b,a,x) runs the difference equation with zero initial conditions, so with the unit impulse it returns exactly the impulse response (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 check confirms the closed form found in Exercise 2.

Check. Matlab was not available while writing this mock exam; the same algorithm was reproduced with numpy (np.convolve, index vector nx[0]+nh[0]+arange(len(y)), scipy.signal.lfilter in place of filter): 2525 samples, index range −2…22-2\dots22, y(0)=2.6875y(0)=2.6875, max⁡y=3.1377\max y=3.1377 at n=3n=3, max⁡∣h−hf∣=0\max\lvert h-h_f\rvert=0.

Typical errors: forgetting the offset of the index vector; using plot instead of stem for sequences; using y(0); * or ^ in place of conv and .^; writing h for all nn (the sequence is zero for n<0n<0 and must be defined only on n≥0n\ge0).

Self-assessment grid
Exercise Points What must be there for full marks Typical errors
Ex. 1 7 Sketch, mean 13\frac13 and power 113\frac{11}3 (1); ω0=π3\omega_0=\frac\pi3 and ak=4kπsin⁡kπ3e−jkπ/3a_k=\frac4{k\pi}\sin\frac{k\pi}3e^{-jk\pi/3} with a0=13a_0=\frac13, zeros at multiples of 33 and the line spectrum (2.5); Parseval fraction 133+9011π2≈0.859\frac1{33}+\frac{90}{11\pi^2}\approx0.859 (1); filter type, passing harmonics, y(t)y(t) in trigonometric form with amplitudes and phases and PyP_y (2); y=23y=\frac23 with H2H_2 (0.5) Period 22 instead of 66; sinc formula at k=0k=0; missing phase factor; forgetting the factor 22 of the pairs ±k\pm k or the gain 22 of the filter; thinking that a harmonic just above the cutoff partly passes
Ex. 2 7 Poles 12\frac12, −14-\frac14 and stability (1); recursion values, closed form h=2(12)n−(−14)nh=2\left(\frac12\right)^n-\left(-\frac14\right)^n and ∑∣h∣=165\sum\lvert h\rvert=\frac{16}5 (1.5); H(ejθ)H(e^{j\theta}), values at 0,π2,π0,\frac\pi2,\pi and low-pass sketch (1.5); y(n)=9.6+2.454cos⁡(π2n−1.004)y(n)=9.6+2.454\cos\left(\frac\pi2n-1.004\right) with the component at π\pi removed (1.5); s(n)s(n) in closed form and limit 165=H(ej0)\frac{16}5=H(e^{j0}) (1.5) Closed form not matched to h(0),h(1)h(0),h(1); forgetting the numerator in HH; dropping the phase of HH; cos⁡(πn)\cos(\pi n) confused with DC; summing the geometric series with the wrong first term
Ex. 3 7 H(s)H(s), poles −1±2j-1\pm2j, zero −5-5, stability and existence of H(jω)H(j\omega) (1.5); h(t)=e−t(cos⁡2t+2sin⁡2t)u(t)h(t)=e^{-t}(\cos2t+2\sin2t)u(t) with h(0+)=1h(0^+)=1 (1.5); natural, forced and total responses with the checks y(0+)=2y(0^+)=2, y′(0+)=1y'(0^+)=1, y(∞)=1y(\infty)=1 (2.5); steady state to cos⁡2t\cos2t with modulus 2917\sqrt{\frac{29}{17}} and phase −0.945-0.945 (1.5) Missing initial-condition terms in the transform of y′y' and y′′y''; wrong partial fractions; mixing natural and forced response; H(2)H(2) instead of H(2j)H(2j)
Theory 1 4 Four definitions (0.75); linearity (0.75); time invariance disproved with a counterexample (1); causality (0.75); BIBO stability with the bound (0.75) Declaring time invariance; counterexample that does not break it; confusing static and time-invariant
Theory 2 4 Truncated series and the two convergences (1); Dirichlet and Riesz-Fischer with hypotheses (1); ak=j(−1)kkπa_k=\frac{j(-1)^k}{k\pi} and the limit values 12\frac12 and 00 (1.25); Parseval giving π26\frac{\pi^2}6 and Gibbs overshoot of about 9%9\% (0.75) Limit at the jump taken as x(t)x(t); missing hypotheses; pointwise and uniform convergence confused
Matlab 1 3 Sequences and index vectors (0.5); conv and the index vector ny from −2-2 to 2222 (1.25); three stem plots with labels (0.5); printed values 2525, 2.68752.6875, 3.13773.1377 at n=3n=3 (0.5); check with filter (0.25) Missing index offset; y(0); plot for sequences; * and ^ instead of conv and .^