0% found this document useful (0 votes)
22 views4 pages

Signal

This document outlines a study on analyzing triangular and square waves using Fourier Series, emphasizing its application in signal processing. It details the mathematical representation of both waveforms, discusses the characteristics of their Fourier Series approximations, and presents MATLAB code for generating the respective waveforms. The findings confirm that the triangular wave converges more smoothly than the square wave, which exhibits Gibbs phenomenon due to slower harmonic decay.

Uploaded by

rustturf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

Signal

This document outlines a study on analyzing triangular and square waves using Fourier Series, emphasizing its application in signal processing. It details the mathematical representation of both waveforms, discusses the characteristics of their Fourier Series approximations, and presents MATLAB code for generating the respective waveforms. The findings confirm that the triangular wave converges more smoothly than the square wave, which exhibits Gibbs phenomenon due to slower harmonic decay.

Uploaded by

rustturf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

LAB 4

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

where : a0 is the DC component,

an and bn : are the Fourier coefficients,


w0 : T is the fundamental angular frequency.

For odd and even functions, certain coefficients may vanish, simplifying the series representation.

Fourier Series Representation for Square Wave:

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.

Fourier Series Representation of Triangular Wave:

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.Fourier series for Sqaure wave:


tmin= 0;
tmax= 10;
dt=0.01;
t=tmin:dt:tmax;
x1 = 1. ∗ (t >= 0&t <= 2);
x2 = 1. ∗ (t >= 0&t <= 4);
x3=conv(x1,x2);
n=length(x3);
t1=(0:1:n-1)*dt;
subplot(3,1,1);
plot(t,x1);
xlabel(’time’);
ylabel(’x1(t)’);
subplot(3,1,2);
plot(t,x2);
xlabel(’time’);
ylabel(’x2(t)’);
subplot(3,1,3);
plot(t1,x3);
xlabel(’time’);
ylabel(’x3(t)’);

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

You might also like