You are on page 1of 15

Fourier Series and Transform

Daniel Sanz — URV

26 de noviembre de 2023

1
Fundamentos de Comunicaciones I URV

The aim of this brief paper is to show a easy and chill way to calculate Fourier series based on the theory
of linear algebra and orthogonal basis.

1. Introduction

Definition of Basis
Let V be a vector space over a field F . A subset B of V is called a basis for V if the following conditions
hold:

1. B spans V , i.e., every vector in V can be expressed as a linear combination of vectors in B.

2. B is linearly independent, i.e., no vector in B can be written as a linear combination of the others.

If B satisfies these conditions, then V is said to be finite-dimensional, and the number of vectors in B
is the dimension of V , denoted as dim(V ).

Linear Combination and Scalar Product


Consider vectors v1 , v2 , . . . , vn in a vector space V . A linear combination of these vectors is given by:

u = c1 v1 + c2 v2 + . . . + cn vn

where c1 , c2 , . . . , cn are scalar coefficients.


The scalar product (dot product) of two vectors u and v is denoted by ⟨u, v⟩ and is given by:

⟨u, v⟩ = u1 v1 + u2 v2 + . . . + un vn

Two vectors u and v are orthogonal if their scalar product is zero, i.e., ⟨u, v⟩ = 0.

Scalar Product of Continuous Functions


Let f (x) and g(x) be two continuous functions defined on a closed interval [a, b]. The scalar product of
these functions, denoted by ⟨f, g⟩, is defined as:
Z b
⟨f, g⟩ = f (x) · g(x) dx
a

This integral represents the area between the graphs of f (x) and g(x) over the interval [a, b].
Two functions f (x) and g(x) are orthogonal over [a, b] if their scalar product is zero, i.e., ⟨f, g⟩ = 0.
Basically, this explains us how similar (or not) are the two functions.

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 2


Fundamentos de Comunicaciones I URV

For instance, let’s suppose we have a a basis n = 3, we can represent in a basis like that:
     
1 0 0
e1 = 0 , e2 = 1 , e3 = 0
     

0 0 1
Each vector in this basis corresponds to a unit vector along one of the coordinate axes in three-dimensional
space.
Any vector v in R3 can be expressed as a linear combination of these basis vectors:

v = x1 e1 + x2 e2 + x3 e3

where x1 , x2 , and x3 are the coordinates of v with respect to the standard basis.
This is just a generalization for any space.

Kronecker Delta and Tensor Notation


The Kronecker delta, denoted by δij , is a mathematical function defined as:

1 if i = j
δij =
0 if i ̸= j

In tensor notation, the Kronecker delta is often used to represent the identity matrix. For a vector space
V , the identity matrix in terms of the Kronecker delta is given by:

1 if i = j
δij =
0 if i ̸= j

The identity matrix in R3 can be written as:


 
δ11 δ12 δ13
I = δ21 δ22 δ23 
 

δ31 δ32 δ33

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 3


Fundamentos de Comunicaciones I URV

Trigonometric Fourier Series, Exponential Series, and Polar Series


The Trigonometric Fourier Series of a function f (x) on the interval [a, b] is given by:

∞     
a0 X 2πn 2πn
f (x) ∼ + an cos x + bn sin x
2 n=1
b−a b−a

where a0 , an , and bn are the Fourier coefficients.


The Exponential Series representation of f (x) is given by:


X 2πn
f (x) ∼ cn ei b−a x
n=−∞

where cn are the complex Fourier coefficients.


The Polar Series representation of f (r, θ) in polar coordinates is given by:


X
f (r, θ) ∼ rn (an cos(nθ) + bn sin(nθ))
n=−∞

where r is the radial coordinate, θ is the angular coordinate, and an and bn are the polar coefficients.
Now it looks difficult, but according to orthogonality, we should now these integrals:

Orthogonality of Trigonometric Functions


Let f (x) and g(x) be two functions defined on a given interval [a, b]. The orthogonality of certain trigo-
nometric functions can be demonstrated by evaluating the following integrals:

1. Orthogonality of Sine and Cosine:


Z b
sin(mx) cos(nx) dx = 0
a

for any integers m and n where m ̸= n.

2. Orthogonality of Sine with Sine:



Z b 0 if m ̸= n
sin(mx) sin(nx) dx =
a  b−a if m = n
2

3. Orthogonality of Cosine with Cosine:



Z b 0 if m ̸= n
cos(mx) cos(nx) dx =
a  b−a if m = n
2

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 4


Fundamentos de Comunicaciones I URV

