LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Am I calculating RMS correctly in my program?

I have this voltmeter instrument and am wondering if I can do RMS properly like this or do I have to put a certain amount of them in an array over time and then do the calculation? 

 

a47e126d613d0d6bb9db5f69f2c1eaf9.png

 

Outside of this case is just one continuous loop. I did not include the whole program because it is huge but I can if need be.

Message 1 of 7
(2,383 Views)

RMS of a scalar is pretty boring. We cannot tell what's in the dynamic data and why you are reducing it to a scalar.

 

(Code pictures are almost useless, especially if they contain express VIs and dynamic data. No way to tell what's inside!)

 

You might be interested in the ptbypt RMS function, but your code is too confusing to tell if that's appropriate.

Message 2 of 7
(2,368 Views)

I don't understand where the multiply by 10 is coming from.  Otherwise, it looks like it should be fine.  Though, I would just use the Basic Averaged DC-RMS.vi, which calculates the Mean and the Std Deviation on a waveform.  I am just not a fan of pretty much every Express VI.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 7
(2,361 Views)

Thank you for replying! I have included a mock replica of my program without all the other stuff, just the main loop and the voltmeter part. I hope that helps you understand what I'm trying to do.

0 Kudos
Message 4 of 7
(2,348 Views)

crossrulz, will that work with an AC signal?

0 Kudos
Message 5 of 7
(2,342 Views)

@crash_override wrote:

crossrulz, will that work with an AC signal?


That's what I've used it for.  If your signal has a "large" DC component, you really should calculate the Mean (which gives you the DC Offset), subtract that value from the waveform, and then calculate the RMS.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(2,329 Views)

@crossrulz wrote:

@crash_override wrote:

crossrulz, will that work with an AC signal?


That's what I've used it for.  If your signal has a "large" DC component, you really should calculate the Mean (which gives you the DC Offset), subtract that value from the waveform, and then calculate the RMS.


I believe you can just take the Population Standard Deviation and not worry about subtracting the mean. The Population Standard Deviation and AC RMS are equivalent.

 

mcduff

Message 7 of 7
(2,292 Views)