3y ago

133 Views

6 Downloads

1.61 MB

28 Pages

Transcription

EL 713: Digital Signal ProcessingExtra Problem Solutions1.11 Consider the following 9-point signals, 0 n 8.(a) [3, 2, 1, 0, 0, 0, 0, 2, 1](b) [3, 2, 1, 0, 0, 0, 0, 2, 1](c) [3, 2, 1, 0, 0, 0, 0, 2, 1](d) [0, 2, 1, 0, 0, 0, 0, 2, 1](e) [0, 2, 1, 0, 0, 0, 0, 2, 1](f) [3, 2, 1, 0, 0, 0, 0, 1, 2](g) [3, 2, 1, 0, 0, 0, 0, 1, 2](h) [0, 2, 1, 0, 0, 0, 0, 1, 2](i) [0, 2, 1, 0, 0, 0, 0, 1, 2]Which of these signals have a real-valued 9-point DFT? Which of these signals have an imaginaryvalued 9-point DFT? Do not use MATLAB or any computer to solve this problem and do not explicitlycompute the DFT; instead use the properties of the DFT.Solution:Signals (f ) and (i) both have purely real-valued DFT. Signal (h) has a purly imaginary-valued DFT. 14Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions1.12 Matching. Match each discrete-time signal with its DFT by filling out the following table. You shouldbe able to do this problem with out using a computer.Signal1234567815Prof. Ivan Selesnick, Polytechnic UniversityDFT

EL 713: Digital Signal ProcessingExtra Problem SolutionsSIGNAL 1SIGNAL 21.51.5110.50.500 0.5 0.5 1 1 1.50102030 1.50SIGNAL 31.5110.50.500 0.5 0.5 1 10102030 1.50SIGNAL 51.5110.50.500 0.5 0.5 1 10102030 1.50SIGNAL 71.5110.50.500 0.5 0.5 1 1010203016Prof. Ivan Selesnick, Polytechnic University1020301020302030SIGNAL 81.5 1.530SIGNAL 61.5 1.520SIGNAL 41.5 1.510 1.5010

EL 713: Digital Signal ProcessingExtra Problem SolutionsDFT 1DFT 2303020201010001020030010DFT 3302020101001020030010DFT 5302020101001020030010DFT 730202010100103020302030DFT 830020DFT 630030DFT 43002020030010Solution:Signal 1 has exactly two cycles of a cosine, so you would expect X(2) and X( 2) to be nonzero, andother DFT coefficients to be 0; that gives DFT 4. Note that X( 2) is really X(N 2).Signal 2 has two and a half cycles of a cosine, so you would expect the DFT to have a peak at indexk 2.5, but that is not an integer — there is no DFT coefficient at that index. So the largest DFTcoefficients would be at k 2 and k 3 and there would be ‘leakage’. There would also be a peak17Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutionsaround k N 2.5. This gives DFT 6.Similar reasons are used for signals 3 and 4.The DFT of a constant is an impulse, so signal 6 corresponds to DFT 7. The DFT of an impulse is aconstant, so signal 7 corresponds to DFT 3.The DTFT of a rectangular pulse is a digital sinc function, so the DFT of a rectangular pulse is samplesof the sinc function. So signal 8 corresponds to DFT 5.That leaves signal 5 and DFT 8. Signal 5 can be written as a cosine times a rectangular pulse, so theDFT of signal 5 will be the convolution of a DFT of a cosine with the DFT of rectangular pulse — thatis a sum of two shifted digital sinc functions.Signal12345678DFT46128735 18Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions1.25 The analog signal x(t) is band-limited to 40 Hz. Suppose the signal is sampled at the rate of 100samples per second and that at this rate 200 samples are collected. Then 200 zeros are appended tothe 200 samples to form a 400-point vector. Then the 400-point DFT of this vector is computed to getX(k) for 0 k 399.(a) Which DFT coefficients are free of aliasing?(b) The DFT coefficient X(50) represents the spectrum of the analog signal at what frequency f ?(Give your answer in Hz).Solution:(a) All of the DFT coefficients are free of aliasing. The sampling rate is more that twice the maximumsignal frequency.(b) The DFT bin width is 100/400 or 0.25 Hz. The 50th DFT coefficient corresponds to the frequency50 times 0.25 Hz or 12.5 Hz . 34Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions3.3 Matching. The diagrams on the following three pages show the impulse responses, pole-zero diagrams,and frequency responses magnitudes of 8 discrete-time causal LTI systems. But the diagrams are outof order. Match each diagram by filling out the following table.Impulse response12345678Pole-zero52Prof. Ivan Selesnick, Polytechnic UniversityFrequency response

