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.

Matlab code for FIR filter design

Status
Not open for further replies.

ztanish

Member level 1
Member level 1
Joined
Jan 23, 2007
Messages
32
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,288
Activity points
1,449
fir filter matlab

Can anybody help to find our FIR filter design for random noise removal.
 

cydi

Full Member level 3
Full Member level 3
Joined
Dec 12, 2006
Messages
162
Helped
14
Reputation
28
Reaction score
3
Trophy points
1,298
Activity points
2,004
matlab noise filter

What is the type of filter you want? You can use the filter design tool box that comes with matlab (check matlab help).. A simple cammand fir will design the filter for you..
 

    V

    Points: 2
    Helpful Answer Positive Rating

Unomano

Member level 1
Member level 1
Joined
Aug 31, 2005
Messages
40
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Location
Minsk, Belarus
Activity points
1,613
fir matlab

What kind of signal do you use? Filter must be matched to your signal.
 
  • Like
Reactions: teenu

    teenu

    Points: 2
    Helpful Answer Positive Rating

sumit_techkgp

Full Member level 2
Full Member level 2
Joined
Apr 1, 2007
Messages
133
Helped
8
Reputation
16
Reaction score
5
Trophy points
1,298
Activity points
1,866
fir filter matlab code

Your FIR should be a low pass in nature, but the specification has to be extracted from noise spec.
 

helios

Full Member level 2
Full Member level 2
Joined
Jun 3, 2005
Messages
146
Helped
22
Reputation
44
Reaction score
10
Trophy points
1,298
Activity points
2,798
matlab fir

in general cases

Find the noise variance or estimate it

use the "fspecial" to design u r quick gaussian filter

might work easily ..but it depends of the noise distribution...


If u want a real good answer....u r questions must be very specific
 

mehdi_an

Advanced Member level 4
Full Member level 1
Joined
Jan 17, 2007
Messages
106
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,296
Activity points
1,813
noise filter matlab

ztanish said:
Can anybody help to find our FIR filter design for random noise removal.

please you want filter noise in what frequency?
 

jeffleeh

Newbie level 3
Newbie level 3
Joined
Mar 8, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
matlab filter noise

use fdatool in Matlab
>> fdatool
br
 

hurrynarain

Newbie level 4
Newbie level 4
Joined
Apr 17, 2007
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
matlab code for fir filter

Filtering noise through a simple Low Pass filter will be a naive method but its a good step if its your first try.

As a first step check out "fir1" in matlab.

bye.
 

sprao

Member level 1
Member level 1
Joined
Dec 7, 2006
Messages
32
Helped
6
Reputation
12
Reaction score
2
Trophy points
1,288
Activity points
1,464
filter noise matlab

Use FDATOOL in matlab. If you type
>> fdatool
in command window, Fda tool will be opened. There you can select FIR or IIR filter, order of filter and cutoff freq. of filter (either HPF, LPF or BPF). That code will automatically generate .m file for you.
 

maomun

Junior Member level 2
Junior Member level 2
Joined
Jan 9, 2007
Messages
24
Helped
8
Reputation
16
Reaction score
6
Trophy points
1,283
Activity points
1,461
matlab fir filter

Hi,

Try this " help firwiener " and read how to use. This is easy step to filtering noise and no need to design in "fir" function learn it as benchmark, then u should design parameter of "fir1" for filtering by yourself.
 

goleroz

Newbie level 6
Newbie level 6
Joined
Apr 9, 2007
Messages
14
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,355
matlab fir filter design

maomun said:
Hi,

Try this " help firwiener " and read how to use. This is easy step to filtering noise and no need to design in "fir" function learn it as benchmark, then u should design parameter of "fir1" for filtering by yourself.



tanks for help
 

ls000rhb

Full Member level 3
Full Member level 3
Joined
Jun 17, 2005
Messages
185
Helped
7
Reputation
14
Reaction score
1
Trophy points
1,298
Activity points
2,425
matlab fdatool

you should know what type filter matched to your apllications, LPF,BPF,or HPF, then you should know what charateristic the filter have , such as cut off frequency , ripple wave in passband and attenuation! wish it helps !
 

tejaswi.subash

