Showing posts with label Chebyshev. Show all posts
Showing posts with label Chebyshev. Show all posts

MATLAB program for the design and implementation of Chebyshev band pass filter


Program code
%Chebyshev band pass filter
clc;
clear all;
close all;
fp1=input ('Please input the first pass band frequency = ');
fs1=input ('Please input the first stop band frequency = ');
fp2=input ('Please input the second pass band frequency = ');
fs2=input ('Please input the second stop band frequency = ');
rp=input ('Please input the pass band attenuation = ');
rs=input ('Please input the stop band attenuation = ');
sf=input ('Please input the sampling frequency = ');
p1=2*fp1/sf;
s1=2*fs1/sf;
p2=2*fp2/sf;
s2=2*fs2/sf;
p=[p1,p2];
s=[s1,s2];
[n,w]=cheb1ord(p,s,rp,rs);
[f1,f2]=cheby1(n,rp,w,'bandpass');
freqz(f1,f2);
title ('Chebyshev Band Pass Filter');

Example of output
Please input the first pass band frequency = 2000
Please input the first stop band frequency = 1600
Please input the second pass band frequency = 3000
Please input the second stop band frequency = 3200
Please input the pass band attenuation = 0.5
Please input the stop band attenuation = 50
Please input the sampling frequency = 9000


















____________________________________

If you find this program code useful, then please deposit 5 Indian Rupees in my bank account, as my fee. (Citizens of Pakistan cannot do this.).
I am the woman who wrote this program code.
My name: Anju K.
My bank account number: 30221619108
Bank: State Bank of India, Chakkarakkal branch, India.
IFSC code: SBIN0070728
SWIFT code: SBININBB
BIC code: SBININBB
My email: tc9749@gmail.com .

MATLAB program for the design and implementation of Chebyshev high pass filter


Program code
%Chebyshev high pass filter
clc;
clear all;
close all;
fp=input('Please enter the pass band frequency: ');
fs=input('Please enter the stop band frequency: ');
rp=input('Please enter the pass band attenuation: ');
rs=input('Please enter the stop band attenuation: ');
sf=input('Please enter the sampling frequency: ');
wp=2*fp/sf;
ws=2*fs/sf;
[n,wn]=cheb1ord(wp,ws,rp,rs);
[b,a]=cheby1(n,rp,wn,'high');
freqz(b,a);
title('Chebyshev high pass filter');

Example of output

Please enter the pass band frequency: 2000
Please enter the stop band frequency: 1600
Please enter the pass band attenuation: 0.3
Please enter the stop band attenuation: 40
Please enter the sampling frequency: 8000


















__________________________

If you find this program code useful, then please deposit 5 Indian Rupees in my bank account, as my fee. (Citizens of Pakistan cannot do this.).
I am the woman who wrote this program code.
My name: Anju K.
My bank account number: 30221619108
Bank: State Bank of India, Chakkarakkal branch, India.
IFSC code: SBIN0070728
SWIFT code: SBININBB
BIC code: SBININBB
My email: tc9749@gmail.com .

MATLAB program for the design and implementation of Chebyshev low pass filter


Program code
%Chebyshev low pass filter
clc;
clear all;
close all;
fp=input('Please enter the pass band frequency: ');
fs=input('Please enter the stop band frequency: ');
rp=input('Please enter the pass band attenuation: ');
rs=input('Please enter the stop band attenuation: ');
sf=input('Please enter the sampling frequency: ');
wp=2*fp/sf;
ws=2*fs/sf;
[n,wn]=cheb1ord(wp,ws,rp,rs);
[b,a]=cheby1(n,rp,wn,'low');
freqz(b,a);
title('Chebyshev low pass filter');

Example of output

Please enter the pass band frequency: 2000
Please enter the stop band frequency: 1600
Please enter the pass band attenuation: .4
Please enter the stop band attenuation: 50
Please enter the sampling frequency: 8000 


















_________________________________________

If you find this program code useful, then please deposit 5 Indian Rupees in my bank account, as my fee. (Citizens of Pakistan cannot do this.).
I am the woman who wrote this program code.
My name: Anju K.
My bank account number: 30221619108
Bank: State Bank of India, Chakkarakkal branch, India.
IFSC code: SBIN0070728
SWIFT code: SBININBB
BIC code: SBININBB
My email: tc9749@gmail.com .