EL 713: Digital Signal ProcessingExtra Problem SolutionsIMPULSE RESPONSE 1IMPULSE RESPONSE 2110.50.500 0.5 0.5 1 1051015202505IMPULSE RESPONSE 310.50.500 0.5 0.5 1 151015202505IMPULSE RESPONSE 510.50.500 0.5 0.5 1 151015202505IMPULSE RESPONSE 710.50.500 0.5 0.5 1 1510152025053Prof. Ivan Selesnick, Polytechnic University2510152025101520252025IMPULSE RESPONSE 81020IMPULSE RESPONSE 61015IMPULSE RESPONSE 4101051015

EL 713: Digital Signal ProcessingExtra Problem SolutionsPOLE ZERO DIAGRAM 210.50.5imag partimag partPOLE ZERO DIAGRAM 1160 0.520 0.5 1 1 1.5 1 0.50real part0.511.5 1.5 110.50.50 0.511.511.511.511.50 1 1.5 1 0.50real part0.511.5 1.5 1POLE ZERO DIAGRAM 5 0.50real part0.5POLE ZERO DIAGRAM 6110.50.5imag partimag part0.5 0.5 10 0.520 0.5 1 1 1.5 1 0.50real part0.511.5 1.5 1POLE ZERO DIAGRAM 710.50.520 0.50real part0.5POLE ZERO DIAGRAM 81imag partimag part0real partPOLE ZERO DIAGRAM 41imag partimag partPOLE ZERO DIAGRAM 3 0.5 0.50 0.5 1 1 1.5 1 0.50real part0.511.5 1.554Prof. Ivan Selesnick, Polytechnic University 1 0.50real part0.5

EL 713: Digital Signal ProcessingExtra Problem SolutionsFREQUENCY RESPONSE 1FREQUENCY RESPONSE 21.471.26150.840.630.420.210 1 0.500.50 11 0.5ω/π00.51ω/πFREQUENCY RESPONSE 3FREQUENCY RESPONSE 463.5532.54231.52110 10.5 0.500.50 11 0.5ω/π00.51ω/πFREQUENCY RESPONSE 5FREQUENCY RESPONSE 63.5203152.52101.5510.5 1 0.500.50 11 0.5ω/π00.51ω/πFREQUENCY RESPONSE 7FREQUENCY RESPONSE 83.573652.54231.5210.5 11 0.500.50 11ω/π0ω/πSolution:55Prof. Ivan Selesnick, Polytechnic University 0.50.51

