Salta al contenuto
Note per Studenti Continuous-Time Fourier Series Report

Continuous-Time Fourier Series

In questa pagina 7

The question that motivates the series

Since ejωte^{j\omega t} are well-defined eigenfunctions for BIBO stable convolutional LTI systems (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 →), which periodic signals can be expressed as a linear combination of exponentials u(t)=∑ℓ=1Naℓejωℓt,ω1,…,ωN∈R,u(t)=\sum_{\ell=1}^{N}a_\ell e^{j\omega_\ell t},\qquad \omega_1,\dots,\omega_N\in\mathbb{R}, for which the output is u(t)↦y(t)=∑ℓ=1NaℓH(jωℓ)⏟=:bℓejωℓt ?u(t)\mapsto y(t)=\sum_{\ell=1}^{N}\underbrace{a_\ell H(j\omega_\ell)}_{=:b_\ell}e^{j\omega_\ell t}\ ? (The lecture does not answer immediately: it prepares the tools using geometry, and gives a partial answer later; see 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 →.)

Harmonics

Exponential functions ψn(t)\psi_n(t) are in harmonic relation if, given ω0∈R\omega_0\in\mathbb{R}, ψn(t)=ejnω0t,∀n∈Z.\psi_n(t)=e^{jn\omega_0t},\qquad\forall n\in\mathbb{Z}. Fundamental period: T=2π∣ω0∣T=\frac{2\pi}{|\omega_0|}, if ω0≠0\omega_0\neq0.

  • ej0ω0t=1e^{j0\omega_0t}=1 is a constant (cause of "offset").
  • e±jω0te^{\pm j\omega_0t} are called the first harmonic (components), with period TT.
  • e±j2ω0te^{\pm j2\omega_0t} are the second harmonics, etc.

If u(t)=∑n=N1N2anejnω0tu(t)=\sum_{n=N_1}^{N_2}a_ne^{jn\omega_0t}, then uu is periodic of period TT; this implies that y(t)=∑n=N1N2anH(jnω0)ejnω0ty(t)=\sum_{n=N_1}^{N_2}a_nH(jn\omega_0)e^{jn\omega_0t} is also periodic of period TT.

Fact: the harmonics are orthogonal over a period

Notation: [T][T] is any TT-long interval (such as [0,T][0,T] or [−T/2,T/2][-T/2,T/2]), ∫[T]f(τ)dτ=∫t0t0+Tf(τ)dτ\int_{[T]}f(\tau)d\tau=\int_{t_0}^{t_0+T}f(\tau)d\tau for every t0∈Rt_0\in\mathbb{R}, and ⟨f,g⟩[T]=∫[T]f(τ)g(τ)‾dτ\langle f,g\rangle_{[T]}=\int_{[T]}f(\tau)\overline{g(\tau)}d\tau.

Fact. If ω0≠0\omega_0\ne0, 1T⟨ψm(⋅),ψn(⋅)⟩[T]=δm,n(Kronecker δ, not Dirac).\frac1T\langle\psi_m(\cdot),\psi_n(\cdot)\rangle_{[T]}=\delta_{m,n}\qquad(\text{Kronecker }\delta,\text{ not Dirac}). So the assumptions of the representation lemma (see Orthogonal Projection and the Projection TheoremThe orthogonal projection of a vector onto a subspace spanned by orthogonal generators has explicit coefficients, and it is the closest point of the subspace to the vector (projection theorem).Orthogonal Projection and the Projection Theorem →) are satisfied.

