## RMS of a triangle wave???

### RMS of a triangle wave???

This is buggin' me coz I have a feeling that the answer is simple. I have an AC triangle wave alternating between +5 and -5 but no time scale (ie no frequency!) given, so what is its RMS value?<p>B)

"Nothing is true, all is permitted" - Hassan i Sabbah

### Re: RMS of a triangle wave???

Hello Mr Bwtz,<p>To get the rms of a triangle a shortcut is

to divide the peak by the square root of 3.<p>Vrms=Vp/sqrt(3)=Vp/1.732

where

Vp=Vpp/2<p>As a side note, "rms" stands for

"The ROOT of the MEAN of the SQUARE"

where

the Square is simply the waveform squared,

the Mean is simply the average,

and the Root is simply the square root.<p>Taken together,

[1]

First you form the square of the wave, which

results in a second wave.

[2]

Then you calculate the mean of that resulting wave found in step 1.

[3]

Lastly, you take the square root of the mean

value calculated in step 2.<p>Normally when you calculate the mean of the

square of the wave you have the square of the

wave in the form of an equation and you use

integration to get the mean of one period, but

you can also use small steps in the time

variable to go through the wave and add up all

the results of the squaring, then divide the sum

up by the length of time of one period, then

take the square root and you have the answer to

a good degree of accuracy. This method is good

for any wave that is periodic, not only

those of a specific form such as triangle.<p>

As a quick example, lets use the equation

y=x to represent a triangle wave. To make

this appear periodic, we'll use x values from

0 to 1 and assume that the wave repeats

(even though in this form it really doesnt).<p>Taking the square of the wave is easy:

The wave squared is y^2 = x^2 or x*x<p>Taking the integral of x^2:

integ(x^2, from x=0 to 1)=0.3333333

Then divide by the period (1):

0.3333333/1=0.3333333<p>Taking the square root of 0.3333333:

sqrt(0.3333333)=0.57735<p>So the rms value of this wave (a triangle)

is 1/sqrt(3), which is the Vp/1.732 as above.<p>

Take care,

Al

to divide the peak by the square root of 3.<p>Vrms=Vp/sqrt(3)=Vp/1.732

where

Vp=Vpp/2<p>As a side note, "rms" stands for

"The ROOT of the MEAN of the SQUARE"

where

the Square is simply the waveform squared,

the Mean is simply the average,

and the Root is simply the square root.<p>Taken together,

[1]

First you form the square of the wave, which

results in a second wave.

[2]

Then you calculate the mean of that resulting wave found in step 1.

[3]

Lastly, you take the square root of the mean

value calculated in step 2.<p>Normally when you calculate the mean of the

square of the wave you have the square of the

wave in the form of an equation and you use

integration to get the mean of one period, but

you can also use small steps in the time

variable to go through the wave and add up all

the results of the squaring, then divide the sum

up by the length of time of one period, then

take the square root and you have the answer to

a good degree of accuracy. This method is good

for any wave that is periodic, not only

those of a specific form such as triangle.<p>

As a quick example, lets use the equation

y=x to represent a triangle wave. To make

this appear periodic, we'll use x values from

0 to 1 and assume that the wave repeats

(even though in this form it really doesnt).<p>Taking the square of the wave is easy:

The wave squared is y^2 = x^2 or x*x<p>Taking the integral of x^2:

integ(x^2, from x=0 to 1)=0.3333333

Then divide by the period (1):

0.3333333/1=0.3333333<p>Taking the square root of 0.3333333:

sqrt(0.3333333)=0.57735<p>So the rms value of this wave (a triangle)

is 1/sqrt(3), which is the Vp/1.732 as above.<p>

Take care,

Al

LEDs vs Bulbs, LEDs are winning.

### Re: RMS of a triangle wave???

Mr. AI is correct, although I can not help myself but add the following. A triangle wave is often refered to as a sawtooth wave and consists of two triangles. And to change his notation from x and y to t and y. The integration takes place over the period (Tau) over the two parts of the triagle defined as