EL 713: Digital Signal ProcessingImpulse response12345678Extra Problem SolutionsPole-zero63847125Frequency response84753261 56Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions3.6 An FIR digital filter has the transfer functionH(z) (1 z 1 )3 (1 z 1 )3(a) Sketch the pole-zero diagram of this system.(b) Sketch H f (ω) .(c) Would you classify this as a low-pass, high-pass, band-pass, or band-stop filter? Please brieflyexplain.Solution:Note that because the zero at z 1 is of third order, not only is H f (ω 0) equal to one, but so is itsfirst and second derivative, so the frequency response is flat at ω 0. The same is true for ω π.Imaginary Part10.50363 0.5 1 1 0.500.5Real Part1 H(ω) 1086420 1 0.50omega/π0.51 4Linear-Phase FIR Digital Filters59Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions4.5 For the transfer functionH(z) z 1 z 6of an FIR linear-phase filter,(a) sketch the impulse response(b) what is the type of the filter (I, II, III, or IV)?(c) sketch the frequency response magnitude H f (ω) .(d) sketch the zero diagramSolution:This is a Type 2 FIR filter.To find the zeros of H(z),z 1 z 6 0(17)5z 1 1(18)5z 1(19)z 5 ej π(20)5j π j 2 π k(21)j π/5 j (2 π/5) k(22)z ez ewhich for different integer values of k gives the values z ej π/5 , z ej 3 π/5 , z ej 5 π/5 1,z ej 7 π/5 , z ej 9 π/5 , and which are shown in the zero diagram.IMPULSE RESPONSEZEROS OF H(z)1.51Imaginary Part10.50 0.50.550 0.5 1 1.5 10246 180Real Part1 H(ω) 21.510.50 π 4π/5 3π/5 2π/5 (ω)210 1 2 π 4π/5 3π/5 2π/5 π/50ωAll the zeros lie on the unit circle, with equal spacing between them. From that, we can sketch thefrequency response. 65Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions4.8 Matching. Match each impulse response with its frequency response and zero diagram by filling outthe following table. You should do this problem with out using a computer.Impulse ResponseABCDZero DiagramFrequency ResponseIMPULSE RESPONSE AIMPULSE RESPONSE B221100 1 1 2024 260IMPULSE RESPONSE C21100 1 1024 2669Prof. Ivan Selesnick, Polytechnic University46IMPULSE RESPONSE D2 220246

EL 713: Digital Signal ProcessingExtra Problem SolutionsZPLANE B10.50.5Imaginary PartImaginary PartZPLANE A150 0.540 0.5 1 1 1 0.500.5Real Part1 1 0.510.50.540 0.550 0.5 1 1 1 0.500.5Real Part1 1FREQ RESP A54433221100.20.4ω/π0.60.80100.2FREQ RESP C6554433221100.20.4ω/π0.60.801Solution:70Prof. Ivan Selesnick, Polytechnic University00.5Real Part10.4ω/π0.60.810.81FREQ RESP D60 0.5FREQ RESP B501ZPLANE D1Imaginary PartImaginary PartZPLANE C00.5Real Part00.20.4ω/π0.6

EL 713: Digital Signal ProcessingImpulse ResponseABCDExtra Problem SolutionsZero DiagramCABDFrequency ResponseBDAC 71Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions4.11 FIR Filter Matching Problem.The following Matlab code fragment defines the impulse responses of four different FIR digital filters. h1h2h3h4 [2 7 12.5 12.5 7 2];h1 .* ((-1). (0:5));conv(h2,[1 -1]);h3 .* ((-1). (0:6));Without consulting MATLAB, match each of the two filters, h3 and h4, with their pole-zero diagramsshown below.Impulse Responseh3h4Pole-Zero Diagram10.5DIAGRAM 2DIAGRAM 1140 0.5 10 10.52DIAGRAM 4DIAGRAM 30116 0.5 10.5602 0.5 1 101 1110.50.5DIAGRAM 6DIAGRAM 5 0.51160 0.5 106012 0.5 1 101 1110.50.5DIAGRAM 8DIAGRAM 760 1 100.540 0.5 102016 0.5 1 101 179Prof. Ivan Selesnick, Polytechnic University01

EL 713: Digital Signal ProcessingExtra Problem SolutionsSolution:Note that h1 is a lowpass filter of Type 2. Also, from the code, we see that h2 (n) ( 1)n h1 (n), so h2is a highpass filter of Type 4. From the code we have that H3 (z) H2 (z) (1 z 1 ) which puts a nullin the frequency response at ω 0. Since h2 already has a zero at z 1, h3 will have a double zero atz 1 and will be a Type 1 filter. So h3 will correspond to pole-zero diagram 4 or 6. (This is not sucha good exercise!) From the code we have h4 (n) ( 1)n h3 (n) or H4 (z) H3 ( z) which will negateall the zeros of H3 (z) so h4 will correspond to pole-zero diagram 3 or 8. 80Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions4.12 Matching Problem.The following figures show 6 impulse responses, frequency responses, and zero diagrams. Match eachfrequency response and zero diagram to the corresponding impulse response.Impulse Response123456Frequency ResponseIMPULSE RESPONSE 1IMPULSE RESPONSE 2110.50.500 0.5 0.5 1 102460IMPULSE RESPONSE 310.50.500 0.5 0.5 1 124246IMPULSE RESPONSE 410Zero Diagram60IMPULSE RESPONSE 5246IMPULSE RESPONSE 6110.50.500 0.5 0.5 1 1024681Prof. Ivan Selesnick, Polytechnic University0246

