LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga: DC-RMS Measurement vi

Solved!
Go to solution

Hi experts!

 

Can anybody tell me, how the "DC-RMS Measurements.vi"  works? More specifaclly, I would like to know if it returns a moving average or does it work on blocks of data, like averaging lets say over 1000 samples and returning only one value/1000samples ...

 

Best wishes,

 

Luke

0 Kudos
Message 1 of 6
(3,769 Views)

Hi BrainDrain.

 

This VI only takes a single sample of data at every time, so it seems to be calculating a moving average. In its configuration window you can set the measurement time and the expected sample rate, so you can define the actual number of measurements samples. Once the number of samples which has passed through your system is getting closer to this "number of measurement samples" the accuracy will get better. You can use "output valid"  to check. 

 

Regards!

 

 

0 Kudos
Message 2 of 6
(3,747 Views)
Solution
Accepted by topic author BrainDrain

I think you're referring to the DC and RMS Measurements VI on the FPGA Math & Analysis palette?  That one operates on blocks (or frames) of data, so it will return one valid output for every N inputs. As agomez mentioned, you can verify this by monitoring the output valid signal while executing in Simulation mode or under My Computer.

 

A continuous averaging measurement would be handy, but also requires storing the entire frame so you can subtract out the effect of the oldest point when it leaves the window.

0 Kudos
Message 3 of 6
(3,733 Views)

Storing the past N values is not much different in terms of resource than taking the N values of input.   An RMS calculation is not terribly difficult depending on how they implement the root function.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 4 of 6
(3,710 Views)

Thanks all for the replies!

 

Indeed  the DC-RMS.vi did not return the moving average. After beeing reminded to use the "execute on DevelopmentComputer"-mode, I quickly verified it with the script below. It returns the average/RMS/... of the numbers of samples specified during set up. It keeps this result until the next full sample is acquired...

 

Sorry for posting a trivial question...

 

Best wishes

0 Kudos
Message 5 of 6
(3,686 Views)

@sth wrote:

Storing the past N values is not much different in terms of resource than taking the N values of input.   An RMS calculation is not terribly difficult depending on how they implement the root function.


It's different in requiring BRAM or distributed RAM to store the N values. This was a bigger deal at the time it was written, both in terms of RAM availability and G language support for it. For the newer targets, not so much.

0 Kudos
Message 6 of 6
(3,679 Views)