Exercise: Sawtooth Redone With Exponential Basis Functions: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
Finished with primary content.
Line 31: Line 31:
<br />
<br />


Noting again that our period for this function is <math>T=1</math> and that an obvious choice for <math>c</math> is zero, we proceed:
Noting that our period for this function is <math>T=1</math> and that an obvious choice for <math>c</math> is zero, we proceed:


<br />
<br />
Line 41: Line 41:
<br />
<br />


Again, the case when <math>\ n=0</math> needs to be considered separately.  In this case,
For <math>n\neq 0</math>, the above integral is solved easiest using integration by parts. When <math>\ n=0</math>,however, IBP does not work, so the case when <math>\ n=0</math> needs to be considered separately.  In this case,


<br />
<br />
Line 47: Line 47:
<br />
<br />


For <math>n\neq 0</math>, the above integral is solved easiest using integration by parts. So letting
For <math>n\neq 0</math>, we continue with IBP, letting
<br />
<br />


Line 61: Line 61:


<br />
<br />
we have
This gives
<br />
<br />


Line 104: Line 104:
<br />
<br />
==Solution Graphs==
==Solution Graphs==
I modified the Matlab code used in the [[Exercise: Sawtooth Wave Fourier Transform]] to generate the solution graphs using the equation found above instead of the previously found solution.  This code can be found here: [[Sawtooth2 Matlab Code]].  It generates the following analagous three graphs, which as hoped appear exactly identical to those found using the other method.  Note that the "terms" mentioned in the titles of the graphs should now be interpreted as the sum of the nth and -nth terms.
I modified the Matlab code used in the [[Exercise: Sawtooth Wave Fourier Transform]] to generate the solution graphs using the equation found above instead of the previously found solution.  This code can be found here: [[Sawtooth2 Matlab Code]].  It generates the following analagous three graphs, which as hoped appear exactly identical to those found using the other method.  Note that the "terms" mentioned in the titles of the graphs should now be interpreted as the sum of the <math>n</math>th and <math>-n</math>th terms.
<br />
<br />


Line 127: Line 127:
<br />
<br />


<math>=\frac{1}{-j2\pi n} (\cos 2\pi nt+j\sin 2\pi nt)-\frac{1}{-j2\i n}\left(\cos(-2\pi nt)+j\sin(-2\pi nt)\right)</math>
<math>=\frac{1}{-j2\pi n} (\cos 2\pi nt+j\sin 2\pi nt)-\frac{1}{-j2\pi n}\left(\cos(-2\pi nt)+j\sin(-2\pi nt)\right)</math>


<br />
<br />
Line 142: Line 142:


</center>
</center>
<br />
Therefore,
<br />
<center><math>x(t)=\frac{1}{2}-\sum_{n=\pm 1}^{\pm \infty}\frac{1}{j2\pi n}e^{j2\pi nt}=\frac{1}{2}-\sum_{n=1}^\infty\frac{1}{\pi n}\sin 2\pi nt</math></center>
<br />
As we had hoped and expected.
<br />
==Reviewed By==
==Read By==
==Comments==

Revision as of 21:48, 19 January 2010

Author

John Hawkins

Problem Statement

Find the Fourier Tranform with exponential basis functions of the sawtooth wave given by the equation


x(t)=tt


Note that this is the same function solved in Exercise: Sawtooth Wave Fourier Transform, but solved differently to compare the two methods.

Solution

The goal of this method is to find the coefficients an such that


x(t)=n=anej2πnt/T


In class we showed not only that this was possible, but also that


an=1Tcc+Tx(t)ej2πnt/Tdt


Noting that our period for this function is T=1 and that an obvious choice for c is zero, we proceed:


an=1101tej2πnt/1dt


For n0, the above integral is solved easiest using integration by parts. When n=0,however, IBP does not work, so the case when n=0 needs to be considered separately. In this case,


a0=01tdt=12


For n0, we continue with IBP, letting

u=tdu=dt


dv=ej2πntdtv=1j2πnej2πnt


This gives

an=t(1j2πn)ej2πnt|0101(1j2πn)ej2πntdt

=[1j2πnej2πn0](1j2πn)2ej2πnt|01


=1j2πnej2πn(1j2πn)2(ej2πn1)


But


ej2πn=cos(2πn)+jsin(2πn)=1+j0=1


So


an=1j2πn(1)(1j2πn)2(11)=1j2πn


Therefore,


x(t)=12n=±1±1j2πnej2πnt


Solution Graphs

I modified the Matlab code used in the Exercise: Sawtooth Wave Fourier Transform to generate the solution graphs using the equation found above instead of the previously found solution. This code can be found here: Sawtooth2 Matlab Code. It generates the following analagous three graphs, which as hoped appear exactly identical to those found using the other method. Note that the "terms" mentioned in the titles of the graphs should now be interpreted as the sum of the nth and nth terms.

Error creating thumbnail: File missing


Error creating thumbnail: File missing


Error creating thumbnail: File missing


Analytical Comparison of Two Solutions

To convince myself that the two solutions are actually the same, I performed the following analysis. Let tn be the nth term of the solution found on this page. Then for n0,


tn+tn=1j2πnej2πnt+1j2π(n)ej2π(n)t


=1j2πn(cos2πnt+jsin2πnt)1j2πn(cos(2πnt)+jsin(2πnt))


=1j2πn(cos2πnt+jsin2πntcos2πnt+jsin2πnt)


=1j2πn(2jsin2πnt)


=1πnsin2πnt


Therefore,


x(t)=12n=±1±1j2πnej2πnt=12n=11πnsin2πnt


As we had hoped and expected.


Reviewed By

Read By

Comments