Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
20/07/2020, 11:05worksheet9
Page 1 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Worksheet 9
To accompany Chapter 4.1 Trigonometric Fourier Series
ColophonThis worksheet can be downloaded as a PDF file (https://cpjobling.github.io/eg-247-textbook/worksheets/worksheet9.pdf). We will step through this worksheet in class.
An annotatable copy of the notes for this presentation will be distributed before the second class meetingas Worksheet 9 in the Week 4: Classroom Activities section of the Canvas site. I will also distribute acopy to your personal Worksheets section of the OneNote Class Notebook so that you can add yourown notes using OneNote.
You are expected to have at least watched the video presentation of Chapter 4.1(https://cpjobling.github.io/eg-247-textbook/fourier_series/1/trig_fseries) of the notes(https://cpjobling.github.io/eg-247-textbook/) before coming to class. If you haven't watch it afterwards!
After class, the lecture recording and the annotated version of the worksheets will be made availablethrough Canvas.
Motivating ExampleIn the class I will demonstrate the Fourier Series demo (see Notes (trig_fseries)).
The Trigonometric Fourier SeriesAny periodic waveform can be represented as
or equivalently (if more confusingly)
where rad/s is the fundamental frequency.
!(")!(") =
++ cos " + cos 2 " + cos 3 " + ! + cos # " + !1
2 $0 $1 "0 $2 "0 $3 "0 $# "0
sin " + sin 2 " + sin 3 " + ! + sin # " + !%1 "0 %2 "0 %3 "0 %# "0
!(") = + ( cos # " + sin # ")12 $0 !
#=1
#$# "0 %# "0
"0
20/07/2020, 11:05worksheet9
Page 2 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Evaluation of the Fourier series coefficientsThe coefficients are obtained from the following expressions (valid for any periodic waveform withfundamental frequency so long as we integrate over one period where ), and
:"0 0 $ &0 = 2'/&0 "0
( = ""0
= !("))" = !(())(12 $0
1&0 !
&0
0
1' !
2'
0
= !(") cos # " )" = !(() cos #( )($#1&0 !
&0
0"0
12' !
2'
0
= !(") sin # " )" = !(() cos #( )(%#1&0 !
&0
0"0
12' !
2'
0
Odd, Even and Half-wave Symmetry
Odd- and even symmetryAn odd function is one for which . The function is an odd function.An even function is one for which . The function is an even function.
!(") = %!(%") sin "!(") = !(%") cos "
Half-wave symmetryA periodic function with period is a function for which A periodic function with period , has half-wave symmetry if
& !(") = !(" + & )& !(") = %!(" + & /2)
Symmetry in Trigonometric Fourier SeriesThere are simplifications we can make if the original periodic properties has certain properties:
If is odd, and there will be no cosine terms so !(") = 0$0 = 0 &# > 0$#
If is even, there will be no sine terms and . The DC may or may not be zero.!(") = 0 &# > 0%#
20/07/2020, 11:05worksheet9
Page 3 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
If has half-wave symmetry only the odd harmonics will be present. That is and is zero forall even values of (0, 2, 4, ...)
!(") $# %##
Symmetry in Common WaveformsTo reproduce the following waveforms (without annotation) publish the script waves.m(https://cpjobling.github.io/eg-247-textbook/matlab/waves.m).
Squarewave
Average value over period is ...?It is an odd/even function?It has/has not half-wave symmetry ?
&
!(") = %!(" + & /2)
20/07/2020, 11:05worksheet9
Page 4 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Shifted Squarewave
Average value over period isIt is an odd/even function?It has/has not half-wave symmetry ?
&
!(") = %!(" + & /2)
20/07/2020, 11:05worksheet9
Page 5 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Sawtooth
Average value over period isIt is an odd/even function?It has/has not half-wave symmetry ?
&
!(") = %!(" + & /2)
20/07/2020, 11:05worksheet9
Page 6 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Triangle
Average value over period isIt is an odd/even function?It has/has not half-wave symmetry ?
&
!(") = %!(" + & /2)
Symmetry in fundamental, Second and Third HarmonicsIn the following, is taken to be the half-period of the fundamental sinewave.& /2
20/07/2020, 11:05worksheet9
Page 7 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Fundamental
Average value over period isIt is an odd/even function?It has/has not half-wave symmetry ?
&
!(") = %!(" + & /2)
20/07/2020, 11:05worksheet9
Page 8 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Second Harmonic
Average value over period isIt is an odd/even function?It has/has not half-wave symmetry ?
&
!(") = %!(" + & /2)
20/07/2020, 11:05worksheet9
Page 9 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Third Harmonic
Average value over period isIt is an odd/even function?It has/has not half-wave symmetry ?
&
!(") = %!(" + & /2)
Some simplifications that result from symmetryThe limits of the integrals used to compute the coefficents and of the Fourier series are givenas which is one period We could also choose to integrate from If the function is odd, or even or has half-wave symmetry we can compute and by integratingfrom and multiplying by 2.If we have half-wave symmetry we can compute and by integrating from andmultiplying by 4.
(For more details see page 7-10 of the textbook)
$# %#0 $ 2' &
%' $ '$# %#
0 $ '$# %# 0 $ '/2
20/07/2020, 11:05worksheet9
Page 10 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Computing coefficients of Trig. Fourier Series in MatlabAs an example let's take a square wave with amplitude and period .±* &
SolutionSolution: See square_ftrig.mlx (https://cpjobling.github.io/eg-247-textbook/matlab/square_ftrig.mlx).Script confirms that:
: function is odd: for even - half-wave symmetry
ft =
(4*A*sin(t))/pi + (4*A*sin(3*t))/(3*pi) + (4*A*sin(5*t))/(5*pi) + (4*A*sin(7*t))/(7*pi) + (4*A*sin(9*t))/(9*pi) + (4*A*sin(11*t))/(11*pi)
= 0$0= 0$+= 0%+ +
In [2]: cd ../matlabopen square_ftrig
20/07/2020, 11:05worksheet9
Page 11 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Note that the coefficients match those given in the textbook (Section 7.4.1).
!(") = (sin " + sin 3 " + sin 5 " + !) = sin # "4*'
"013 "0
15 "0
4*' !
#=odd
1#
"0
Using symmetry - computing the Fourier series coefficients of the shiftedsquare wave
As before We observe that this function is even, so all coefficents will be zeroThe waveform has half-wave symmetry, so only odd indexed coeeficents will be present.Further more, because it has half-wave symmetry we can just integrate from and multiplythe result by 4.
See shifted_sq_ftrig.mlx (https://cpjobling.github.io/eg-247-textbook/matlab/shifted_sq_ftrig.mlx).
ft =
(4*A*cos(t))/pi - (4*A*cos(3*t))/(3*pi) + (4*A*cos(5*t))/(5*pi) - (4*A*cos(7*t))/(7*pi) + (4*A*cos(9*t))/(9*pi) - (4*A*cos(11*t))/(11*pi)
= 0$0%,
0 $ '/2
In [3]: open shifted_sq_ftrig
20/07/2020, 11:05worksheet9
Page 12 of 12http://127.0.0.1:8888/nbconvert/html/fourier_series/1/worksheet9.ipynb?download=false
Note that the coefficients match those given in the textbook (Section 7.4.2).
!(") = (cos " % cos 3 " + cos 5 " % !) = (%1 cos # "4*'
"013 "0
15 "0
4*' !
#=odd)
#%12
1#
"0