02 Fourier Series
02 Fourier Series
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
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