Results 1 to 9 of 9

Math Help - RMS for a Square Wave Signal?

  1. #1
    Member
    Joined
    Jun 2010
    From
    United States
    Posts
    200

    RMS for a Square Wave Signal?

    Hey everyone, I'm trying to learn how to manually do RMS calculation for Square Wave Signals. I've read the following in several places:

    * Some say that for a Square wave, RMS = Peak but I believe they all assume that the signal is uniform with its centre at the origin.

    * RMS = Peak / \sqrt{2} , but I thought that was for sinusoidal waveforms.

    Anyways, here is an example:



    Notice how this square wave form is considerably off centre from the x axis, meaning the majority of the waveform is above the x-axis.

    How do I calculate the RMS value?

    Thank you - Samson
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member ILikeSerena's Avatar
    Joined
    Dec 2011
    Posts
    733
    Thanks
    121

    Re: RMS for a Square Wave Signal?

    Hi Samson!

    The RMS value is the "root mean squared" value.
    To calculate it, you need to calculate the squares of your signal, average them (weighted), and take the square root.

    Btw, as far as I can tell the wave form is symmetric around the x-axis.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Jun 2010
    From
    United States
    Posts
    200

    Re: RMS for a Square Wave Signal?

    Quote Originally Posted by ILikeSerena View Post
    Hi Samson!

    The RMS value is the "root mean squared" value.
    To calculate it, you need to calculate the squares of your signal, average them (weighted), and take the square root.

    Btw, as far as I can tell the wave form is symmetric around the x-axis.
    Hello Serena,

    So how do I calculate the squares of my square wave signal and average them? You also noted weighted, what do you mean?

    On that figure above, I don't see how I can square it and average them when I don't have that detailed of an interval. I guess I could use the interval from 10 ms to 20 ms and just correlate the same region (1V) ?

    Please help if possible!
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member ILikeSerena's Avatar
    Joined
    Dec 2011
    Posts
    733
    Thanks
    121

    Re: RMS for a Square Wave Signal?

    Usually we look at one period of a wave.
    Your wave is at -1 V for the first 2 ms.
    Then +1 V for 2 ms.

    The following table shows the amplitudes and the squared amplitudes that you have in your wave, combined with the duration of each amplitude.
    From it we can calculate the average of the squared amplitudes.
    \begin{array}{|c|c|c|}\hline \textbf{duration} & \textbf{amplitude} & \textbf{squared}\\ \hline  2 ms & -1 V & 1 V^2\\ 2 ms & +1 V & 1 V^2 \\ 2 & 2 & 4 \\ 2 & 1 & 1 \\ 2 & -1 & 1 \\ 2 & -2 & 4 \\ \hline \end{array}

    The average of the squares is {1+1+4+1+1+4 \over 6} = 2 V^2.
    The RMS is the square root, which is \sqrt{2} V.

    In this case all durations are the same.
    If they are not then the squares have to be "weighed" by the duration.

    In total the squared signal is 1 V^2 for a period of 8 ms, and 4 V^2 for a period of 4 ms.
    The weighed average is {8 \times 1 + 4 \times 4 \over 8 + 4} = 2 V^2.
    As you can see this matches with the mean square that I found earlier.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Jun 2010
    From
    United States
    Posts
    200

    Re: RMS for a Square Wave Signal?

    Wow! Thank you! So how could you tell that they were 2ms intervals? I had trouble because of where they put the 10, or was that a very good assumption?

    Two other quick questions:
    1. How would this differ if the whole signal was shifted up one unit?
    2. It would have been incorrect to just look at the peak value of this signal being 2 and dividing it by \sqrt{2} to reveal an RMS value of \sqrt{2} right?

    Thank you!
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member ILikeSerena's Avatar
    Joined
    Dec 2011
    Posts
    733
    Thanks
    121

    Re: RMS for a Square Wave Signal?

    Quote Originally Posted by Samson View Post
    Wow! Thank you! So how could you tell that they were 2ms intervals? I had trouble because of where they put the 10, or was that a very good assumption?

    Two other quick questions:
    1. How would this differ if the whole signal was shifted up one unit?
    2. It would have been incorrect to just look at the peak value of this signal being 2 and dividing it by \sqrt{2} to reveal an RMS value of \sqrt{2} right?

    Thank you!
    Now that you mention it, I'm not sure why I thought why each piece was 2 ms.
    Looking again it looks closer to 3 ms.
    Luckily it does not matter for the calculation whether the pieces are 2 ms or 3 ms.
    As long as they have the same duration.

    It the signal is shifted up by 1 V, the squares change, and the resulting RMS value will be higher.

    And yes, you can't just look at the peak and divide by \sqrt{2}.
    It depends on the shape of the signal what the RMS value is.
    For a sine wave, the RMS is the amplitude divided by \sqrt{2}, but for a square wave, it is simply its amplitude.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Jun 2010
    From
    United States
    Posts
    200

    Re: RMS for a Square Wave Signal?

    Quote Originally Posted by ILikeSerena View Post
    Now that you mention it, I'm not sure why I thought why each piece was 2 ms.
    Looking again it looks closer to 3 ms.
    Luckily it does not matter for the calculation whether the pieces are 2 ms or 3 ms.
    As long as they have the same duration.

    It the signal is shifted up by 1 V, the squares change, and the resulting RMS value will be higher.

    And yes, you can't just look at the peak and divide by \sqrt{2}.
    It depends on the shape of the signal what the RMS value is.
    For a sine wave, the RMS is the amplitude divided by \sqrt{2}, but for a square wave, it is simply its amplitude.
    So you're saying that the 2ms or 3ms doesn't matter as long as you're using a consistent unit of measure for the intervals then, correct?

    Also, when you said the RMS for a square wave is simply its amplitude, you mean like a standard square wave that is rather binary (high/low), correct? The square wave in the above example is different then, correct?

    What if the signal is a sine wave and it has a vertical axis offset, i.e. y(x) = Sin(x) + 1, is the RMS of the signal in that case \sqrt{2} since the peak of the Sin wave is 1 and its being bumped up 1 due to the offset?

    Thank you!
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Super Member ILikeSerena's Avatar
    Joined
    Dec 2011
    Posts
    733
    Thanks
    121

    Re: RMS for a Square Wave Signal?

    Yes, with a consistent unit of measure you will get the same result.

    Yes, I meant a square wave that is half of its time positive, and the other half equally negative.

    sin(x) has RMS = \sqrt{1 \over 2} = {1 \over \sqrt 2}.

    1+sin(x) has RMS = \sqrt {3 \over 2}. As you can see, this is not simply bumped up by 1.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    Jun 2010
    From
    United States
    Posts
    200

    Re: RMS for a Square Wave Signal?

    Thank you so much for your help!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Plotting a square wave using MATLAB
    Posted in the Math Software Forum
    Replies: 1
    Last Post: January 3rd 2012, 01:16 PM
  2. Laplace Transform of Period Square Wave Function
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: February 28th 2010, 01:25 PM
  3. Fourier Series of Square Wave
    Posted in the Calculus Forum
    Replies: 0
    Last Post: December 13th 2009, 12:31 PM
  4. square sine wave
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: September 30th 2009, 04:04 AM
  5. Replies: 0
    Last Post: November 13th 2008, 09:53 AM

Search Tags


/mathhelpforum @mathhelpforum