Proof. 1T⟨ψm,ψn⟩[T]=1T∫0Tψm(τ)ψn(τ)‾dτ\frac1T\langle\psi_m,\psi_n\rangle_{[T]}=\frac1T\int_0^T\psi_m(\tau)\overline{\psi_n(\tau)}d\tau.

  • If m=nm=n: 1T∫0T∣ejnω0τ∣2dτ=1T∫0Tdτ=1\frac1T\int_0^T|e^{jn\omega_0\tau}|^2d\tau=\frac1T\int_0^Td\tau=1.
  • If m≠nm\neq n: 1T∫0Tejmω0τe−jnω0τdτ=1Tej(m−n)ω0τj(m−n)ω0∣0T=0\frac1T\int_0^Te^{jm\omega_0\tau}e^{-jn\omega_0\tau}d\tau=\frac1T\left.\frac{e^{j(m-n)\omega_0\tau}}{j(m-n)\omega_0}\right|_0^T=0, because ejω00=ejω0Te^{j\omega_00}=e^{j\omega_0T} (so ej(m−n)ω0T=1e^{j(m-n)\omega_0T}=1). ■\blacksquare

Applying the fact to u(t)=∑m=N1N2amψm(t)u(t)=\sum_{m=N_1}^{N_2}a_m\psi_m(t): 1T⟨u,ψn⟩[T]=1T∫0Tu(τ)e−jnω0τdτ=1T∑m=N1N2am∫0Tejmω0τe−jnω0τdτ=an.\frac1T\langle u,\psi_n\rangle_{[T]}=\frac1T\int_0^Tu(\tau)e^{-jn\omega_0\tau}d\tau=\frac1T\sum_{m=N_1}^{N_2}a_m\int_0^Te^{jm\omega_0\tau}e^{-jn\omega_0\tau}d\tau=a_n .

The nn-th Fourier coefficient

In this procedure we projected u(t)u(t) onto ψn(t)\psi_n(t) (over a period TT): ana_n describes how large the projection of u(t)u(t) along the nn-th harmonic ejω0nte^{j\omega_0nt} is. The idea is to express periodic signals as combinations of harmonics such that

  • the harmonics ejω0nte^{j\omega_0nt} behave like unit vectors (orthogonal);
  • the coefficients ana_n are projections of u(t)u(t) onto ejω0nte^{j\omega_0nt}.

Definition (nn-th Fourier coefficient). Let x(t)x(t) be a periodic signal that can be expressed as a finite linear combination of exponentials. The quantity an:=1T∫[T]x(t) e−jnω0t dt\boxed{a_n:=\frac1T\int_{[T]}x(t)\,e^{-jn\omega_0t}\,dt} is called the nn-th Fourier coefficient of xx with respect to the basis {ψn(t)}\{\psi_n(t)\}, n∈Zn\in\mathbb{Z}.

  • Existence. If x∈L1([T])x\in L^1([T]), then ∣an∣=∣1T∫0Tx(t)e−jnω0tdt∣≤1T∫0T∣x(t)∣dt<+∞|a_n|=\left|\frac1T\int_0^Tx(t)e^{-jn\omega_0t}dt\right|\le\frac1T\int_0^T|x(t)|dt<+\infty: all Fourier coefficients are well defined for the class of absolutely integrable signals over a period.
  • Energy. E[T][x]:=∫[T]∣x(τ)∣2dτ=∫0T∑m,n=N1N2aman‾ψm(τ)ψn(τ)‾dτ=T∑m,naman‾δ(m−n)=T∑n=N1N2∣an∣2E_{[T]}[x]:=\int_{[T]}|x(\tau)|^2d\tau=\int_0^T\sum_{m,n=N_1}^{N_2}a_m\overline{a_n}\psi_m(\tau)\overline{\psi_n(\tau)}d\tau=T\sum_{m,n}a_m\overline{a_n}\delta(m-n)=T\sum_{n=N_1}^{N_2}|a_n|^2.

Worked exercise (very important)

