0% found this document useful (0 votes)
35 views2 pages

02 Fourier Series

The document discusses representing a square wave using its Fourier series expansion by adding together cosine waves of different frequencies. It shows how truncating the Fourier series by including fewer frequency components results in a distorted square wave shape. Including more frequency components brings the shape closer to an ideal square wave. MATLAB code is used to plot square waves constructed using different numbers of frequency components, from 3 to 9, and it is observed that more components yields a more ideal square wave shape.
Copyright
© Attribution Non-Commercial (BY-NC)
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)
35 views2 pages

02 Fourier Series

The document discusses representing a square wave using its Fourier series expansion by adding together cosine waves of different frequencies. It shows how truncating the Fourier series by including fewer frequency components results in a distorted square wave shape. Including more frequency components brings the shape closer to an ideal square wave. MATLAB code is used to plot square waves constructed using different numbers of frequency components, from 3 to 9, and it is observed that more components yields a more ideal square wave shape.
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 2

LAB-02 Truncation of frequency components of a square wave

OBJECTIVE: To observe effect of truncation of different frequency components of sine wave THEORY: Fourier Series Representation Any signal can be represented by the combination of sinusoids of different frequencies. Square wave is consisting of different cosine waves. Infinite number of cosine wave addition makes ideal square wave. Let us consider a signal g(t) formed by adding sinusoids of frequencies 0,f0,2f0,...,kf0 g(t)=a0 +
n cos

2 nf0t + bn cos 2 nf0t)

Fourier series expansion of square wave can be represented by x(t)= 2V/n (cos Where, W0= fundamental frequency V= amplitude N= no. of harmonics Square wave is consisting of different cosine waves. Infinite number of cosine wave addition makes ideal square wave. MATLAB CODE:
0t

- cos 3

0t

+ cos 5

0t

- cos 7

0t

+ cos 9

0t)

v=1; % amplitude w=10; % w- angular frequency t=0:0.01:0.99; x1=v*(cos(w*t)-cos(3*w*t)/3)/pi; % Defining components x2=v*(cos(w*t)-cos(3*w*t)/3+cos(5*w*t)/5)/pi; x3=v*(cos(w*t)-cos(3*w*t)/3+cos(5*w*t)/5-cos(7*w*t)/7)/pi; x4=v*(cos(w*t)-cos(3*w*t)/3+cos(5*w*t)/5-cos(7*w*t)/7+cos(9*w*t)/9)/pi; subplot(2,2,1) plot(x1); Title('3 components'); xlabel('Frequecy'); ylabel('Amplitude'); subplot(2,2,2)

plot(x2); Title('5 components'); xlabel('Frequecy'); ylabel('Amplitude'); subplot(2,2,3) plot(x3); Title('7 components'); xlabel('Frequecy'); ylabel('Amplitude'); subplot(2,2,4) plot(x4); Title('9 components'); xlabel('Frequecy'); ylabel('Amplitude');
RESULTS:

CONCLUSION: From the results we can observe that adding the first few harmonics of cosine wave gives us the distorted square wave. From the results we can observe that increase the number of harmonics being added leads us to the ideal square wave. ASSIGNMENT: (1) Plot triangular wave using first five harmonics (2) Increase the number of components comprised, which can lead us to more ideal shape of square wave

You might also like