Fourier Series

Chapter 2 Trigonometric Fourier Series
Chapter 2.1  Introduction

Fig. 2-1
More friendly Fourier Series version-without sigma sign when:
a0-constant
1ω- first harmonic pulsation
2ω, 3ω…-
the consecutive  harmonics pulsations
a1, a2 …- the consecutive 
cosine harmonics amplitudes
b1, b2 …- the consecutive 
sine harmonics amplitudes
The Fourier Series is mostly infinitive but not always as in example: f(t)=1.25sin(1t)+0.25sin(2t)
This Fourier Series contains only factors b1=1.25 and b2=0.25. The ω pulsation is any value but for simpler calculations  may be ω=1 or ω=2π and Fourier Series then:

Fig. 2-2
ω=1 (T=2π) is a slower process and ω=2π (T=1) is a faster one.

Chapter 2.2 Fourier Series-first approach
How did Jean Baptiste Joseph Fourier hit on an idea  in 1806? Any periodical function f(t)) is a sinusoids/cosinusoids sum?
I don’t know but it could be so:
All the trick is how to find the appropriate ω,a0,a1,a2…b1,b2…  coefficients  of the  f(t)=… see Fig 2-1. He assumed that he knows the f(t) function first and that is for example:
f(t)=1sin(t)+0.25sin(2t)+0.5sin(3t)
We will use a wonderful and easy application  WolframAlpha. Poor Fourier didn’t know it! Your job is only to click an application and do appropriate steps shown on the figures. You will see effects immediately and you will be a great WolframAlpha fan forever by the way! The f(t) will be ploted.
Click
https://www.wolframalpha.com

Fig. 2-3
f(t) function ploted by WolphramAlfa
You see only  t=-2π…+2π but the real range is t=-∞…+∞. This is a sum of 3 harmonics with parameters  ω-pulsation and amplitude:
first harmonic–>ω=1/sec (T=2π sec) and  amplitude b1=1
second harmonic–>2ω=2/sec and  amplitude b2=0.25
third harmonic–>3ω=3/sec  and  amplitude b1=0.5
The first harmonic suits ω=1/sec (T=2π sec) of the f(t) function and. The next are the first multiplies. The other parameters i.e. b4,b5…a0, a1,a2…are null.
This is an example of the Finite Fourier Series when n=3. I spoke of it in the Chapter 1. Assume that we know the f(t) diagram only, not the formula. You know that there are 3 sine harmonics but you don’t know the ω1, ω2, ω3 pulsations and the b1, b2 b3 amplitudes. About a0 constant coeffitient–>a0=0 and this transparently.
The first harmonic period should be the same as f(t) period, that is T=2π! Why? Because the first harmonic is the first f(t) function approximation.
Conclusion–>ω1=ω=1. And what about ω2 and ω3. They should be ω multipiles ω2=2 and ω3=3. Otherwise the f(t=2π)≠0f(t=4π)≠0… !
And what about b1, b2 b3 amplitudes? Let’s draw many  sums with different  b1, b2 b3 combinations and choose this one with the best f(t) approximation.
We tested circa 100  combinations and the best one is b1=0.95, b2=0.23 and b3=0.52. The chart of f(t)=0.95sin(t)+0.23sin(t)+0.52sin(t) was most similar to Fig. 2-3. Almost success!
This method is labour-intensive and primitive some. We use it as a last resort, when we don’t have  better ideas. 

Chapter 2.3 Fourier Series-second approach–> “lift harmonics out method”
Mr Fourier realized that trial and error method used earlier is only an access to solve a problem. How does lift harmonics out skilfully? In fact, b1, b2, b3 harmonics  only, to be precise. I know already ,i 3ω pulsations. Maybe so?

Fig. 2-4
Lift harmonics out method
Fig. 2-4a
Napoleon buttonholed Fourier about mathematics*.
Dear Jean Baptiste. The f(t) periodical function consists of  sinusoids.  What is the function? I’m giving you a head start, Jean. The sinusoids pulsations are 1ω=1/sec, 2ω=2/sec and 3ω=3/sec. You don’t know the f(t) formula, but you know the f(t) chart–>see Fig. 2-3. You know function values, other words.
Fig. 2-4b
Fourier started to find the b1,b2 and b3. First the b1 amplitude.
Fig. 2-4c
I am looking for  b1 amplitude. Let’s multiply both side of the formula. Why?  Fourier didn’t know. Maybe, intuition. When b2, multiply both sides by sin(2t) then.
Fig. 2-4d
Let’s Integrate both sides from to . Why integrate? Fourier doesn’t know. Intuition!
Fig. 2-4e
Definite integral fracted for sums.
Fig. 2-4f
b1, b2 i b3 factors before integral.
Fig. 2-4g
The circus clou program now! Both integrals are null but the value of the first one is π!
It isn’t random! Explanation in the Chapter 2.6
Fig. 2-4h
Formula for b1 when  ω=1 strictly ω=1/sec–>T=2π sec
Fig. 2-4i
Formula for b1 when  any ω–>T=2π/ω. The formula transforms for Fig. 2-4h.
Fig. 2-4j
Final formula for a0, b1,b2,b3 for f(t) function.
-a0 an average value  a0=0 here. This is a typical average formula for periodical function.
-b1 see Fig. 2-4a…2-4i
-b2 set sin(2t) instead of sin(1t) 
-b3 set sin(3t) instead of sin(1t)
*Note
I am not sure that is a true. But the fact is that gentlemens knew each other. Napoleon was a good mathematician! Some people say that he is an author of the proposition about some triangles. The other people deny. They don’t like Chief, I suppose.

