Berkeley Notes
  • Introduction
  • EE120
    • Introduction to Signals and Systems
    • The Fourier Series
    • The Fourier Transform
    • Generalized transforms
    • Linear Time-Invariant Systems
    • Feedback Control
    • Sampling
    • Appendix
  • EE123
    • The DFT
    • Spectral Analysis
    • Sampling
    • Filtering
  • EECS126
    • Introduction to Probability
    • Random Variables and their Distributions
    • Concentration
    • Information Theory
    • Random Processes
    • Random Graphs
    • Statistical Inference
    • Estimation
  • EECS127
    • Linear Algebra
    • Fundamentals of Optimization
    • Linear Algebraic Optimization
    • Convex Optimization
    • Duality
  • EE128
    • Introduction to Control
    • Modeling Systems
    • System Performance
    • Design Tools
    • Cascade Compensation
    • State-Space Control
    • Digital Control Systems
    • Cayley-Hamilton
  • EECS225A
    • Hilbert Space Theory
    • Linear Estimation
    • Discrete Time Random Processes
    • Filtering
  • EE222
    • Real Analysis
    • Differential Geometry
    • Nonlinear System Dynamics
    • Stability of Nonlinear Systems
    • Nonlinear Feedback Control
Powered by GitBook
On this page
  • Continuous Time
  • Discrete Time
  • Properties of the Fourier Series
  • Interpreting the Fourier Series
  • Discrete Time
  • Continuous Time

Was this helpful?

  1. EE120

The Fourier Series

Continuous Time

Definition 19

A function x(t)x(t)x(t) is periodic if ∃T\exists T∃T such that ∀t,x(t−T)=x(t)\forall t, x(t-T)=x(t)∀t,x(t−T)=x(t).

Definition 20

The fundamental period is the smallest such TTT which satisfies the periodicity property in Definition 19

Theorem 1

If x(t)x(t)x(t) and y(t)y(t)y(t) are functions with period T1T_1T1​ and T2T_2T2​ respectively, then x(t)+y(t)x(t)+y(t)x(t)+y(t) is periodic if ∃m,n∈Z\exists m, n \in \mathbb{Z}∃m,n∈Z such that mT1=nT2mT_1 = nT_2mT1​=nT2​.

Definition 21

Given a periodic function x(t)x(t)x(t) with fundamental period TTT and fundamental frequency ω0=2πT\omega_0=\frac{2\pi}{T}ω0​=T2π​, the Fourier Series of xxx is a weighted sum of the harmonic functions.

x(t)=∑k=−∞∞akejkω0tx(t) = \sum_{k=-\infty}^{\infty}{a_ke^{jk\omega_0t}}x(t)=∑k=−∞∞​ak​ejkω0​t

To find the coefficients aka_kak​:

\begin{aligned} x(t) \cdot e^{-jn\omega_0t} &= \sum_{k=-\infty}^{\infty}{a_ke^{j\omega_0t(k-n)}}\\ \int_{T}{x(t) \cdot e^{-jn\omega_0t}dt} &= \sum_{k=-\infty}^{\infty}{a_k\int_{T}{e^{j\omega_0t(k-n)}}dt}\\ &= \begin{cases} Ta_k & \text{if } $k=n$,\\ 0 & \text{else } \end{cases}\end{aligned}

Rearranging this, we can see that

an=1T∫Tx(t)e−jnω0tdt.a_n = \frac{1}{T}\int_{T}{x(t)e^{-jn\omega_0t}dt}.an​=T1​∫T​x(t)e−jnω0​tdt.

For a0a_0a0​, the DC offset term, this formula makes a lot of sense because it is just the average value of the function over one period.

a0=1T∫Tx(t)dta_0 = \frac{1}{T}\int_{T}{x(t)dt}a0​=T1​∫T​x(t)dt

Because the Fourier Series is an infinite sum, there is a worry that for some functions x(t)x(t)x(t), it will not converge. The Dirichlet Convergent Requirements tell us when the Fourier Series converges. More specificially, they tell us when