y = t from t = 0 to t = Tau/2 and

y = -t from t = Tau/2 to t = Tau. Square 'em and

integrate t^2 and (-t)^2 from 0 to Tau/2 and Tau/2 to Tau respectively.

The result is t^3/3 evaluated from 0 to Tau/2 +

t^3/3 evaluted from Tau/2 to Tau which equals

Tau/6 + Tau/6 = Tau/3.

This result is averaged over the period Tau resulting in 1/3, take the sqrt() and Mr. AI's correct answer pops out.

The slope of Mr. AI's triangle is 1 that is not necessarily the case for all triangle waves. I think the general solution for a sawtooth wave rms value is

m/sqrt(3) where m is the slope of the triangles.

-Rick

y = t from t = 0 to t = Tau/2 and

y = -t from t = Tau/2 to t = Tau. Square 'em and

integrate t^2 and (-t)^2 from 0 to Tau/2 and Tau/2 to Tau respectively.

The result is t^3/3 evaluated from 0 to Tau/2 +

t^3/3 evaluted from Tau/2 to Tau which equals

Tau/6 + Tau/6 = Tau/3.

This result is averaged over the period Tau resulting in 1/3, take the sqrt() and Mr. AI's correct answer pops out.

The slope of Mr. AI's triangle is 1 that is not necessarily the case for all triangle waves. I think the general solution for a sawtooth wave rms value is

m/sqrt(3) where m is the slope of the triangles.

-Rick

### Re: RMS of a triangle wave???

Thanx this has freed some extra space in my thought processes (not that things like this keep me awake at night u understand )<p>B)

"Nothing is true, all is permitted" - Hassan i Sabbah

### Re: RMS of a triangle wave???

Hello again,<p>Sorry rosborne, but Vp/1.732 is correct for

triangles and sawtooth waves.

Perhaps i misunderstood the point you were

trying to make?<p>The only difference for waves that appear

above the time axis and also touch it

(such as a sawtooth rising from 0 to 5v

and back to zero) is that Vp is taken as

the height of the triangle, not the Vpp/2 .<p>For a triangle sawtooth that rides above

zero, there is also a trick:<p>Vrms=sqrt[Vrmst^2+Vp*Vd]

where

Vrmst is the rms value of the sawtooth as if

it was sitting on the time axis (0vdc)

and

Vp is the max height of the triangle

and

Vd is the min height of the triangle.<p>That trick was derived from knowing that the

total rms value of a wave is equal to the

square root of the sum of the squares of the

individual component rms values.<p>Also, for waves that have a duty cycle where

part of the wave is at zero for some time,

you can multiply the triangle rms value (taken

alone for it's time duration) by the square root

of the duty cycle to get the true rms value.

For example a triangle that is 'on' for only

half the time would have it's rms value (taking

the triangle alone) multiplied by sqrt(0.5) to

get the true rms of the entire wave.<p>BACK TO THE ORIGINAL QUESTION<p>In the simple case where the triangle runs

equally plus and minus above and below the

time axis (as was the original question) the

rms value is simply the peak value divided by

the square root of three, where the peak value

is obtained by dividing the peak to peak value

by two.<p>Take care,

Al

triangles and sawtooth waves.

Perhaps i misunderstood the point you were

trying to make?<p>The only difference for waves that appear

above the time axis and also touch it

(such as a sawtooth rising from 0 to 5v

and back to zero) is that Vp is taken as

the height of the triangle, not the Vpp/2 .<p>For a triangle sawtooth that rides above

zero, there is also a trick:<p>Vrms=sqrt[Vrmst^2+Vp*Vd]

where

Vrmst is the rms value of the sawtooth as if

it was sitting on the time axis (0vdc)

and

Vp is the max height of the triangle

and

Vd is the min height of the triangle.<p>That trick was derived from knowing that the

