Fourier Transform Examples 1 Colorado School of Mines Department of Electrical Engineering and Computer Science Example 1 • By hand, do the following: – Find complex conjugate of a = 1 - 2j – Find magnitude of b = -4 + 5j – Find product of a*b 2 Colorado School of Mines Department of Electrical Engineering and Computer Science Example 2 • By hand, do the following: – Find polar representation of -2 – 3j – Find Cartesian representation of 5e-j3 • Repeat the previous exercises using Matlab (see functions conj, abs, angle) 3 Colorado School of Mines Department of Electrical Engineering and Computer Science Example 3 • Find the integration of the continuous impulse function with ∫ (2t ∞ −∞ ∫ ∞ −∞ 2 + 1)δ (t )dt sin (2πt )δ (t − 1)dt • Find the summation of the discrete impulse function with ∞ −πx e 3 ∑ δ ( x) x = −∞ ∞ ∑ cos(2πx + π / 2)δ ( x + 1 / 2) x = −∞ 4 Colorado School of Mines Department of Electrical Engineering and Computer Science Example 4 • Find the Fourier transform of the one-sided “box” or “rectangle” function A 0 ≤ t ≤ T f (t ) =   0 otherwise The magnitude of F(u) is the same as the result when the box was centered at the origin; it is just multiplied by a constant exponential term (a phase shift) 5 Colorado School of Mines Department of Electrical Engineering and Computer Science Example 5 • In Matlab, create a series of numbers f(0), f(1), ..., f(M-1). • Find the Discrete Fourier Transform (DFT) of the series, directly from the definition: F (u ) = M −1 ∑ for u 0,1,..., M − 1 f ( x)e − j 2π ux / M= x =0 x = 0:M-1; u = 0:M-1; % Create an input series f(1), … ,f(M) % : for n=1:M F(n) = 0; for m = 1:M F(n) = F(n) + f(m) * exp(-j*2*pi*u(n)*x(m)/M); end end 6 Colorado School of Mines Department of Electrical Engineering and Computer Science Example 5 (continued) • Show that applying the inverse DFT to F yields the original series f 1 M −1 j 2πux / M ( ) for x = 0,1,ď, M − 1 f ( x) = F u e ∑ M u =0 for n=1:M f2(n) = 0; for m = 1:M f2(n) = f2(n) + F(m) * exp(j*2*pi*u(n)*x(m)/M); end end 7 Colorado School of Mines Department of Electrical Engineering and Computer Science Example 5 (continued) • Repeat example, using Matlab’s fft, ifft functions clear all close all M = 10; x = 0:M-1; u = 0:M-1; % Create an input series f(1), … ,f(M) f = rand(1,M) for n=1:M F(n) = 0; for m = 1:M F(n) = F(n) + f(m) * exp(-j*2*pi*u(n)*x(m)/M); end end disp(F) for n=1:M f2(n) = 0; for m = 1:M f2(n) = f2(n) + F(m) * exp(j*2*pi*u(n)*x(m)/M); end end disp(f2) F2 = fft(f); disp(F2) f3 = ifft(F2); disp(f3) Colorado School of Mines 8 Department of Electrical Engineering and Computer Science Example 6 • Show that the 1D discrete Fourier transform is a linear operation. • Linearity: đđđđ1 đĽđĽ + đđđđ2 đĽđĽ ↔ đđđšđš1 đ˘đ˘ + đđđšđš2 đ˘đ˘ = F (u ) M −1 ∑ for u 0,1,..., M − 1 f ( x)e − j 2π ux / M= x =0 First show that af(x) <-> aF(u), then show f1(x)+f2(x) <-> F1(u)+F2(u) 9 Colorado School of Mines Department of Electrical Engineering and Computer Science