Is there a best way to identify anomalous peaks in signals and remove them?

조회 수: 2 (최근 30일)
EM geo
EM geo 2021년 1월 12일
편집: KALYAN ACHARJYA 2021년 1월 13일
Hi to everybody!
I need some advices regarding how to find big peaks in a signal (both positive or negative). My data are hydrograms where in the x axis there is the datetime (hourly measurements) and in the y axis there is "flowls". I looked for the outliers detection in matlab using the movmean but I didn't find any changes and replacements.
This is my code:
clear; close; clc;
load('data_prova')
t= DateTime;
[B,TF,U,L,C] = filloutliers(flowls,'previous','movmean',5)
plot(t,flowls,t,B,'o')
legend('Original Data','Filled Data')
Alternatively, is there another way to do that?
Thanks in advance
  댓글 수: 4
EM geo
EM geo 2021년 1월 12일
As you can see here I plotted t vs flowls and I have some big peaks (positive and negative). I would like to identify them as possibile outliers and remove from the plot in order to remove noise.
Mathieu NOE
Mathieu NOE 2021년 1월 13일
hello
a few thougts ,
  1. why not simply average the data with movmean ?
  2. or use movmean to create a reference line and says we remove data that are 10% (to be checked) above and below this reference line ?

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

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 1월 13일
편집: KALYAN ACHARJYA 2021년 1월 13일
"identify anomalous peaks in signals and remove them?"
You can do this in many ways, it depends on you and your exact needs. But you must have to decide some threshold %, based on it pre and sucessive neighbours.
  1. Apply the diff, if the difference, if the different quite large as per threshold %, you can delete that indices datapoints.
  2. It is not sure, whether those peaks because on single outliers data point or multiple, if moltiple case, you can do movesum to get the indices ranges.
Your job to get the indices, where these anomalous peaks appears, and remove those data as follows
data([index positions])=[]
The resulting data length will be shorter than the original data point. Here you have to contact locally. Other methods are also available, please answer the same question as the related MATLAB.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by