Schilling fundamentals of digital signal processing using MATLAB 2nd ed solutions

873 58 0
Schilling fundamentals of digital signal processing using MATLAB 2nd ed solutions

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

An Instructor’s Solutions Manual to Accompany    Fundamentals of Digital Signal  Processing using MATLAB, 2nd Edition    Robert J. Schilling  Sandra L. Harris      http://www.elsolucionario.blogspot.com LIBROS UNIVERISTARIOS Y SOLUCIONARIOS DE MUCHOS DE ESTOS LIBROS LOS SOLUCIONARIOS CONTIENEN TODOS LOS EJERCICIOS DEL LIBRO RESUELTOS Y EXPLICADOS DE FORMA CLARA VISITANOS PARA DESARGALOS GRATIS ISBN-13: 978-1-1114-2603-3 ISBN-10: 1-111-42603-1 © 2012, 2005 Cengage Learning ALL RIGHTS RESERVED No part of this work covered by the copyright herein may be reproduced, transmitted, stored, or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher except as may be permitted by the license terms below For product information and technology assistance, contact us at Cengage Learning Academic Resource Center, 1-800-423-0563 For permission to use material from this text or product, submit all requests online at www.cengage.com/permissions Further permissions questions can be emailed to permissionrequest@cengage.com Cengage Learning 200 First Stamford Place, Suite 400 Stamford, CT 06902 USA Cengage Learning is a leading provider of customized learning solutions with office locations around the globe, including Singapore, the United Kingdom, Australia, Mexico, Brazil, and Japan Locate your local office at: international.cengage.com/region Cengage Learning products are represented in Canada by Nelson Education, Ltd For your course and learning solutions, visit www.cengage.com/engineering Purchase any of our products at your local college store or at our preferred online store www.cengagebrain.com NOTE: UNDER NO CIRCUMSTANCES MAY THIS MATERIAL OR ANY PORTION THEREOF BE SOLD, LICENSED, AUCTIONED, OR OTHERWISE REDISTRIBUTED EXCEPT AS MAY BE PERMITTED BY THE LICENSE TERMS HEREIN READ IMPORTANT LICENSE INFORMATION Dear Professor or Other Supplement Recipient: Cengage Learning has provided you with this product (the “Supplement”) for your review and, to the extent that you adopt the associated textbook for use in connection with your course (the “Course”), you and your students who purchase the textbook may use the Supplement as described below Cengage Learning has established these use limitations in response to concerns raised by authors, professors, and other users regarding the pedagogical problems stemming from unlimited distribution of Supplements Cengage Learning hereby grants you a nontransferable license to use the Supplement in connection with the Course, subject to the following conditions The Supplement is for your personal, noncommercial use only and may not be reproduced, posted electronically or distributed, except that portions of the Supplement may be provided to your students IN PRINT FORM ONLY in connection with your instruction of the Course, so long as such students are advised that they may not copy or distribute any portion of the Supplement to any third party Test banks and other testing materials may be made available in the classroom and collected at the end of each class session, or Printed in the United States of America 14 13 12 11 10 posted electronically as described herein Any material posted electronically must be through a password-protected site, with all copy and download functionality disabled, and accessible solely by your students who have purchased the associated textbook for the Course You may not sell, license, auction, or otherwise redistribute the Supplement in any form We ask that you take reasonable steps to protect the Supplement from unauthorized use, reproduction, or distribution Your use of the Supplement indicates your acceptance of the conditions set forth in this Agreement If you not accept these conditions, you must return the Supplement unused within 30 days of receipt All rights (including without limitation, copyrights, patents, and trade secrets) in the Supplement are and will remain the sole and exclusive property of Cengage Learning and/or its licensors The Supplement is furnished by Cengage Learning on an “as is” basis without any warranties, express or implied This Agreement will be governed by and construed pursuant to the laws of the State of New York, without regard to such State’s conflict of law rules Thank you for your assistance in helping to safeguard the integrity of the content contained in this Supplement We trust you find the Supplement a useful teaching tool INSTRUCTOR'S SOLUTIONS MANUAL     TO ACCOMPANY                      FUNDAMENTALS OF  DIGITAL SIGNAL PROCESSING  using MATLAB  SECOND EDITION              ROBERT J. SCHILLING    SANDRA L. HARRIS            Contents        Chapter 1                  1  Chapter 2    Chapter 3    Chapter 4    Chapter 5    Chapter 6    Chapter 7    Chapter 8    Chapter 9                                                    57                  155                  274                   384                            467                           572                             675                            765                  Chapter 1.1 Suppose the input to an amplifier is xa (t) = sin(2πF0 t) and the steady-state output is ya (t) = 100 sin(2πF0 t + φ1 ) − sin(4πF0 t + φ2 ) + cos(6πF0 t + φ3 ) (a) Is the amplifier a linear system or is it a nonlinear system? (b) What is the gain of the amplifier? (c) Find the average power of the output signal (d) What is the total harmonic distortion of the amplifier? Solution (a) The amplifier is nonlinear because the steady-state output contains harmonics (b) From (1.1.2), the amplifier gain is K = 100 (c) From (1.2.4), the output power is d20 + d + d+ 22 + d23 = 5(1002 + 22 + 1) Py = = 5002.5 (d) From (1.2.5) 100(Py − d21 /2) Py 100(5002.5 − 5000) = 5002.5 = 05% THD = © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part √ 1.2 Consider the following signum function that returns the sign of its argument   , t>0 ∆ sgn(t) = , t=0  −1 , t < (a) Using Appendix 1, find the magnitude spectrum (b) Find the phase spectrum Solution (a) From Table A2 in Appendix Xa (f ) = jπf Thus the magnitude spectrum is Aa (f ) = |Xa(f )| = |jπf | = π|f | (b) The phase spectrum is φa (f ) = Xa (f ) = − jπf = −sgn(f ) π © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 1.3 Parseval’s identity states that a signal and its spectrum are related in the following way ∞ −∞ ∞ |xa (t)|2 dt = −∞ |Xa(f )|2 df Use Parseval’s identity to compute the following integral ∞ J = sinc2 (2Bt)dt −∞ Solution From Table A2 in Appendix if xa (t) = sinc(2Bt) then Xa (f ) = µa (f + B) − µa (f − B) 2B Thus by Parseval’s identity ∞ J = −∞ ∞ = −∞ ∞ = −∞ 2B = sin2 (2Bt)dt |xa (t)|2 dt |Xa(f )|2 df B = df −B © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part Learning Curve 0.7 0.6 e2(k) 0.5 0.4 0.3 0.2 0.1 0 500 1000 1500 k Problem 9.43 (a) Learning Curve Magnitude Responses 2.5 Secondary Path FIR Model A(f) 1.5 0.5 0 200 400 600 800 1000 f (Hz) Problem 9.43 (b) Secondary Path Magnitude Responses © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 852 Phase Responses Secondary Path FIR Model φ(f) −1 −2 −3 −4 200 400 600 800 1000 f (Hz) Problem 9.43 (c) Secondary Path Phase Responses © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 853 9.44 Consider the active noise control system shown previously in Figure 9.45 Suppose the primary noise x(k) consists of the following noise-corrupted periodic signal x(k) = i=1 sin(2πF0 ikT ) + v(k) 1+i Here the fundamental frequency is F0 = 100 Hz and fs = 2000 Hz The additive noise term, v(k), is white noise uniformly distributed over [−.2, 2] Coefficient vectors for FIR models of the secondary path F (z) and the primary path G(z) are contained in MAT-file prob9 44 The coefficient vectors are f and g Write a MATLAB program that loads f and g and uses the FDSP toolbox function f fxlms to apply active noise control with the filtered-x LMS method starting at sample N/4 where N = 2000 Use a noise controller of order m = 30 and a step size of µ = 002 Plot the learning curve including a title that displays the amount of noise cancellation in dB using (9.8.15) Solution % Problem 9.44 % Initialize f_header(’Problem 9.44’) m = f_prompt (’Enter filter order m’,0,60,30); N = f_prompt (’Enter number of points N’,1,3000,2000); r = f_prompt (’Enter number of harmonics r’,0,10,5); delta = f_prompt (’Enter amplitude of white noise’,0,1,0.2); mu = f_prompt (’Enter step size’,0,1,0.002); load prob9_41 % loads f and g % Construct noisy periodic input k = [1 : N]’; fs = 2000; f_0 = 100; T = 1/fs; x = f_randu (N,1,-delta,delta); for i = : r x = x + 2*sin(2*pi*i*k*f_0*T)/(1+i); end % Apply active noise control starting at sample N/4+1 e = filter (g,1,x); p = [N/4 + 1:N]; [w,e(p)] = f_fxlms (x(p),g,f,m,mu); © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 854 % Plot learning curve figure plot(k,e.^2) f_labels (’Learning Curve’,’k’,’e^2(k)’) P_u = sum(e(1:N/4).^2); P_c = sum(e(3*N/4+1:N).^2); E = real(10*log10(P_u/P_c)); caption = sprintf (’Learning Curve, Noise reduction = %.1f dB’,E); f_labels (caption,’k’,’e^2(k)’) f_wait Learning Curve, Noise reduction = 15.8 dB 0.06 0.05 e2(k) 0.04 0.03 0.02 0.01 0 500 1000 k 1500 2000 Problem 9.44 Learning Curve Using FXLMS Method © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 855 9.45 Consider the active noise control system shown previously in Figure 9.45 Suppose the primary noise x(k) consists of the following noise-corrupted periodic signal x(k) = i=1 sin(2πF0 ikT ) + v(k) 1+i Here the fundamental frequency is F0 = 100 Hz and fs = 2000 Hz The additive noise term, v(k), is white noise uniformly distributed over [−.2, 2] Coefficient vectors for FIR models of the secondary path F (z) and the primary path G(z) are contained in MAT file prob9 44.mat The coefficient vectors are f and g Write a MATLAB program that loads f and g and uses the FDSP toolbox function f sigsyn to apply active noise control with the signal synthesis method starting at sample N/4 where N = 2000 Use a step size of µ = 04 (a) Plot the learning curve Add a title which displays the amount of noise cancellation in dB using (9.8.15) (b) Plot the magnitude spectra of the noise without cancellation (c) Plot the magnitude spectra of the noise with cancellation Solution % Problem 9.45 % Initialize f_header(’Problem 9.45’) N = f_prompt (’Enter number of points N’,1,3000,2000); r = f_prompt (’Enter number of harmonics r’,0,10,5); delta = f_prompt (’Enter amplitude of white noise’,0,1,0.2); mu = f_prompt (’Enter step size’,0,1,0.04); load prob9_41 % loads f and g % Construct noisy periodic input k = [1 : N]’; fs = 2000; f_0 = 100; T = 1/fs; x = f_randu (N,1,-delta,delta); for i = : r x = x + 2*sin(2*pi*i*k*f_0*T)/(1+i); end e = filter (g,1,x); s = [N/4 + 1:N]; [p,q,e(s)] = f_sigsyn (x(s),g,f,f_0,fs,r,mu); © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 856 % Plot learning curve figure plot(k,e.^2) f_labels (’Learning Curve’,’k’,’e^2(k)’) P_u = sum(e(1:N/4).^2); P_c = sum(e(3*N/4+1:N).^2); E = real(10*log10(P_u/P_c)); caption = sprintf (’Learning Curve, Noise reduction = %.1f dB’,E); f_labels (caption,’k’,’e^2(k)’) f_wait % Display power spectrum of noise [A_u,phi_u,S_u,f] = f_spec (e(1:N/4),N/4,fs); [A_c,phi_c,S_c,f] = f_spec (e(3*N/4+1:N),N/4,fs); figure i = : N/8; plot (f(i),A_u(i)) f_labels (’’,’f (Hz)’,’A_u(f)’) ylim = get(gca,’Ylim’); f_wait figure plot (f(i),A_c(i)) f_labels (’’,’f (Hz)’,’A_c(f)’) axis([0 fs/2 ylim(1) ylim(2)]) f_wait © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 857 Learning Curve, Noise reduction = 19.2 dB 0.06 0.05 e2(k) 0.04 0.03 0.02 0.01 0 500 1000 k 1500 2000 Problem 9.45 (a) Signal Synthesis Learning Curve 35 30 Au(f) 25 20 15 10 0 200 400 600 800 1000 f (Hz) Problem 9.45 (b) Magnitude Spectrum of Noise without Noise Control © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 858 35 30 Ac(f) 25 20 15 10 0 200 400 600 800 1000 f (Hz) Problem 9.45 (c) Magnitude Spectrum of Noise with Active Noise Control © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 859 9.46 Consider the following nonlinear discrete-time system which has m = past inputs and n = past outputs y(k) = 8y(k1) + 3[x(k) − y(k − 1)]3 Suppose the input x(k) consists of N = 1000 samples of white noise uniformly distributed over [−1, 1] Let the number of grid point per dimension be d = Write a MATLAB program that performs the following tasks (a) Use the FDSP toolbox function f state to compute a set of output bounds b such that b1 ≤ y(k) ≤ b2 Use a safety factor of β = 1.2 as in (9.9.29) Print a, b, ∆x, ∆y, and the total number of grid points r (b) Plot the output y(k) corresponding to the white noise input x(k) Include dashed lines showing the grid values along the y dimension (c) Let f (u) denote the right-hand side of the nonlinear difference equation where u(k) = [x(k), y(k − 1)]T Plot the surface f (u) over the domain [a1 , a2 ] × [b1 , b2 ] Solution function prob9_46 % Initialize f_header(’Problem 9.46’) N = 1000; a = [-1,1] m = 0; n = 1; d = 8; p = m+n+1; beta = 1.2 ; theta = zeros(p,1); % Estimate output bounds x = f_randu(N,1,a(1),a(2)); y = zeros(size(x)); for k = : N theta = f_state (x,y,k,m,n); y(k) = fun (theta); end y_min = min(y); y_max = max(y); b(1) = (y_min + y_max)/2 - beta*(y_max - y_min)/2; b(2) = (y_min + y_max)/2 + beta*(y_max - y_min)/2; b © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 860 Delta_x = (a(2)-a(1))/(d-1) Delta_y = (b(2)-b(1))/(d-1) r = d^p % Plot output and range figure; k = : N-1; hold on plot (k,y) for i = : d y_g = b(1) + (i-1)*Delta_y; if (i > 1) & (i < d) plot ([0 N-1],[y_g y_g],’k:’) else plot ([0 N-1],[y_g y_g],’k’) end end f_wait % Plot equation surface P = A = B = f = for 60; linspace (a(1),a(2),P); linspace (b(1),b(2),P); zeros(P,P); i = : P for j = : P theta(1) = A(i); theta(2) = B(j); f(i,j) = fun (theta,m,n); end end figure surf (B,A,f) pause (0.1) surf (B,A,f) f_labels (’Nonlinear System Surface’,’\theta_2’,’\theta_1’,’f(\theta)’) f_wait function y = fun (theta,m,n) % Description: Nonlinear system (m = 0, n = 1) y = 0.8*theta(2) + 0.3*(theta(1) - theta(2))^3; (a) a = -1 b = -0.4633 0.4673 © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 861 Delta_x = 0.2857 Delta_y = 0.1329 r = 64 0.5 0.4 0.3 0.2 0.1 −0.1 −0.2 −0.3 −0.4 −0.5 200 400 600 800 1000 Problem 9.46 (b) Nonlinear System Output © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 862 Nonlinear System Surface 0.4 f(θ) 0.2 −0.2 −0.4 −0.6 −0.8 0.5 0.5 0 −0.5 θ −1 −0.5 θ2 Problem 9.46 (c) Nonlinear System Equation Surface © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 863 9.47 Consider the following nonlinear discrete-time system which has m = past inputs and n = past outputs y(k) = 8y(k1) + 3[x(k) − y(k − 1)]3 Let the range of inputs be −1 ≤ x(k) ≤ and the number of grid points per dimension be d = Write a MATLAB program that does the following (a) Use the FDSP toolbox function f state to compute a set of output bounds b such that b1 ≤ y(k) ≤ b2 Use P = 1000 points of white noise uniformly distributed over [−1, 1] for the test input and a safety factor of β = 1.2 as in (9.9.29) Print a, b, and the total number of grid points r (b) Use FDSP toolbox function f rbfw with N = and ic = to compute a weight vector w that satisfies (9.9.22) Then use f rbf0 to compute the output y0 (k) to a white noise input with M = 100 points uniformly distributed over [−1, 1] Use f state to compute the nonlinear system response y(k) to the same input Plot the two outputs on one graph using a legend Compute the error E using (9.9.31) and add this to the graph title Solution function prob9_47 % Initialize f_header(’Problem 9.47’) m = 0; n = 1; p = m+n+1; P = 1000; N = 100; theta = zeros(p,1); w = zeros(p,1); % Get parameters d = f_prompt (’Enter number of grid points per dimension’,2,12,8); % Estimate output bounds a = x = y = for [-1,1] f_randu(P,1,a(1),a(2)); zeros(size(x)); k = : P theta = f_state (x,y,k,m,n); y(k) = fun (theta,m,n); © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 864 end y_min = min(y); y_max = max(y); beta = 1.2; % safety factor b(1) = (y_min + y_max)/2 - beta*(y_max - y_min)/2; b(2) = (y_min + y_max)/2 + beta*(y_max - y_min)/2; b r = d^p % Compute w so network is exact on grid mu = 0; w = f_rbfw (@fun,0,a,b,m,n,d,mu,1); % Compute outputs and error x = y_0 y = for f_randu (N,1,a(1),a(2)); = f_rbf0 (x,w,a,b,m,n,d); zeros(N,1); k = : N theta = f_state (x,y,k,m,n); y(k) = fun (theta); end % Compare outputs figure k = : N; plot (k,y,k,y_0) hold on plot ([0 N],[b(1) b(1)],’k’,[0 N],[b(2) b(2)],’k’) e = y-y_0; E = sum(e.^2)/sum(y.^2); caption = sprintf (’System and Network Outputs, E = %.3g’,E); f_labels (caption,’k’,’y(k) and y_0(k)’) legend (’nonlinear system’,’RBF model’) f_wait function y = fun (theta,m,n) % Description: Nonlinear system (m = 0, n = 1) y = 0.8*theta(2) + 0.3*(theta(1) - theta(2))^3; © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 865 (a) a = -1 b = -0.4581 0.4533 r = 64 System and Network Outputs, E = 0.0216 0.5 nonlinear system RBF model 0.4 0.3 y(k) and y0(k) 0.2 0.1 −0.1 −0.2 −0.3 −0.4 −0.5 20 40 60 80 100 k Problem 9.47 (b) Nonlinear System and RBF Network Outputs © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 866 ... Outputs: y = vector of samples of analog signal evaluated at t y = exp(-t) * sin(2*pi*t); © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly... vector of input times % % Outputs: y = vector of samples of analog signal evaluated at t y = exp(-t) * sin(2*pi*t); © 2012 Cengage Learning All Rights Reserved May not be scanned, copied or duplicated,... Rights Reserved May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 1.8 Show that the spectrum of a causal signal xa(t) can be obtained from the

Ngày đăng: 07/10/2021, 12:24

Từ khóa liên quan

Mục lục

  • Preface

  • El Solucionario

  • Contents

  • Chapter 1

  • Chapter 2

  • Chapter 3

  • Chapter 4

  • Chapter 5

  • Chapter 6

  • Chapter 7

  • Chapter 8

  • Chapter 9

Tài liệu cùng người dùng

Tài liệu liên quan