Find the Fourier coefficients of x(t)=1+sin⁡(ω0t)+2cos⁡(ω0t)+cos⁡ ⁣(2ω0t+π4)x(t)=1+\sin(\omega_0t)+2\cos(\omega_0t)+\cos\!\left(2\omega_0t+\frac\pi4\right). The fundamental period is T=2π∣ω0∣T=\frac{2\pi}{|\omega_0|}, with ψn(t)=ejnω0t\psi_n(t)=e^{jn\omega_0t}. Use Euler's formulas: x(t)=1+ejω0t−e−jω0t2j+2ejω0t+e−jω0t2+ej(2ω0t+π4)+e−j(2ω0t+π4)2x(t)=1+\frac{e^{j\omega_0t}-e^{-j\omega_0t}}{2j}+2\frac{e^{j\omega_0t}+e^{-j\omega_0t}}{2}+\frac{e^{j(2\omega_0t+\frac\pi4)}+e^{-j(2\omega_0t+\frac\pi4)}}{2} =12e−jπ4e−j2ω0t+(−12j+1)e−jω0t+1+(12j+1)ejω0t+12ejπ4ej2ω0t.=\tfrac12e^{-j\frac\pi4}e^{-j2\omega_0t}+\left(-\tfrac1{2j}+1\right)e^{-j\omega_0t}+1+\left(\tfrac1{2j}+1\right)e^{j\omega_0t}+\tfrac12e^{j\frac\pi4}e^{j2\omega_0t}. Reading off the coefficients: a−2=12e−jπ4=12(22−j22)=24−j24,a−1=−12j+1=1+j12,a0=1,a_{-2}=\tfrac12e^{-j\frac\pi4}=\tfrac12\Big(\tfrac{\sqrt2}{2}-j\tfrac{\sqrt2}{2}\Big)=\tfrac{\sqrt2}{4}-j\tfrac{\sqrt2}{4},\qquad a_{-1}=-\tfrac1{2j}+1=1+j\tfrac12,\qquad a_0=1, a1=12j+1=1−j12=a−1‾,a2=12ejπ4=24+j24=a−2‾,an=0  ∀n∈Z∖{−2,−1,0,1,2}.a_1=\tfrac1{2j}+1=1-j\tfrac12=\overline{a_{-1}},\qquad a_2=\tfrac12e^{j\frac\pi4}=\tfrac{\sqrt2}4+j\tfrac{\sqrt2}4=\overline{a_{-2}},\qquad a_n=0\ \ \forall n\in\mathbb{Z}\setminus\{-2,-1,0,1,2\}. Notice that the coefficients can be found even without the integral definition: be smart, work less. Important: if x(t)x(t) is real, we do not need to compute all ana_n, n∈Zn\in\mathbb{Z}: half of the computations are not required, because Hermitian symmetry holds for ana_n.

Symmetries of the Fourier coefficients

Fact. x(t)x(t) real   ⟺  an\iff a_n Hermitian (a−n=an‾a_{-n}=\overline{a_n}) for all n∈Zn\in\mathbb{Z}.

Proof (⇒\Rightarrow). x(t)∈Rx(t)\in\mathbb{R} for all tt: a−n=1T∫[T]x(t)e−jω0(−n)tdt=1T∫[T]x(t)e−jω0ntdt‾=an‾.a_{-n}=\frac1T\int_{[T]}x(t)e^{-j\omega_0(-n)t}dt=\overline{\frac1T\int_{[T]}x(t)e^{-j\omega_0nt}dt}=\overline{a_n}. (⇐\Leftarrow) is a very easy exercise.

Fact. x(t)x(t) Hermitian   ⟺  an\iff a_n real for all n∈Zn\in\mathbb{Z}.

Proof (⇒\Rightarrow). an∈R  ⟺  Im(an)=0  ⟺  an‾=ana_n\in\mathbb{R}\iff\mathrm{Im}(a_n)=0\iff\overline{a_n}=a_n. With x(−t)=x(t)‾x(-t)=\overline{x(t)} and the change of variable τ=−t\tau=-t: an‾=1T∫0Tx(t)∗ ⁣ejω0ntdt=1T∫0Tx(−t)ejω0ntdt=−1T∫0−Tx(τ)e−jω0nτdτ=1T∫−T0x(τ)e−jω0nτdτ=an,\overline{a_n}=\frac1T\int_0^Tx(t)^{*}\!e^{j\omega_0nt}dt=\frac1T\int_0^Tx(-t)e^{j\omega_0nt}dt=-\frac1T\int_0^{-T}x(\tau)e^{-j\omega_0n\tau}d\tau=\frac1T\int_{-T}^{0}x(\tau)e^{-j\omega_0n\tau}d\tau=a_n, where x(t)∗x(t)^* denotes the complex conjugate of x(t)x(t). (⇐\Leftarrow) is left as an exercise.

