The Fourier Series Representing a Signal • The convolution method for finding the response of a system to an excitation takes advantage of the linearity and timeinvariance of the system and represents the excitation as a linear combination of impulses and the response as a linear combination of impulse responses • The Fourier series represents a signal as a linear combination of complex sinusoids 5/10/04 M. J. Roberts - All Rights Reserved 2 Linearity and Superposition If an excitation can be expressed as a sum of complex sinusoids the response can be expressed as the sum of responses to complex sinusoids. 5/10/04 M. J. Roberts - All Rights Reserved 3 Real and Complex Sinusoids e jx + e − jx cos( x ) = 2 e jx − e − jx sin( x ) = j2 5/10/04 M. J. Roberts - All Rights Reserved 4 Jean Baptiste Joseph Fourier 3/21/1768 - 5/16/1830 5/10/04 M. J. Roberts - All Rights Reserved 5 ContinuousTime Fourier Series Concept 5/10/04 M. J. Roberts - All Rights Reserved 6 ContinuousTime Fourier Series Concept 5/10/04 M. J. Roberts - All Rights Reserved 7 ContinuousTime Fourier Series Concept 5/10/04 M. J. Roberts - All Rights Reserved 8 CT Fourier Series Definition The Fourier series representation, x F (t ), of a signal, x(t), over a time, t 0 < t < t 0 + TF , is x F (t ) = ∞ ∑ k =−∞ X[ k ]e j 2π ( kf F ) t where X[k] is the harmonic function, k is the harmonic number and fF = 1 / TF (pp. 212-215). The harmonic function can be found from the signal as 1 X[ k ] = TF t 0 + TF ∫ x(t )e − j 2π ( kf F ) t dt t0 The signal and its harmonic function form a Fourier series FS pair indicated by the notation, x(t ) ← → X[ k ] . 5/10/04 M. J. Roberts - All Rights Reserved 9 CTFS of a Real Function It can be shown (pp. 216-217) that the continuous-time Fourier series (CTFS) harmonic function of any real-valued function, x(t), has the property that X[ k ] = X* [− k ] One implication of this fact is that, for real-valued functions, the magnitude of the harmonic function is an even function and the phase is an odd function. 5/10/04 M. J. Roberts - All Rights Reserved 10 The Trigonometric CTFS The fact that, for a real-valued function, x(t), X[ k ] = X* [− k ] also leads to the definition of an alternate form of the CTFS, the so-called trigonometric form. ∞ { } x F ( t ) = X c [ 0 ] + ∑ X c [ k ] cos ( 2π ( kfF ) t ) + X s [ k ] sin ( 2π ( kfF ) t ) k =1 where 2 Xc [ k ] = TF 2 Xs [k ] = TF 5/10/04 t 0 + TF ∫ x(t ) cos(2π ( kf )t )dt F t0 t 0 + TF ∫ x(t )sin(2π ( kf )t )dt F t0 M. J. Roberts - All Rights Reserved 11 The Trigonometric CTFS Since both the complex and trigonometric forms of the CTFS represent a signal, there must be relationships between the harmonic functions. Those relationships are Xc [0 ] = X[0 ] X = 0 0 [ ] s , k = 1, 2, 3,K * X X X k = k + k [ ] [ ] c[ ] X s [ k ] = j ( X[ k ] − X* [ k ]) X[0 ] = Xc [0 ] Xc [ k ] − j X s [ k ] X[ k ] = , k = 1, 2, 3,K 2 X c [ k ] + j X s [ k ] * X[− k ] = X [ k ] = 2 5/10/04 M. J. Roberts - All Rights Reserved 12 Periodicity of the CTFS It can be shown (pg. 218) that the CTFS representation, x F (t ) of a function, x(t), is periodic with fundamental period, TF . Therefore, if x(t) is also periodic with fundamental period, T0 and if TF is an integer multiple of T0 then the two functions are equal for all t, not just in the interval, t 0 < t < t 0 + TF . 5/10/04 M. J. Roberts - All Rights Reserved 13 CTFS Example #1 Let a signal be defined by x(t ) = 2 cos( 400πt ) and let TF = 5 ms which is the same as T0 t 0 + TF t 0 + TF 2 2 X k = x ( t ) sin ( 2π ( kfF ) t ) dt 2 Xc [ k ] = x t cos π kf t dt ( ) ( ( F) ) s[ ] ∫ ∫ TF t 0 TF t0 5/10/04 M. J. Roberts - All Rights Reserved 14 CTFS Example #1 5/10/04 M. J. Roberts - All Rights Reserved 15 CTFS Example #2 Let a signal be defined by x(t ) = 2 cos( 400πt ) and let TF = 10 ms which is 2T0 5/10/04 M. J. Roberts - All Rights Reserved 16 CTFS Example #2 5/10/04 M. J. Roberts - All Rights Reserved 17 CTFS Example #3 Let x(t ) = 5/10/04 1 3 1 − cos( 20πt ) + sin( 30πt ) and let TF = 200 ms 2 4 2 M. J. Roberts - All Rights Reserved 18 CTFS Example #3 5/10/04 M. J. Roberts - All Rights Reserved 19 CTFS Example #3 5/10/04 M. J. Roberts - All Rights Reserved 20 CTFS Example #3 5/10/04 M. J. Roberts - All Rights Reserved 21 Linearity of the CTFS These relations hold only if the harmonic functions, X, of all the component functions, x, are based on the same representation time. 5/10/04 M. J. Roberts - All Rights Reserved 22 CTFS Example #4 Let the signal be a 50% duty-cycle square wave with an amplitude of one and a fundamental period , T0 = 1 x(t ) = rect( 2t ) ∗ comb(t ) 5/10/04 M. J. Roberts - All Rights Reserved 23 CTFS Example #4 5/10/04 M. J. Roberts - All Rights Reserved 24 CTFS Example #4 5/10/04 M. J. Roberts - All Rights Reserved 25 CTFS Example #4 5/10/04 M. J. Roberts - All Rights Reserved 26 CTFS Example #4 A graph of the magnitude and phase of the harmonic function as a function of harmonic number is a good way of illustrating it. 5/10/04 M. J. Roberts - All Rights Reserved 27 CTFS Example #5 Let x(t ) = 2 cos( 400πt ) and let TF = 7.5 ms which is 1.5 periods of this signal. 5/10/04 M. J. Roberts - All Rights Reserved 28 CTFS Example #5 5/10/04 M. J. Roberts - All Rights Reserved 29 CTFS Example #5 5/10/04 M. J. Roberts - All Rights Reserved 30 CTFS Example #5 The CTFS representation of this cosine is the signal below, which is an odd function, and the discontinuities make the representation have significant higher harmonic content. This is a very inelegant representation. 5/10/04 M. J. Roberts - All Rights Reserved 31 CTFS of Even and Odd Functions • For an even function – The complex CTFS harmonic function, X[ k ] , is purely real – The sine harmonic function, X s [ k ], is zero • For an odd function – The complex CTFS harmonic function, X[ k ] , is purely imaginary – The cosine harmonic function, Xc [ k ] , is zero 5/10/04 M. J. Roberts - All Rights Reserved 32 CTFS Example #6 This signal has no known functional description but it can still be represented by a CTFS. 5/10/04 M. J. Roberts - All Rights Reserved 33 CTFS Example #6 5/10/04 M. J. Roberts - All Rights Reserved 34 CTFS Example #6 5/10/04 M. J. Roberts - All Rights Reserved 35 CTFS Example #6 5/10/04 M. J. Roberts - All Rights Reserved 36 CTFS Properties Let a signal, x(t), have a fundamental period, T0 x and let a signal, y(t), have a fundamental period, T0 y . Let the CTFS harmonic functions, each using the fundamental period as the representation time, TF , be X[k] and Y[k]. In the properties which follow the two fundamental periods are the same unless otherwise stated. Linearity FS α x(t ) + β y(t ) ← → α X[ k ] + β Y[ k ] 5/10/04 M. J. Roberts - All Rights Reserved 37 CTFS Properties Time Shifting 5/10/04 FS x(t − t 0 ) ← → e − j 2π ( kf 0 ) t 0 X[ k ] FS x(t − t 0 ) ← → e − j ( kω 0 ) t 0 X[ k ] M. J. Roberts - All Rights Reserved 38 CTFS Properties Frequency Shifting (Harmonic Number Shifting) FS e j 2π ( k 0 f 0 ) t x(t ) ← → X[ k − k0 ] FS e j ( k 0ω 0 ) t x(t ) ← → X[ k − k0 ] A shift in frequency (harmonic number) corresponds to multiplication of the time function by a complex exponential. Time Reversal 5/10/04 FS x( − t ) ← → X[− k ] M. J. Roberts - All Rights Reserved 39 CTFS Properties Time Scaling Let z(t ) = x( at ) , a > 0 T0 x = T0 z for z(t) a Z[ k ] = X[ k ] Case 1. TF = Case 2. TF = T0 x for z(t) If a is an integer, k k X , an integer Z[ k ] = a a 0 , otherwise 5/10/04 M. J. Roberts - All Rights Reserved 40 CTFS Properties Time Scaling (continued) 5/10/04 M. J. Roberts - All Rights Reserved 41 CTFS Properties Change of Representation Time FS → X[ k ] With TF = T0 x , x(t ) ← FS With TF = mT0 x , x(t ) ← → Xm [k ] k k an integer X , Xm [k ] = m m 0 , otherwise (m is any positive integer) 5/10/04 M. J. Roberts - All Rights Reserved 42 CTFS Properties Change of Representation Time 5/10/04 M. J. Roberts - All Rights Reserved 43 CTFS Properties FS ← → Time Differentiation d FS → j 2π ( kf0 ) X[ k ] (x(t )) ← dt d FS → j ( kω 0 ) X[ k ] (x(t )) ← dt FS ← → 5/10/04 M. J. Roberts - All Rights Reserved 44 CTFS Properties Time Integration Case 1 Case 1. X[0 ] = 0 Case 2 X[ k ] ∫−∞ x(λ )dλ ←→ j 2π ( kf0 ) t FS X[ k ] ∫−∞ x(λ )dλ ←→ j( kω 0 ) t FS Case 2. X[0 ] ≠ 0 t ∫ x(λ )dλ is not periodic −∞ 5/10/04 M. J. Roberts - All Rights Reserved 45 CTFS Properties Multiplication-Convolution Duality FS x(t ) y(t ) ← → X[ k ] ∗ Y[ k ] (The harmonic functions, X[k] and Y[k], must be based on the same representation period, TF .) x(t ) FS y(t ) ← → T0 X[ k ] Y[ k ] The symbol, , indicates periodic convolution. Periodic convolution is defined mathematically by x(t ) x(t ) 5/10/04 y(t ) = ∫ x(τ ) y(t − τ )dτ T0 y(t ) = x ap (t ) ∗ y(t ) where x ap (t ) is any single period of x(t ) M. J. Roberts - All Rights Reserved 46 CTFS Properties 5/10/04 M. J. Roberts - All Rights Reserved 47 CTFS Properties Conjugation FS x* (t ) ← → X* [ − k ] Parseval’s Theorem ∞ 1 2 2 x(t ) dt = ∑ X[ k ] ∫ T T0 0 k =−∞ The average power of a periodic signal is the sum of the average powers in its harmonic components. 5/10/04 M. J. Roberts - All Rights Reserved 48 Convergence of the CTFS Partial CTFS Sums x N (t ) = For continuous signals, convergence is exact at every point. N ∑ k =− N X [ k ] e j 2 π ( kf0 )t A Continuous Signal 5/10/04 M. J. Roberts - All Rights Reserved 49 Convergence of the CTFS Partial CTFS Sums For discontinuous signals, convergence is exact at every point of continuity. Discontinuous Signal 5/10/04 M. J. Roberts - All Rights Reserved 50 Convergence of the CTFS The Gibbs Phenomenon 5/10/04 M. J. Roberts - All Rights Reserved 51 DiscreteTime Fourier Series Concept 5/10/04 M. J. Roberts - All Rights Reserved 52 The Discrete-Time Fourier Series The formal derivation of the discrete-time Fourier series (DTFS) is on pages 259-262. The results are x F [n ] = ∑ k= NF X[ k ]e j 2π ( kFF ) n 1 X[ k ] = NF n0 + N F −1 ∑ n = n0 x[n ]e − j 2π ( kFF ) n 1 where N F is the representation time, FF = , and the notation, NF ∑ k= NF means a summation over any range of consecutive k’s exactly N F in length. 5/10/04 M. J. Roberts - All Rights Reserved 53 The Discrete-Time Fourier Series Notice that in x F [n ] = ∑ k= NF X[ k ]e j 2π ( kFF ) n the summation is over exactly one period, a finite summation. This is because of the periodicity of the complex sinusoid, e − j 2π ( kFF ) n in harmonic number, k. That is, if k is increased by any integer multiple of N F the complex sinusoid does not change. e − j 2π ( kFF ) n = e − j 2π ( ( k + mN F ) FF ) n (m an integer) This occurs because discrete time, n, is always an integer. 5/10/04 M. J. Roberts - All Rights Reserved 54 The Discrete-Time Fourier Series In the very common case in which the representation time is taken as the fundamental period, N 0 , the DTFS is x[n ] = ∑ X[k ]e j 2π ( kF0 ) n k= N0 1 − j 2π ( kF0 ) n ←→ X[ k ] = x n e [ ] ∑ N0 n= N 0 FS or in terms of radian frequency x[n ] = ∑ X[k ]e k= N0 j ( kΩ 0 ) n 1 − j ( kΩ 0 ) n ←→ X[ k ] = x n e [ ] ∑ N0 n= N 0 FS 2π where Ω0 = 2πF0 = N0 5/10/04 M. J. Roberts - All Rights Reserved 55 DTFS Example 5/10/04 M. J. Roberts - All Rights Reserved 56 DTFS Properties Let a signal, x[n], have a fundamental period, N 0 x, and let a signal, y[n], have a fundamental period, N 0 y . Let the DTFS harmonic functions, each using the fundamental period as the representation time, N F , be X[k] and Y[k]. In the properties to follow the two fundamental periods are the same unless otherwise stated. Linearity FS α x(t ) + β y(t ) ← → α X[ k ] + β Y[ k ] 5/10/04 M. J. Roberts - All Rights Reserved 57 DTFS Properties Time Shifting 5/10/04 FS x[ n − n0 ] ← → e − j 2π ( kF0 ) n0 X[ k ] FS x[ n − n0 ] ← → e − j ( kΩ 0 ) n0 X[ k ] M. J. Roberts - All Rights Reserved 58 DTFS Properties Frequency Shifting (Harmonic Number Shifting) 5/10/04 FS e j 2π ( k 0 F0 ) n x[n ]← → X[ k − k0 ] FS e j ( k 0Ω 0 ) n x[n ]← → X[ k − k0 ] Conjugation FS x* [n ]← → X* [ − k ] Time Reversal FS x[− n ]← → X[− k ] M. J. Roberts - All Rights Reserved 59 DTFS Properties Time Scaling Let z[n ] = x[an ] , a > 0 If a is not an integer, some values of z[n] are undefined and no DTFS can be found. If a is an integer (other than 1) then z[n] is a decimated version of x[n] with some values missing and there cannot be a unique relationship between their harmonic functions. However, if n n an integer x , z[n ] = m m 0 , otherwise then 1 Z [ k ] = X [ k ] , N F = mN 0 m 5/10/04 M. J. Roberts - All Rights Reserved 60 DTFS Properties 5/10/04 M. J. Roberts - All Rights Reserved 61 DTFS Properties Change of Representation Time FS → X[ k ] With N F = N x 0, x[n ]← FS With N F = qN x 0, x[n ]← → Xq [ k ] k k X , an integer Xq [ k ] = q q 0 , otherwise (q is any positive integer) 5/10/04 M. J. Roberts - All Rights Reserved 62 DTFS Properties 5/10/04 M. J. Roberts - All Rights Reserved 63 DTFS Properties X[ k ] ∑ x[m]←→ 1 − e− j 2π ( kF0 ) , k ≠ 0 m =−∞ n X[ k ] FS x[ m ]←→ , k≠0 ∑ − j ( kΩ 0 ) 1− e m =−∞ n Accumulation Parseval’s Theorem 5/10/04 FS 1 2 2 n k x = X [ ] ∑ [ ] ∑ N0 n= N 0 k= N0 M. J. Roberts - All Rights Reserved 64 DTFS Properties MultiplicationConvolution Duality First Backward Difference 5/10/04 FS x[n ] y[n ]← → Y[ k ] x[n ] X[ k ] = ∑ Y[q] X[k − q] q= N 0 FS y[n ]← → N 0 Y[ k ] X[ k ] ( x[n ] − x[n − 1]←→(1 − e ) FS x[n ] − x[n − 1]← → 1 − e − j 2π ( kF0 ) X[ k ] FS M. J. Roberts - All Rights Reserved − j ( kΩ 0 ) ) X[k ] 65 DTFS Properties FS ← → FS ← → FS ← → 5/10/04 M. J. Roberts - All Rights Reserved 66 Convergence of the DTFS • The DTFS converges exactly with a finite number of terms. It does not have a “Gibbs phenomenon” in the same sense that the CTFS does 5/10/04 M. J. Roberts - All Rights Reserved 67 LTI Systems with Periodic Excitation The differential equation describing an RC lowpass filter is RC v′out (t ) + vout (t ) = vin (t ) If the excitation, vin (t ) , is periodic it can be expressed as a CTFS, ∞ vin (t ) = ∑ Vin [ k ]e j 2π ( kf 0 ) t k =−∞ The equation for the kth harmonic alone is RC v′out ,k (t ) + vout ,k (t ) = vin,k (t ) = Vin [ k ]e j 2π ( kf 0 ) t 5/10/04 M. J. Roberts - All Rights Reserved 68 LTI Systems with Periodic Excitation If the excitation is periodic, the response is also, with the same fundamental period. Therefore the response can be expressed as a CTFS also. vout ,k (t ) = Vout [ k ]e j 2π ( kf 0 ) t Then the equation for the kth harmonic becomes j 2 kπf0 RC Vout [ k ]e j 2π ( kf 0 ) t + Vout [ k ]e j 2π ( kf 0 ) t = Vin [ k ]e j 2π ( kf 0 ) t Notice that what was once a differential equation is now an algebraic equation. 5/10/04 M. J. Roberts - All Rights Reserved 69 LTI Systems with Periodic Excitation Solving the kth-harmonic equation, Vin [ k ] Vout [ k ] = j 2 kπf0 RC + 1 Then the response can be written as vout (t ) = ∞ ∑ V [k ]e out k =−∞ 5/10/04 j 2π ( kf 0 ) t = ∞ ∑ k =−∞ Vin [ k ] e j 2π ( kf 0 ) t j 2 kπf0 RC + 1 M. J. Roberts - All Rights Reserved 70 LTI Systems with Periodic Excitation Vout [ k ] The ratio, , is the frequency response of the system. Vin [ k ] 5/10/04 M. J. Roberts - All Rights Reserved 71