total rms value of a wave is equal to the

square root of the sum of the squares of the

individual component rms values.<p>Also, for waves that have a duty cycle where

part of the wave is at zero for some time,

you can multiply the triangle rms value (taken

alone for it's time duration) by the square root

of the duty cycle to get the true rms value.

For example a triangle that is 'on' for only

half the time would have it's rms value (taking

the triangle alone) multiplied by sqrt(0.5) to

get the true rms of the entire wave.<p>BACK TO THE ORIGINAL QUESTION<p>In the simple case where the triangle runs

equally plus and minus above and below the

time axis (as was the original question) the

rms value is simply the peak value divided by

the square root of three, where the peak value

is obtained by dividing the peak to peak value

by two.<p>Take care,

Al

LEDs vs Bulbs, LEDs are winning.

### Re: RMS of a triangle wave???

Mr. AI said,

>Sorry rosborne, but Vp/1.732 is correct for

>triangles and sawtooth waves.

Perhaps i misunderstood the point you were

trying to make?

>Sorry rosborne, but Vp/1.732 is correct for

>triangles and sawtooth waves.

Perhaps i misunderstood the point you were

trying to make?

### Re: RMS of a triangle wave???

Whoops, and<p>Mr AI, I have no idea what you could be sorry about. I thought that what I wrote complemented and expanded on what you wrote. I even came up with the exact same answer Vp/sqrt(3) = Vp/1.732 although I see that I forgot the Vp.<p>As far as what happens when there is a DC component I think you can use superposition and just add the DC value. But maybe I'm mistaken. And, of course, i agree that the triagle or sawtooth is sitting on the 0V line.<p>The duty cycle stuff lost me. I'll have to look at it more closely later. Looks like a trick I'd like to know.<p>Sorry if miscommunicated or irritated,

Rick

Rick

### Re: RMS of a triangle wave???

The RMS voltage can be viewed as the DC voltage which, when applied to a resistor, will produce the same heating effecting as a complex waveform applied to the same resistor. Some RMS voltmeters actually use thermal conversion to measure the RMS value.<p>The power is proportional to the square of the applied DC voltage. If the waveform is only applied one half of the time, the heating effect is one half. Producing one half the heating effect means dividing the DC voltage by the square root of two instead of two. This is the basis for the RMS voltage being proportional to the square root of the duty cycle.<p>In general, adding two waveforms using the root-sum-of-squares of the RMS value is not valid. Consider two waveforms, each consisting of 1 volt DC, and thus 1 volt RMS. Adding these with a root-sum-of-squares would give a value of 1.414 volts RMS. The actual sum is a DC level of 2 volts, which is also 2 volts RMS.<p>If the waveforms do not overlap, then the root-sum-of-squares addition is probably valid. This is a special case however. Consider two 1 volt pulses of 50% duty cycle. The RMS value of each pulse is .707 volts. If the two pulses do not overlap, they provide a constant 1 volt level. This is the same answer that would be given by a root-sum-of-squares addition. If the pulses coincide, they form a 2 volt pulse of 50% duty cycle. This would have an RMS value of 1.414 volts, which is not the result of a root-sum-of-squares operation.

### Re: RMS of a triangle wave???

Hello again Rick and hello stephen,<p>Rick:

I thought you were trying to say that the RMS value was

equal to the slope m divided by the square root of three

because you said that you thought that was the general

solution to a sawtooth. I liked your idea about

integrating from -T/2 to T/2 though.

The duty cycle shortcut was derived directly from

the integral equation for calculating rms.<p>stephen:

I liked to hear your ideas about the reasoning behind some

of the shortcuts used in calculating rms values, but what on

earth would make you want to add two separate waveforms by

using the root-sum-of-squares method?<p>

Take care,

Al

I thought you were trying to say that the RMS value was

equal to the slope m divided by the square root of three

because you said that you thought that was the general

solution to a sawtooth. I liked your idea about

