LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect unusual changes in graphs

i have a 1 dimensional array and i display it on a graph. The problem here I want to find the anomaly on this chart (because normally the chart will be stable for a while, when there is an outlier it will greatly fluctuate like the video I attached below.
Can anyone give me some advice on how to solve this problem.
thank

link video: https://www.youtube.com/watch?v=ClBmxvXMNWo

0 Kudos
Message 1 of 12
(1,133 Views)

Hi Vu,

 


@Vu_Anh wrote:

i have a 1 dimensional array and i display it on a graph. The problem here I want to find the anomaly on this chart


The question is worded wrongly: you don't find changes "in a chart", but you detect anomalies on your data!

 

So: you need to define an algorithm to detect those "unusual data", then you can easily filter them.

Some of those "unusual data" look like there was "no data" at all from your DAQ device, so you better try to fix the upstream code where those data is read from DAQ device…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(1,124 Views)

Normally you want to get to the root cause of the anomaly and fix it instead of trying to hide it.

 

Example - holes in the data:

Wrong: Whenever I see a hole in the data, I will fill it with zeros.

Right: I should discover why there are holes in the data and fix it so there are no longer holes in the data.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 12
(1,081 Views)

 


@GerdW wrote:

Hi Vu,

 


@Vu_Anh wrote:

i have a 1 dimensional array and i display it on a graph. The problem here I want to find the anomaly on this chart


The question is worded wrongly: you don't find changes "in a chart", but you detect anomalies on your data!

 

So: you need to define an algorithm to detect those "unusual data", then you can easily filter them.

Some of those "unusual data" look like there was "no data" at all from your DAQ device, so you better try to fix the upstream code where those data is read from DAQ device…



Sorry my English is not good, so the interpretation is difficult to understand. What I mean here is that my data is displayed on a chart to make it easier for you to observe and find outliers. That anomaly was created by me and i want to detect it in software.

I want to find an algorithm that can find that outlier in real time. 

I tried using the function "array max min" to find the 2 largest and smallest values. Then subtract 2 results to find fluctuations but it is correct only when my data is stable.

0 Kudos
Message 4 of 12
(1,063 Views)

@billko wrote:

Normally you want to get to the root cause of the anomaly and fix it instead of trying to hide it.

 

Example - holes in the data:

Wrong: Whenever I see a hole in the data, I will fill it with zeros.

Right: I should discover why there are holes in the data and fix it so there are no longer holes in the data.


How to find holes in data? This data hole was created by me and I want to detect them in the software to execute the trigger.

0 Kudos
Message 5 of 12
(1,060 Views)

Oh!!!  You're simulating a failure and you want to detect it!  I have to think on this - that was unexpected.  Thank you for the clarification.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 12
(1,043 Views)

Hi Vu,

 


@Vu_Anh wrote:
How to find holes in data? This data hole was created by me and I want to detect them in the software to execute the trigger.

Apart from understanding your approach to this by generating the faulty data on your own:

A simple approach might be to detect for sudden "jumps" in your signal by calculating the derivate and checking for large derivate sample values…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 12
(1,038 Views)

@billko wrote:

Oh!!!  You're simulating a failure and you want to detect it!  I have to think on this - that was unexpected.  Thank you for the clarification.


Because my data it's stable in one state. Thank you for your help, I look forward to hearing from you.

0 Kudos
Message 8 of 12
(1,013 Views)

@GerdW wrote:

Hi Vu,

 


@Vu_Anh wrote:
How to find holes in data? This data hole was created by me and I want to detect them in the software to execute the trigger.

Apart from understanding your approach to this by generating the faulty data on your own:

A simple approach might be to detect for sudden "jumps" in your signal by calculating the derivate and checking for large derivate sample values…


can you tell more about calculating the derivate and checking for large derivate sample values

0 Kudos
Message 9 of 12
(1,009 Views)

Hi Vu,

 


@Vu_Anh wrote:
can you tell more about calculating the derivate and checking for large derivate sample values

Did you learn some basic math at school?

Derivative is defined as dx/dt, so you calculate the difference between one sample and the next, then multiply by your sample rate (which is the same as 1/dt)…

You really ask "how to check for large values"? Ever looked at the comparison functions palette?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(1,000 Views)