02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

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

146 Chapter 5 THE DISCRETE FOURIER TRANSFORM<br />

a. By applying the analysis equation (5.3),<br />

˜X(k) =<br />

N−1<br />

∑<br />

n=0<br />

L−1<br />

L−1<br />

∑ ∑ ) n<br />

˜x(n)e −j 2π N nk = e −j 2π N nk =<br />

(e −j 2π N k<br />

n=0<br />

⎧<br />

⎨ L, k =0, ±N,±2N,...<br />

=<br />

⎩ 1 − e −j2πLk/N<br />

, otherwise<br />

1 − e−j2πk/N The last step follows from the sum of the geometric terms formula (2.7) in<br />

Chapter 2. The last expression can be simplified to<br />

n=0<br />

1 − e −j2πLk/N e−jπLk/N e jπLk/N − e −jπLk/N<br />

=<br />

1 − e−j2πk/N e −jπk/N e jπk/N − e −jπk/N<br />

= e −jπ(L−1)k/N sin (πkL/N)<br />

sin (πk/N)<br />

or the magnitude of ˜X(k) isgiven by<br />

⎧<br />

⎪⎨ L, k =0, ±N,±2N,...<br />

∣<br />

∣ ˜X(k) = ⎪ ⎩ sin (πkL/N)<br />

∣ sin (πk/N) ∣ , otherwise<br />

b. The MATLAB script for L =5and N = 20:<br />

>> L = 5; N = 20; k = [-N/2:N/2]; % Sq wave parameters<br />

>> xn = [ones(1,L), zeros(1,N-L)]; % Sq wave x(n)<br />

>> Xk = dfs(xn,N); % DFS<br />

>> magXk = abs([Xk(N/2+1:N) Xk(1:N/2+1)]); % DFS magnitude<br />

>> subplot(2,2,1); stem(k,magXk); axis([-N/2,N/2,-0.5,5.5])<br />

>> xlabel(’k’); ylabel(’Xtilde(k)’)<br />

>> title(’DFS of SQ. wave: L=5, N=20’)<br />

The plots for this and all other cases are shown in Figure 5.2. Note that<br />

since ˜X(k) isperiodic, the plots are shown from −N/2 toN/2.<br />

c. Several interesting observations can be made from plots in Figure 5.2. The<br />

envelopes of the DFS coefficients of square waves look like “sinc” functions.<br />

The amplitude at k =0is equal to L, while the zeros of the functions are<br />

at multiples of N/L, which is the reciprocal of the duty cycle. We will study<br />

these functions later in this chapter.<br />

□<br />

5.1.2 RELATION TO THE z-TRANSFORM<br />

Let x(n) beafinite-duration sequence of duration N such that<br />

{<br />

Nonzero, 0 ≤ n ≤ N − 1<br />

x(n) =<br />

0, Elsewhere<br />

(5.8)<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

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

Saved successfully!

Ooh no, something went wrong!