Trigonometric Fourier Series Solved Examples

Want create site? Find Free WordPress Themes and plugins.

Why Fourier series?

There are many functions that are important in engineering which are not sinusoids or exponentials. A few examples are square waves, saw-tooth waves, and triangular pulses. Indeed, a function may be represented by a set of data points and have no analytical representation given at all. In this tutorial, we shall consider these additional functions and show how we may represent them in terms of our familiar sinusoidal functions. The techniques we shall use were first given in 1822 by the French mathematician and physicist Joseph Fourier.

Trigonometric Fourier Series

Let us begin by considering a function f (t) which is periodic of period T; that is,

$f(t)=f(t+T)$

As Fourier showed, if f (t) satisfies a set of rather general conditions, it may be represented by the infinite series of sinusoids

$f(t)=\frac{{{a}_{o}}}{2}+{{a}_{1}}\cos {{\omega }_{o}}t+{{a}_{1}}\cos {{\omega }_{o}}t+\cdots +{{b}_{1}}\sin {{\omega }_{o}}t+{{b}_{1}}\sin {{\omega }_{o}}t+\cdots$

Or more compactly,

$f(t)=\frac{{{a}_{o}}}{2}+\sum\limits_{n=1}^{\infty }{(}{{a}_{n}}\cos (n{{\omega }_{o}}t)+{{b}_{n}}\sin (n{{\omega }_{o}}t))\text{ (1)}$

Where  ${{\omega }_{o}}={}^{2\pi }/{}_{T}$ . This series is called the trigonometric Fourier series, or simply the Fourier series, of f (t). The a’s and b’s are called the Fourier coefficients and depend, of course, on f (t).

The coefficients may be determined rather easily by the use of Table 1.

