셈툴 다운로드

셈툴 튜토리얼

신호처리 | FIR 저역통과 필터 설계 2 |

페이지 정보

작성자 cemtool 작성일14-04-23 18:45 조회11,240회 댓글0건

본문

사양이 다음과 같은 디지털 FIR 저역통과 필터를 설계하라.

카이저 창함수를 사용하여 저역통과 필터를 설계해보자.

ex7_9.cem
/*    Chapter 7: Example 7.9    Lowpass filter design - Kaiser window
*/
 
 wp = 0.2*pi; ws = 0.3*pi; As = 50;
 tr_width = ws - wp;
 M = ceil((As-7.95)/(14.36*tr_width/(2*pi))+1) + 1 
 n=[0:M-1:1];
 beta = 0.1102*(As-8.7) 
 wc = (ws+wp)/2;
 hd = ideallp(wc,M);
 w_kai = (kaiser(M,beta))';
 h = hd .* w_kai;
 [db,mag,pha,grd,w] = mfreq_z(h,[1]);
 delta_w = 2*pi/1000;
 As = -round(max(db(ws/delta_w+1:501)))  /* Min Stopband Attenuation */
 
 /* plots */
 subplot(1,1,1) 
subplot(2,2,1); 
stem(n,hd); title("Ideal Impulse Response") 
xtitle("n"); ytitle("hd(n)") 
subplot(2,2,2); 
stem(n,w_kai);title("Kaiser Window") 
xtitle("n"); ytitle("w(n)") 
subplot(2,2,3); 
stem(n,h);title("Actual Impulse Response") 
xtitle("n"); ytitle("h(n)") 
subplot(2,2,4); 
plot(w/pi,db);title("Magnitude Response in dB");
 xtitle("frequency in pi units"); ytitle("Decibels")


댓글목록

등록된 댓글이 없습니다.