integrating from -T/2 to T/2 though.

The duty cycle shortcut was derived directly from

the integral equation for calculating rms.<p>stephen:

I liked to hear your ideas about the reasoning behind some

of the shortcuts used in calculating rms values, but what on

earth would make you want to add two separate waveforms by

using the root-sum-of-squares method?<p>

Take care,

Al

LEDs vs Bulbs, LEDs are winning.

### Re: RMS of a triangle wave???

Sometimes a complex waveform can be considered as the sum of several simpler waveforms. If there was a consistent rule for summing RMS values, this would make calculating the RMS value easier. One example would be adding a DC offset to a waveform whose RMS value is known. A root-sum-of-squares calculation is simpler than calculating the RMS value by integration. Unfortunately, the root-sum-of-squares is not always valid.<p>An example of a composite waveform would be the current in a deflection yoke in a television set or computer monitor. This is a sawtooth during the trace period and a sine wave during the retrace period. Both these waveforms have known RMS values. The overall RMS value can be computed by using these previously known results, weighted by the duty cycle of each waveform. This is easier than calculating the integral of the squared waveform.<p>The RMS voltages of uncorrelated noise sources do add in a root-sum-of-squares fashion. If the noise sources are correlated, the RMS voltage of the combined waveforms is higher, depending on the degree of correlation.

### Re: RMS of a triangle wave???

Hello stephen,<p>Sorry if i didnt make it clear, but i had said:<p>"That trick was derived from knowing that the

total rms value of a wave is equal to the

square root of the sum of the squares of the

individual component rms values."<p>I assumed that most readers would understand that

'component' means "Fourier component", which is

NOT the same as two separate waveforms. You got

me wondering why you would add two dc values to

try to somehow disprove this important

conclusion, which cannot be disproved by adding

two dc voltages or currents as you did.<p>In any case, let me restate this so it becomes

more clear...<p>"The rms value of a waveform is equal to the

square root of the sum of the squares of the

individual Fourier component rms values."<p>Does that make this more clear to you now?<p>I was going to recommend using the integral

anyway because of the misunderstandings that

sometimes come up when trying to use shortcuts

like this.<p>

Take care,

Al

total rms value of a wave is equal to the

square root of the sum of the squares of the

individual component rms values."<p>I assumed that most readers would understand that

'component' means "Fourier component", which is

NOT the same as two separate waveforms. You got

me wondering why you would add two dc values to

try to somehow disprove this important

conclusion, which cannot be disproved by adding

two dc voltages or currents as you did.<p>In any case, let me restate this so it becomes

more clear...<p>"The rms value of a waveform is equal to the

square root of the sum of the squares of the

individual Fourier component rms values."<p>Does that make this more clear to you now?<p>I was going to recommend using the integral

anyway because of the misunderstandings that

sometimes come up when trying to use shortcuts

like this.<p>

Take care,

Al

LEDs vs Bulbs, LEDs are winning.

### Re: RMS of a triangle wave???

AI, <p>You are right about the slope thing, that was a half baked idea that occured to me while I was defining the shape of the triangle. I forgot that the slope of the triangle wave has an impact on the period of the waveform. I came up with an idea that you rightly called me on because it was BS. Thanks, once again I learn something that I already thought I knew, only better. . . if that makes sense.<p>You wrote Vrms=sqrt[Vrmst^2+Vp*Vd]

I don't get it. Did you mean

Vrms=sqrt(Vrmst^2+(Vp-Vd)^2) or

Vrms=squt(Vrmst^2) + abs(Vp-Vd)? Which I think are two ways of saying about the same thing, but definitly does not say the same thing as your eq'n.<p>-Rick

I don't get it. Did you mean

Vrms=sqrt(Vrmst^2+(Vp-Vd)^2) or

Vrms=squt(Vrmst^2) + abs(Vp-Vd)? Which I think are two ways of saying about the same thing, but definitly does not say the same thing as your eq'n.<p>-Rick

