셈툴 다운로드

셈툴 튜토리얼

신호처리 | 제 2형 체비셰프 대역저지 필터 설계 |

페이지 정보

작성자 cemtool 작성일14-04-23 19:12 조회10,210회 댓글0건

본문

다음 CEMTool코드에 주어진 사양을 갖는 제 2형 체비셰프 대역저지 필터를 설계해보자.

ex8_30.cem
/*   
Chapter 8: Example 8.30            
Chebyshev-2 Bandstop Filter Design:
Use of the CHEBY2 function
*/
 
 /* Digital Filter Specifications:  */         	/* Type: Chebyshev-II Bandstop */
 ws = [0.4*pi 0.7*pi];                     	/* Dig. stopband edge frequency */
 wp = [0.25*pi 0.8*pi];                    	/* Dig. passband edge frequency */
 Rp = 1;                           		/* Passband ripple in dB */
 As = 40;                             		/* Stopband attenuation in dB */
 
 /* Calculations of Chebyshev-II Filter Parameters: */
 [N,wn] = chb2ord(wp/pi,ws/pi,Rp,As);
 
 /* Digital Chebyshev-II Bandstop Filter Design: */
 [b,a] = cheby2(N,As,ws/pi,"stop");
 
 /* Cascade Form Realization: */
 [b0,B,A] = drt2cas(b,a) 
 
% Plotting:
figure 
[db,mag,pha,grd,w] = mfreq_z(b,a);
subplot(2,2,1);plot(w/pi,mag);title("Magnitude Response")xtitle("Digital frequency in pi units");
 
subplot(2,2,3);plot(w/pi,db);title("Magnitude in dB")xtitle("Digital frequency in pi units");
 
subplot(2,2,2);plot(w/pi,pha/pi);title("Phase Response")xtitle("Digital frequency in pi units");ytitle("phase in pi units") 
subplot(2,2,4);plot(w/pi,grd);title("Group Delay")xtitle("Digital frequency in pi units");


댓글목록

등록된 댓글이 없습니다.