06.06.2022 Views

B. P. Lathi, Zhi Ding - Modern Digital and Analog Communication Systems-Oxford University Press (2009)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3 . 10 MATLAB Exercises 125

In this example, we knew G(f) beforehand and hence could make IN TELLIGENT choices

for B (or the sampling frequency fs). In practice, we generally do not know G(f) beforehand.

In fact, that is the very thing we are trying to determine. In such a case, we must make

an intelligent guess for B or fs from circumstantial evidence. We then continue reducing

the value of T s and recomputing the transform until the result stabilizes within the desired

number of significant digits.

Next, we compute the Fourier transform of g(t) = 8 TI (t).

COMPUTER EXAMPLE C3.2

Use DFf (implemented by the FFf algorithm) to compute the Fourier transform of 8 TT (t). Plot the

resulting Fourier spectra.

This rectangular function and its Fourier transform are shown in Fig. 3.41a and b. To

determine the value of the sampling interval T s , we must first decide on the essential

bandwidth B. From Fig. 3.41b, we see that G(f) decays rather slowly with f. Hence,

the essential bandwidth B is rather large. For instance, at B = 15.5 Hz (97.39 rad/s),

G(f) = -0.1643, which is about 2% of the peak at G(O). Hence, the essential bandwidth

may be taken as 16 Hz. However, we shall deliberately take B = 4 for two reasons: (1) to

show the effect of aliasing and (2) because the use of B > 4 will give an enormous number

of samples, which cannot be conveniently displayed on a book-sized page without losing

sight of the essentials. Thus, we shall intentionally accept approximation for the sake of

clarifying the concepts of DFT graphically.

The choice of B = 4 results in the sampling interval T s = 1 /2B = 1 /8. Looking

again at the spectrum in Fig. 3.41b, we see that the choice of the frequency resolution

J o = 1/4 Hz is reasonable. This will give four samples in each lobe of G(f). In this case

To = I /J o = 4 seconds and N o = To/T = 32. The duration of g(t) is only 1 second. We

must repeat it every 4 seconds (To = 4), as shown in Fig. 3.41c, and take samples every

0.125 second. This gives us 32 samples (No = 32). Also,

8k = T s g (kT)

1

= Sg(kT)

Since g(t) = 8 TI (t), the values of 8k are 1, 0, or 0.5 (at the points of discontinuity), as

shown in Fig. 3.41c, where for convenience, 8k is shown as a function of t as well as k.

In the derivation of the DFT, we assumed that g (t) begins at t = 0 (Fig. 3.39a), and

then took No samples over the interval (0, To). In the present case, however, g(t) begins at

-½. This difficulty is easily resolved when we realize that the DFT found by this procedure

is actually the DFT of 8k repeating periodically every T o seconds. From Fig. 3.41c, it is

clear that repeating the segment of 8k over the interval from -2 to 2 seconds periodically

is identical to repeating the segment of 8k over the interval from O to 4 seconds. Hence,

the DFT of the samples taken from -2 to 2 seconds is the same as that of the samples

taken from O to 4 seconds. Therefore, regardless of where g (t) starts, we can always take

the samples of g(t) and its periodic extension over the interval from Oto To. In the present

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!