From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the standard deviation of the mean (SDOM)?

I am trying to do 'online' uncertainty calculations for my measurements whilst my experiment is running. I have a mathscript node which works out all the systematic uncertainties. I also need to get the random uncertainties, and to do this I've got a separate loop running which does a running average, RMS and standard deviation of the mean (SDOM = RMS / sqrt(N)) calc. So far I've been doing this 'manually' using a shift register. However I know that the 'Basic DC/RMS' and 'Average DC/RMS' vi's would probably be an easier way to do this, certainly to get the mean and RMS. However does anyone know how I would extract the SDOM using these vi's? In order to do so I would need to know the number of data points (N) over which the mean and RMS had been calculated by the vi. Help!

 

0 Kudos
Message 1 of 8
(3,918 Views)

Is 'Array Size(s)' what you're looking for?

 

Felix 

0 Kudos
Message 2 of 8
(3,914 Views)
Possibly, but the vi returns only the average and RMS values, not all the working values inside, if you see what I mean. I would need to hack inside the vi (which I would rather not do).
0 Kudos
Message 3 of 8
(3,912 Views)

Why would you need to hack into the vi? You can get the number of points by the array size function, use the sqrt funtion and dived the RMS output by that value.

 

Felix 

0 Kudos
Message 4 of 8
(3,906 Views)
I think you're misunderstanding. Let's say for simplicity that I am trying to find the SDOM of a single variable. The output of the DC/RMS vi will not be an array, it will just be a single variable that changes each time the loop repeats. So I cannot find out 'N' by using the array size function..
0 Kudos
Message 5 of 8
(3,903 Views)

But the input of RMS/DC.vi is an array. Or how else the 'N' is defined?

 

Felix 

0 Kudos
Message 6 of 8
(3,901 Views)
Sorry, yes, that's correct you do need to feed in an array, however I also believe the vi has history which means that it stores (and averages) data over a longer time period than the array size you send it. The time period for averaging is settable in the more complex version of the vi.
0 Kudos
Message 7 of 8
(3,884 Views)

From the help

 

default is –1.00, corresponding to average time = input block duration.

 

Felix

0 Kudos
Message 8 of 8
(3,863 Views)