셈툴 다운로드

셈툴 튜토리얼

신호처리 | 디지털 대역통과 필터 설계 |

페이지 정보

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

본문

사양이 다음과 같은 디지털 대역통과 필터를 설계해보자.

  • 저지대역의 낮은 쪽 끝: 
  • 통과대역의 낮은 쪽 끝: 
  • 통과대역의 높은 쪽 끝: 
  • 저지대역의 높은 쪽 끝: 
ex7_10.cem
/*   Chapter 7: Example 7.10   Bandpass filter design - Blackman window
*/
 
 ws1 = 0.2*pi; wp1 = 0.35*pi;
 wp2 = 0.65*pi; ws2 = 0.8*pi;
 As = 60;
 tr_width = min((wp1-ws1),(ws2-wp2));
 M = ceil(11*pi/tr_width) + 1 
 n=[0:M-1:1];
 wc1 = (ws1+wp1)/2; wc2 = (wp2+ws2)/2;
 hd = ideallp(wc2,M) - ideallp(wc1,M);
 w_bla = (blackman(M))';
 h = hd .* w_bla;
 [db,mag,pha,grd,w] = mfreq_z(h,[1]);
 delta_w = 2*pi/1000;
 Rp = -min(db(wp1/delta_w+1:wp2/delta_w))     /* Actual Passband Ripple */
 
 As = -round(max(db(ws2/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_bla);title("Blackman 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")


댓글목록

등록된 댓글이 없습니다.