EL 713: Digital Signal ProcessingExtra Problem SolutionsFREQUENCY RESPONSE 1FREQUENCY RESPONSE 2221.51.5110.50.5000.20.40.60.8100FREQUENCY RESPONSE 30.20.40.60.81FREQUENCY RESPONSE 422.521.51.5110.500.500.20.40.60.8100FREQUENCY RESPONSE 50.20.40.60.81FREQUENCY RESPONSE 62.5221.51.5110.50.5000.20.4ω/π0.60.8182Prof. Ivan Selesnick, Polytechnic University000.20.4ω/π0.60.81

EL 713: Digital Signal ProcessingExtra Problem SolutionsZERO DIAGRAM 1ZERO DIAGRAM 21Imaginary PartImaginary Part10.550 0.50.550 0.5 1 1 10Real Part1 1ZERO DIAGRAM 31Imaginary PartImaginary Part1ZERO DIAGRAM 410.5502 0.5 10.550 0.5 1 10Real Part1 1ZERO DIAGRAM 50Real Part1ZERO DIAGRAM 61Imaginary Part1Imaginary Part0Real Part0.5502 0.5 10.550 0.5 1 10Real Part1 10Real Part1Solution:Although each impulse is one of the four types of FIR linear phase filter, in this problem, it is instructiveto look at the number of sign changes in the impulse response. Roughly, the more sign changes animpulse response have, the higher its frequency content is. Impulse response 3 has no sign changes andit is a lowpass filter — that impulse response has the lowest frequency content. Then impulse response1 has one sign change. Impulres response 6 has 2 sign changes etc. So you can match them to each ofthe frequency responses — each frequency response has its passband at a different frequency. From thefrequency response, the zero diagram can be directly found.Impulse Response123456Frequency Response325641Zero Diagram241563 83Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions4.15 A student is asked to design a Type I and a Type II low-pass FIR linear-phase filter using DFT-basedinterpolation. The student turns in the work shown on the next page, which has two problems.(a) The student does not provide an explanation.(b) One of the solutions is correct, the other solution is fake (the student just made up the vector h,it does not follow from the MATLAB commands).Identify which solution is correct and provide an explanation for it. Why does the fake solution notwork? You should be able to do this problem with out actually using MATLAB.89Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem SolutionsTYPE I FIR IMPULSE RESPONSE: H [1 1 1 1 1 0 0 0 0 0 0 1 1 1 1]’; v ifft(H); h [v(9:15); v(1:8)]h 50-0.0963-0.06670.08530-0.06670.0394TYPE II FIR IMPULSE RESPONSE: H [1 1 1 1 1 0 0 0 0 0 1 1 1 1]’; v ifft(H); h [v(9:14); v(1:8)]h :The Type II filter solution is incorrect. The Type I filter solution is right.For the Type I solution, note that the vector H is of length 15 and that it is real and circularly symmetric.That means that the inverse DFT, (v in the code) is also real and circularly symmetric, and also oflength 15. The vector v will have the following symmetry pattern:90Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutionsv [a b c d e f g h h g f e d c b]So the vector h produced by the 3rd line of MATLAB code in the Type I solution will have the symmetrypattern:v [h g f e d c b a b c d e f g h]which is indeed a Type I impulse response.On the other hand, for the Type II solution, note that the vector H is of length 14 and that it is alsoreal and circularly symmetric. Therefore, the inverse DFT, (v in the MATLAB code) is also real andcircularly symmetric, and also of length 14. The vector v will then have the following symmetry pattern:v [a b c d e f g h g f e d c b]So the vector h produced by the 3rd line of MATLAB code in the Type II solution will have the symmetrypattern:v [g f e d c b a b c d e f g h]which is not a symmetric impulse response. The actual result of the MATLAB commands for the TypeII filter is:h 92-0.1287-0.02550.0891-0.0494-0.03180.0714To design a Type II FIR filter using DFT-based interpolation, we can use a phase-shift of A prior tousing the DFT. In that case, the ones at the end of the A vector should be 1. 91Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions4.16 Optional : Mitra 4.19. (But use the frequencies 0.2π, 0.4π, 0.9π)Solution:This is an interpolation problem:A(ω) 0 for ω 0.2π, 0.9π,andA(0.4π) 1.We can use the general interpolation approach described in the notes. The impulse response we get asa solution ish(n) [ 0.3968, 0.1127, 0.4276, 0.1127, 0.3968]The frequency response we obtain is shown in the figure.IMPULSE RESPONSE h(n)10.80.60.40.20 0.2 0.4 0.6 0.8 1 1012n345 A(ω) 1.41.210.80.60.40.2000.10.20.30.40.5ω/πN 5;M (N-1)/2;wk [0.2 0.4 0.9]’*pi;Ak [0 1 0]’;C cos(wk*[0:M]);a C\Ak;h (1/2)*[a([M:-1:1] 1); 2*a([0] 1); a([1:M] )xlabel(’n’)title(’IMPULSE RESPONSE h(n)’)axis([-1 5 -1 1])[A,w] firamp(h,1);subplot(2,1,2)93Prof. Ivan Selesnick, Polytechnic University0.60.70.80.91

EL 713: Digital Signal ProcessingExtra Problem Solutions5.3 (Porat 6.1) We saw that the height of the largest side-lobe of the rectangular window is about -13.5dB relative to the main-lobe. What is the relative height of the smallest side-lobe? You may assumethe window length N is odd. (Hint: At what frequency will it be located?).Solution:The smallest side lobe of the Dirichlet kernel is at ω π. The formula is sin N2 ωf .S (ω) sin 21 ωsoS f (π) sinsinN212 π 1πwhen N is odd. Recall that S f (0) N . The relative height of the smallest side-lobe is therefore 1/N . 99Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions5.15 The following spectrogram is taken from the HW submitted by an EL 713 student.Which of the following three parameters would you suggest the student modify to best improve the appearance of this spectrogram? What change would you make to that parameter? The three parametersare:R block length.L time lapse between blocks.N FFT length. (Each block is zero-padded to length N .)Explain your answer.Solution:The student should reduce L the time-lapse between blocks. (Equivalently, the overlap fraction shouldbe increased.) Making that change will reduce the step like appearance of the spectrogram. 119Prof. Ivan Selesnick, Polytechnic University

EL 713: Digital Signal ProcessingExtra Problem Solutions5.17 The following figures show a signal and its spectrogram, computed with different sets of parameters,R {30, 60},N {64, 256}whereR block lengthN FFT length (nfft in the Matlab specgram function). (Each block is zero-padded to length N .)(a) For each of the spectrograms, indicate what you think R and N are, and explain your choices.(b) Describe how the spectrogram would change if the time-skip (L in the notes), is increased.1SIGNAL0.50 0.5 1020406080120140160SPECTROGRAM 15002000.30.20.10.10180SPECTROGRAM C0.5frequencyfrequencySPECTROGRAM A1000050100time150050100time150Solution:For spectrogram B, the vertical width of the bar with respect to the frequency axis is less than forspectrogram A, so spectorgram B uses a longer block length than spectrogram A. In addition, the pointin the middle where the frequency starts to decrease is blurred, which also suggests that spectrogram Buses a longer block length.The horizontal stripe effect in spectrogram C is due to discontinuities along the frequency axis — so forspectrogram C there is less zero padding that for A and B. Except for the stripe artifact, spectrogramC appears to be similar to spectram A, so it appears that they use the same block length.SpectrogramABCRN30603025625664 127Prof. Ivan Selesnick, Polytechnic University

That leaves signal 5 and DFT 8. Signal 5 can be written as a cosine times a rectangular pulse, so the DFT of signal 5 will be the convolution of a DFT of a cosine with the DFT of rectangular pulse — that is a sum of two shifted digital sinc functions. Signal DFT 1 4 2 6 3 1 4 2 5 8 6 7 7 3 8 5 18 EL 713: Digital Signal Processing .

Related Documents: