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

From Class Wiki
Jump to navigation Jump to search
(First bit of work)
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 19: Line 19:
<br />
<br />


<center><math>x(t)=\sum_{-\infty}^\infty a_n e^{j2\pi nt/T}</math></center>
<center><math>x(t)=\sum_{n=-\infty}^\infty a_n e^{j2\pi nt/T}</math></center>


<br />
<br />
Line 31: Line 31:
<br />
<br />


Noting again that our period for this function is <math>\ T=1</math>, 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 />
This gives
we have
<br />
<br />


Line 67: Line 67:


<math>a_n=t\left(\frac{1}{-j2\pi n}\right)e^{-j2\pi nt}\Bigg|_0^1-\int_0^1\left(\frac{1}{-j2\pi n}\right)e^{-j2\pi nt}dt</math>
<math>a_n=t\left(\frac{1}{-j2\pi n}\right)e^{-j2\pi nt}\Bigg|_0^1-\int_0^1\left(\frac{1}{-j2\pi n}\right)e^{-j2\pi nt}dt</math>
<br />

<math>=\left[\frac{1}{-j2\pi n}e^{-j2\pi n}-0\right]-\left(\frac{1}{-j2\pi n}\right)^2e^{-j2\pi nt}\Bigg|_0^1</math>

<br />

<math>=\frac{1}{-j2\pi n}e^{-j2\pi n}-\left(\frac{1}{-j2\pi n}\right)^2\left(e^{-j2\pi n}-1\right)</math>

</center>
<br />

But

<br />
<center>

<math>\ e^{-j2\pi n}=\cos(-2\pi n)+j\sin(-2\pi n) = 1+j0=1</math>

</center>
<br />

So

<br />
<center>

<math>a_n=\frac{1}{-j2\pi n}(1)-\left(\frac{1}{-j2\pi n}\right)^2(1-1)=\frac{1}{-j2\pi n}</math>

</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}</math></center>
<br />
==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 <math>n</math>th and <math>-n</math>th terms.
<br />

[[Image:Sawtooth2_First_100_Terms.jpg|thumb|800px|center]]

<br />
[[Image:Sawtooth2_First_n_Terms.jpg|thumb|800px|center]]

<br />
[[Image:Sawtooth2_Error.jpg|thumb|800px|center]]

<br />

==Analytical Comparison of Two Solutions==
To convince myself that the two solutions are actually the same, I performed the following analysis. Let <math>t_n</math> be the nth term of the solution found on this page. Then for <math>n\neq 0</math>,

<br />
<center>

<math>t_n+t_{-n}=\frac{1}{-j2\pi n}e^{j2\pi nt}+\frac{1}{-j2\pi (-n)}e^{j2\pi (-n)t}</math>

<br />

<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 />

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

<br />

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

<br />

<math>=-\frac{1}{\pi n}\sin 2\pi nt</math>

</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==

[[Lau, Chris|Christopher Garrison Lau I]]

Tyler Starr
==Read By==
==Comments==

Latest revision as of 12:18, 25 January 2010

Author

John Hawkins

Problem Statement

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



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 such that



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



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



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



For , we continue with IBP, letting



This gives




But



So



Therefore,



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 th and th terms.

Sawtooth2 First 100 Terms.jpg


Sawtooth2 First n Terms.jpg


Sawtooth2 Error.jpg


Analytical Comparison of Two Solutions

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







Therefore,



As we had hoped and expected.


Reviewed By

Christopher Garrison Lau I

Tyler Starr

Read By

Comments