diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /40/CH9/EX9.12 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '40/CH9/EX9.12')
-rwxr-xr-x | 40/CH9/EX9.12/Exa_9_12.jpg | bin | 0 -> 17768 bytes | |||
-rwxr-xr-x | 40/CH9/EX9.12/Exa_9_12.sce | 36 |
2 files changed, 36 insertions, 0 deletions
diff --git a/40/CH9/EX9.12/Exa_9_12.jpg b/40/CH9/EX9.12/Exa_9_12.jpg Binary files differnew file mode 100755 index 000000000..8fe31f903 --- /dev/null +++ b/40/CH9/EX9.12/Exa_9_12.jpg diff --git a/40/CH9/EX9.12/Exa_9_12.sce b/40/CH9/EX9.12/Exa_9_12.sce new file mode 100755 index 000000000..15b484acb --- /dev/null +++ b/40/CH9/EX9.12/Exa_9_12.sce @@ -0,0 +1,36 @@ +//IIR filter design
+//Design of chebyshev IIR filter with following specifications
+fp1=1.6;fp2=1.8;fs1=3.2;fs2=4.8;//pass band edges
+Ap=2;As=20;S=12;
+s=%s;z=%z;
+//(a)Indirect Bilinear design
+W=2*%pi*[fp1 fp2 fs1 fs2]/S
+C=2;
+omega=2*tan(0.5*W');//prewarping each band edge frequency
+epsilon=sqrt(10^(0.1*Ap)-1);
+n=acosh(((10^(0.1*As)-1)/epsilon^2)^1/2)/(acosh(fs1/fp1));
+n=ceil(n)
+alpha=(1/n)*asinh(1/epsilon);
+for i=1:n
+ B(i)=(2*i-1)*%pi/(2*n);
+end
+for i=1:n
+ p(i)=-sinh(alpha)*sin(B(i))+%i*cosh(alpha)*cos(B(i));
+end
+Qs=1;
+for i=1:n
+ Qs=Qs*(s-p(i))
+end
+Qo=0.1634;
+HPS=Qo/Qs
+HBPS=horner(HPS,(s^2+1.5045^2)/(s*1.202))
+HZ=horner(HBPS,2*(z-1)/(z+1))
+f=0:0.001:0.5;
+HZF=abs(horner(HZ,exp(%i*2*%pi*f')));
+HBPF=abs(horner(HBPS,%i*2*%pi*f'));
+a=gca();
+plot2d(f,HZF);
+plot2d(f,HBPF);
+xlabel('Analog Frequency');
+ylabel('magnitude');
+xtitle('band pass filter designed by the bilinear transformation');
\ No newline at end of file |