These orthogonality relations are fundamental in Fourier series and other areas of mathematical analysis.

Conditions for Fourier Series Expansion


The Fourier series expansion of a function f (x) on the interval [a, b] is given by:

∞     
a0 X 2πn 2πn
f (x) ∼ + an cos x + bn sin x
2 n=1
b−a b−a

To ensure the convergence and validity of the Fourier series, the following conditions must be satisfied:

1. Periodicity: The function f (x) must be periodic on the interval [a, b] with a period T = b − a.

2. Piece-wise Continuity: f (x) must be piece-wise continuous on [a, b], allowing for a finite number of
jump discontinuities.

3. Finite Number of Extreme: f (x) must have a finite number of extreme within each period T .

4. Finite Number of Discontinuities: The number of discontinuities of f (x) in [a, b] should be finite.

These conditions ensure that the Fourier series provides an accurate representation of the function within
the specified interval.

Transforming to Fourier Transform


The Fourier Transform of a function f (x) is defined by:
Z ∞
F{f (x)} = f (x)e−i2πξx dx
−∞

To deduce this from the Fourier series, we start with the exponential series representation:


X 2πn
f (x) ∼ cn ei b−a x
n=−∞

2π n
where cn are the complex Fourier coefficients. By letting T = b − a, ω0 = T , and ξ = T, we can rewrite
this as:


X
f (x) ∼ cn eiω0 ξx
n=−∞

Now, as T approaches infinity (b → ∞ and a → −∞), the sum becomes an integral:


Z ∞
f (x) ∼ fˆ(ξ)eiω0 ξx dξ
−∞

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 5


Fundamentos de Comunicaciones I URV

where fˆ(ξ) is the Fourier transform of f (x).

Inverse Fourier Transform and Properties


The Inverse Fourier Transform of a function F (ξ) is defined as:
Z ∞
f (x) = F −1 {F (ξ)} = F (ξ)ei2πξx dξ
−∞

The inverse transform recovers the original function f (x) from its frequency domain representation F (ξ).

Properties of Inverse Fourier Transform


1. Linearity: The inverse transform is a linear operation.

F −1 {aF1 (ξ) + bF2 (ξ)} = aF −1 {F1 (ξ)} + bF −1 {F2 (ξ)}

2. Time-Shifting: A time-shifted function f (x−x0 ) corresponds to a phase-shifted spectrum F (ξ)e−i2πξx0 .

F −1 {F (ξ)e−i2πξx0 } = f (x − x0 )

3. Frequency-Shifting: A frequency-shifted function ei2πξ0 x f (x) corresponds to a time-shifted spectrum


F (ξ − ξ0 ).
F −1 {ei2πξ0 x F (ξ)} = f (x − ξ0 )

4. Scaling: Scaling in the time domain corresponds to scaling in the frequency domain.

1 x
F −1 {F (αξ)} = f
|α| α

Example
sin(πξ)
Consider the function F (ξ) = sinc(ξ), where sinc(ξ) = πξ . The inverse Fourier transform of F (ξ) is
given by:
Z ∞
−1
f (x) = F {sinc(ξ)} = sinc(ξ)ei2πξx dξ
−∞
x

This integral evaluates to f (x) = rect 2 , where rect(x) is the rectangular function:

1
1 if |x| < 2
rect(x) =
0 otherwise

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 6


Fundamentos de Comunicaciones I URV

Calculation of Fourier Coefficients and Orthogonality


Consider the Fourier series expansion of a function f (x) on the interval [a, b]:

∞     
a0 X 2πn 2πn
f (x) ∼ + an cos x + bn sin x
2 n=1
b−a b−a

The coefficients a0 , an , and bn are determined by the following formulas:

Z b
1
a0 = f (x) dx
b−a a
Z b  
2 2πn
an = f (x) cos x dx
b−a a b−a
Z b  
2 2πn
bn = f (x) sin x dx
b−a a b−a

The orthogonality of the trigonometric functions leads to the following relationships:


Z b     0 if m ̸= n
2πm 2πn
cos x cos x dx =
a b−a b−a  b−a if m = n
2

Z b 0 if m ̸= n
   
2πm 2πn
sin x sin x dx =
a b−a b−a  b−a if m = n
2
Z b    
2πm 2πn
cos x sin x dx = 0
a b − a b −a

