LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Constant value period within a number of data points

I am reading a set of data points. I define a tolerance range. How can i say that the vale readings are now constant.

For example the data points are like


10.9
10.8
11.1
11.3
11.4
11.4
11.5
11.6
11.5
11.7
12.0


tolerance range = 0.1

So I should know the point at which temperature is constant. How can i find this one?

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 13
(3,947 Views)

Hi Nghtcrwlr

 

Lets see if I understand you correctly:

1. You read a number of values

2. When the valuechange between values is less than the tolerance level you want to do something?

 

Is that correct? If so you compare the value with the previous one. If the difference is less than the tolerance for a certain number of comparisons it should be constant, right?

 

Best Regards

 

David

NISW

Message 2 of 13
(3,937 Views)

Nghtcrwlr wrote:

I am reading a set of data points. I define a tolerance range. How can i say that the vale readings are now constant.

For example the data points are like


10.9
10.8
11.1
11.3
11.4
11.4
11.5
11.6
11.5
11.7
12.0


tolerance range = 0.1

So I should know the point at which temperature is constant. How can i find this one?


If you thresholds are arranged in a increasing seq (sorted) yu hcan use the threshold 1d array and it returns the index.

 

YOu could alsow subtract your reading from each value in your array of thresholds and then use the array max min on the abosulte difference. The index of the min will give you the index of your threshold.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 13
(3,933 Views)

Hi Nghtcrwlr,

 

I used to collect a certain number of measurement values in an array (lets say 10 values), the taking max(array)-min(array), then comparing the difference with my tolerance value. If difference is smaller than threshhold, measurement value is considered constant...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(3,921 Views)

Nghtcrwlr,

 

Do you consider any portion of the sample data you included in your original post to be stable? The two consecutive 11.4s or the 11.5, 11.6, 11.5 sequence?

 

The data you posted looks to me like it has a drift.  Please post some data which contains a segment you consider to be stable and mark or indicate which parts are the stable segments.

 

If your concept of stability can be well defined mathematically, it is probably not very difficult to implement its detection in LV.

 

Lynn 

0 Kudos
Message 5 of 13
(3,919 Views)
I tried something for you
Message 6 of 13
(3,916 Views)

Hello everyone.... Give me som time to get some actual readings. The readings are not in an order , i.e sometimes it is 11.3, 11.4 and then the next reading could be 11. 3 again. so I need to know where the reading is almost constant depending on the tolerance range.

 

I ll let u know if some progress is there.. thankss

 

Ngtcrwlr

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 13
(3,888 Views)
I've done an identical thing as GerdW mentioned for a PID heater controller application. A simple "sliding" data scheme of the last N samples. In this case the tolerance is 0.0001 degC.
0 Kudos
Message 8 of 13
(3,875 Views)

 


Hello everyone.... Give me som time to get some actual readings. The readings are not in an order , i.e sometimes it is 11.3, 11.4 and then the next reading could be 11. 3 again. so I need to know where the reading is almost constant depending on the tolerance range.

 

I ll let u know if some progress is there.. thankss


 

 

Did you try my vi? Is it atleast close to what u want?

Message 9 of 13
(3,861 Views)

Hi muks

 

I could not open ur Vi since am having LV7. And moreover i changed the whole algorithm. Now i need not want to find the steady state.

 

But could you please convert it to LV7, so that i can have a look..

thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 10 of 13
(3,772 Views)