LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analyze measurements, detect when signal is stable

Hi everybody,

I'm new to the "Analyze"-VIs and hope for anybody's help: )

I would like to detect the time, when my measurements become stable (when they have nearly the same value over a certain time period), when there is no overshooting anymore corresponding to the final value. Do you know what I mean?

I get some values over the time, at the beginning they are very small (say zero), then there is a sharpe increase, after that they decrease a little and rise again, etc. until they become stable (until the derivative is zero). And I would like to detect that moment.

Is there a special vi for this application available?

Thanks in advance.

Steffi
0 Kudos
Message 1 of 7
(6,454 Views)
Steffi,

There are some pulse measurement VIs, but most likely you will need to write your own.

A zero derivative may not be the best criterion for detecting "stability." The derivative will be zero at the peak of the overshoot, at the valley following the peak, at the very beginning and perhaps at various other times.

Without more details on your waveform it is hard to be specific, but I would probably use a threshold to detect the sharp rise and then look for the value to stay within some limit of a mean value. There are some limit testing VIs, but I have not used them and do not know how suitable they would be for your application.

There will always be some lag between the actual onset of stability and the detection of it because the signal must remain stable for some time before it can be determined that it is truly stable. How much delay can you tolerate?

What happens after you detect the moment of the onset of stability? Does the program control something or is this simply an analysis after the data is collected? Does the amplitude of the stable region vary from measurement to measurement or is it predictable? What is the signal to noise ratio?

Lynn
Message 2 of 7
(6,450 Views)
Hi Lynn,

thank you very much for your help.
You're right, the zero derivative doesn't seem to be a good criterion for detecting stability.
Your idea sounds good (detecting the sharp rise and then look for the value to stay within some limit of a mean value), but the amplitude of the "stable value" vary from measurement to measurement (it's not predictable). So we don't know which mean value is our aim and therefore we can't set a limit, can we?

The program controls a device: After LV detects the moment of the onset of stability the device does the next step, then LV again takes measurements and the device needs to know the moment of the onset of stability again to do the next step and so on...

The signal to noise ratio is very small I think.

I would be really happy if you could post some small examples (LV 7 or 😎 if you have any special ideas (it's unknown territory for me: ( ...)

Thank you very much in advance.

Steffi
0 Kudos
Message 3 of 7
(6,426 Views)
Hi Lynn,

just an addition, may be helpful:

the signal should be stable for about 30 sec before the device does the next step. With a sampling rate of 1 measurement value/2sec we get 15 values which should satisfy the criterion...

Steffi
0 Kudos
Message 4 of 7
(6,418 Views)
Steffi,

Thirty seconds is a long time for the computer, so you should be able to find something which works.

How long does it take to stabilize (when you look at the data on an oscilloscope or chart recorder)? Is it 1-2 seconds or does it take 27 seconds? Can you post some data? Ideal would be if you took one of the data acquisition examples (graphing), ran it until you have a display of some typical data, then Make Current Values Default and save as with a new name (you don't want to modify the examples). Then post the modified VI so we can see the data. It is much easier to make suggestions when we can see actual data. A .png or .jpg image of a display of the data would be useful if you cannot post a VI with the data. Please avoid .bmp files as as they tend to be very large.

Lynn
Message 5 of 7
(6,407 Views)
Hi Lynn:

during our last test we didn't wait until it stabilizes, that's why I can't say for sure how long it would take to stabilize. But we think that it takes a time of about two minutes.
Well, as I said, we unfortunately don't have any measurements which show the process of stabilizing, but we know that it would look like a unit step response of a PT2 (for an example please have a look at the following link)

http://www.mathworks.com/matlabcentral/files/10906/stepshape.png

In our case there will be probably more and bigger overshoots.

Hope this helps and thanks a lot!

Steffi


0 Kudos
Message 6 of 7
(6,398 Views)
Steffi,

I think I misunderstood earlier. You want it to be stable for 30 seconds.

After the sharp rise, put the data you collect into a circular buffer which can hold 30 seconds of the most recent data. Define your stability criteria in terms of the initial voltage before the sharp rise and the maximum overshoot peak voltage. In the stepshape.png you posted earlier the stability would be about 2% of the peak to baseline value. (That image shows 2% of top stable value to baseline, but the difference is small and the peak is much easier to calculate.) After each value is placed into the circular buffer, check to see if all values are within the limits. If they are, then it is stable. If not wait for the next value and repeat.

I have attached a circular buffer VI which uses a queue of limited size and a simple stability checker VI in version 8.0. These alone will not do everything you need but may give you some ideas and a starting place.

Lynn
Message 7 of 7
(6,389 Views)