Part 3) Matlab Simulation
3-1) DFT/FFT
Use DFT (implemented by the FFT algorithm) to compute the Fourier transform of e^(-2t). Plot the resulting Fourier spectra.
We first determine T and To. The Fourier transform of e^(-2t) is 1/(j+2). This low-pass signal is not band-limited. Let us take its essential bandwidth to be that frequency where |G| becomes 1% of its peak value, which occurs at ω=0. Observe that 1/(1+|G|^2) = 2/(2+4).
Also, the peak of |G| is at ω=0, where |G(0)|=0.5. Hence, the essential bandwidth B is at ω=2B, where 1/(1+|G|^2) = 0.50.01/(2πB) Hz. From Eq.3.104b, 1/(2πB) = 0.005 = 0.0157.
Let us round this value down to T = 0.015625 second so that we have 64 samples per second. The second issue is to determine To. The signal is not time-limited. We need to truncate it at To such that g(To) = 1. We shall pick To = 4 (eight time constants of the signal), which yields No = To/T = 256. This is a power of 2. Note that there is a great deal of flexibility in determining Ts and To, depending on the accuracy desired and the computational capacity available. We could just as well have picked To = 8 and T = 1/32, yielding No = 256, although this would have given a slightly higher aliasing error. Because the signal has a jump discontinuity at t = 0, the first sample at t = 0 is 0.5, the average of the values on the two sides of the discontinuity. The MATLAB program, which implements the DFT using the FFT algorithm, is as follows:
Ts = 1/64;
To = 4;
No = To/Ts;
t = 0:Ts:Ts*(No-1);
t = t;
g = Ts*exp(-2*t);
g1 = Ts*0.5;
G = fft(g);
[Gp, Gm] = cart2pol(real(G), imag(G));
k = 0:No-1;
k = k;
w = 2*pi*k/To;
subplot(2,1,1);
stem(w(1:32), Gm(1:32));
subplot(2,1,2);
stem(w(1:32), Gp(1:32));
Plot the Fourier transform and explain the result.