Line 40: | Line 40: | ||
*<span style="color:green"> Note 1: You answered the question by integration by parts. It works, but there is an easier way: express sin as a linear combination of exponential (using [[More_on_Eulers_formula|Euler's formula]]), and then the integral becomes trivial. </span> --[[User:Mboutin|Mboutin]] 08:15, 29 September 2010 (UTC) | *<span style="color:green"> Note 1: You answered the question by integration by parts. It works, but there is an easier way: express sin as a linear combination of exponential (using [[More_on_Eulers_formula|Euler's formula]]), and then the integral becomes trivial. </span> --[[User:Mboutin|Mboutin]] 08:15, 29 September 2010 (UTC) | ||
*<span style="color:green"> Note 2: Be careful when computing <math>a_0</math>: you must not divide by zero! (In the computations above, you divided by b). In general, I recommend computing <math>a_0</math> separately. </span> --[[User:Mboutin|Mboutin]] 08:15, 29 September 2010 (UTC) | *<span style="color:green"> Note 2: Be careful when computing <math>a_0</math>: you must not divide by zero! (In the computations above, you divided by b). In general, I recommend computing <math>a_0</math> separately. </span> --[[User:Mboutin|Mboutin]] 08:15, 29 September 2010 (UTC) | ||
+ | ---- | ||
+ | <span style="color:green">Supplement from Note 2 by Prof. Boutin </span> | ||
+ | |||
+ | <math>\begin{align} | ||
+ | a_0 & = \frac{1}{T}\int_{0}^{T} |\text{sin}(\pi t)| dt = \int_{0}^{1} \text{sin}(\pi t) dt \\ | ||
+ | & = | ||
+ | \end{align}</math> | ||
+ | |||
+ | |||
---- | ---- | ||
[[Recommended_exercise_Fourier_series_computation|More exercises on computing continuous-time Fourier series]] | [[Recommended_exercise_Fourier_series_computation|More exercises on computing continuous-time Fourier series]] | ||
[[ECE301|Back to ECE301]] | [[ECE301|Back to ECE301]] |
Revision as of 09:40, 29 September 2010
- There was only the answer, so I add its question at the top and some links at the bottom. --Jaemin 14:50, 28 September 2010 (UTC).
Exercise: Compute the Fourier series coefficients of the following periodic signal:
$ \;\;\;x(t)=|\text{sin}(\pi t)|, \;\; \text{with the period }T=1 $
- Note: It is not necessary to state the period in the question, as one can figure it out from the signal itself. --Mboutin 08:15, 29 September 2010 (UTC)
Answer
- Note: Before beginning to answer the question, you should ask yourself whether this is a signal that can be directly expressed in terms of complex exponentials. In this case (because of the absolute value), it is not easy to do so directly. --Mboutin 08:15, 29 September 2010 (UTC)
$ a_n = \frac{1}{T}\int_{0}^{T}x(t)e^{-j\frac{2\pi}{T}n t} dt = \int_{0}^{1}x(t)e^{-j2\pi n t} $
Substitute $ a=\pi, \;\; b=-j2\pi n $ :: This change of varible is confusing. At the very least, I would not use the variable a, as it is easily confused with the coefficients of the series. --Mboutin 08:15, 29 September 2010 (UTC)
$ \begin{align} a_n &= \int_{0}^{1}\text{sin}(at)e^{bt}dt = \left[\frac{1}{b}\text{sin}(at)e^{bt}\right]^{1}_{0} - \int_{0}^{1}\frac{a\text{cos}(at)}{b}e^{bt}dt \\ &= \left(\frac{e^b}{b}\text{sin}(a)\right) - \frac{a}{b}\left(\left[\frac{\text{cos}(at)}{b}e^{bt}\right]^{1}_{0} - \int_{0}^{1}\frac{-a\text{sin}(at)}{b}e^{bt}dt\right) \\ &= \left(\frac{e^b}{b}\text{sin}(a)\right) - \frac{a}{b} \left( \left( \frac{\text{cos}(a)}{b}e^{b}-\frac{1}{b}\right) + \frac{a}{b}\int_{0}^{1}\text{sin}(at)e^{bt}dt \right) \\ &= \frac{e^b}{a}\text{sin}(a)-\frac{a\text{cos}(a)}{b^2}e^b + \frac{a}{b^2} - \frac{a^2}{b^2}\int_{0}^{1}\text{sin}(at)e^{bt}dt \\ \end{align} $
As you can see $ \int_{0}^{1}\text{sin}(at)e^{bt}dt $ term repeats, therefore it needs to be subtracted to both sides.
Then, an can be calculated.
$ \frac{e^{-j2\pi n}}{-j2\pi n}\text{sin}\pi + \frac{\pi \text{cos}\pi}{4 \pi^2 n^2}e^{-j2\pi n} - \frac{\pi}{4 \pi^2 n^2} = \left(1-\frac{\pi^2}{4\pi^2 n^2}\right) \int_{0}^{1}\text{sin}(\pi t) e^{-j2\pi n t}dt = \left(1-\frac{\pi^2}{4\pi^2 n^2}\right) a_n $
From this equation, $ \frac{e^{-j2\pi n t}}{-j2\pi n}\text{sin}\pi=0 $ because of sinπ, and $ \frac{\pi \text{cos}\pi}{4 \pi^2 n^2}e^{-j2\pi n} = \frac{-\pi}{4\pi^2 n^2} $
There are two terms of $ -\frac{\pi}{4\pi^2 n^2} $.
$ a_n=\frac{-\frac{2\pi}{4\pi^2 n^2}}{1-\frac{\pi^2}{4\pi^2 n^2}} = -\frac{2\pi}{4\pi^2 n^2 - \pi^2} = \frac{2}{\pi(1-4n^2)} $
- Note 1: You answered the question by integration by parts. It works, but there is an easier way: express sin as a linear combination of exponential (using Euler's formula), and then the integral becomes trivial. --Mboutin 08:15, 29 September 2010 (UTC)
- Note 2: Be careful when computing $ a_0 $: you must not divide by zero! (In the computations above, you divided by b). In general, I recommend computing $ a_0 $ separately. --Mboutin 08:15, 29 September 2010 (UTC)
Supplement from Note 2 by Prof. Boutin
$ \begin{align} a_0 & = \frac{1}{T}\int_{0}^{T} |\text{sin}(\pi t)| dt = \int_{0}^{1} \text{sin}(\pi t) dt \\ & = \end{align} $