셈툴 다운로드

셈툴 튜토리얼

신호처리 | 디지털 타원형 저역통과 필터 설계 |

페이지 정보

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

본문

디지털 타원형 저역통과 필터 설계

ex8_24.cem
/*   Chapter 8: Example 8.24            
Elliptic Lowpass Filter Design:   
Use of the ELLIP 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 Elliptic Filter order calculations: */
 ep = sqrt(10^(Rp/10)-1);                /*Passband Ripple Factor */
 A = 10^(As/20);                   	 /*Stopband Attenuation Factor */
 OmegaC = OmegaP;                	 /*Analog Prototype Cutoff freq */
 k = OmegaP/OmegaS;                	 /*Analog Prototype Transition Ratio; */
 k1 = ep/sqrt(A*A-1);                  	 /*Analog Prototype Intermediate cal. */
// capk = ellipke([k.^2 1-k.^2]);
// capk1 = ellipke([(k1 .^2) 1-(k1 .^2)]);
capk = ellipke([k.^2 1-k.^2]); 			%elp_k([k.^2 1-k.^2]); 
capk1 = ellipke([(k1 .^2) 1-(k1 .^2)]);		%elp_k([(k1 .^2) 1-(k1 .^2)]); 
 N = ceil(capk(1)*capk1(2)/(capk(2)*capk1(1)));
 msgprint("*** Elliptic Filter Order = ") N
 
 /* Digital Elliptic Filter Design: */
 wn = wp/pi;                           /*Digital Passband freq in pi units */
 [b,a]=ellip(N,Rp,As,wn);
 [b0,B,A] = drt2cas(b,a)


댓글목록

등록된 댓글이 없습니다.