LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measuring when a signal reaches equilibrium

I have a thermocouple signal that increases and then flattens off reaching an equilibrium, at this point I would like to do some calculations using the amplitude of this equilibrium level. I wondered what vi's are the best in order to do this sort of mathematics, Any questions should I stick the data through a low pass/smoothing filter and then differentiate remove the initial flat level (baseline at beginning) as the dT/dt increases I wait until it goes back to zero which would suggest that its reached equilibrium. Any one got any example code or suggest some vi's I should look at?

Nice
0 Kudos
Message 1 of 2
(2,502 Views)

I view TC signals as very susceptible to noise glitches, so I'd want to make myself pretty insenstive to such outliers, or find a way to remove them first.  An outline of the kind of thing I've done in the past:

1. Calc mean and std dev, then identify all points > 3*std dev's from mean.  Remove them.  (Personally, I'd make sure I used a population of >100 samples to start with).  If more then, say, 5% of the population was removed, I'd acquire a new set of samples and start over with step 1.

2. On the remaining data, find the best fit straight line and evaluate the slope.  If avg temp rate-of-change too large, return to step 1.  If flat enough, continue.

3. Calc an average value of remaining data.  With noise--susceptible data, I tend to prefer using a Median rather than a Mean.  When the actual data is pretty well-behaved, the two types of average are very similar.  Median are much less sensitive to glitches though.

Your filter idea could also work if you have a low enough cutoff freq and high enough attenuation rate to truly squelch the glitches.  I don't think I've got the best intuition about filter choices and settings.  I've gotten good results quicker with my brute-force approach, probably because I have a better intuitive feel for it.  If you're good with filters, that's probably a better technical solution.  I'd still recommend a best-fit line over dozens of samples as a simpler measure of average slope.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 2
(2,493 Views)