hw 8 matlab problem

Upload: joekurina3194

Post on 15-Oct-2015

28 views

Category:

Documents


0 download

DESCRIPTION

matlab problem for ee518

TRANSCRIPT

  • EE518 PMP Digital Signal Processing Winter 2014 Homework 8, due March 11

    Prof. Les Atlas, [email protected] http://www.ee.washington.edu/class/pmp518/2012wtr/

    TA: David Perlmutter, [email protected] Page 1 of 2

    Homework #8, due Tuesday 3/11, at 9:00 (beginning of discussion):

    A. Oppenheim & Schafer: problems 7.61, 7.62 a-d and f (skip part e)

    The problem below is derived from McClellan et. al., MATLAB Exercises for Signal

    Processing, Prentice-Hall, 1998.

    B. MATLAB Project Background

    As Discussed in Text and Lecture:

    Definition of the Discrete Fourier Transform (DFT)

    Analysis:

    1

    0

    [ ] , 0,1,2,..., 1[ ]

    0,

    N

    kn

    N

    n

    x n W k NX k

    otherwise

    Synthesis:

    1

    0

    1[ ] , 0,1,2,..., 1

    [ ]

    0,

    N

    kn

    N

    k

    X k W n Nx n N

    otherwise

    where the zeros outside the calculated N-point range are directly implied.

    The following DFTs are rather difficult to compute by hand, yet the results are not hard to

    visualize with MATLAB. To this end, the important duality principal of Fourier analysis will be

    demonstrated by the following exercises.

    Exercise 1

    Aliased Sinc Sequence

    Once mastered, the duality principal if quite powerful. As a starting example of its use in

    computing, consider the DFT of an aliased sinc signal, called asinc. According to duality, the rectangular pulse and the asinc function are, in time to frequency, or in its dual, in frequency to

    time, transform pairs. We will see both possibilities below.

    a. The DTFT of a rectangular pulse is an aliased sinc function in ; the N-point DFT just

    samples the asinc uniformly in frequency , namely at 2 / , N k 0,1,2,..., 1 k N . For an even-symmetric1 L-point pulse, the resulting DTFT is

    2 /

    sin /[ ] , , 0,1,2,..., 1

    sin /

    k N

    kL NR k asinc L k N

    k N

    Generate a 7-point pulsewidth boxcar(7), and compute its N=16 point DFT. Verify that the correct transform values were obtained. Repeat for a N=21 point DFT. Explain why

    the N=21 point DFT has so many values equal to zero.

    1 DFT symmetries are closely related, and essentially identical to one period of the discrete Fourier series (DFS)

    symmetries seen in Table 8.1 on page 634 of Oppenheim and Schafer text.

  • EE518 PMP Digital Signal Processing Winter 2014 Homework 8, due March 11

    Prof. Les Atlas, [email protected] http://www.ee.washington.edu/class/pmp518/2012wtr/

    TA: David Perlmutter, [email protected] Page 2 of 2

    b. For the dual of the above part (a), the time sequence is taken to be an asinc function, now in n. Use MATLAB to calculate and plot the N-point DFT of the following sampled asinc

    sequence:

    0

    sin 9 /[ ] for 0,1,..., 1

    sin /

    n Na n n N

    n N

    Assume that N is greater than 9, say 16 or 21N N .

    c. Find the N-point DFT of the following shifted asinc sequence:

    1

    sin 9 ( 1) /[ ] for 0,1,..., 1

    sin ( 1) /

    n Na n n N

    n N

    Since the asinc function is periodic, this shift must be a circular shift.

    d. Note that the factor in the numerator of 0 1[ ] or [ ]a n a n must be odd! Try replacing the 9

    with 10 in either of the previous parts, and compute the DFT. Explain why there is so

    much difference between the even and odd cases.