∀τ, lim⁡M→∞xM(τ)=x(τ)xM(t)=∑k=−MMakejkω0t\forall \tau, \ \lim_{M \rightarrow \infty}{x_M(\tau) = x(\tau)} \qquad x_M(t) = \sum_{k=-M}^{M}{a_k e^{jk\omega_0t}}∀τ, limM→∞​xM​(τ)=x(τ)xM​(t)=∑k=−MM​ak​ejkω0​t

will converge.

Theorem 2

The Fourier Series of a continuous time periodic function x(t)x(t)x(t) will converge when xxx is piecewise continuous and ddtx\frac{d}{dt}xdtd​xis piecewise continuous.

  • If xxx is continuous at τ\tauτ, lim⁡M→∞xM(τ)=x(τ)\lim_{M \rightarrow \infty}x_M(\tau) = x(\tau)limM→∞​xM​(τ)=x(τ)

  • If xxx is discontinuous at τ\tauτ, then lim⁡M→∞xM(τ)=12(x(τ−)+x(τ+))\lim_{M\rightarrow \infty}x_M(\tau) = \frac{1}{2}(x(\tau^-) + x(\tau^+))limM→∞​xM​(τ)=21​(x(τ−)+x(τ+))

These convergence requirements are for pointwise convergence only. They do not necessarily imply that the graphs of the Fourier Series and the original function will look the same.

Discrete Time

The definition for periodicity in discrete time is the exact same as the definition in continuous time.

Definition 22

A function x[n]x[n]x[n] is periodic with period N∈ZN \in \mathbb{Z}N∈Z if ∀n,x[n+N]=x[n]\forall n, x[n+N]=x[n]∀n,x[n+N]=x[n]

However, there are some differences. For example, x[n]=cos(ω0n)x[n] = cos(\omega_0 n)x[n]=cos(ω0​n) is only periodic in discrete time if ∃N,M∈Z,ω0N=2πM\exists N, M \in \mathbb{Z}, \omega_0 N = 2 \pi M∃N,M∈Z,ω0​N=2πM.

Theorem 3

The sum of two discrete periodic signals is periodic

Theorem 3 is not always true in continuous time but it is in discrete time.

The Fourier Series in discrete time is the same idea as the Fourier series in continuous time: to express every signal as a linear combination of complex exponentials. The discrete time basis that we use are the Nth roots of unity.

ϕk[n]=ejk2πNn\phi_k[n] = e^{jk\frac{2\pi}{N}n}ϕk​[n]=ejkN2π​n

  • ϕk[n]\phi_k[n]ϕk​[n] is perioidic in n (i.e ϕk[n+N]=ϕk[n]\phi_k[n+N] = \phi_k[n]ϕk​[n+N]=ϕk​[n])

  • ϕk[n]\phi_k[n]ϕk​[n] is periodic in k (i.e ϕk+N[n]=ϕk[n]\phi_{k+N}[n] = \phi_k[n]ϕk+N​[n]=ϕk​[n])

  • ϕk[n]⋅ϕm[n]=ϕk+m[n]\phi_k[n]\cdot \phi_m[n] = \phi_{k + m}[n]ϕk​[n]⋅ϕm​[n]=ϕk+m​[n]

Notice that with this basis, there are only N unique functions that we can use. An additional property of the ϕk[n]\phi_k[n]ϕk​[n] is that

