Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to test a filter functionality

Status
Not open for further replies.

lakshmikalyani

Member level 1
Joined
Jan 5, 2014
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Location
kakinada
Activity points
248
hi i am stuck with a question called how to test a filter
i know how to design a filter in MATLAB, by taking the specifications like cutoff frequencies and ripple factors.
but i want to know how to test it
in my experiment i gave a sine signal and tested it but i am unable to analyze the thing.
can you please help me?
 

but i how to give that in coding in matlab ?
i have done bu giving a sampled sine signal to a low pass filter and band pass filter by realizing them from FDATOOL in MATLAB. the responce is not correct
i want to do in coding .
i had designed the filter lpf and bpf iir filter in coding like this :


Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
wp=400;
ws=450;
rp=3;
rs=60;
fs=1000;
w1=2*wp/fs;w2=2*ws/fs;
[n,wn]=buttord(w1,w2,rp,rs)
[b,a]= butter(n,wn)
[x,y]=freqz(b,a,fs);
plot(y,abs(x));



i want to give inputs to this code to check the filter fuctionality i.e whether it is sending the signals below 400hz or not and how it is attenuating the signals above 400hz
can u help pls me
 
Last edited by a moderator:

Just use ADS for quick design:
pass band=400Hz, stop=450Hz, ripple inband=3dB, attenua stop=60dB,
then max flat needs 45 orders.
Elliptic needs 8 orders, some 7mH inductor
what is your purpose for this filter?
 

thanks for the response


actually i need to know how the filter is working lpf and bpf in my project
i am experimenting with filters. i want to send the input and analyze the output of the filter any lpf and bpf iir filters.
so i started with lpf
what is ADS?
i have to do this in matlab
 

what is your purpose for this filter?[/QUOTE said:
my purpose is to check the functionality of the lowpass iir filter.
to test the filter how it is sending taking the input and how to analyze the output.
 

why did you choose 400Hz as passband, and 450Hz as stop band?
If you just study, you can set it as 400MHz and 450MHz, that become much easier.

- - - Updated - - -

Sorry, you want to test IIR filter, here is an example.
f = fdesign.bandpass(.35,.45,.55,.65,60,1,60);
Hd = design(f, 'equiripple');
fvtool(Hd)

Hf = Hd;
Hf.Arithmetic = 'fixed';
set(Hf, 'CoeffWordLength', 8);
fvtool(Hf)
 

Hi,
Do you want to design and test the filter with software alone (OR) upto practical stage?
If software means, any osftware is OK for you (OR) you need it to do with Matlab alone?
 
i want to design and test the filter only in matlab so please help me

i had done some more implementations in the code
now my code is

Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
freq=0:10:10000;
t=0.001;
in=10*sin(freq*t);
subplot(2,2,1);
plot(freq,in);
 
wp=400;
ws=450;
rp=2;
rs=80;
fs=1000;
w1=2*wp/fs;w2=2*ws/fs;
[N,wn]=ellipord(w1,w2,rp,rs)
[b,a]=ellip(N,rp,rs,wn);
[x,y]=freqz(b,a,fs);
mag=20*log(abs(x));
subplot(2,2,2);
plot(y,mag);
 
out=filter(b,a,in);
subplot(2,2,3);
plot(freq,out);



but the problem is now i am unable to analyze the output
i want to know whether i gave the correct input and the o/p is correct or not
can u help me in analyzing the output
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top