LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get RMS of triangle wave

Solved!
Go to solution

I am metering an AC voltage signal using a cRIO and 9206.  The signal is a triangular wave and I need to get the RMS of this triangle wave.  It seems the Cycle Average RMS VI in labview only does sinusoidal wave forms.  There is an option between peak/histogram/auto where auto gives a "reasonable answer" for a triangle wave.  I need a more precise answer.   I can write a custom vi grabbing the peaks of the triangle wave then dividing by sq.rt(3), but this is a lot of work.  Was hoping Labview had one programmed already.  Thanks for your help.

 

-phdieum

0 Kudos
Message 1 of 22
(2,635 Views)

Why do you say the VI only works on sinusoids? Did you test it?

 

 

 

 

What does your "triangle" wave actually look like?

0 Kudos
Message 2 of 22
(2,626 Views)

Hello,

 

Cycle Average RMS VI is calculating RMS of the one selected period of the given signal (unless specified differently with number of cycles) - if you have a lot of data to analyze and want to calculate RMS of all data, I recommend you to use RMS VI. VI takes array of Double, and make an RMS calculation on them, outputting RMS in double.

 

Please let me know if this solution was appropriate for your problem.

 

Best Regards,

Gregor Černe

0 Kudos
Message 3 of 22
(2,619 Views)

Sorry, I should have specified.  My triangle wave is not a perfect wave like the one shown above.  I would like to use the RMS.vi for all of my signal data, but it assumes sinusoidal by dividing by sq.rt (2) whereas with the triangle wave I need to divide by sq.rt(3). 

0 Kudos
Message 4 of 22
(2,602 Views)

Unfortunately my signal's peak is dynamic, so I can't just take the peak / sq.rt(3).  I have to take an average of the peaks over time, then divide by sq.rt(3). 

0 Kudos
Message 5 of 22
(2,597 Views)

When you say the "RMS" VI are you still referring to the Cycle and Average RMS, or to the RMS VI? Either way, neither of these VIs does any sort of dividing by the sqrt(2). It calculates the RMS value based on the definition of RMS. Please read the Help on those functions before claiming a VI works a certain way.

 

Please post an example of what your waveform looks like. No pictures - actual data.

0 Kudos
Message 6 of 22
(2,586 Views)

I was referring to the RMS.VI in my last post.  My apologies, I understand the RMS.VI is just calculating the RMS, which is fine for my sinusoidal waveform.   I suppose what I am looking for is how to calculate the TRUE RMS of the triangular wave I am metering.   I am not next to my workstation, but I will post my waveform asap.  I do appreciate all of your help and I apologize since I am new to the labview environment.   

0 Kudos
Message 7 of 22
(2,575 Views)

smercurio_fc:

 

Attached you will find the AC signal that I am trying to capture.  Using a Klein CL2000 DMM, I am able to accurately read the TRUE RMS voltage of this signal.  My question is how to program Labview to accurately interpret this signal.  Using RMS.vi does not work on this signal.  I am able to get close by extracting the peaks from the signal, averaging them, then dividing by sq.rt(3).   Is there a better more accurate way to measure the TRUE RMS of this signal?  Again, I appreciate your help and time.

 

-JLG  


Download All
0 Kudos
Message 8 of 22
(2,519 Views)

First of all, it is important to note that the Vp/sqrt(2) or Vp/sqrt(3) results assume the RMS operation is being performed on an integer number of periods.  To improve your estimation you should be measuring the frequency and then clipping the input to the RMS VI to be equal in length to an integer number of periods.

0 Kudos
Message 9 of 22
(2,511 Views)

@phdieum wrote:

Sorry, I should have specified.  My triangle wave is not a perfect wave like the one shown above.  I would like to use the RMS.vi for all of my signal data, but it assumes sinusoidal by dividing by sq.rt (2) whereas with the triangle wave I need to divide by sq.rt(3). 


No this is not correct.It takes the sqrt of the sum of the squares of the elements divided by n

 

1.png

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 22
(2,509 Views)