Fact. x(t)x(t) even   ⟺  an\iff a_n even for all n∈Zn\in\mathbb{Z}.

Proof (⇒\Rightarrow). xx even means x(−t)=x(t)x(-t)=x(t). With τ=−t\tau=-t: a−n=1T∫0Tx(t)e−jω0(−n)tdt=−1T∫0−Tx(−τ)e−jω0nτdτ=1T∫−T0x(−τ)e−jω0nτdτ=ana_{-n}=\frac1T\int_0^Tx(t)e^{-j\omega_0(-n)t}dt=-\frac1T\int_0^{-T}x(-\tau)e^{-j\omega_0n\tau}d\tau=\frac1T\int_{-T}^0x(-\tau)e^{-j\omega_0n\tau}d\tau=a_n. (⇐\Leftarrow) is an exercise.

Exercise (further symmetries to prove):

  • x(t)x(t) imaginary   ⟺  an\iff a_n anti-Hermitian;
  • x(t)x(t) anti-Hermitian   ⟺  an\iff a_n imaginary;
  • x(t)x(t) odd   ⟺  an\iff a_n odd;
  • x(t)x(t) real and even   ⟺  an\iff a_n real and even;
  • x(t)x(t) real and odd   ⟺  an\iff a_n imaginary and odd.

The Fourier series

Notation: Lp([T]):={{x(t)} ∣ ∃T>0: x(t)=x(t+T) ∀t, ∫[T]∣x(τ)∣pdτ<+∞}L^p([T]):=\Big\{\{x(t)\}\ \Big|\ \exists T>0:\ x(t)=x(t+T)\ \forall t,\ \int_{[T]}|x(\tau)|^pd\tau<+\infty\Big\} (see Lebesgue Spaces and Convergence of Sequences of FunctionsL^p and l^p are the spaces of signals with finite p-norm, their inclusions depend on whether the domain is bounded or discrete, and sequences of functions can converge pointwise or in the L^p sense.Lebesgue Spaces and Convergence of Sequences of Functions →).

Given x(t)x(t), t∈Rt\in\mathbb{R}, periodic of period TT and "regular" enough, we can express x(t)x(t) in general as x(t) "="lim⁡N1→+∞N2→+∞∑n=−N1N2anejω0nt,ω0=2πT,x(t)\ "="\lim_{\substack{N_1\to+\infty\\N_2\to+\infty}}\sum_{n=-N_1}^{N_2}a_ne^{j\omega_0nt},\qquad\omega_0=\frac{2\pi}{T}, where ana_n is the nn-th Fourier coefficient. The meaning of this equality depends on the sense in which xx is "regular"; it is the answer to the initial question (see 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 →). Assuming xx is regular enough, we obtain x(t)=∑n=−∞+∞anejω0ntFourier synthesis formula, i.e. the Fourier series,\boxed{x(t)=\sum_{n=-\infty}^{+\infty}a_ne^{j\omega_0nt}}\quad\text{Fourier synthesis formula, i.e. the Fourier series,} an:=1T∫[T]x(t)e−jω0ntdtFourier analysis formula, i.e. the n-th Fourier coefficient.\boxed{a_n:=\frac1T\int_{[T]}x(t)e^{-j\omega_0nt}dt}\quad\text{Fourier analysis formula, i.e. the }n\text{-th Fourier coefficient.}

Special case: constants. Constant signals are periodic of any period T>0T>0, so we do not know how to determine ω0\omega_0. If x(t)=Ωx(t)=\Omega for all tt, it is self-evident that a0=1T∫[T]Ω dt=Ωa_0=\frac1T\int_{[T]}\Omega\,dt=\Omega and an=0a_n=0 for all n≠0n\neq0.