∑n=<N>ϕk[n]={Nif k=0,±N,±2N,⋯0otherwise.\sum_{n=<N>}{\phi_k[n]} = \begin{cases} N & \text{if } k = 0, \pm N, \pm 2N, \cdots\\ 0 & \text{otherwise.} \end{cases}∑n=<N>​ϕk​[n]={N0​if k=0,±N,±2N,⋯otherwise.​

Definition 23

Given a periodic discrete-time function x[n]x[n]x[n] with period NNN, the Fourier series of the function is a weighted sum of the roots of unity basis functions.

x[n]=∑k=0N−1akϕk[n]x[n] = \sum_{k=0}^{N-1}{a_k\phi_k[n]}x[n]=∑k=0N−1​ak​ϕk​[n]

In order to find the values of aka_kak​, we can perform a similar process as in continuous time.

x[n]=∑k=0N−1akϕk[n]x[n]ϕ−M[n]=∑k=0N−1akϕk[n]ϕ−M[n]∑n=<N>x[n]ϕ−M[n]=∑n=<N>∑k=<N>akϕk−M[n]=∑k=<N>ak∑n=<N>ϕk−M[n]∑n=<N>x[n]ϕ−M[n]=aMNaM=1N∑n=<N>x[n]ϕ−M[n]\begin{aligned} x[n] &= \sum_{k=0}^{N-1}{a_k\phi_k[n]}\\ x[n]\phi_{-M}[n] &= \sum_{k=0}^{N-1}{a_k\phi_k[n]\phi_{-M}[n]}\\ \sum_{n=<N>}{x[n]\phi_{-M}[n]} &= \sum_{n=<N>}{\sum_{k=<N>}{a_k\phi_{k-M}[n]}} = \sum_{k=<N>}{a_k\sum_{n=<N>}{\phi_{k-M}[n]}}\\ \sum_{n=<N>}{x[n]\phi_{-M}[n]} &= a_MN\\ a_M &= \frac{1}{N}\sum_{n=<N>}{x[n]\phi_{-M}[n]}\end{aligned}x[n]x[n]ϕ−M​[n]n=<N>∑​x[n]ϕ−M​[n]n=<N>∑​x[n]ϕ−M​[n]aM​​=k=0∑N−1​ak​ϕk​[n]=k=0∑N−1​ak​ϕk​[n]ϕ−M​[n]=n=<N>∑​k=<N>∑​ak​ϕk−M​[n]=k=<N>∑​ak​n=<N>∑​ϕk−M​[n]=aM​N=N1​n=<N>∑​x[n]ϕ−M​[n]​

Properties of the Fourier Series

Linearity: If aka_kak​ and bkb_kbk​ are the coefficients of the Fourier Series of x(t)x(t)x(t) and y(t)y(t)y(t) respectively, then Aak+BbkAa_k + Bb_kAak​+Bbk​ are the coefficients of the Fourier series of Ax(t)+By(t)Ax(t)+By(t)Ax(t)+By(t)

Time Shift: If aka_kak​ are the coefficients of the Fourier Series of x(t)x(t)x(t), then bk=e−jk2πTt0akb_k = e^{-jk\frac{2\pi}{T}t_0}a_kbk​=e−jkT2π​t0​ak​ are the coefficients of the Fourier Series of x^(t)=x(t−t0)\hat{x}(t)=x(t-t_0)x^(t)=x(t−t0​)

Time Reversal: If aka_kak​ are the coefficients of the Fourier Series of x(t)x(t)x(t), then bk=a−kb_k=a_{-k}bk​=a−k​ are the coefficients of the Fourier Series of x(−t)x(-t)x(−t)

Conjugate Symmetry: If aka_kak​ are the coefficients of the Fourier Series of x(t)x(t)x(t), then ak∗a_k^*ak∗​ are the coefficients of the Fourier Series of x∗(t)x^*(t)x∗(t). This means that x(t)x(t)x(t) is a real valued signal, then ak=a−k∗a_k=a_{-k}^*ak​=a−k∗​

Theorem 4 (Parseval's Theorem)

Continuous Time: 1T∫∣x(t)∣2dt=∑k=−∞∞∣ak∣2\textbf{Continuous Time: } \frac{1}{T}\int{|x(t)|^2dt} = \sum_{k=-\infty}^{\infty}{|a_k|^2}Continuous Time: T1​∫∣x(t)∣2dt=∑k=−∞∞​∣ak​∣2

Discrete Time: 1N∑n=<N>∣x[n]∣2=∑k=<N>∣ak∣2\textbf{Discrete Time: } \frac{1}{N}\sum_{n=<N>}{|x[n]|^2} = \sum_{k=<N>}{|a_k|^2}Discrete Time: N1​∑n=<N>​∣x[n]∣2=∑k=<N>​∣ak​∣2

Interpreting the Fourier Series

A good way to interpret the Fourier Series is as a change of basis. In both the continuous and discrete case, we are projecting our signal xxx onto a set of basis functions, and the coefficients aka_kak​ are the coordinates of our signal in the new space.

Discrete Time

Since in discrete time, signal is peroidic in NNN, we can turn any it into a vector x⃗∈CN\vec{x}\in \mathbb{C}^Nx∈CN.

x⃗=[x[0]x[1]⋮x[N−1]]∈CN\vec{x} = \left[ \begin{array}{c} x[0]\\ x[1]\\ \vdots\\ x[N-1] \end{array} \right] \in \mathbb{C}^Nx=​x[0]x[1]⋮x[N−1]​​∈CN

We can use this to show that ϕk\phi_kϕk​ form an orthogonal basis. If we take two of them ϕk[n]\phi_k[n]ϕk​[n] and ϕM[n]\phi_M[n]ϕM​[n] (k≠Mk\ne Mk=M) and compute their dot product of their vector forms, then

ϕk[n]⋅ϕM[n]=ϕM∗ϕk=∑<n>ϕk−M[n]=0\phi_k[n] \cdot \phi_M[n] = \phi_M^*\phi_k = \sum_{<n>}{\phi_{k-M}[n]} = 0ϕk​[n]⋅ϕM​[n]=ϕM∗​ϕk​=∑<n>​ϕk−M​[n]=0

That means that ϕk\phi_kϕk​ and ϕM\phi_MϕM​ are orthogonal, and they are NNN of them, therefore they are a basis. If we compute their magnitudes, we see

ϕk⋅ϕk=∣∣ϕk∣∣2=N,∴∣∣ϕk∣∣=N\phi_k \cdot \phi_k = ||\phi_k||^2 = N, \therefore ||\phi_k|| = \sqrt{N}ϕk​⋅ϕk​=∣∣ϕk​∣∣2=N,∴∣∣ϕk​∣∣=N​

Finally, if we compute x⃗ϕM\vec{x}\phi_MxϕM​ where x⃗\vec{x}x is the vector form of an N-periodic signal,

x⃗⋅ϕM⃗=(∑i=0N−1aiϕi)⋅ϕM=Nam\vec{x}\cdot \vec{\phi_M} = \left(\sum_{i=0}^{N-1}{a_i\phi_i}\right)\cdot \phi_M = Na_mx⋅ϕM​​=(∑i=0N−1​ai​ϕi​)⋅ϕM​=Nam​

am=1Nx⃗⋅ϕMa_m = \frac{1}{N}\vec{x}\cdot \phi_Mam​=N1​x⋅ϕM​

This is exactly the equation we use for finding the Fourier Series coefficients, and notice that it is a projection since N=∣∣ϕm∣∣2N = ||\phi_m||^2N=∣∣ϕm​∣∣2. This gives a nice geometric intution for Parseval’s theorem

1N∑∣x[n]∣2=1N∣∣x⃗∣∣2=∑∣ak∣2\frac{1}{N}\sum{|x[n]|^2} = \frac{1}{N}||\vec{x}||^2 = \sum{|a_k|^2}N1​∑∣x[n]∣2=N1​∣∣x∣∣2=∑∣ak​∣2

because we know the norms of two vectors in different bases must be equal.

Continuous Time

In continuous time, our bases functions are ϕk(t)=ejk2πTt\phi_k(t) = e^{jk\frac{2\pi}{T}t}ϕk​(t)=ejkT2π​t for k∈(−∞,∞)k \in (-\infty, \infty)k∈(−∞,∞) Since we can’t convert continuous functions into vectors, these ϕk\phi_kϕk​ are really a basis for the vector space of square integrable functions on the interval [0,T][0, T][0,T]. The inner product for this vector space is

<x,y>=∫0Tx(t)y∗(t).<x, y> = \int_{0}^{T}{x(t)y^*(t)}.<x,y>=∫0T​x(t)y∗(t).

We can use this inner product to conduct the same proof as we did in discrete time.

PreviousIntroduction to Signals and SystemsNextThe Fourier Transform

Last updated 3 years ago

Was this helpful?