필터 지우기
필터 지우기

How to do signal processing for discrete set of data

조회 수: 2 (최근 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 CenterFile Exchange에서 Kaiser에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by