Reg : FFT Filter
2 ビュー (過去 30 日間)
古いコメントを表示
Hello, I am just a beginner in Matlab, and just started to explore the complete usage of MatLab. I am given a task on filtering a noisy data. Say for Ex: I am given a inputdata.mat file, i loaded and plotted the data variable inside the mat file. got a curve with lots of noise. I want to use the FFT filter to filter the noisy data. As am a beginner, i would really appreciate if anyone can help me out in this. I know i have to use the fft command for the same, but i couldnt move any further. Need your help Thanks Venkat
0 件のコメント
回答 (3 件)
William
2011 年 9 月 26 日
What version are you using? If you are using the student version you can use the "Filter" command within the control systems toolbox to visually create a filter.
Next you need to figure out how your data is input. If your .mat file is just points of a random noise function stacked on top of a sine wave you can use the filter function
help filter
If you don't have the control systems toolbox you can find the transfer function and work the problem with a number of for loops in a c code type manner.
If you can at all use the "filter" command. It does all the FFT work for you.
0 件のコメント
Wayne King
2011 年 9 月 26 日
If you have the Signal Processing Toolbox, you can:
1.) specify your filter using fdesign.lowpass (for example)
2.) design your filter using design()
3.) apply your filter to data using filter() or filtfilt()
In this example I design a lowpass FIR equiripple filter for data sampled at 10 kHz. I'll pass everything below 1 kHz, with the stopband starting at 1100 Hz. I specify 60 dB of attenuation in the stopband and 0.5 dB of passband ripple.
I'll create some noisy signal first to filter.
t = 0:1/1e4:1;
x = cos(2*pi*250*t)+sin(2*pi*500*t)+randn(size(t));
%Now to specify the filter
Fs = 1e4;
d = fdesign.lowpass('Fp,Fst,Ap,Ast',1000,1100,0.5,60,Fs);
% use specifications to design the filter
Hd = design(d,'equiripple');
% apply the filter to the noisy signal
y = filter(Hd,x);
You can view your filter response with:
fvtool(Hd)
Hope that helps,
Wayne
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Filter Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!