# RMS Value for Ramp waveform

Discussion in 'General Electronics Chat' started by DumbDummy77, Jun 24, 2010.

1. ### DumbDummy77 Thread Starter Member

Jan 21, 2010
43
0
Hi

I have been debating with my friend about RMS Value and he is very confident that Vp*0.6/Root(2) is the correct way of measuring RMS on the ramp waveform.

The ramp waveform like on the figure 1 and firgure 3 from http://masteringelectronicsdesign.com/how-to-derive-the-rms-value-of-a-triangle-waveform/. I acknowledge the equations for RMS Value must be correct.

He wrote this down - the rms value of a triangle is 0.6 x peak by taking samples and doing Root Sum Squared on them. The rms of a discontinuous triangle waveform is this multiplied by the square root of mark-space ratio, which as the ratio is 0.5, is 1/ root 2

I am not entirely who is right or wrong now. Is there any is expert in calculating the rms for triangular waveform to defuse my debating with other guy?

Regards

MM

2. ### dsp_redux Active Member

Apr 11, 2009
182
5
Last edited: Jun 24, 2010
3. ### DumbDummy77 Thread Starter Member

Jan 21, 2010
43
0
Are you sure?

Why my friend's equation is different to your equation while my link also is different your. It is sooooo confusin!!!

4. ### dsp_redux Active Member

Apr 11, 2009
182
5
I was talking about a pure triangular waveform.

5. ### DumbDummy77 Thread Starter Member

Jan 21, 2010
43
0

Thank you but I am looking RMS value for the waveform in figure 1 which can found the Link I posted in the 1st thread

DD

Jul 7, 2009
1,585
141
While figuring out an RMS value of a periodic waveform via the analytic formula is fine, I'd like to let folks know there's another way. It's numerical, so you get less insight; however, you can get answers for problems you can't integrate, so it has some uses. Besides, it's very fast.

Basically, you need python and numpy. OK, you can do it without numpy, but numpy is such a fantastic computing tool that it's worth your time to learn it. Python is a general purpose interpreted programming language and numpy is a python library for doing numerical calculations with arrays of data (because it's a library written in C, it's very fast).

The first thing you need to do is get a sampled version of one period of the periodic waveform into a variable; let's call it y. Let's suppose y is a numpy array of one dimension.

OK, watch closely, as this is going to whoosh on by... Here's the calculation of the RMS value of the waveform:

Code ( (Unknown Language)):
1.
2. import numpy
3. rms = numpy.sqrt(sum(y*y)/len(y))
4.
If you want to verify you calculated the RMS for the right waveform, plot it with matplotlib:

Code ( (Unknown Language)):
1.
2. from pylab import *
3. plot(y)
4.
It just can't get much simpler than that. That's working code too, by the way...

Oh, here's the RMS value without numpy; here, y is a python list or tuple of the waveform's values:

Code ( (Unknown Language)):
1.
2. import math
3. rms = math.sqrt(sum([i*i for i in y])/len(y))
4.

7. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
782
$U_{rms}=V_p\sqrt{\frac{t_1}{3T}}$

$U_{rms}=V_p\frac{0.6}{\sqrt{2}}$

Equating these we have

$V_p\sqrt{\frac{t_1}{3T}}=V_p\frac{0.6}{\sqrt{2}}$

or

$\sqrt{\frac{t_1}{3T}}=\frac{0.6}{\sqrt{2}}$

Squaring both sides

$\frac{t_1}{3T}=\frac{0.36}{2}$

or

$t_1=\frac{3$$0.36$$}{2}T=0.54T$

So the mark-space ratio would be

$MS_{ratio}=\frac{t_1}{T-t_1}=\frac{0.54T}{T-0.54T}=1.174$

And the corresponding Duty Cycle would be

$\frac{t_1}{T}=0.54$

So I'm not sure what your friend is claiming