EMNG 3028 - Chapter 5: Periodic Functions & Fourier Series Notes EMNG 3028 Power Quality & Distribution - Chapter 5: Periodic Functions & Fourier Series Objectives Understand periodic functions and their characteristics. Understand Fourier Series Theory. Calculate Fourier constants. Definition of a Periodic Function A function f ( x ) f(x) f ( x ) is periodic if and only if f ( x + L ) = f ( x ) f(x + L) = f(x) f ( x + L ) = f ( x ) is true for some value of L L L and for all values of x x x . The smallest value of L L L for which the equation f ( x + L ) = f ( x ) f(x + L) = f(x) f ( x + L ) = f ( x ) holds true for every value of x x x is called the period of the function. A graph of a periodic function f ( x ) f(x) f ( x ) with period L L L exhibits the same pattern every L L L units along the x-axis. Knowing the function's behavior over one complete period allows us to sketch the graph over a wider interval containing multiple periods. Examples: sin x \sin x sin x and cos x \cos x cos x are periodic functions with a period of 2 π 2\pi 2 π . Fourier Series Periodic functions frequently occur in engineering problems and can be complicated. It is desirable to represent these functions in terms of simple periodic functions like sine and cosine. Joseph Fourier (1768-1830) studied the development of a periodic function into a series of sines and cosines. The series of sines and cosines is named after him: Fourier Series. If f ( x ) f(x) f ( x ) is a periodic function with period 2 π 2\pi 2 π defined in ( c , c + 2 π ) (c, c + 2\pi) ( c , c + 2 π ) and satisfies Dirichlet's conditions, it can be expanded as a Fourier series. Dirichlet Conditions Dirichlet conditions (also known as the Dirichlet-Jordan test) provide sufficient conditions for a periodic function to be equal to the sum of its Fourier series. These conditions ensure the convergence of the Fourier series to the original function. Three Dirichlet Conditions: Absolute Integrability : The function f ( t ) f(t) f ( t ) must be absolutely integrable over one period. This means that the integral of the absolute value of the function over a period is finite.Bounded Variation : Within any finite interval, the function must have a finite number of maxima and minima. The function's variation over the interval is bounded.Finite Discontinuities : The function can have a finite number of discontinuities in any finite interval, but each discontinuity must be finite (not infinite).Fourier Series Coefficients The coefficients are calculated using the following formulas:a < e m > 0 = 1 π ∫ < / e m > c c + 2 π f ( x ) d x a<em>0 = \frac{1}{\pi} \int</em>{c}^{c+2\pi} f(x) dx a < e m > 0 = π 1 ∫ < / e m > c c + 2 π f ( x ) d x a < e m > n = 1 π ∫ < / e m > c c + 2 π f ( x ) cos ( n x ) d x a<em>n = \frac{1}{\pi} \int</em>{c}^{c+2\pi} f(x) \cos(nx) dx a < e m > n = π 1 ∫ < / e m > c c + 2 π f ( x ) cos ( n x ) d x b < e m > n = 1 π ∫ < / e m > c c + 2 π f ( x ) sin ( n x ) d x b<em>n = \frac{1}{\pi} \int</em>{c}^{c+2\pi} f(x) \sin(nx) dx b < e m > n = π 1 ∫ < / e m > c c + 2 π f ( x ) sin ( n x ) d x f ( t ) = a < e m > 0 + ∑ < / e m > n = 1 ∞ ( a < e m > n cos ( n ω < / e m > 0 t ) + b < e m > n sin ( n ω < / e m > 0 t ) ) f(t) = a<em>0 + \sum</em>{n=1}^{\infty} (a<em>n \cos(n \omega</em>0 t) + b<em>n \sin(n \omega</em>0 t)) f ( t ) = a < e m > 0 + ∑ < / e m > n = 1 ∞ ( a < e m > n cos ( nω < / e m > 0 t ) + b < e m > n sin ( nω < / e m > 0 t )) ω 0 = 2 π T \omega_0 = \frac{2\pi}{T} ω 0 = T 2 π is the fundamental frequency in radians per second.The Fourier series resolves the function into a DC component (a 0 a_0 a 0 ) and an AC component (the summation). The constants a < e m > 0 a<em>0 a < e m > 0 , a < / e m > n a</em>n a < / e m > n , and b n b_n b n are called the Fourier coefficients. Periodic Functions - Cosine and Sine Cosine Function:cos ( n π ) = { ( − 1 ) n a m p ; for all n 1 a m p ; , n = 0 , 4 , 8 , … − 1 a m p ; , n = 2 , 6 , 10 , … \cos(n\pi) = \begin{cases} (-1)^n & \text{for all n} \ 1 & , n = 0, 4, 8, … \ -1 & , n = 2, 6, 10, … \end{cases} cos ( nπ ) = { ( − 1 ) n am p ; for all n 1 am p ;, n = 0 , 4 , 8 , … − 1 am p ;, n = 2 , 6 , 10 , … cos ( n π 2 ) = { 0 a m p ; , n odd 1 a m p ; , n = 0 , 4 , 8 , … − 1 a m p ; , n = 2 , 6 , 10 , … \cos(n\frac{\pi}{2}) = \begin{cases} 0 & \text{, n odd} \ 1 & , n = 0, 4, 8, … \ -1 & , n = 2, 6, 10, … \end{cases} cos ( n 2 π ) = { 0 am p ; , n odd 1 am p ;, n = 0 , 4 , 8 , … − 1 am p ;, n = 2 , 6 , 10 , … Sine Function:sin ( n π ) = 0 for all n \sin(n\pi) = 0 \text{ for all n} sin ( nπ ) = 0 for all n sin ( n π 2 ) = { 0 a m p ; , n even 1 a m p ; , n = 1 , 5 , 9 , … − 1 a m p ; , n = 3 , 7 , 11 , … \sin(n\frac{\pi}{2}) = \begin{cases} 0 & \text{, n even} \ 1 & , n = 1, 5, 9, … \ -1 & , n = 3, 7, 11, … \end{cases} sin ( n 2 π ) = { 0 am p ; , n even 1 am p ;, n = 1 , 5 , 9 , … − 1 am p ;, n = 3 , 7 , 11 , … Modulation :Amplitude varies in a repeating manner: Amplitude Modulation (AM). Frequency varies in a repeating manner: Frequency Modulation (FM). Waveform shape varies in a repeating manner: Non-sinusoidal periodic wave. Fourier Series Theory A square-wave pattern can be approximated with a sum involving a fundamental sine-wave plus a combination of harmonics of this fundamental frequency. This sum is called a Fourier series. Harmonics The sinusoid sin ( n ω < e m > 0 t ) \sin(n\omega<em>0 t) sin ( nω < e m > 0 t ) or cos ( n ω < / e m > 0 t ) \cos(n\omega</em>0 t) cos ( nω < / e m > 0 t ) is called the n t h n^{th} n t h harmonic of f ( t ) f(t) f ( t ) .If n n n is odd, then it's called the odd harmonic. If n n n is even, then it's called the even harmonic. Requirements for Fourier Series Representation f ( t ) f(t) f ( t ) must be single-valued everywhere.It must have a finite number of finite discontinuities per period. It must have a finite number of maxima and minima per period. Integrals Useful for Evaluating Fourier Coefficients ∫ cos ( a t ) d t = 1 a sin ( a t ) \int \cos(at) dt = \frac{1}{a} \sin(at) ∫ cos ( a t ) d t = a 1 sin ( a t ) ∫ sin ( a t ) d t = − 1 a cos ( a t ) \int \sin(at) dt = -\frac{1}{a} \cos(at) ∫ sin ( a t ) d t = − a 1 cos ( a t ) ∫ t cos ( a t ) d t = 1 a cos ( a t ) + t a sin ( a t ) \int t \cos(at) dt = \frac{1}{a} \cos(at) + \frac{t}{a} \sin(at) ∫ t cos ( a t ) d t = a 1 cos ( a t ) + a t sin ( a t ) ∫ t sin ( a t ) d t = 1 a sin ( a t ) − t a cos ( a t ) \int t \sin(at) dt = \frac{1}{a} \sin(at) - \frac{t}{a} \cos(at) ∫ t sin ( a t ) d t = a 1 sin ( a t ) − a t cos ( a t ) To find a < e m > 0 a<em>0 a < e m > 0 : a < / e m > 0 = 2 T ∫ 0 T f ( t ) d t a</em>0 = \frac{2}{T} \int_{0}^{T} f(t) dt a < / e m > 0 = T 2 ∫ 0 T f ( t ) d t To find a < e m > n a<em>n a < e m > n : a < / e m > n = 2 T ∫ < e m > 0 T f ( t ) cos ( n ω < / e m > 0 t ) d t a</em>n = \frac{2}{T} \int<em>{0}^{T} f(t) \cos(n \omega</em>0 t) dt a < / e m > n = T 2 ∫ < e m > 0 T f ( t ) cos ( nω < / e m > 0 t ) d t To find b < e m > n b<em>n b < e m > n : b < / e m > n = 2 T ∫ < e m > 0 T f ( t ) sin ( n ω < / e m > 0 t ) d t b</em>n = \frac{2}{T} \int<em>{0}^{T} f(t) \sin(n \omega</em>0 t) dt b < / e m > n = T 2 ∫ < e m > 0 T f ( t ) sin ( nω < / e m > 0 t ) d t Integrals Table ∫ x n d x = x n + 1 n + 1 \int x^n dx = \frac{x^{n+1}}{n+1} ∫ x n d x = n + 1 x n + 1 ∫ 1 x d x = ln ∣ x ∣ \int \frac{1}{x} dx = \ln |x| ∫ x 1 d x = ln ∣ x ∣ ∫ e x d x = e x \int e^x dx = e^x ∫ e x d x = e x ∫ sin x d x = − cos x \int \sin x dx = -\cos x ∫ sin x d x = − cos x ∫ cos x d x = sin x \int \cos x dx = \sin x ∫ cos x d x = sin x ∫ [ g ( x ) ] n g ′ ( x ) d x = [ g ( x ) ] n + 1 n + 1 \int [g(x)]^n g'(x) dx = \frac{[g(x)]^{n+1}}{n+1} ∫ [ g ( x ) ] n g ′ ( x ) d x = n + 1 [ g ( x ) ] n + 1 ∫ g ′ ( x ) g ( x ) d x = ln ∣ g ( x ) ∣ \int \frac{g'(x)}{g(x)} dx = \ln |g(x)| ∫ g ( x ) g ′ ( x ) d x = ln ∣ g ( x ) ∣ ∫ a x d x = a x ln a \int a^x dx = \frac{a^x}{\ln a} ∫ a x d x = l n a a x ∫ cosh x d x = sinh x \int \cosh x dx = \sinh x ∫ cosh x d x = sinh x ∫ sinh x d x = cosh x \int \sinh x dx = \cosh x ∫ sinh x d x = cosh x ∫ tanh x d x = ln ( cosh x ) \int \tanh x dx = \ln(\cosh x) ∫ tanh x d x = ln ( cosh x ) ∫ coth x d x = ln ( sinh x ) \int \coth x dx = \ln(\sinh x) ∫ coth x d x = ln ( sinh x ) ∫ tan x d x = − ln ( cos x ) \int \tan x dx = -\ln(\cos x) ∫ tan x d x = − ln ( cos x ) ∫ cot x d x = ln ( sin x ) \int \cot x dx = \ln(\sin x) ∫ cot x d x = ln ( sin x ) ∫ d x a 2 + x 2 = 1 a tan − 1 ( x a ) \int \frac{dx}{a^2 + x^2} = \frac{1}{a} \tan^{-1}(\frac{x}{a}) ∫ a 2 + x 2 d x = a 1 tan − 1 ( a x ) ∫ d x a 2 − x 2 = sin − 1 ( x a ) \int \frac{dx}{\sqrt{a^2 - x^2}} = \sin^{-1}(\frac{x}{a}) ∫ a 2 − x 2 d x = sin − 1 ( a x ) Example: Fourier Series Calculation Function defined in ( 0 , 2 π ) (0, 2\pi) ( 0 , 2 π ) . f ( x ) = { x , a m p ; 0 l t ; x l t ; π π , a m p ; π l t ; x l t ; 2 π f(x) = \begin{cases} x, & 0 < x < \pi \ \pi, & \pi < x < 2\pi \end{cases} f ( x ) = { x , am p ; 0 l t ; x l t ; π π , am p ; π l t ; x l t ; 2 π Calculate a 0 a_0 a 0 :a < e m > 0 = 1 2 π ∫ < / e m > 0 2 π f ( x ) d x = 1 2 π [ ∫ < e m > 0 π x d x + ∫ < / e m > π 2 π π d x ] a<em>0 = \frac{1}{2\pi} \int</em>{0}^{2\pi} f(x) dx = \frac{1}{2\pi} \left[ \int<em>{0}^{\pi} x dx + \int</em>{\pi}^{2\pi} \pi dx \right] a < e m > 0 = 2 π 1 ∫ < / e m > 0 2 π f ( x ) d x = 2 π 1 [ ∫ < e m > 0 π x d x + ∫ < / e m > π 2 π π d x ] a 0 = 1 2 π [ π 2 2 + π 2 ] = 3 π 4 a_0 = \frac{1}{2 \pi} \left[ \frac{\pi^2}{2} + \pi^2 \right] = \frac{3\pi}{4} a 0 = 2 π 1 [ 2 π 2 + π 2 ] = 4 3 π Calculate a n a_n a n :a < e m > n = 1 π ∫ < / e m > 0 2 π f ( x ) cos ( n x ) d x = 1 π [ ∫ < e m > 0 π x cos ( n x ) d x + ∫ < / e m > π 2 π π cos ( n x ) d x ] a<em>n = \frac{1}{\pi} \int</em>{0}^{2\pi} f(x) \cos(nx) dx = \frac{1}{\pi} \left[ \int<em>{0}^{\pi} x \cos(nx) dx + \int</em>{\pi}^{2\pi} \pi \cos(nx) dx \right] a < e m > n = π 1 ∫ < / e m > 0 2 π f ( x ) cos ( n x ) d x = π 1 [ ∫ < e m > 0 π x cos ( n x ) d x + ∫ < / e m > π 2 π π cos ( n x ) d x ] a n = 1 π [ cos ( n π ) − 1 n 2 + sin ( 2 n π ) − sin ( n π ) n ] = cos ( n π ) − 1 π n 2 a_n = \frac{1}{\pi} \left[ \frac{\cos(n \pi) - 1}{n^2} + \frac{\sin(2n\pi) - \sin(n\pi)}{n} \right] = \frac{\cos(n \pi) - 1}{\pi n^2} a n = π 1 [ n 2 c o s ( nπ ) − 1 + n s i n ( 2 nπ ) − s i n ( nπ ) ] = π n 2 c o s ( nπ ) − 1 a n = { 0 a m p ; , n even − 2 π n 2 a m p ; , n odd a_n = \begin{cases} 0 & \text{, n even} \ -\frac{2}{\pi n^2} & \text{, n odd} \end{cases} a n = { 0 am p ; , n even − π n 2 2 am p ; , n odd Calculate b n b_n b n :b < e m > n = 1 π ∫ < / e m > 0 2 π f ( x ) sin ( n x ) d x = 1 π [ ∫ < e m > 0 π x sin ( n x ) d x + ∫ < / e m > π 2 π π sin ( n x ) d x ] b<em>n = \frac{1}{\pi} \int</em>{0}^{2\pi} f(x) \sin(nx) dx = \frac{1}{\pi} \left[ \int<em>{0}^{\pi} x \sin(nx) dx + \int</em>{\pi}^{2\pi} \pi \sin(nx) dx \right] b < e m > n = π 1 ∫ < / e m > 0 2 π f ( x ) sin ( n x ) d x = π 1 [ ∫ < e m > 0 π x sin ( n x ) d x + ∫ < / e m > π 2 π π sin ( n x ) d x ] b < e m > n = 1 π [ π cos ( n π ) n + sin ( n π ) n 2 − ( cos ( 2 n π ) − cos ( n π ) ) π n ] b<em>n = \frac{1}{\pi} \left[ \frac{\pi \cos(n \pi)}{n} + \frac{\sin(n\pi)}{n^2} - \frac{(\cos(2n\pi) - \cos(n\pi))\pi}{n} \right] b < e m > n = π 1 [ n π c o s ( nπ ) + n 2 s i n ( nπ ) − n ( c o s ( 2 nπ ) − c o s ( nπ )) π ] b < / e m > n = 1 − ( − 1 ) n n b</em>n = \frac{1 - (-1)^n}{n} b < / e m > n = n 1 − ( − 1 ) n Final Fourier Series :f ( x ) = 3 π 4 + ∑ < e m > n = 1 ∞ [ a < / e m > n cos ( n x ) + b n sin ( n x ) ] f(x) = \frac{3\pi}{4} + \sum<em>{n=1}^{\infty} \left[ a</em>n \cos(nx) + b_n \sin(nx) \right] f ( x ) = 4 3 π + ∑ < e m > n = 1 ∞ [ a < / e m > n cos ( n x ) + b n sin ( n x ) ] Where a < e m > 0 = 3 π 2 a<em>0 = \frac{3 \pi}{2} a < e m > 0 = 2 3 π , a < / e m > n = 0 a</em>n = 0 a < / e m > n = 0 , (n even), a < e m > n = − 2 π n 2 a<em>n = -\frac{2}{\pi n^2} a < e m > n = − π n 2 2 , (n odd), and b < / e m > n = 1 − ( − 1 ) n n b</em>n = \frac{1 - (-1)^n}{n} b < / e m > n = n 1 − ( − 1 ) n Amplitude Modulation (AM) Amplitude varies with time. Includes a carrier frequency plus sidebands. Frequency Modulation (FM) Frequency varies with time. Modulation determines the number of sidebands. Non-sinusoidal Periodic Waves Examples: Sawtooth wave, Square wave, Triangular wave. Consist of harmonic series with varying amplitudes and frequencies.