셈툴 다운로드

셈툴 튜토리얼

신호처리 | 디지털 버터워스 저역통과 필터 설계 |

페이지 정보

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

본문

디지털 버터워스 저역통과 필터 설계

ex8_21.cem
/*   Chapter 8: Example 8.21            
Butterworth Lowpass Filter Design:
Use of the BUTTER function
*/
 
  /* 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: */
 T = 1;                                /* Set T=1 */
 OmegaP = (2/T)*tan(wp/2);             /* Prewarp Prototype Passband freq */
 OmegaS = (2/T)*tan(ws/2);             /* Prewarp Prototype Stopband freq */
 
 /* Analog Prototype Order Calculation: */
 N =ceil((log10((10^(Rp/10)-1)/(10^(As/10)-1)))/(2*log10(OmegaP/OmegaS)));
 msgprint("*** Butterworth Filter Order = ") N
 
 OmegaC = OmegaP/((10^(Rp/10)-1)^(1/(2*N)));   /* Analog BW prototype cutoff */
 
 wn = 2*atan((OmegaC*T)/2);                /* Digital BW cutoff freq */
 
 /* Digital Butterworth Filter Design: */
 wn = wn/pi;                               /* Digital Butter cutoff in pi units */
 [b,a]=butter(N,wn);
 [b0,B,A] = drt2cas(b,a)


댓글목록

등록된 댓글이 없습니다.