FFT results correct for following filtering?

1 回表示 (過去 30 日間)
EmirBeg
EmirBeg 2021 年 5 月 4 日
回答済み: Star Strider 2021 年 5 月 4 日
I have inductive measurement data that i want to filter with a lowpass, so first i want to get the frequency spectrum to know what to filter out.
I used the following code to do the FFT motivated by an answer to a question i was reading here.
%% FFT
load('CH0.mat');
load('t.mat');
L = numel(CH0);
Ts = mean(diff(t));
Fs = 1/Ts;
Fn = Fs/2;
CH0FT = fft(CH0-mean(CH0),[],1)/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn;
Iv = 1:numel(Fv);
CH0abs = abs(CH0FT);
plot(Fv,mag2db(CH0abs(Iv)*2));
As you see it look like this:
Usually i would expect a peak at a certain frequency so i could filter the other frequencys out but here is just a big peak near zero and also the frequencys are smaller than i would expect.
Do you see any mistakes or is it just the way my sensor measures? How would you filter it? I also attached the data. Thank you!

採用された回答

Star Strider
Star Strider 2021 年 5 月 4 日
It is my code ( apparently copied from is the FFT right? ) and I do not see any mistakes in it!
That signal and ‘CH0’ here are apparently quite noisy with a large low-frequency component. Consider using a lowpass filter if you only want to isolate the low-frequency component (likely 0 to 0.001 frequency units here).

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by