How to remove or identify spikes in a random signal.

조회 수: 12 (최근 30일)
Subhash Sagar
Subhash Sagar 2019년 4월 26일
댓글: Subhash Sagar 2019년 4월 26일
I have signal from different RFID tags. I just want to remove the spikes occurs in the signal.
Data file and signal images is attached. I have to remove the highlighted spikes.
Thanks. spikes.png
  댓글 수: 4
Image Analyst
Image Analyst 2019년 4월 26일
"remove" means to clip/clamp/saturate, or to completely delete those elements from the array, essentially shortening it (it's less wide than before)?
Can you count on the spike always being below a threshold, and good values being above some threshold?
Subhash Sagar
Subhash Sagar 2019년 4월 26일
Thanks.
It can be any, either completely remove it or to saturate the values based on the previous trend. Both or either of them will work for me.
As its a real time data, we cannot set a threshold as in the current signal, outlier has lower as compared with previous value. But it is also possible that outlier value will be higher than the previous one.

댓글을 달려면 로그인하십시오.

채택된 답변

Akira Agata
Akira Agata 2019년 4월 26일
Looking at your data, negative spikes you mentioned is always less than 1000. So, if this condition is applicable to other data, you can simply remove them by:
idx = t1(:,3) < 1000;
t1(idx,:) = [];
If you have to detect negative peaks with more complex conditions, I believe findpeaks function will be some help.
  댓글 수: 3
Akira Agata
Akira Agata 2019년 4월 26일
Thank you for your clarification.
Actually, rmoutlier might be one possible solution. But this function removes both higher- and lower-side outliers.
To remove lower-side outliers only, the following is one solution.
load('tag1.mat');
% Identify outliers of lower side
[~,lo] = isoutlier(double(t1(:,3)));
idx = t1(:,3) < int64(lo);
% Remove identified outliers
t1(idx,:) = [];
Subhash Sagar
Subhash Sagar 2019년 4월 26일
Thank you.
It somewhat worked for me.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Electrophysiology에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by