These orthogonality integrals, prove that the Fourier series is a set of sums.
Consider a periodic function f (x) with period T . The Fourier series expansion involves calculating the
coefficients Cn given by:
Z a+T  
1 2πn
Cn = f (x) cos x dx
T a T
For a par function f (x), the formula simplifies to:
Z a+T  
2 2πn
Cn = f (x) cos x dx
T a T
The orthogonality of trigonometric functions over one period implies the following relations:
Z a+T    
2πm 2πn T
cos x cos x dx = δmn
a T T 2

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 7


Fundamentos de Comunicaciones I URV

Z a+T    
2πm 2πn T
sin x sin x dx = δmn
a T T 2
Z a+T    
2πm 2πn
cos x sin x dx = 0
a T T
Using these properties, we can derive the formula for the coefficients:
Z a+T  
2 2πn
Cn = f (x) cos x dx
T a T
This formula allows us to calculate the coefficients in the Fourier series expansion of f (x).

Minimum Squared Error Calculation


Consider a signal or function f (x) and an approximation g(x). The squared error between the signal and
the approximation is given by:
Z b
E= [f (x) − g(x)]2 dx
a

To find the minimum of this error, we differentiate E with respect to the parameters of the approximation
and set the derivatives to zero.
Let g(x) be an approximation represented by a Fourier series:

∞     
a0 X 2πn 2πn
g(x) = + an cos x + bn sin x
2 n=1
T T

The squared error is:


Z b
E= [f (x) − g(x)]2 dx
a

Z b
" ∞     #2
a0 X 2πn 2πn
= f (x) − − an cos x + bn sin x dx
a 2 n=1
T T

To find the minimum, we differentiate E with respect to a0 , an , and bn and set the derivatives to zero.
For a0 :
Z b
∂E
=− [f (x) − g(x)] dx = 0
∂a0 a

For an :

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 8


Fundamentos de Comunicaciones I URV

Z b  
∂E 2πn
= −2 [f (x) − g(x)] cos x dx = 0
∂an a T
For bn :
Z b  
∂E 2πn
= −2 [f (x) − g(x)] sin x dx = 0
∂bn a T
Solving these equations provides the coefficients a0 , an , and bn that minimize the squared error.
Indeed, we can use this alternative expression for the calculation of the error.

Minimum Squared Error in Terms of Fourier Coefficients


Consider a signal or function f (x) and its Fourier series approximation g(x) over one period [a, a + T ]:

∞     
a0 X 2πn 2πn
g(x) = + an cos x + bn sin x
2 n=1
T T

The minimum squared error is given by the norm squared of the difference between the signal and its
approximation:
Z a+T
1
E= [f (x) − g(x)]2 dx
T a

Z a+T
" ∞     #2
1 a0 X 2πn 2πn
= f (x) − − an cos x + bn sin x dx
T a 2 n=1
T T

The squared error can be expressed as:


Z a+T ∞
1 2
X
a2n + b2n

E= f (x) dx −
T a n=0

To find the minimum, differentiate E with respect to a0 , an , and bn and set the derivatives to zero.
For a0 :
Z a+T
∂E
=− [f (x) − g(x)] dx = 0
∂a0 a

For an :
Z a+T  
∂E 2πn
= −2 [f (x) − g(x)] cos x dx = 0
∂an a T
For bn :

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 9


Fundamentos de Comunicaciones I URV

Z a+T  
∂E 2πn
= −2 [f (x) − g(x)] sin x dx = 0
∂bn a T
Solving these equations provides the coefficients a0 , an , and bn that minimize the squared error.

Derivation of Fourier Coefficients via Inner Products


Consider a signal or function f (x) with period T and its Fourier series approximation g(x):

∞     
a0 X 2πn 2πn
g(x) = + an cos x + bn sin x
2 n=1
T T

The coefficients a0 , an , and bn are determined by the following formulas:


Z a+T
2
a0 = f (x) dx
T a

Z a+T  
2 2πn
an = f (x) cos x dx
T a T
Z a+T  
2 2πn
bn = f (x) sin x dx
T a T
Now, let’s consider the inner product of f (x) with the basis functions:
Z a+T  
2 2πn
⟨f, cos(ω0 t)⟩ = f (x) cos x dx
T a T
Z a+T  
2 2πn
⟨f, sin(ω0 t)⟩ = f (x) sin x dx
T a T
Now, we can express the coefficients in terms of inner products:

a0 = ⟨f, 1⟩

an = ⟨f, cos(ω0 t)⟩

bn = ⟨f, sin(ω0 t)⟩

So, each Fourier coefficient can be seen as the ratio of the inner product of f (x) with the corresponding
basis function to the inner product of the basis function with itself.

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 10


