신호처리 | 디지털 버터워스 필터 설계 |
페이지 정보
작성자 cemtool 작성일14-04-23 19:03 조회12,130회 댓글0건본문
디지털 버터워스 필터를 설계해보자.
- ex8_17.cem
/* Chapter 8: Example 8.17 BiLinear Transformation: Butterworth Lowpass Filter Design */ /* Digital Filter Specifications: */ wp = 0.2*pi; /* digital Passband freq in Hz */ ws = 0.3*pi; /* digital Stopband freq in Hz */ Rp = 1; /* Passband ripple in dB */ As = 15; /* Stopband attenuation in dB */ /* Analog Prototype Specifications: Inverse mapping for frequencies */ T = 1; Fs = 1/T; /* Set T=1 */ OmegaP = (2/T)*tan(wp/2); /* Prewarp Prototype Passband freq */ OmegaS = (2/T)*tan(ws/2); /* Prewarp Prototype Stopband freq */ /* Analog Butterworth Prototype Filter Calculation: */ [cs,ds] = butlpf(OmegaP,OmegaS,Rp,As); /* Bilinear transformation: */ [b,a] = bilinear(cs,ds,T); [C,B,A] = drt2cas(b,a) % Plotting figure; subplot(1,1,1)[db,mag,pha,grd,w] = mfreq_z(b,a); subplot(2,2,1); plot(w/pi,mag); title("Magnitude Response")xtitle("frequency in pi units"); ytitle("|H|"); subplot(2,2,3); plot(w/pi,db); title("Magnitude in dB"); xtitle("frequency in pi units"); ytitle("decibels"); subplot(2,2,2); plot(w/pi,pha/pi); title("Phase Response")xtitle("frequency in pi units"); ytitle("pi units"); subplot(2,2,4); plot(w/pi,grd); title("Group Delay")xtitle("frequency in pi units"); ytitle("Samples");
댓글목록
등록된 댓글이 없습니다.