Salta al contenuto
Note per Studenti Fourier Series of the Square Wave and the Gibbs Phenomenon Report

Fourier Series of the Square Wave and the Gibbs Phenomenon

In questa pagina 3

The symmetric even square wave

Let ω0=2πT\omega_0=\frac{2\pi}{T} and x(t)=repT ⁣[rect ⁣(t2T1)]=∑n=−∞+∞rect ⁣(t−nT2T1),rect ⁣(t2T1)={1∣t∣≤T10otherwise,x(t)=\mathrm{rep}_T\!\left[\mathrm{rect}\!\left(\frac{t}{2T_1}\right)\right]=\sum_{n=-\infty}^{+\infty}\mathrm{rect}\!\left(\frac{t-nT}{2T_1}\right),\qquad\mathrm{rect}\!\left(\frac{t}{2T_1}\right)=\begin{cases}1&|t|\le T_1\\0&\text{otherwise,}\end{cases} i.e. a train of unit pulses of half-width T1T_1 repeated every TT:

   x(t)
 1 |  ____        ____        ____
   | |    |      |    |      |    |
 --+-|----|------|----|------|----|----> t
  -T -T1 0 T1    ...   T-T1  T  T+T1       (pulse on [-T1,T1], repeated every T)

The duty cycle is δc:=2T1T∈[0,1]\delta_c:=\frac{2T_1}{T}\in[0,1].

Coefficient a0a_0: a0=1T∫[T]x(t)dt=1T∫−T1T1dt=2T1T=δc.a_0=\frac1T\int_{[T]}x(t)dt=\frac1T\int_{-T_1}^{T_1}dt=\frac{2T_1}{T}=\delta_c .

Coefficients ana_n, n≠0n\ne0: an=1T∫[T]x(t)e−jω0ntdt=1T∫−T1T1e−jω0ntdt=1Te−jω0nt−jω0n∣−T1T1=1T1jω0n(ejω0nT1−e−jω0nT1)a_n=\frac1T\int_{[T]}x(t)e^{-j\omega_0nt}dt=\frac1T\int_{-T_1}^{T_1}e^{-j\omega_0nt}dt=\frac1T\left.\frac{e^{-j\omega_0nt}}{-j\omega_0n}\right|_{-T_1}^{T_1}=\frac1T\frac{1}{j\omega_0n}\Big(e^{j\omega_0nT_1}-e^{-j\omega_0nT_1}\Big) =2T n ω0⋅ejω0nT1−e−jω0nT12j=2Tnω0sin⁡(nω0T1).=\frac{2}{T\,n\,\omega_0}\cdot\frac{e^{j\omega_0nT_1}-e^{-j\omega_0nT_1}}{2j}=\frac{2}{Tn\omega_0}\sin(n\omega_0T_1). Now use T1=T2δcT_1=\frac T2\delta_c, so nω0T1=n2πTT2δc=πδcnn\omega_0T_1=n\frac{2\pi}{T}\frac T2\delta_c=\pi\delta_c n and 2Tnω0=1πn\frac{2}{Tn\omega_0}=\frac{1}{\pi n}. Recall sinc(t)={sin⁡(πt)πt,t≠01,t=0.\mathrm{sinc}(t)=\begin{cases}\dfrac{\sin(\pi t)}{\pi t},&t\ne0\\[2mm]1,&t=0.\end{cases} Therefore an=δc sinc(δc n)\boxed{a_n=\delta_c\,\mathrm{sinc}(\delta_c\,n)} (this also gives a0=δca_0=\delta_c for n=0n=0).

Observation. an∈Ra_n\in\mathbb{R} and even, because x(t)x(t) is real and even (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 →, symmetries).

Particular case δc=50%\delta_c=50\%. Then T=4T1T=4T_1 and ω0T1=2πTT4=π2\omega_0T_1=\frac{2\pi}{T}\frac T4=\frac\pi2. The coefficients are a0=12,∀n≠0: an=12sinc ⁣(n2)=12sin⁡ ⁣(nπ2)nπ2,a_0=\tfrac12,\qquad\forall n\ne0:\ a_n=\tfrac12\mathrm{sinc}\!\left(\tfrac n2\right)=\tfrac12\frac{\sin\!\left(n\frac\pi2\right)}{n\frac\pi2}, a±1=1π,a±2=0,a±3=−13π,a±4=0,a±5=15π, …a_{\pm1}=\tfrac1\pi,\quad a_{\pm2}=0,\quad a_{\pm3}=-\tfrac1{3\pi},\quad a_{\pm4}=0,\quad a_{\pm5}=\tfrac1{5\pi},\ \dots

Behaviour of the coefficients

The sinc\mathrm{sinc} function has zeros at the nonzero integers and an envelope decaying like 1t\frac1t:

 sinc(t)
  1 |      .
    |     / \
    |    /   \                  zeros at t = +-1, +-2, +-3, ...
 ---+---/-----\---+----+----+---> t
    |  -1  .   1   2    3
    |           \_/  (negative lobe between 1 and 2, positive between 2 and 3, ...)

Since an=δc sinc(δcn)a_n=\delta_c\,\mathrm{sinc}(\delta_c n), we get an→0a_n\to0 as n→±∞n\to\pm\infty, decaying like 1n\frac1n.

Gibbs phenomenon

Consider the truncated series x^N(t)=∑n=−NNanejω0nt\hat x_N(t)=\sum_{n=-N}^{N}a_ne^{j\omega_0nt} of the square wave. Its plot oscillates around the pulse; at the jump points ±T1\pm T_1 it passes through 12\frac12 (the midpoint of the jump, as predicted by the Dirichlet theorem in 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 →), and just before and after the jump it overshoots by about 9%9\%.

Gibbs phenomenon. The approximation error ∣x(t)−x^N(t)∣|x(t)-\hat x_N(t)| in a neighbourhood of a point of discontinuity, where lim⁡t→t0−x(t)=x(t0−),lim⁡t→t0+x(t)=x(t0+)(finite jump),\lim_{t\to t_0^-}x(t)=x(t_0^-),\qquad\lim_{t\to t_0^+}x(t)=x(t_0^+)\qquad(\text{finite jump}), reaches about 9%9\% of ∣x(t0+)−x(t0−)∣|x(t_0^+)-x(t_0^-)| as N→+∞N\to+\infty.

So the overshoot does not disappear as more terms are added: it stays at about 9 percent of the jump height.

Versione ripasso

  • Even square wave: x(t)=repT[rect(t/2T1)]x(t)=\mathrm{rep}_T[\mathrm{rect}(t/2T_1)], ω0=2π/T\omega_0=2\pi/T, duty cycle δc=2T1/T∈[0,1]\delta_c=2T_1/T\in[0,1].
  • a0=δca_0=\delta_c; for n≠0n\ne0: an=2Tnω0sin⁡(nω0T1)=δc sinc(δcn)a_n=\frac{2}{Tn\omega_0}\sin(n\omega_0T_1)=\delta_c\,\mathrm{sinc}(\delta_c n), with sinc(t)=sin⁡πtπt\mathrm{sinc}(t)=\frac{\sin\pi t}{\pi t}, sinc(0)=1\mathrm{sinc}(0)=1. Real and even since xx is real and even; an∼1na_n\sim\frac1n.
  • δc=50%\delta_c=50\% (T=4T1T=4T_1, ω0T1=π2\omega_0T_1=\frac\pi2): a0=12a_0=\frac12, a±1=1πa_{\pm1}=\frac1\pi, a±2=0a_{\pm2}=0, a±3=−13πa_{\pm3}=-\frac1{3\pi}, a±4=0a_{\pm4}=0, a±5=15πa_{\pm5}=\frac1{5\pi}, ...
  • Truncated series x^N\hat x_N passes through 12\frac12 at the jumps ±T1\pm T_1.
  • Gibbs phenomenon: near a finite jump the error ∣x−x^N∣|x-\hat x_N| reaches about 9%9\% of the jump ∣x(t0+)−x(t0−)∣|x(t_0^+)-x(t_0^-)| as N→+∞N\to+\infty.
  • Typical mistakes: forgetting sinc\mathrm{sinc} is normalized with π\pi; mixing up δc=2T1/T\delta_c=2T_1/T with T1/TT_1/T; expecting the overshoot to vanish as NN grows.

Teoria collegata