Obtain the Fourier series for the periodic function in Fig. 17.7 and plot the amplitude and phase spectra.
The function is described as
f(t) = \begin{cases} t , & 0 < t < 1 \\ 0, & 1 < t < 2 \end{cases}
Since T = 2 , ω_{0} = 2 π / T = π . Then
a_{0} = \frac{1}{T} \int^{T}_{0}{f(t) dt} = \frac{1}{2} [ \int^{1}_{0}{t dt} + \int^{2}_{1}{0 dt} ] = \frac{1}{2} \frac{t^{2}}{2} \mid^{1}_{0} = \frac{1}{4} (17.2.1)
To evaluate a_{n} and b_{n} , we need the integrals in Eq. (17.15):
\int{\cos at dt} = \frac{1}{a} \sin at (17.15a)
\int{\sin at dt} = – \frac{1}{a} \cos at (17.15b)
\int{t \cos at dt } = \frac{1}{a^{2}} \cos at + \frac{1}{a} t \sin at (17.15c)
\int{t \sin at dt} = \frac{1}{a^{2}} \sin at – \frac{1}{a} t \cos at (17.15d)
a_{n} = \frac{2}{T} \int^{T}_{0}{f(t) \cos nω_{0} t dt }
= \frac{2}{2} [ \int^{1}_{0}{t \cos n π t dt } + \int^{2}_{1}{0 \cos n π t dt } ] (17.2.2)
= [ \frac{1}{n^{2} π^{2}} \cos n π t + \frac{t}{n π } n π t ] \mid^{1}_{0}
= \frac{1}{n^{2} π^{2}} (\cos n π – 1) + 0 = \frac{(-1)^{n} – 1}{n^{2} π^{2}}
since \cos nπ = (-1)^{n} ; and
b_{n} = \frac{2}{T} \int^{T}_{0}{f(t) \sin n ω_{0} t dt}
= \frac{2}{2} [ \int^{1}_{0}{t \sin nπt dt } + \int^{2}_{1}{0 \sin nπt dt } (17.2.3)
= [\frac{1}{n^{2}π^{2}} \sin n πt – \frac{t}{n π} \cos n πt] \mid^{1}_{0}
= 0 – \frac{\cos nπ }{n π} = \frac{(-1)^{n + 1}}{n π}
Substituting the Fourier coefficients just found into Eq. (17.3) yields
\boxed{f(t)=\underbrace{a_0}_{dc}+\underbrace{\sum_{n=1}^{\infty}\left(a_{n}\cos n\omega_{0}t+b_{n}\sin n\omega_{0}t\right)}_{ac}}(17.3)
f(t)=\frac{1}{4}+\sum_{n=1}^{\infty}\left[\frac{\left[(-1)^{n}-1\right]}{(n\pi)^{2}}\mathrm{cos}\,n\,\pi t+\frac{(-1)^{n+1}}{n\pi}\mathrm{sin}\,n\pi t\right]To obtain the amplitude and phase spectra, we notice that, for even harmonics, a_n=0,b_n=-1/n\pi, so that
A_{n}/\underline{\phi_{n}}=a_n -j b_n=0+j\frac{1}{n\pi} (17.2.4)
Hence,
\begin{array}{ll}A_{n}=|b_{n}|={\frac{1}{n\pi}},\qquad n=2,4,\ldots.&(17.2.5)\\\phi_{n}=90^{\circ},\qquad n=2,4,\ldots.\end{array}For odd harmonics, a_{n}= -2/(n^{2}\pi^{2}),b_{n}=1/(n\pi) so that
A_{n}/\underline{\phi_{n}}=a_{n}-j b_{n}=-\frac{2}{n^{2}\pi^{2}}-j\frac{1}{n\pi}\qquad\qquad(17.2.6)That is,
\begin{array}{l l}{{{ A}_{n}=\,\sqrt{a_{n}^{2}+b_{n}^{2}}=\sqrt{\frac{4}{n^{4}\pi^{4}}+\frac{1}{n^{2}\pi^{2}}}~~~~~}}&{{~~~~(17.2.7)}}\\ {{}}&{{}}&{{}}\\ {{=\frac{1}{n^{2}\pi^{2}}~\sqrt{4+n^{2}\pi^{2}}~~~~~n=1,3,\dots.}}\end{array}From Eq. (17.2.6), we observe that lies in the third quadrant, so that
\phi_{n}=180^{\circ}+\tan^{-1}{\frac{n\pi}{2}},\qquad n=1,3,\cdot\cdot\cdot (17.2.8)
From Eqs. (17.2.5), (17.2.7), and (17.2.8), we plot A_n and \phi_n for different values of n\omega_0=n\pi to obtain the amplitude spectrum and phase spectrum as shown in Fig. 17.8.