Fundamentos de Comunicaciones I URV

Parseval’s Relations and Energy Conservation


Parseval’s relations provide a link between the time domain and the frequency domain representations of
a signal. For a function f (x) with period T , and its Fourier series representation g(x), the relations are as
follows:

Parseval’s Theorem for Trigonometric Fourier Series


For a Fourier series of the form:

∞     
a0 X 2πn 2πn
g(x) = + an cos x + bn sin x
2 n=1
T T

Parseval’s theorem states:


Z a+T ∞
1 1 2 X 2
[g(x)]2 dx = a0 + (an + b2n )
T a 2 n=1

This relation emphasizes the conservation of energy between the time and frequency domains.

Parseval’s Theorem for Complex Fourier Series


Alternatively, for a complex Fourier series of the form:


X
g(x) = cn eiω0 nx
n=−∞

Parseval’s theorem takes the form:


Z a+T ∞
1 2
X
|g(x)| dx = |cn |2
T a n=−∞

This version relates the energy in the time domain to the magnitudes of the complex coefficients in the
frequency domain.

Energy Conservation Interpretation


Parseval’s relations can be interpreted as stating that the total energy of a signal is the same in both
the time and frequency domains. The sum of the squares of the Fourier coefficients represents the energy in
the frequency domain, while the integral of the squared magnitude of the signal represents the energy in the
time domain.

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 11


Fundamentos de Comunicaciones I URV

Example of Parseval’s Theorem


Consider the function f (x) = sin(x) over the interval 0 ≤ x ≤ 2π. We want to find the Fourier series
representation of f (x) and verify Parseval’s theorem.
The Fourier series for f (x) is given by:


a0 X
f (x) = + (an cos(nx) + bn sin(nx))
2 n=1

where the coefficients are calculated as follows:


Z 2π
2
a0 = sin(x) dx = 0
2π 0
Z 2π
2
an = sin(x) cos(nx) dx = 0
2π 0
Z 2π Z 2π
2 1
bn = sin(x) sin(nx) dx = sin(x) sin(nx) dx
2π 0 π 0

The integral involving bn is non-zero only when n = 1, and in that case:


Z 2π
1
b1 = sin(x) sin(x) dx = 1
π 0

Therefore, the Fourier series for f (x) = sin(x) is:

1
f (x) = sin(x)
π
Now, let’s verify Parseval’s theorem:
Z 2π ∞
1 X
| sin(x)|2 dx = (a2n + b2n )
2π 0 n=1
Z 2π
1 1
sin2 (x) dx =
2π 0 π2
The right-hand side is the sum of the squares of the Fourier coefficients, which is b21 = 1. Therefore,
Parseval’s theorem holds for this example.

Examples of Fourier Series


Example 1: Square Wave
Consider the square wave function defined on [0, 2π):

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 12


Fundamentos de Comunicaciones I URV


1 for 0 ≤ x < π
f (x) =
−1 for π ≤ x < 2π

The Fourier series for this square wave is given by:


4 X sin((2n − 1)x)
f (x) =
π n=1 2n − 1

1.1. Example 2: Fourier Series for Saw tooth Wave


Consider the saw tooth wave function defined on [0, 2π):

g(x) = x

The Fourier series for this saw tooth wave, considering its odd nature, is given by:


1 1 X sin(nx)
g(x) = −
2 π n=1 n

Example 3: Triangle Wave


Consider the triangle wave function defined on [0, 2π):

x for 0 ≤ x < π
h(x) =
2π − x for π ≤ x < 2π

The Fourier series for this triangle wave is given by:


X (−1)n+1
h(x) = sin(nx)
n=1
n2

Fourier Transforms of Common Functions


1. Dirac’s Delta (δ(t))

F{δ(t)} = 1

2. Pulse (u(t))

1
F{u(t)} = + πδ(ω)

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 13


Fundamentos de Comunicaciones I URV

3. Decay exponential (e−at u(t))

1
F{e−at u(t)} =
a + iω

4. Rect Signal (rect(t))

ω
F{rect(t)} = sinc
2

5. Sin (sin(ω0 t))

F{sin(ω0 t)} = π (δ(ω − ω0 ) − δ(ω + ω0 ))

6. Cos (cos(ω0 t))

F{cos(ω0 t)} = π (δ(ω − ω0 ) + δ(ω + ω0 ))

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 14


Fundamentos de Comunicaciones I URV

Figura 1: Joseph Fourier.

Doble titulación en ingenierı́a de Sistemas y servicios de telecomunicaciones y Biomédica 15

You might also like