Observation. a0=1T∫[T]x(t)e−jω0⋅0⋅tdt=1T∫[T]x(t)dt=m[T][x]a_0=\frac1T\int_{[T]}x(t)e^{-j\omega_0\cdot0\cdot t}dt=\frac1T\int_{[T]}x(t)dt=m_{[T]}[x], the mean value of xx over a period.

Alternative formulas for the Fourier series

Recall an=1T∫[T]x(t)e−jω0ntdta_n=\frac1T\int_{[T]}x(t)e^{-j\omega_0nt}dt and x(t) "="∑nanejω0ntx(t)\,"="\sum_{n}a_ne^{j\omega_0nt}, where ω0=2πT\omega_0=\frac{2\pi}{T} is tied to the fundamental period of x(t)x(t); the equality holds in different senses depending on the properties of x(t)x(t) and on the type of convergence wanted.

Polar form. Let x(t)∈Cx(t)\in\mathbb{C} and set an=Anejφna_n=A_ne^{j\varphi_n}. Then x(t)=∑n=−∞+∞Anej(ω0nt+φn)x(t)=\sum_{n=-\infty}^{+\infty}A_ne^{j(\omega_0nt+\varphi_n)}.

Real signals. If x(t)∈Rx(t)\in\mathbb{R}, then an‾=a−n\overline{a_n}=a_{-n} (Hermitian), which means A−n=AnA_{-n}=A_n and φ−n=−φn\varphi_{-n}=-\varphi_n. Using cos⁡z=ejz+e−jz2\cos z=\frac{e^{jz}+e^{-jz}}{2} and sin⁡z=ejz−e−jz2j\sin z=\frac{e^{jz}-e^{-jz}}{2j}, x(t)=a0+∑n=1+∞An[ej(ω0nt+φn)+e−j(ω0nt+φn)],x(t)=a_0+\sum_{n=1}^{+\infty}A_n\Big[e^{j(\omega_0nt+\varphi_n)}+e^{-j(\omega_0nt+\varphi_n)}\Big], x(t)=m[T][x]+2∑n=1+∞Ancos⁡(ω0nt+φn)x(t)∈R,\boxed{x(t)=m_{[T]}[x]+2\sum_{n=1}^{+\infty}A_n\cos(\omega_0nt+\varphi_n)}\qquad x(t)\in\mathbb{R}, where a0=1T∫[T]x(t)dta_0=\frac1T\int_{[T]}x(t)dt is the mean value over [T][T].

Cosine and sine (trigonometric) form. Let x(t)∈Cx(t)\in\mathbb{C}. From an=1T∫[T]x(t)e−jω0ntdta_n=\frac1T\int_{[T]}x(t)e^{-j\omega_0nt}dt impose an=12Bn−j12Cna_n=\frac12B_n-j\frac12C_n. Then Bn=2T∫[T]x(t)cos⁡(ω0nt)dt,Cn=2T∫[T]x(t)sin⁡(ω0nt)dt,x(t)=12∑n=−∞+∞(Bn−jCn)ejω0nt.B_n=\frac2T\int_{[T]}x(t)\cos(\omega_0nt)dt,\qquad C_n=\frac2T\int_{[T]}x(t)\sin(\omega_0nt)dt,\qquad x(t)=\frac12\sum_{n=-\infty}^{+\infty}(B_n-jC_n)e^{j\omega_0nt}. Moreover, if x(t)∈Rx(t)\in\mathbb{R}: x(t)=B02+∑n=1+∞[Bncos⁡(ω0nt)+Cnsin⁡(ω0nt)]x(t)∈R.\boxed{x(t)=\frac{B_0}{2}+\sum_{n=1}^{+\infty}\Big[B_n\cos(\omega_0nt)+C_n\sin(\omega_0nt)\Big]}\qquad x(t)\in\mathbb{R}. By the projection theorem (Orthogonal Projection and the Projection TheoremThe orthogonal projection of a vector onto a subspace spanned by orthogonal generators has explicit coefficients, and it is the closest point of the subspace to the vector (projection theorem).Orthogonal Projection and the Projection Theorem →) this is the best approximation of x(t)x(t) in terms of trigonometric polynomials.