$f(t)$$\int\limits_{0}^{{}^{2\pi }/{}_{\omega }}{f(t)dt,\text{ }\omega \ne \text{0}} 1.\text{ sin(}\omega \text{t+}\alpha \text{),cos(}\omega \text{t+}\alpha \text{)}$$0$
$2.\text{ sin(n}\omega \text{t+}\alpha \text{),cos(n}\omega \text{t+}\alpha \text{)*}$$0 3.\text{ si}{{\text{n}}^{\text{2}}}\text{(}\omega \text{t+}\alpha \text{),co}{{\text{s}}^{\text{2}}}\text{(}\omega \text{t+}\alpha \text{)}$${}^{\pi }/{}_{\omega }$
$4.\text{ sin(m}\omega \text{t+}\alpha \text{)cos(n}\omega \text{t+}\alpha \text{)*}$$0 5.\text{ cos(m}\omega \text{t+}\alpha \text{)cos(n}\omega \text{t+}\beta \text{)*}$$\left\{ \begin{matrix} \begin{matrix} 0, & m\ne n \\ \end{matrix} \\ \begin{matrix} \frac{\pi \cos (\alpha -\beta )}{\omega }, & m=n \\ \end{matrix} \\ \end{matrix} \right.$

Table.1: Integrals of Sinusoidal Functions and Their Products

* m and n are integers

Let us begin by obtaining  ${{a}_{o}}$ , which may be done by integrating both sides of equation (1) over a full period; that is,

$\int\limits_{0}^{T}{f(t)dt=}\int\limits_{0}^{T}{\frac{a{}_{o}}{2}dt+}\sum\limits_{n=1}^{\infty }{\int\limits_{0}^{T}{({{a}_{n}}\cos (n{{\omega }_{o}}t)+{{b}_{n}}\sin (n{{\omega }_{o}}t))dt}}$

Since  $T={}^{2\pi }/{}_{{{\omega }_{o}}}$ , every term in the summation is zero by entry 2 in Table 1 ($\alpha =0$ ), and therefore we have

${{a}_{o}}=\frac{2}{T}\int\limits_{0}^{T}{f(t)dt\text{ (2)}}$

Next, let us multiply equation (1) through by  $\cos (m{{\omega }_{o}}t)$ , where m is an integer, and integrate. This yields

$\int\limits_{0}^{T}{f(t)\text{cos(m}{{\omega }_{\text{o}}}\text{t)}dt=}\int\limits_{0}^{T}{\frac{a{}_{o}}{2}\text{cos(m}{{\omega }_{\text{o}}}\text{t)}dt+}\sum\limits_{n=1}^{\infty }{{{a}_{n}}\int\limits_{0}^{T}{\text{cos(m}{{\omega }_{\text{o}}}\text{t)}(\cos (n{{\omega }_{o}}t)dt+\sum\limits_{n=1}^{\infty }{{{b}_{n}}}\int\limits_{0}^{T}{\text{cos(m}{{\omega }_{\text{o}}}\text{t)}}\sin (n{{\omega }_{o}}t))dt}}$

By entries 2, 4 and 5 of Table 1 ($for\text{ }\alpha =\beta =0$ ), every term in the right member is zero except the term where n=m in the first summation. This term is given by

${{a}_{m}}\int\limits_{0}^{T}{{{\cos }^{2}}(m{{\omega }_{o}}t)}dt=\frac{\pi }{{{\omega }_{o}}}{{a}_{m}}=\frac{T}{2}{{a}_{m}}$

So that

${{a}_{m}}=\frac{2}{T}\int\limits_{0}^{T}{f(t)cos(m{{\omega }_{o}}t)}dt,\text{ m=1,2,3,}\cdots \text{ (3)}$

Finally, multiplying by  $\sin (m{{\omega }_{o}}t)$ , integrating, and applying Table 1, we have

${{b}_{m}}=\frac{2}{T}\int\limits_{0}^{T}{f(t)\sin (m{{\omega }_{o}}t)}dt,\text{ m=1,2,3,}\cdots \text{ (4)}$

We note that equation (2) is the special case, m=0, of equation (3) (which is why we used ${}^{{{a}_{o}}}/{}_{2}$  instead of  ${{a}_{o}}$ for the constant term). Also, as the reader may easily show, we may integrate over any interval of length T, such as  ${{t}_{o}}\text{ to }{{t}_{o}}\text{+T}$ , for arbitrary   ${{t}_{o}}$, and the results will be the same. Therefore we may summarize by giving the Fourier coefficients in the form

$\begin{matrix} {{a}_{n}}=\frac{2}{T}\int\limits_{{{t}_{o}}}^{{{t}_{o}}+T}{f(t)cos(n{{\omega }_{o}}t)}dt, & \text{n=0,1,2,}\cdots & {} \\ {} & {} & (5) \\ {{b}_{n}}=\frac{2}{T}\int\limits_{{{t}_{o}}}^{{{t}_{o}}+T}{f(t)\sin (n{{\omega }_{o}}t)}dt, &\text{n=1,2,3,}\cdots & {} \\\end{matrix}\text{ }$

We have replaced the dummy subscript m by n to correspond to the notation of equation (1). The term $({{a}_{n}}\cos (n{{\omega }_{o}}t)+{{b}_{n}}\sin (n{{\omega }_{o}}t)$ in equation (1) is sometimes called the nth harmonic. The case n=1 is the first harmonic, or fundamental, with fundamental frequency  ${{\omega }_{o}}$ . The case n=2 is the second harmonic with frequency   $2{{\omega }_{o}}$, and so forth. The term ${}^{{{a}_{o}}}/{}_{2}$ is the constant, or dc, component.

The conditions that equation (1) is the Fourier series representing f(t), where the Fourier coefficients are given by equation (5), are, as we have said, quite general and hold for almost any function we are likely to encounter in engineering. For the reader’s information they are as follows:

1. $\int\limits_{0}^{T}{\left| f(t) \right|}dt$ is finite means $\int\limits_{0}^{T}{\left| f(t) \right|}dt<\infty$
2. In any finite interval, f(t) has at most a finite number of finite discontinuities
3. In any finite interval, f(t) has at most a finite number of maxima and minima

Saw-Tooth Fourier Series Example

As an example, consider f(t) is the saw-tooth wave as shown in figure 1,

Fig.1: Saw-Tooth Wave

Given by

$\begin{matrix} f(t)=t, & -\pi <t<\pi \\\end{matrix}\text{ (6)}$

$f(t+2\pi )=f(t)$

Since  $T=2\pi$ , we have ${{\omega }_{o}}={}^{2\pi }/{}_{T}=1$  . If we choose ${{t}_{o}}=-\pi$  , then the first equation of (5) for n=0 yields,

${{a}_{o}}=\frac{1}{\pi }\int\limits_{-\pi }^{\pi }{t\text{ }dt=0}$

For n=1, 2, 3, ⋯, we have

${{a}_{n}}=\frac{1}{\pi }\int\limits_{-\pi }^{\pi }{tcos(nt)}$

$=\frac{1}{{{n}^{2}}\pi }\left. (cos(nt)+ntsin(nt)) \right|_{-\pi }^{\pi }=0$

And

${{b}_{n}}=\frac{1}{\pi }\int\limits_{-\pi }^{\pi }{t\sin (nt)dt}$

$=\frac{1}{{{n}^{2}}\pi }\left. (sin(nt)-nt\cos (nt)) \right|_{-\pi }^{\pi }$

$=-\frac{2\cos (n\pi )}{n}=-\frac{2{{(-1)}^{n+1}}}{n}$

The case n=0 had to be considered separately because of the appearance of n2 in the denominator in the general case.

From our results, the Fourier series for equation (6) can be obtained by putting all the coefficients in equation (1):

$f(t)=2(\frac{\sin t}{1}-\frac{\sin 2t}{2}+\frac{\sin 3t}{3}-\cdots )\text{ (7)}$

As another example, suppose we have

$\begin{matrix} f(t) & =0, & -2<t<-1 \\ {} & =6, & -1<t<1 \\ {} & =0, & 1<t<2 \\\end{matrix}$

$f(t+4)=f(t)$

Evidently, T=4, and ${{\omega }_{o}}={}^{2\pi }/{}_{T}=\frac{\pi }{2}$ . If we take ${{t}_{o}}=0$ in equation (5), we must break each integral into three parts since on the interval from 0 to 4, f (t) has 0, 6, and 0 values. If ${{t}_{o}}=-1$ , we only have to divide the integral intro two parts since f (t)=6 on -1 to 1 and f (t)=0 on 1 to 3. Therefore let us choose this value of ${{t}_{o}}$ and obtain

${{a}_{o}}=\frac{1}{\pi }\int\limits_{-1}^{1}{\text{6 }dt+\frac{2}{4}\int\limits_{1}^{3}{\text{0 }dt=6}}$

Also we have

${{a}_{n}}=\frac{2}{4}\int\limits_{-1}^{1}{6cos(\frac{n\pi t}{2})dt}+\frac{2}{4}\int\limits_{1}^{3}{0cos(\frac{n\pi t}{2})dt}$

$=\frac{12}{n\pi }\sin (\frac{n\pi }{2})$

And, finally,

${{b}_{n}}=\frac{2}{4}\int\limits_{-1}^{1}{6\sin (\frac{n\pi t}{2})dt}+\frac{2}{4}\int\limits_{1}^{3}{0\sin (\frac{n\pi t}{2})dt}$

$=0$

Thus the Fourier series is

$f(t)=3+\frac{12}{\pi }\left( cos(\frac{\pi t}{2})-\frac{1}{3}cos(\frac{3\pi t}{2})+\frac{1}{5}cos(\frac{5\pi t}{2})+\cdots \right)$

Since there are no even harmonics, we may put the results in the more compact form

$f(t)=3+\frac{12}{\pi }\sum\limits_{n=1}^{\infty }{\frac{{{(-1)}^{n+1}}\cos \{[(2n-1)\pi t]/2\}}{2n-1}}$