Chapter 2.4  Formula test.
Chapter 2.4.1 Introduction
We apply the formula Fig. 2-4j when f(t) is Fig. 2-3. Will be the undermentioned result?
a0=0
b1=1
b2=0.25
b3=0.5
It’s similar to the puzzle? “The duck is swimming in the pond. What is swimming in the pond?”. You see the aforementioned parameters directly in the f(t) formula. But we will use the Fig. 2-4j to test only, not to get parameters.

Chapter 2.4.2  DC component-a0
Set f(t) to the a0 formula Fig. 2-4j when T=2π. The WolframAlpfa  will be used.
Click https://www.wolframalpha.com and do picture indtructions 

Fig. 2-5
a0-DC component calculation
The result a0=0 is obvious. The functions surfaces “+” and “-“,see Fig. 2-3, are equal.

Chapter 2.4.3 First harmonic amplitude-b1
Click https://www.wolframalpha.com and do picture indtructions 

Fig. 2-6
b1-First harmonic amplitude calculation
Ok. b1=1, definite integral is shown as surface=1

Chapter 2.4.5 Second harmonic amplitude-b2
Click https://www.wolframalpha.com and do picture instructions

Fig. 2-7
b2-Second harmonic amplitude calculation
Ok. b2=0.25. Note that “Higher” and “Lower” surfaces are subtracted

Chapter 2.4.5 Third harmonic amplitude-b2
Click https://www.wolframalpha.com and do picture instructions

Fig. 2-8
b3-Third harmonic amplitude calculation
Ok, b3=0.5
Conclusion
Chapters 2.4.2…5
 confirmed formula Fig. 2-4j

Chapter 2.5 Orthogonal functions
Chapter 2.5.1 Introduction
Return for a moment to Fig. 2-4g. There are null  integrals and integral π value. You will know the reason now. Because these null are the orthogonal functions pairs and the “π” are the non orthogonal functions pairs! The Orthogonal Function knowledge is necessary for  Fourier Series analysis.

Fig. 2-9
Orthogonal functions definition
An example for electricians
The A/C coil current and voltage  are the orthogonal functions because the average coil energy in the period is 0. The coil charges  energy during T/2 and gives it back during the next T/2.
The most popular orthogonal functions are sine type*. So we will test different combinations of the sin(nωt) and cos(kωt) pairs. The Wolframalpha program will be very useful here.
*Note
There are other orthogonal functions (Walsh functions for example) but they aren’t so important in the science area.
The indispensable WolframAlpha will be used as usual.
Click https://www.wolframalpha.com and do picture instructions

Fig. 2-10
The sin(t) and cos(t) are orthogonal
It isn’t possible simpler! We will test different  sin(nωt) and cos(kωt) pairs orthogonality in the chapters 2.5.3…5. All the pairs are all almost orhogonal. Why almost? All except pairs sin(nωt) and sin(nωt) or cos(nωt) and cos(nωt). These pairs definite integral aren’t but T/2 (T =2π/ω).

Chapter 2.5.2 sin(nωt) and cos(kωt) pairs are orthogonal for any n,k.
Click www.wolframalpha.com  and test orthogonality for n=2 and k=3.

Fig. 2-11
sin(nωt) and cos(kωt) pairs are orthogonal because integral=0.
The generalisation for all combinations n,k is for mathematicians. For the next pairs too.
Note:
The sin(2t) and cos(3t) periods are different but the sin(2t)*cos(3t) product is 2π≈6.28!–>see Fig. 2-11.

Chapter 2.5.3 sin(nωt), sin(kω)  or cos(nωt),cos(kωt) pairs are orthogonal for n≠k.
Test the sin(2t)sin(3t) and cos(2t)cos(3t) orthogonality yourself. Use WolframemAlpha of course.
Woflfram reaction

Fig. 2-12
sin(nω),sin(kω) and cos(nω),cos(kω) are orthogonal for n≠k.
I emphasize that n≠k!

Chapter 2.5.4 sin(nωt), sin(nωt)  or cos(nωt),cos(nωt) pairs aren’t orthogonal!
Please test orthogonality sin(2t)sin(2t) and cos(2t)cos(2t):
Woflfram reaction.

Fig. 2-13
sin(nω),sin(nω) and cos(nω),cos(nω) aren’t orthogonal. The inegral=T/2.

Chapter 2.6  What are a0, a1, a2…an,,, b1,b2…bn Fourier Series Parameters?
Chapter 2.6 .1 Introduction
Why do we study functions orthogonality so much? You will know in a while.

Chapter 2.6.2 a0 coefficient
This is f(t) function average value.

Fig. 2-14
 a0 as  an  average value

