f ( x) a0 a1 cos x a2 cos 2x a3 cos 3x ...... b1 sin x b2 sin 2x b3 sin 3x ..... f ( x) a0 (an cos nx bn sin nx) n1 Fourier Series 2.06715 2.5 0.900316 1 2 0.8 1.5 c( k) 0.6 0 f( x) 1 0.4 0.5 0.2 0 0 5 0638351 0 5 10 15 0 1 1 2 3 4 5 6 k 7 8 9 10 11 12 11 0.5 -3.14159 x 12.5584 1 INFINITE SERIES A series is a sum of a sequence of terms. An infinite series is an ordered set of terms, combined together by the addition operators (+ or -). The term infinite series is used to emphasize the fact that series contains an infinite number of terms. The series is generally written as a n1 n a1 a2 a3 ...... The term an is called the general term. It is an expression that contains n. For example if an 1 2n 1 A series can be expressed in summation form using general term in a summation symbol or in the expanded form using individual terms: 1 1 1 1 1 an ...... 3 5 7 9 n1 n1 2n 1 2 There are different types of series. For instance, if the difference an+1 - an between successive terms of a series is a constant, the series is called an arithmetic series. An example of an arithmetic series is: (4n 1) 3 7 1115 ...... n1 an1 A series for which the ratio of each two consecutive termsa n is a constant is called a geometric series. An example of a geometric series is 1 1 1 1 1 ...... n 2 4 8 n 0 2 A series may converge to a definite value in which case it is called a convergent series. If it does not converge, it is called a divergent series. 3 The terms of series do not have to be constants. They can be functions of a variable, usually denoted by x. For example, there are power series that are expressed as: n n 2 3 4 a x a a x a x a x a x ...... n 0 1 2 3 4 n 0 In the above expression, a0, a1,….. are called coefficients. Many functions can be approximated by power series. For example x3 x5 sin x x ..... 3! 5! x2 x4 cos x x ..... 2! 4! 2 3 4 x x x ex 1 x ....... 2! 3! 4! 4 One type of series contains terms that are sinusoidal trigonometric functions. This type is called Fourier series f ( x) a0 c1 sin ( x 1) c2 sin (2x 2 ) c3 sin (3x 3 ) ..... Fourier series are often shown decomposed into sine and cosine parts: f ( x) a0 a1 cos x a2 cos 2x a3 cos 3x ...... b1 sin x b2 sin 2x b3 sin 3x ..... f ( x) a0 (an cos nx bn sin nx) n1 5 Fourier Series Analysis The name of Fourier series comes from the French mathematician Joseph Fourier (1768-1830) who used the series to solve problems in thermodynamics. Later the series were used by various researchers to solve mechanical vibrations and problems with electrical signals and electromagnetic radiation. The Fourier series analysis is a mathematical tool used for analyzing periodic functions. A periodic function is a function for which f(t) = f(t+T) f(t) 110 100 g( t ) 50 T 0 0.001 0 -0.000333 0.001 0.002 0.003 0.004 t 0.005 0.006 0.007 0.008 0.009 0.008997 t 6 Fourier Series Analysis Fourier series analysis decomposes any periodic function into an infinite weighted sum of much simpler sine and cosine component functions. The problems then can be solved for the individual simple sine and cosine functions, and then the individual solutions can be recombined to obtain the solution to the original problem or at least an approximation of the solution to a desired accuracy. The study of Fourier series is known as harmonic analysis. For example a square wave can be decomposed into in infinite number of sinusoidal functions that, when all added together, approximate the square wave. Let us consider a function given by 1 1 1 f (t ) 10.00 sin t sin 3t sin 5t sin 7t ..... 3 5 7 or 1 f (t ) 10.00 sin nt n1,3,5... n 7 Adding first two terms (pink and blue) gives a graph shown in red. 10 5 A1( t ) A3( t ) 0 C3( t ) 5 10 0 2 4 6 8 10 t 8 Adding the third term gives: 10 5 A1( t ) A3( t ) 0 C5( t ) A5( t ) 5 10 0 2 4 6 8 10 t f (t ) 10.00sin t 3.33sin 3t 2.00sin 5t 9 Adding first four term results in a waveform that begins to resemble a square wave. Adding large number of terms will give a square wave. 10 A1( t ) 5 A3( t ) C( t ) 0 A5( t ) A7( t ) 5 10 0 2 4 6 8 10 t 10 Finding the Terms of Fourier Series We will start by writing a periodic function f(x) with a period of 2π as a sum of sinusoidal components: f ( x) a0 a1 cos x a2 cos 2x a3 cos 3x ...... b1 sin x b2 sin 2x b3 sin 3x ..... f ( x) a0 (an cos nx bn sin nx) (1) n1 In the above equation, the non-sinusoidal term a0 is a constant that will be equal to zero if the function f(x) oscillates around the x axis. If f(x) oscillates around any other value, a0 will be different from zero. The constant a0 is called an offset or average value. Terms a1cos x and b1sin x are called the fundamental components. The remaining terms are called harmonic components or just harmonics; terms with argument 2x are second harmonics, terms with argument 3x are third harmonics and so on. 11 2nd harmonic components Average value f ( x) a0 a1 cos x a2 cos 2x a3 cos 3x ..... b1 sin x b2 sin 2x b3 sin 3x ..... 1st harmonic components 3rd harmonic components 12 Example 1 4 𝑎) 𝑡ℎ𝑖𝑟𝑑 ℎ𝑎𝑟𝑚𝑜𝑛𝑖𝑐 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 = 𝑠𝑖𝑛3𝜃 3𝜋 𝑐𝑜𝑠2𝑥 𝑠𝑖𝑛2𝑥 𝑏) 𝑠𝑒𝑐𝑜𝑛𝑑 ℎ𝑎𝑟𝑚𝑜𝑛𝑖𝑐 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 = + 2 3 13 Example 2 4 1 1 𝑎) 𝑓 𝑥 = 𝑠𝑖𝑛𝑥 + 𝑠𝑖𝑛3𝑥 + 𝑠𝑖𝑛5𝑥 + … . 𝜋 3 5 4 = 𝜋 ∞ 𝑛=1,3,5,… 1 sin(𝑛𝑥) 𝑛 1 −2 1 1 𝑑) 𝑓 𝑦 = + ( )(𝑐𝑜𝑠𝑦 + 2 𝑐𝑜𝑠3𝑦 + 2 𝑐𝑜𝑠5𝑦 + ⋯ ) 2 𝜋 3 5 1 −2 = + 2 𝜋 ∞ 𝑛=1,3,5,… 1 𝑐𝑜𝑠𝑛𝑦 2 𝑛 14 Finding the Coefficients Since we know the function f(x), but we don’t know the offset and the constants (coefficients) ai and bi , our aim is to find formulas for the coefficients ai and bi in terms of f(x). If we integrate both sides of equation (1) inside the limits of –π and +π, we get: f ( x) a0 (an cos nx bn sin nx) (1) n1 f ( x)dx a dx (a cos nx b sin nx)dx 0 f ( x)dx a x 0 n n1 n n1 n1 an cos nx dx bn sin nx dx 15 Now we will find the value of the integrals inside the summation: 1 1 cos nxdx n sin nx n [sin n sin(n)] 0 because n is an integer. 1 1 sin nxdx cos nx [cos n cos(n)] 0 n n Therefore, f ( x)dx 2a 0 Solving for a0 gives 1 a0 f ( x)dx 2 16 SUMMARY A periodic function f(x) can be replaced by a sum of sine and cosine components called Fourier series f ( x) a0 a1 cos x a2 cos 2x a3 cos 3x ...... b1 sin x b2 sin 2x b2 sin 2x ..... f ( x) a0 (an cos nx bn sin nx) n1 The coefficients of the series are given by 1 a0 f ( x)dx 2 1 an f ( x)cos nx dx 1 bn f ( x)sin nx dx 17 Example 3 Find the average value for the following waveforms: 𝑎) 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑣𝑎𝑙𝑢𝑒, 𝑎0 = 0 𝑏) 𝑓 𝜃 = 0 𝑓 𝜃 = 𝑠𝑖𝑛𝜃 −𝜋 <𝜃 <0 0<𝜃<𝜋 18 1 𝑎0 = 2𝜋 𝜋 −𝜋 1 𝑓 𝜃 𝑑𝜃 = 2𝜋 𝜋 0 1 𝑓 𝜃 𝑑𝜃 = [−𝑐𝑜𝑠𝜃]𝜋0 2𝜋 −1 −1 1 𝑎0 = 𝑐𝑜𝑠𝜋 − 𝑐𝑜𝑠0 = −1 − 1 = 2𝜋 2𝜋 𝜋 19 Example 4 Find coefficients a1 and b1 for the above waveform: 1 𝑓 𝜃 = 𝜃−1 𝜋 1 𝑎1 = 𝜋 2𝜋 0 0 < 𝜃 < 2𝜋 1 1 𝜃 − 1 𝑐𝑜𝑠𝜃𝑑𝜃 = 2 𝜋 𝜋 2𝜋 0 1 1 2𝜋 𝑎1 = 2 [𝑐𝑜𝑠𝜃 + 𝜃𝑠𝑖𝑛𝜃]0 − 𝑠𝑖𝑛𝜃 𝜋 𝜋 1 𝜃𝑐𝑜𝑠𝜃𝑑𝜃 − 𝜋 2𝜋 𝑐𝑜𝑠𝜃𝑑𝜃 0 2𝜋 0 𝑎1 1 = 2 𝑐𝑜𝑠2𝜋 + 2𝜋𝑠𝑖𝑛2𝜋 − 𝑐𝑜𝑠0 − 0𝑠𝑖𝑛0 𝜋 1 − 𝑠𝑖𝑛2𝜋 − 𝑠𝑖𝑛0 = 0 𝜋 20 Example 4 Find coefficients a1 and b1 for the first waveform: 1 1) 𝑓 𝜃 = 𝜃 − 1 𝜋 1 𝑏1 = 2 𝜋 2𝜋 0 0 < 𝜃 < 2𝜋 1 1 𝜃 − 1 𝑠𝑖𝑛𝜃 = 2 𝜋 𝜋 2𝜋 0 1 𝜃𝑠𝑖𝑛𝜃𝑑𝜃 − 𝜋 1 1 2𝜋 𝑏1 = 2 [−𝜃𝑐𝑜𝑠𝜃 + 𝑠𝑖𝑛𝜃]0 − 𝑐𝑜𝑠𝜃 𝜋 𝜋 2𝜋 𝑠𝑖𝑛𝜃𝑑𝜃 0 2𝜋 0 1 1 𝑏1 = 2 −2𝜋𝑐𝑜𝑠2𝜋 + 𝑠𝑖𝑛2𝜋 − 0 − 𝑠𝑖𝑛0 − 𝑐𝑜𝑠2𝜋 − 𝑐𝑜𝑠0 𝜋 𝜋 −2 = 𝜋 21 Polar Form of Fourier Series In order to easily compare relative magnitudes and phase shifts of the individual harmonics, we want to get Fourier series in a polar form. f ( x) a0 c1 sin ( x 1) c2 sin (2x 2 ) c3 sin (3x 3 ) ..... f ( x) a0 cn sin(nx n ) n1 22 Polar Form of Fourier Series cn sin (nx n ) cn sin n cos nx cn cosn sin nx an an cn sinn bn cn cosn bn an an + bn - an + bn + cn an2 bn2 OR use rectangular to polar conversion on your calculator bn an bn - an bn + 23 Example: Find the polar form of function Will be solved in class. 24 Harmonic Spectrum Harmonic spectrum is a graph showing the amplitude cn of the polar representation of Fourier series as a function of the harmonic order n. 25 If the horizontal axis is labelled in Hz, the graph is called frequency spectrum. 26 Appendix- Coefficients Calculation To determine the coefficients an for n 1 we’ll start again with equation (1). First we will multiply it by cos mx (where m is an integer and m 1 and then we’ll integrate it from –π to +π. f ( x) a0 (an cos nx bn sin nx) (1) n1 f ( x)cos mx a0 cos mx (an cos nx cos mx bn sin nx cos mx) n1 f ( x)cos mx dx a cos mx dx 0 n1 an cos nx cos mx dx bn sin nx cos mx dx n1 f ( x)cos mx dx a cos mx dx a 0 n1 n n1 cos nx cos mx dx bn sin nx cos mx dx 27 f ( x)cos mxdx a cos mxdx a 0 cos mx dx n1 n n1 cos nx cos mxdx bn sin nx cos mxdx 1 1 sin mx [sin m sin(m)] 0 m m 1 cos nx cos mx [cos(n m) x cos(n m)x] 2 For all integers n and m, the product of two cosine functions is the sum of two cosine functions if n m and the integral of any cosine function integrated from –π to π is zero. 28 In case n = m, we have 1 1 sin 2nx cos nx dx 2 (1 cos 2nx) dx 2 x 2 2 29 f ( x)cos mxdx a cos mxdx a 0 cos mx dx n1 n n1 cos nx cos mxdx bn sin nx cos mxdx 1 1 sin mx [sin m sin(m)] 0 m m 1 cos nx cos mx [cos(n m) x cos(n m)x] 2 1 sin nx cos mx [sin(n m)x sin(n m)x] 2 Each sine term integrated from –π to π is zero. 30 f ( x)cos mxdx a cos mxdx a 0 n1 n n1 cos nx cos mxdx bn sin nx cos mxdx 0 0 an cos2 nx dx an only if n = m f ( x)cos nx dx an cos2 nx dx an 1 an f ( x)cos nx dx 31 To find the coefficients bn of the sine terms we will employ a similar method. We will multiply equation (1) by sin mx and then integrate from –π to π is zero. f ( x)sin mx a0 sin mx (an cos nx sin mx bn sin nx sin mx) n1 f ( x)sin mx dx a sin mx dx 0 n1 an cos nx sin mx dx bn sin nx sin mx dx n1 f ( x)sin mx dx a sin mx dx a 0 n1 n n1 cos nx sin mx dx bn sin nx sin mx dx 32 f ( x)sin mxdx a sin mxdx a 0 n1 n n1 cos nx sin mxdx bn sin nx sin mxdx 0 0 1 sin nx sin mx [cos(n m)x cos(n m)x] 2 0 for n m sin nx sin mx dx 1 1 sin 2nx 2 sin nx dx ( 1 cos 2 nx ) dx x 2 2 2 33 f ( x)sin mxdx a sin mxdx a 0 n1 n n1 cos nx sin mxdx bn sin nx sin mxdx bn sin2 nxdx bn 0 0 only if n = m f ( x)sin mx dx bn sin2 nx dx bn 1 bn f ( x)sin nx dx 34