フィルターのクリア

How to do signal processing for discrete set of data

4 ビュー (過去 30 日間)
Athira Surendran
Athira Surendran 2017 年 1 月 15 日
コメント済み: Star Strider 2017 年 1 月 15 日
I've a amplitude-time signal data with 10000 data points having a sampling period of 0.5 microseconds. It has noise embedded in it. I want to remove the noise and do signal averaging. I'm completely new to signal processing and matlab. I've no idea which filter to use also. Can somebody help me with it?

採用された回答

Star Strider
Star Strider 2017 年 1 月 15 日
The data you provided only has 256 data points. It does not have much noise, and no significant baseline drift, so I used a lowpass FIR filter here.
This works:
[d,s,r] = xlsread('Athira Surendran data.xls');
Ts = 0.5; % Sampling Interval (s)
Fs = 1/Ts; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
sig = d(1,:); % Signal
t = d(3,:); % Time
L = length(t);
figure(1)
plot(t, sig)
grid
xlabel('Time')
ylabel('Amplitude')
FTsig = fft(sig)/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn;
Iv = 1:length(Fv);
figure(2)
plot(Fv, abs(FTsig(Iv))*2)
grid
xlabel('Frequency (Hz)')
ylabel('Amplitude')
fcuts = [0.08 0.19]; % Frequency Vector
mags = [1 0]; % Magnitude (Defines Passbands & Stopbands)
devs = [0.01 0.05]; % Allowable Deviations
[n,Wn,beta,ftype] = kaiserord(fcuts,mags,devs,Fs); % Kaiser Window
n = n + rem(n,2);
hh = fir1(n,Wn,ftype,kaiser(n+1,beta),'scale'); % Desing FIR Lowpass Filter
figure(3)
freqz(hh, 1, 2^14, Fs) % Plot Filter Characteristic
filt_sig = filtfilt(hh, 1, sig); % Filter Signal
figure(4)
plot(t, sig, ':b', 'LineWidth',1.5)
hold on
plot(t, filt_sig, '-r')
hold off
grid
legend('Original', 'Low-Pass Filtered')
xlabel('Time')
ylabel('Amplitude')
  2 件のコメント
Athira Surendran
Athira Surendran 2017 年 1 月 15 日
Thank you so much...!!
Star Strider
Star Strider 2017 年 1 月 15 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeKaiser についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by