Chapter 2.6.3 a2 coefficient
This is similar to Chapter 2.3 Let’s compute a2 for example.
Fig. 2-15
How do compute a2 coeffitient?
Fig. 2-15a  Write Fourier Series formula. You know a0 coeffitient only now–>Fig. 2-14
Fig. 2-15b  Multiply 2 formula sides by cos(2ωt) because we are looking for a2
Fig. 2-15c  Integrate
2 formula sides in the 0…T range
Fig. 2-15d Definite integral are computed acc. to the appropriate figures
Fig. 2-15e Included zeroes in Fig. 2-15d
Fig. 2-15f Final Fourier Series Formula for a2.

Chapter 2.7 Fourier Series formula
The remaining a1, a3, … an are computed analogously.
The remaining b1, b2,…, bn are computed analogously but there is sin(nωt) instead of cos(nωt).

Fig. 2-16
Fourier Series formula

Chapter 2.8 Fourier Series for square wave
Chapter 2.8.1 Fourier Series Formula Directly 
The Fig. 2-16 formula for the Fig. 2-17 square wave will be used.

Fig. 2-17
Square wave period T=1 corresponding to ω=2π
Wolfram Alpha  will be used for integrals calculation.
The Fig. 2-18 is an effect for a0, a1 and b1 coefficients.

Fig. 2-18
a0, a1 and b1 calculation for Fourier Series of the Fig. 2-17 square wave.
Please write given instruction in dialog window. There is a little calculation correction. Other say a little and innocent fraud. The Wolfram Alfa calculated a0, a1 as a very, very small number but not 0! I “improved” it for number 0b1 was “improved” likewise that is b1=1.27324 was corrected for b1=4/π as almost the same number.
The other a2, a3,a4,a5,a7 and b2,b3,b4,b5,b7 coeffitients are calculated similarly by Wolfram Alfa. The number “in red border” should be replaced apparently by 4,6,8,10,12 14.
The undermentioned table is a effect of the Wolfram calculations

Fig. 2-19
Współczynniki a0,a2, a3,a4,a5,a7 i b1,b2,b3,b4,b5,b7 Szeregu Fouriera fali prostokątnej z Rys. 2-17 Przy okazji. Badana funkcja jest nieparzystą i dlatego wszystkie współczynniki a1, a2, a3… są zerowe. Gdyby była parzystą (np. przesunięta w lewo o 0.25) to współczynniki b1, b2, b3… byłyby zerowe  natomiast a1, a2, a3niezerowe. Jest to zgodne z intuicją. Zróbmy wykres korzystając z programu http://pl.easima.com

Fig. 2-20
4 harmonics of the square wave.
The first harmonic pulsation is ω=2π corresponding to T=1. The sine amplitudes b1, b3, b5 and b7 are from Fig. 2-19. The 5 (and more…) harmonics diagram is more similar to the ideal  square wave of course.

Chapter 2.8.2 Square Wave Fourier Series calculated by Wolfram Alpha special instruction
Wolfram Alpha is equipped with the special Fourier Series instructions. You don’ t need to calculate integrals as in the previous chapter.
Let’s test it for square wave from Fig. 2-17. The result should be the same.The program will calculate the first square wave harmonics.
Write the given instruction in the dialog window.

Fig. 2-21
The instruction effect
The program will show many different things. There are more crucial here.
Don’t interest yourself “Complex Fourier Series” so long. We will return to this subject in the Chapter 4. The more important are “Diagram” and “First 7 harmonics”.
The conclusion:
The effect is exactly as in the Chapter 2.7. But You are less tired!
Let’s test this marvel for harmonics yet.

Fig. 2-22
square wave harmonics
This square wave approximation is better.
Go baldheaded and try with 17 harmonics now!

Fig. 2-23
17
 square wave harmonics
This is the best approximation. Unfortunately, the “First 17 harmonics” window does’nt exist here. It is just as well that you can read adquate data from the “Complex Fourier Series”
You will fail with 19 square wave harmonics. Why? I don’t know. Maybe we use the free-nonpayable Wolfram Alpha version?

Chapter 2.9 Fourier Series for other periodic functions
Chapter 2.9.1 Function sin(t)
It’s very a simple function. What does Wolfram Alpha say?

Fig. 2-24
harmonics of the sin(t)*
The instruction in the dialog window concerns 5 harmonics of the periodic function Fourier Series when  f(t)=sin(t). The additional Wolfram Alpha  assumption–> T=2π  i.e. ω=1. It concerns the next subchapters too.
*The function has only 1 harmonic–>sin(t) the other and more harmonics are null!

Chapter 2.9.2 “Saw” that is function t
I remind you that  function t is periodical type with T=2π  i.e. ω=1.

Fig. 2-25
5 and harmonics of the  “Saw” i.e. function t.
The harmonics  “Saw” approximation is better of course.

Chapter 2.9.3 Parabola that is function t^2

Fig. 2-26
and 9 harmonics of the Parabola
Note that harmonics  approximation in the range -π…+π is almost as ideal Parabola.
By the by. There is a0≠0.

Leave a Reply

Your email address will not be published. Required fields are marked *