From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 692/CH4/EX4.8/P4_8.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 692/CH4/EX4.8/P4_8.sce (limited to '692/CH4/EX4.8') diff --git a/692/CH4/EX4.8/P4_8.sce b/692/CH4/EX4.8/P4_8.sce new file mode 100755 index 000000000..11adcf481 --- /dev/null +++ b/692/CH4/EX4.8/P4_8.sce @@ -0,0 +1,27 @@ +//EXAMPLE 4.8 +//Determine the order of Analog Elliptic LP filter. +clc; +clear; +ap = 1 //dB +as = 40 //dB +Fp = 1000 //Hz +Fs = 5000 //Hz +wp = Fp*2*%pi; +ws = Fs*2*%pi; + + +k1 = 1/(sqrt((10^(0.1* as)-1)/(10^(0.1*ap)-1))); +disp(1/k1,'1/k1 = '); +k = wp/ws; +k2 = sqrt(1 - (k*k)); +disp(k2,"k2 = "); +po = (1 - sqrt(k2))/(2*(1 + sqrt(k2))); +disp(po,'po = '); +p = po +2*po^5 + 15*po^9 + 150*po^13; +disp(p,'p = '); +N = (2*log10(4/k1))/log10(1/p); +disp(N,'N = '); +disp('Since order of the filter is always an integer, '); +disp(ceil(N),'Order of the filter is, N = '); + + -- cgit