Newbie level 2
Newbie level 2
Joined
Sep 30, 2007
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
fdatool matlab

ztanish said:
Can anybody help to find our FIR filter design for random noise removal.
can u please giv me the code which u had recived...........i hav a project to do
send tat to my mail id tejaswi.subash@gmail.com

Added after 5 minutes:

cydi said:
What is the type of filter you want? You can use the filter design tool box that comes with matlab (check matlab help).. A simple cammand fir will design the filter for you..
can u giv me the code which u recived tat is matlab code for fir filter design as i hav aproject to do.please do help me
my email id is tejaswi.subash@gmail.com

Added after 29 seconds:

Unomano said:
What kind of signal do you use? Filter must be matched to your signal.
can u giv me the code which u recived tat is matlab code for fir filter design as i hav aproject to do.please do help me
my email id is tejaswi.subash@gmail.com

thank you

Added after 10 seconds:

Unomano said:
What kind of signal do you use? Filter must be matched to your signal.
can u giv me the code which u recived tat is matlab code for fir filter design as i hav aproject to do.please do help me
my email id is tejaswi.subash@gmail.com

thank you

Added after 1 minutes:

helios said:
in general cases

Find the noise variance or estimate it

use the "fspecial" to design u r quick gaussian filter

might work easily ..but it depends of the noise distribution...


If u want a real good answer....u r questions must be very specific
can u giv me the code which u recived tat is matlab code for fir filter design as i hav aproject to do.please do help me
my email id is tejaswi.subash@gmail.com

Added after 49 seconds:

armess said:
give ur email id i 'll send thcan u giv me the code which u recived tat is matlab code for fir filter design as i hav aproject to do.please do help me
my email id is tejaswi.subash@gmail.come code to u as a .m file.

Added after 54 seconds:

sprao said:
Use FDATOOL in matlab. If you type
>> fdatool
in command window, Fda tool will be opened. There you can select FIR or IIR filter, order of filter and cutoff freq. of filter (either HPF, LPF or BPF). That code will automatically generate .m file for youcan u giv me the code which u recived tat is matlab code for fir filter design as i hav aproject to do.please do help me
my email id is tejaswi.subash@gmail.com.
 

pranchith

Newbie level 1
Newbie level 1
Joined
Aug 9, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
chennai
Activity points
1,287
noise filtering matlab

clear all;
close all;
rp=input('enter the pass band ripple');
rs=input('enter the stop band ripple');
fp=input('enter the pass band ferquency');
fs=input('enter the stop band frequency');
f=input('enter the sampling frequency');
wp=2*fp/f;
ws=2*fs/f;
num=-20*log10(sqrt(rp*rs))-13;
dem=14.6*(fs-fp)/f;
n=ceil(num/dem);
n1=n+1;
if (rem(n,2)~=0);
n1=n;
n=n-1;
end
y=boxcar(n1);
b=fir1(n,wp,y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,1);
plot(o/pi,m);
 

Aya2002

Advanced Member level 4
Advanced Member level 4
Joined
Dec 12, 2006
Messages
1,140
Helped
184
Reputation
376
Reaction score
117
Trophy points
1,343
Location
Iraq
Activity points
8,006
fir filter design matlab

pranchith said:
clear all;
close all;
rp=input('enter the pass band ripple');
rs=input('enter the stop band ripple');
fp=input('enter the pass band ferquency');
fs=input('enter the stop band frequency');
f=input('enter the sampling frequency');
wp=2*fp/f;
ws=2*fs/f;
num=-20*log10(sqrt(rp*rs))-13;
dem=14.6*(fs-fp)/f;
n=ceil(num/dem);
n1=n+1;
if (rem(n,2)~=0);
n1=n;
n=n-1;
end
y=boxcar(n1);
b=fir1(n,wp,y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,1);
plot(o/pi,m);

please run it and give us the input with the output

thanks
 

shill

Newbie level 3
Newbie level 3
Joined
Jun 3, 2009
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
bangalore
Activity points
1,298
Re: Matlab code for AWGN filter

Hi all.
i have added AWGN to my speech signal, how to filter it out,?
how to know the frequency of the gaussian noise that i have added, plz do reply
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top