### Re: RMS of a triangle wave???

Hi again rosborne,<p>In order to find a formula that is easy to apply i thought

it would be easiest to pick the two points (on the triangle

riding on the dc level) to be the very top most point

(peak) and call this Vp, and the point at the 'bottom' of

the triangle, which is above zero when the triangle rides

on a dc level, and call this point Vd.

I'll use the number 1.732 as the square root of 3.<p>Taking these two points, Vp and Vd, lets form a simple

expression for what we'll call the 'zero ac' level:

Vz=(Vp-Vd)/2<p>Now form an expression for the rms value of the triangle

alone at the 'zero ac' level:<p>Vrmst=Vz/1.732

Notice this is the same as for a regular triangle from

the "Vp/1.732" formula, so this part is simple.<p>Now the dc level we use here is:

Vdc=Vd+Vz

Notice this calculation is simple too.<p>Now to get the rms value of these two together

we can take the square root of the sum of the

squares of the individual component rms values:

Vrms=sqrt(Vrmst^2+Vdc^2)<p>Notice this is still a fairly simple calculation,

but this isnt the formula i presented earlier.

The earlier formula:

Vrms=sqrt[Vrmst^2+Vp*Vd]

is the same however, just in a slightly different

form, and you have to take care not to confuse

Vd in this formula with Vdc of the second formula.

You still have to calculate Vrmst though, as:

Vrmst=(Vp-Vd)/1.732 noting that this value

is different then the other one because we will

assume a different dc level in order to simplify

the end formula.<p>If you dont like the earlier formula for some

reason, then you can always do the second one

but you have to calculate three additional things:<p>Vz=(Vp-Vd)/2

Vrmst=Vz/1.732

Vdc=Vd+Vz

then finally:

Vrms=sqrt(Vrmst^2+Vdc^2)<p>This was supposed to make it easier to calculate the rms

value of a triangle riding on a dc level,

that's all <p>

Take care,

Al

it would be easiest to pick the two points (on the triangle

riding on the dc level) to be the very top most point

(peak) and call this Vp, and the point at the 'bottom' of

the triangle, which is above zero when the triangle rides

on a dc level, and call this point Vd.

I'll use the number 1.732 as the square root of 3.<p>Taking these two points, Vp and Vd, lets form a simple

expression for what we'll call the 'zero ac' level:

Vz=(Vp-Vd)/2<p>Now form an expression for the rms value of the triangle

alone at the 'zero ac' level:<p>Vrmst=Vz/1.732

Notice this is the same as for a regular triangle from

the "Vp/1.732" formula, so this part is simple.<p>Now the dc level we use here is:

Vdc=Vd+Vz

Notice this calculation is simple too.<p>Now to get the rms value of these two together

we can take the square root of the sum of the

squares of the individual component rms values:

Vrms=sqrt(Vrmst^2+Vdc^2)<p>Notice this is still a fairly simple calculation,

but this isnt the formula i presented earlier.

The earlier formula:

Vrms=sqrt[Vrmst^2+Vp*Vd]

is the same however, just in a slightly different

form, and you have to take care not to confuse

Vd in this formula with Vdc of the second formula.

You still have to calculate Vrmst though, as:

Vrmst=(Vp-Vd)/1.732 noting that this value

is different then the other one because we will

assume a different dc level in order to simplify

the end formula.<p>If you dont like the earlier formula for some

reason, then you can always do the second one

but you have to calculate three additional things:<p>Vz=(Vp-Vd)/2

Vrmst=Vz/1.732

Vdc=Vd+Vz

then finally:

Vrms=sqrt(Vrmst^2+Vdc^2)<p>This was supposed to make it easier to calculate the rms

value of a triangle riding on a dc level,

that's all <p>

Take care,

Al

LEDs vs Bulbs, LEDs are winning.

### Re: RMS of a triangle wave???

