DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

RMS calculation

Hi,
 
I would like to know how I could calculate the RMS value of the data in a channel. DatCha_1 contains the time data and Dat_Cha_2 the acceleracion data measured by a device. I need to calculate the RMS value corresponding to each second, but I am not sure how I can do it using the RMS option and the RMSWidth value as percentage if I know that there are, for example 10585 points in time channel, DatCha_1, corresponding to 44.1 seconds.
 
It would be gratefuf if someone could send me some information or an example of how I could calculate the RMS value corresponding to each second.
 
Regards,
 
 
Koniker
0 Kudos
Message 1 of 9
(7,626 Views)
Hello Koniker,

the ChnRMS function is moving an intervall along the curve, to calculate the RMS value using an integral. The width of the interval can be changed, that means the number of values that are used for calculating each RMS value, but the number of calculations is not a changable parameter.
The result channel will contain one value for each data point an is that is why matching  the original time channel.
If you need less values in the result channel you will need to reduce the result channels either with a linear interpolation or a reducing classification.

regards
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 2 of 9
(7,611 Views)
Dear Ingo,
 
I am not sure about your answer. Well, I need an script as solution. Imagine, the time data is collected in a channel, DatCha_1. There are 1000 points corresponding to 10 seconds. I have the corresponding aceleration data, in Dat_Cha_2, that is, 1000 acceleration points. So, I need to calculate the RMS values for each second, that is, the resulting channel length should be 10.
 
If I use ChnRMS, the parameters should be :DatCha_1, DatCha_2, Resulting channel of length 10, and RMSWidth. What  sholud be RMSWidth value? What about linear interpolation or a reducing classification that you mention? Could you please send me a little example of the script I would need to solve the problem?
 
Regards,
 
Koniker
0 Kudos
Message 3 of 9
(7,596 Views)
Hello Koniker,
this is about what I tried to describe. Just run the script and have a look at the generated channels:
Call DATADELALL(1)                    
Call CHNLINGENIMP("GenImplicit",1000,1,0.01)
Cn(1)="Time"

Call FormulaCalc("ch(#)            :=  sin(ch(1)*10)*ch(1)")
Cn(2)="Data"

Call CHNRMS(1,2,3,10)                 
cn(3)="continuous RMS"

CLASSNO          =10
CLASSBEGIN       =1
CLASSWIDTH       =1
Call CHNCLASSXREDXY(1,1,3,"NoBeginWidth","Mean",0)
cn(4)="XChannel average RMS"
cn(5)="average RMS per second"

Regards

Message Edited by IngoS on 01-05-2006 09:01 AM

Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 4 of 9
(7,593 Views)

Dear Ingo,

 

I will try your suggestion. Thanks.

 

Regards,

 

Koniker

0 Kudos
Message 5 of 9
(7,580 Views)
Hi,

There are two additional ways to calculate the RMS-Value of intervalls.

The Reducing Classification (statistics) is able to do some calculations for intervalls of a channel. It is not possible to calculate the RMS directly, but the mean value is available.

1. Calculate the square of your channel
2. Calculate the mean of the intervalls with the reducing Classification
3. Calculate the square root of the result which has just one value per intervall.

The other way to get your result is to cut the channel into peaces. You have to do this for the calculation of the regression anyway. It is easy to calculate the RMS together with the regression. Use "Statistical characterisic values" (quadratic mean).
0 Kudos
Message 6 of 9
(7,565 Views)

Hello,

I have the FFT results of an acceleration vs. time history.  The peak acceleration amplitudes are in germs of G_RMS. I was wondering if there is a way to obtain real amplitude values by Diadem?

Thanks

0 Kudos
Message 7 of 9
(6,889 Views)
Hi,

Short answer:
You just have to multiply the FFT-Result with the square root of 2.

Long answer:
The rms value of a sinus is always the peak value devided by square root of 2. If you calculate the FFT of a random signal, you get a number of sinusfunctions. They are defined by the frequency, the amplitude and a phase displacement. Usually you just use a graph showing the amplitudes over frequency. Each point of your FFT is the amplitude of a sinus and you just need the factor of square root of 2 to change between rms and peek.

The FFT-function of DIAdem gives you the choise between peak and rms results. Other choises are autospectrum (the power of peak) and powerspectrum (the power of rms).


0 Kudos
Message 8 of 9
(6,873 Views)

Hello,

Thanks for the answer. I was wondering why RMS is used instead of the real peak value.

Cheers

 

0 Kudos
Message 9 of 9
(6,858 Views)