For a worked series with infinitely many terms see 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 →; for the properties of the coefficient map see 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 →.

Versione ripasso

  • Harmonics: ψn(t)=ejnω0t\psi_n(t)=e^{jn\omega_0t}, n∈Zn\in\mathbb{Z}, T=2π/∣ω0∣T=2\pi/|\omega_0|; n=0n=0 constant, n=±1n=\pm1 first harmonic, n=±2n=\pm2 second harmonic. Output of a BIBO stable LTI system: y=∑anH(jnω0)ejnω0ty=\sum a_nH(jn\omega_0)e^{jn\omega_0t}, same period TT.
  • Orthogonality: 1T∫[T]ψmψn‾=δm,n\frac1T\int_{[T]}\psi_m\overline{\psi_n}=\delta_{m,n} (Kronecker); proof: m=nm=n gives 11; m≠nm\ne n gives [ej(m−n)ω0τ]0T=0[e^{j(m-n)\omega_0\tau}]_0^T=0.
  • Analysis: an=1T∫[T]x(t)e−jnω0tdta_n=\frac1T\int_{[T]}x(t)e^{-jn\omega_0t}dt (projection onto the nn-th harmonic). Synthesis: x(t)=∑n=−∞+∞anejω0ntx(t)=\sum_{n=-\infty}^{+\infty}a_ne^{j\omega_0nt} (meaning depends on regularity). Exists finite if x∈L1([T])x\in L^1([T]).
  • a0=m[T][x]a_0=m_{[T]}[x] (mean value); a constant Ω\Omega has a0=Ωa_0=\Omega, an=0a_n=0 for n≠0n\ne0. Energy over a period E[T]=T∑∣an∣2E_{[T]}=T\sum|a_n|^2.
  • Symmetries: xx real   ⟺  an\iff a_n Hermitian (a−n=an‾a_{-n}=\overline{a_n}); xx Hermitian   ⟺  an\iff a_n real; xx even   ⟺  an\iff a_n even; xx odd   ⟺  an\iff a_n odd; imaginary   ⟺  \iff anti-Hermitian; real and even   ⟺  \iff real and even; real and odd   ⟺  \iff imaginary and odd.
  • Real xx, polar form: an=Anejφna_n=A_ne^{j\varphi_n}, A−n=AnA_{-n}=A_n, φ−n=−φn\varphi_{-n}=-\varphi_n, x(t)=m[T][x]+2∑n≥1Ancos⁡(nω0t+φn)x(t)=m_{[T]}[x]+2\sum_{n\ge1}A_n\cos(n\omega_0t+\varphi_n).
  • Trigonometric form: an=12(Bn−jCn)a_n=\frac12(B_n-jC_n), Bn=2T∫xcos⁡(nω0t)B_n=\frac2T\int x\cos(n\omega_0t), Cn=2T∫xsin⁡(nω0t)C_n=\frac2T\int x\sin(n\omega_0t); real xx: x=B02+∑n≥1[Bncos⁡(nω0t)+Cnsin⁡(nω0t)]x=\frac{B_0}2+\sum_{n\ge1}[B_n\cos(n\omega_0t)+C_n\sin(n\omega_0t)].
  • Example: x=1+sin⁡ω0t+2cos⁡ω0t+cos⁡(2ω0t+π4)x=1+\sin\omega_0t+2\cos\omega_0t+\cos(2\omega_0t+\frac\pi4): a0=1a_0=1, a±1=1∓j2a_{\pm1}=1\mp\frac j2, a±2=12e±jπ/4a_{\pm2}=\frac12e^{\pm j\pi/4}, others 00. Get them from Euler's formulas, not from the integral.
  • Typical mistakes: dropping the 1T\frac1T; forgetting the minus sign in e−jnω0te^{-jn\omega_0t}; computing negative-nn coefficients of a real signal instead of conjugating; using ω0\omega_0 for a constant (any TT works).

Teoria collegata