微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 天线设计和射频技术 > How to test a filter functionality

How to test a filter functionality

时间:04-05 整理:3721RD 点击:
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?

A sine sweep is effective for displaying the range of response of a filter.

From a very slow frequency to a very fast frequency.

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

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

[QUOTE=
what is your purpose for this filter?[/QUOTE]
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.



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

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top