Most of the times that I have had to calculate RMS values have been in power supply design. Some swotching power supplies generate ripple currents that are trapezoidal pulses of variable duty cycle. These can be viewed as sawtooth waveforms added to square pulses. It is very convenient if the overall RMS value can be calculated from the values of two or more simpler waveforms. The dead time and the variable duty cycle make the fourier series for the waveforms very complicated.<p>Actually, one of the worst calculations is finding the RMS ripple current in the filter capacitor of a linear power supply. The input voltage is a sine wave, but the current tends to flow in short pulses with high peak values. The conduction angle depends on the load current, which may vary as the capacitor voltage varies. The easiest way that I have found to do this calculation is pure brute force- Use a spread sheet to calculate the current at 50 or 100 points and then square the values and sum them numerically.<p>When you square a fourier series, you get the squares of the individual terms as well as a large number of cross products, such as sine two omega tee times sine three omega tee. These cross terms are not zero, but, over a cycle, they integrate to zero. This leaves only the square terms, and the root-sum-of-squares would be valid for this case.<p>Adding a DC component to a waveform can be done using root-sum-of-squares if the waveform does not have a DC component. As an example, consider a 1 volt RMS sine wave with a 1 volt DC offset. The RMS value would be 1.414 volts. Now take this waveform and offset it by 1 volt. A root-sum-of-squares calculation using the previous RMS value would give a value of 1.732 volts RMS. However, this waveform can also be considered as a waveform with a 1 volt sine wave with a 2 volt offset. The RMS value of this waveform is actually 2.236 volts RMS rather than 1.732 volts.

### Re: RMS of a triangle wave???

Hello again stephen,<p>I think i agree with everything you said

except the last paragraph. Im sorry to

say this but your argument isnt valid.<p>The reason for this is that the moment you

say "Fourier component" you automatically

preclude the use of more than one dc value.

You cant break up a dc value into more then

one part like that because there is only one

dc component in a Fourier expansion.<p>For another example, you cant break up 1vdc

into 0.2+0.2+0.2+0.2+0.2 because the Fourier

dc component is 1vdc and only this single value.

I was trying to point this out when you broke

up the dc value in another post apparently to

try to disprove something maybe?<p>The same holds true for any of the harmonics

i think. Each component gets summed before

you can calculate anything else.<p>The correct rms value for a pure sine with a

peak equal to the sqrt(2) riding on a 2vdc

level is sqrt(5).

The correct rms value for a pure sine with a

peak equal to the sqrt(2) riding on a 1vdc

level is sqrt(2).

In both these cases, if you take the dc component

to be a single component (just as you do with

any of the harmonic components) you always get the

correct answer if you use the sum of the sqrt

of the component rms values method.<p>Take care,

Al

except the last paragraph. Im sorry to

say this but your argument isnt valid.<p>The reason for this is that the moment you

say "Fourier component" you automatically

preclude the use of more than one dc value.

You cant break up a dc value into more then

one part like that because there is only one

dc component in a Fourier expansion.<p>For another example, you cant break up 1vdc

into 0.2+0.2+0.2+0.2+0.2 because the Fourier

dc component is 1vdc and only this single value.

I was trying to point this out when you broke

up the dc value in another post apparently to

try to disprove something maybe?<p>The same holds true for any of the harmonics

i think. Each component gets summed before

you can calculate anything else.<p>The correct rms value for a pure sine with a

peak equal to the sqrt(2) riding on a 2vdc

level is sqrt(5).

The correct rms value for a pure sine with a

peak equal to the sqrt(2) riding on a 1vdc

level is sqrt(2).

In both these cases, if you take the dc component

to be a single component (just as you do with

any of the harmonic components) you always get the

correct answer if you use the sum of the sqrt

of the component rms values method.<p>Take care,

Al

LEDs vs Bulbs, LEDs are winning.

### Who is online

Users browsing this forum: No registered users and 10 guests