Fourier Series
Any Periodic function can be represented as sum of sine and cosine wave this representation is known as Fourier series named in the honor of Joseph Fourier.
Fourier series is given by :-
where,
n = 1 , 2 , 3 , ... and T is the period of function f(t).
an and bn are called Fourier coefficients and are given by
now lets we want to represent Square wave in the form of sine & cosine wave.
periodic square wave function f(t) defined by
here suppose T = 6 (approx)
now lets find coefficient a0 which is DC value
a0 = 0
i.e our waveform will oscillation either side of 0 = horizontal axis X line.
now lets find coefficient an which is Even Part
an = 0
i.e our waveform will not contain any of cosine Part (even)
now, lets find coefficient bn which is Odd Part
Note that cos (n pi) may be written as
cos (n pi) = (-1)n
and that bn = 0 whenever n is even.
The given function f(t) has the following Fourier series
so, our waveform contains only of sum of sine function i.e odd part.
now put N=1 and observer the waveform,
we got 1st harmonic of sine wave also called fundamental harmonic.
now put n=2
at 2nd harmonic we observe no change in the waveform because our function is zero when ( i.e bn = 0) whenever n is even
now put n=3
its a addition of 1st harmonic + 3rd harmonic(shown in black at centre) = resultant red waveform
n=4 which is even so there is no change in waveform
n=5 note we are closer to approximation of square wave
n=29 we have almost approximated the square wave