Signal
Signal
Fourier Series
Objectives:
The primary objective of this study is to analyze and represent triangular and square waves
using Fourier Series. The report also aims to demonstrate how the Fourier Series approximation
converges to the actual waveforms.
Theory:
Fourier Series is a fundamental mathematical tool used to analyze periodic signals by decom-
posing them into a sum of sinusoidal components. This decomposition allows engineers and
scientists to study signal behavior in various domains, such as electrical circuits, signal process-
ing, and mechanical vibrations. This report explores the Fourier Series and its application to
triangular and square waves.
∞
X
f (t) = a0 + [an cos(nωt) + bn sin(nωt)]
n=1
2π
w0 : T is the fundamental angular frequency.
For odd and even functions, certain coefficients may vanish, simplifying the series representation.
A square wave is the periodic fucntion that alternates between two levels.Its Fourier Series
expansion consists only of odd harmonics:
∞
4 X 1
f (t) = sin(nω0 t)
π n
n=1,3,5,...
The approximation improves as more harmonics are included, reducing Gibbs phenomenon near
discontinuities.
A triangular wave is a continuous function with linear rise and fall. Its Fourier Series expansion
consists of odd harmonics with squared amplitude decay:
∞
8 X (−1)(n−1)/2
f (t) = 2 cos(nω0 t)
π n2
n=1,3,5,...
This results in a smoother approximation compared to the square wave due to faster harmonic
decay.
1
Matlab Code:
1.Fourier Series Triangular wave:
clc
clear all;
close all;
T=2;
w=(2*pi)/T;
k=-5:0.001:5;
N=10;
syms t
n=1:N;
bn=(4/T)*(int(2*t*sin(n*w*t),t,0,0.5)+int((2-2*t)*sin(n*w*t),t,0.5,1));
F=0;
for i=1:N
F=F+bn(i)*sin(i*w*k);
end
plot(k,F)
grid on
xlabel(’x(t)→′ )
ylabel(’time(t)→′ )
title(’Fourier Series(Triangular wave)’)
2
Discussion:
The Fourier Series approximation of both square and triangular waves exhibits expected char-
acteristics based on their harmonic compositions. The square wave shows noticeable Gibbs
phenomenon near the discontinuities due to the slow decay of its odd harmonics. This results
in overshoot and oscillations around the transitions. In contrast, the triangular wave represen-
tation demonstrates smoother convergence since its harmonics decay at a faster rate, reducing
oscillatory artifacts. The number of harmonics used significantly affects the accuracy of recon-
struction, with higher harmonics improving the fidelity of both waves. The MATLAB-generated
plots confirm theoretical expectations, showcasing how Fourier Series decomposes periodic func-
tions into sinusoidal components.
Conclusion:
Hence,Fourier Series provides an effective method for analyzing periodic signals. The square
wave representation requires more harmonics due to its discontinuities, while the triangular wave
converges more smoothly. MATLAB simulations successfully demonstrated the reconstruction
process, confirming theoretical expectations.
3
4