5.1 Periodic Signals: A signal f(t) is periodic iff for some T0 > 0, f (t ) = f (t + T ) ∀ t The smallest T0 value that satisfies the above conditions is called the period of f(t). i 0 Consider a signal examined over 0 to 5 seconds shown below. What values of T0 satisfy the condition in the definition of periodic? What is the period of this signal? s i n(2 *p i *t) + s i n(2 *p i *2 *t + .3 ) 2 1 .5 Amplitude 1 0 .5 0 -0 .5 -1 -1 .5 -2 0 1 2 3 S e c o nd s 4 5 5.2 Properties of Periodic Signals: The integration over one full period has the same result, independent of where the integration limits begin or end. a + T0 b + T0 a b ∫ g ( t )dt = ∫ g (t )dt = ∫ g ( t )dt T0 The Sinusoid: ⎛ 2π ⎞ g (t ) = sin(ω t + θ ) = sin( 2π ft + θ ) = sin⎜ t + θ ⎟ ⎝T ⎠ Phase - θ, Frequency (radians per second) - ω, Frequency (Hz) - f, Period - T0 0 Harmonics: Consider a signal consisting of a sum of sinusoids whose frequencies are integer multiples of a fundamental frequency f0: g ( t ) = C + C sin(2π f t + θ ) + C sin( 2π 2 f t + θ ) + C sin(2π 3 f t + θ ) +L 0 1 0 1 2 0 2 3 0 3 where f0 is the fundamental frequency and the sinusoid with frequency kf0 is called the k-th harmonic in the series and C0 is the zero-th harmonic (or DC). Examples: Find the periods and fundamental frequencies of the signals below. 5.3 a) g(t) = 6sin(20πt) -13cos(30πt) (Hint: For f0 find the greatest common factor between the frequencies, the least common factor will also work) (Hint: For T0 find the least common multiple between the periods) b) g(t) = 4 + 3sin(120πt) + 10sin(150πt) + 2sin(240πt) c) g(t) = 4cos(8πt) - 11cos(20πt) + cos(10πt) d) g(t) = 6sin(3.2πt) -13cos(7.2πt) e) g(t) = 6sin(20πt) - 13sin(20t) (Hint: Must the sum of periodic sinusoidal signals be periodic?) Fourier Series: 5.4 A periodic signal, f(t), of almost any form can be expressed as a series of harmonic sinusoidals: Trig-forms f ( t ) = C + ∑ C cos( nω t + θ ) = a + ∑ a cos( nω t ) + b sin( nω t ) ∞ 0 ∞ n=1 n n 0 0 n=1 n where C = a , a = C cos(θ ), b = C sin(θ ) , C = 0 0 0 n n n n n n 0 n 0 ⎛ −b ⎞ a + b , θ = tan ⎜ ⎟ ⎝ a ⎠ 2 2 n n −1 n n n Exponential-forms ∞ f ( t ) = ∑ D exp( jnω t ) n =−∞ n 0 n where Dn belongs to the set of complex numbers and Dn = D*-n 5.5 Example: Show by plotting the harmonic components of a Fourier series that the periodic extension of r(t+1)-2r(t) on the interval [-1, 1], has Fourier coefficients: 1 2 (1 − cos(π n )) , b =0 a = , a = 2 (π n ) 0 2 n n >>t = [-4:.001:4]; % Set up time axis to show 4 periods >>s = .5*ones(size(t)); % Initialize summing array with a0 >>for k=1:10, % Loop to sum up 10 harmonics >>s = s + 2*((1-cos(k*pi))/(pi*k)^2)*cos(k*pi*t); >>end >>plot(t,s,'w') first 5 harmonics Up to 11-th harmonic first harmonic 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.5 0 0 -4 -3 -2 -1 0 time 1 2 3 0 -4 4 -3 -2 Up to third harmonic 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 -3 -2 -1 0 time 1 0 time 1 2 3 4 Up to 51-st harmonic 1 0 -4 -1 2 3 4 0 -4 -3 -2 -1 0 time 1 2 3 4 -0.5 -4 -3 -2 -1 0 time 5.6 Computing Fourier Series Coefficients (trig-form): Given the Fourier Series representation of a periodic signal f(t): f (t ) = a + ∑ a cos( nω t ) + b sin( nω t ) ∞ 0 n =1 n 0 n 0 it can be shown that the coefficients for f(t) can be computed with: 1 2 2 a = ∫ f (t ) dt , a = ∫ f (t ) cos( nω t ) dt , b = ∫ f (t ) sin( nω t ) dt T T T 0 n T0 0 T0 0 n 0 0 T0 0 Derive the Fourier Series coefficients in trig form for the waveform in the previous example. Derive the Fourier Series coefficients in trig form for the periodic extension of p (t ) on the interval [0, T0], where 0<Δ<T0 Δ show that: a = 0 1 , T 0 a = n sin(ω n Δ ) , ( nπ Δ ) 0 b = n (1 − cos(ω π n )) ( nπ Δ ) 0 5.7 Computing Fourier Series Coefficients (exponential-form): Given the Fourier Series representation of a periodic signal f(t): f ( t ) = ∑ D exp( jnω t ) ∞ n =−∞ n 0 n it can be shown that the coefficients for f(t) can be computed with: 1 D = ∫ f ( t ) exp( − jnω t )dt T Note the differences between the Trig and Exponential form: 1. Coefficients for the trig for are real for real f(t), while for the exponential form they are complex. 2. The index for summation is from 0 to ∞ for the trig form and from -∞ to +∞ for the exponential form 3. The formulas for the exponential form are more compact and easier to work with than those for the trig form. n 0 T0 0 The coefficients for compact trig representation can be determine from the exponential form coefficients: C = D , and C = 2 D , θ = ∠D for n>0 0 Examples: 0 n n n n 5.8 Derive the Fourier Series coefficients in exponential form for the periodic extension of p (t ) on the interval [0, T0], where 0<Δ<T0. Plot the magnitudes and phases of the coefficients (for T0 = 10 ms and Δ = 1 ms) as a function of frequency (f) and discuss their meaning. ⎛ nΔπ ⎞ ⎛ nπ Δ ⎞ exp⎜ − j ⎟ sin⎜ ⎟ T ⎠ ⎝ T ⎠ ⎝ 1 Show: D = for n≠0 D = T nπ Δ Δ 0 n 0 0 0 >>t0 = 10e-3 % Period >>del = 1e-3 % Duration of pulse >>n = [-60:-1, eps, 1:60]; % Harmonic index (eps is close to zero) >>f0 = 1/t0; % Fundamental Frequency >>d = exp(-j*pi*del*f0*n).*sin(f0*n*pi*del)./(pi*del*n); % Fourier Coefficients >>figure(1) >>stem(f0*n,abs(d),'-w') % Stem plot of magnitudes >>title('Magnitude of Fourier Coefficients') >>xlabel('Hz') >>figure(2) >>stem(f0*n,angle(d),'-w') % Stem plot of phases >>title('Phase of Fourier Coefficients') >>xlabel('Hz') 5.9 M a g n i tu d e o f F o u r i e r C o e ffi c i e n ts 100 80 60 40 20 0 -6 0 0 0 -4 0 0 0 -2 0 0 0 0 H z 2000 4000 P ha s e o f F o urie r C o e ffic ie nts 4 3 2 1 0 -1 -2 -3 -4 -6 0 0 0 -4 0 0 0 -2 0 0 0 0 Hz 2000 4000 5.10 Examples: Derive the Fourier Series coefficients in exponential form for the periodic extension of r(t) on the interval [0, 0.5]. Plot the magnitudes and phases of the coefficients as a function of frequency (f) and discuss their meaning. j 1 for n≠0 Show: D = D = 4 nπ 4 n 0 >>t0 = .5 % Period >>n = [-30:-1, eps, 1:30]; % Harmonic index (eps is close to zero) >>f0 = 1/t0; % Fundamental Frequency >>d = j./(4*pi*n); % Fourier Coefficients. >>d(31) = 1/4; % Must substitute DC term in directly, since expression was >> % simplified beyond the point of using L'Hopital's rule >>figure(1) >>stem(f0*n,abs(d),'-w') % Stem plot of magnitudes >>title('Magnitude of Fourier Coefficients') >>xlabel('Hz') >>figure(2) >>stem(f0*n,angle(d),'-w') % Stem plot of phases >>title('Phase of Fourier Coefficients') >>xlabel('Hz') 5.11 M a g n i tu d e o f F o u ri e r C o e ffi c i e n ts 0 .2 5 0 .2 0 .1 5 0 .1 0 .0 5 0 -6 0 -4 0 -2 0 0 20 Hz P h a s e o f F o u ri e r C o e ffi c i e n ts 40 6 -4 0 -2 0 40 60 2 1 .5 1 0 .5 0 -0 .5 -1 -1 .5 -2 -6 0 0 Hz 20