Signal Processing and Linear Systems-B.P.Lathi copy

16343748 6488239627 t 512583090 1658171874 4280206107

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 448 + 114.34)(8 2 + 19.7588 + 114.34) 512 7 F requency R esponse a nd A nalog F ilters 7.5 d isp('The n ormalized f ourth-order t ransfer f unction i s') p rintsys( a bs( n umI) , abs( d enI)) d isp('The t ransfer f unction w ith s r eplaced b y s /Wc i s') p rintsys ( abs( n um2) , abs ( d en2) ) % S tep 5: A mplitude r esponse o f t he f ilter w =O:.OI:40; w =w'; [ mag,phase,w)=bode(num2,den2,w); p lot(w,mag) F ilter O rder i s n x 4 C utoff F requency o f t he F ilter i s Wc - 10.6934 P oles o f t he t ransfer f unction a re s = - 0.3827 - 0.9239i - 0.9239 - 0.3827i - 0.9239 + 0 .3827i - 0.3827 + 0 .9239i The n ormalized f ourth-order t ransfer f unction i s 0 _794+---------\ 0_707 0.1 o 10 Ole F ig. 7 .23 20 = 10.693 1 n um/den = s - 4 + 2.613 s "3 + 3.414 s -2 + 2.613 s + 1 A mplitude response of t he lowpass B utterworth filter in Example 7.6. T he a mplitude response of this filter is given by Eq. (7.31) w ith n = 4 a nd W e = 10.693 . IH(Jw)1 = T he t ransfer function with s replaced by s /Wc is 1 3,000 d n um / en = s - 4 + 27.94 s -3 + 390.4 s"2 + 3195 s + 1.3 e +004 1 V(~)8 + 1 F igure 7.23 shows t he a mplitude response of this filter. We could also have used t he a lternate value of W e = 11.261. This choice would result in a slightly different design. E ither o f t he two designs satisfies t he specifications. • o 513 B utterworth F ilters C omputer E xample C 7.5 Solve E xample 7.6 using MATLAB % S tep 1: D etermine n w p=IO; w s=20; G p=-2; G s=-20; P I=-Gs/IO; P 2=-Gp/IO; W sp=ws/wp; n c=log( ( 10" P I-I) / ( 10" P 2-I)) / ( 2*log(W s p)); n =ceil(nc); % S tep 2: D etermine W c ( option t hat s atisfies p assband r equirement % e xactly a nd m ay o versatisfy s topband r equirement). W c =wp/ ( IO"P2-I)" ( 1/ ( 2*n)); % S tep 3 : D etermine t he n ormalized t ransfer f unction H (s) f or k =I:n A =(2* ( k-I)+n+I)/ ( 2*n); S k=cos(A * pi)+j*sin(A * pi); s =[s S k); e nd S =8'; n umI=[O 1 ]; d enI=poly([s')); % S tep 4: D etermine t he f inal f ilter t ransfer f unction H (s) n um2=[O W c"n); d en2=poly(Wc*[s']}; f printf(,Filter O rder i s n = % i\n',n) f printf('Cutoff F requency o f t he F ilter is W c = % .4f\n',Wc) d isp('Poles o f t he t ransfer f unction a re'),s o U sing M -files f rom M ATLAB S ignal P rocessing T oolbox W e c an a lso c ompute t he d esired f ilter t ransfer f unction u sing a ppropriate M files f rom t he S ignal P rocessing Toolbox a s s hown i n t he n ext few e xamples. o C omputer E xample C 7.6 Using M-file functions in MATLAB, design a lowpass B utterworth filter t o m eet t he specifications i n E xample 7.6. W p=IO;Ws=20;Gp=-2;Gs=-20; [ n,Wc)=buttord(Wp,Ws,-Gp,-Gs,'s'); [ num,den)=butter(n,Wc,'s'); Here num a nd d en are t he coefficients of t he n umerator a nd t he d enominator polynomials of t he desired filter. I n t his example, t he m atlab answer is n + 1 element vectors as n um= 0 0 0 0 16081 a nd d en= 1 29 433 3732 16081; t hat is, 16081 H(8) = 84 +...
View Full Document

Ask a homework question - tutors are online