DSPRelated.com
Forums

RMS of a Sine Wave

Started by rudykeram January 28, 2014
Hi, 
I am trying to have a deeper understanding of what RMS means in terms of
probability distribution function.

There is a figure (toward the end) of the following article (doesn't have a
figure number)
http://www.mscsoftware.com/training_videos/patran/Reverb_help/index.html#page/Fatigue%20Quickstart%20Guide/fatq15_vibFAT.15.5.html

It depicts the bell shape of a random normal distribution, where was
generated by basically taking the histogram of a snapshot of a signal. And
this makes perfect sense.
However, the figure below it depicts the PDF of a sine wave, and I am just
not sure why this is the case?
To me, it looks like the distribution should be uniform. Any horizontal
lines through the signal (sine wave), will cross the signal the same number
of times! Isn't it?

something more in line with this:
http://en.wikipedia.org/wiki/Uniform_distribution_(continuous)


Please correct me if I am wrong?

Thanks, 
--Rudy	 

_____________________________		
Posted through www.DSPRelated.com
On Tue, 28 Jan 2014 13:21:32 -0600, "rudykeram" <51467@dsprelated>
wrote:

>Hi, >I am trying to have a deeper understanding of what RMS means in terms of >probability distribution function. > >There is a figure (toward the end) of the following article (doesn't have a >figure number) >http://www.mscsoftware.com/training_videos/patran/Reverb_help/index.html#page/Fatigue%20Quickstart%20Guide/fatq15_vibFAT.15.5.html > >It depicts the bell shape of a random normal distribution, where was >generated by basically taking the histogram of a snapshot of a signal. And >this makes perfect sense. >However, the figure below it depicts the PDF of a sine wave, and I am just >not sure why this is the case? >To me, it looks like the distribution should be uniform. Any horizontal >lines through the signal (sine wave), will cross the signal the same number >of times! Isn't it? > >something more in line with this: >http://en.wikipedia.org/wiki/Uniform_distribution_(continuous) > > >Please correct me if I am wrong? > >Thanks, >--Rudy
It's easy to confirm that for yourself by doing a histogram on a few cycles of a sine wave. Consider that the wave spends the least amount of time at zero amplitude, since it traverses through that region more quickly than anywhere else. It spends the most time at the peaks, since it traverses through those regions more slowly than anywhere else. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On Tuesday, January 28, 2014 1:53:05 PM UTC-6, Eric Jacobsen wrote:
> On Tue, 28 Jan 2014 13:21:32 -0600, "rudykeram" <51467@dsprelated> > > wrote: > > > > >Hi, > > >I am trying to have a deeper understanding of what RMS means in terms of > > >probability distribution function. > > > > > >There is a figure (toward the end) of the following article (doesn't have a > > >figure number) > > >http://www.mscsoftware.com/training_videos/patran/Reverb_help/index.html#page/Fatigue%20Quickstart%20Guide/fatq15_vibFAT.15.5.html > > > > > >It depicts the bell shape of a random normal distribution, where was > > >generated by basically taking the histogram of a snapshot of a signal. And > > >this makes perfect sense. > > >However, the figure below it depicts the PDF of a sine wave, and I am just > > >not sure why this is the case? > > >To me, it looks like the distribution should be uniform. Any horizontal > > >lines through the signal (sine wave), will cross the signal the same number > > >of times! Isn't it? > > > > > >something more in line with this: > > >http://en.wikipedia.org/wiki/Uniform_distribution_(continuous) > > > > > > > > >Please correct me if I am wrong? > > > > > >Thanks, > > >--Rudy > > > > > > It's easy to confirm that for yourself by doing a histogram on a few > > cycles of a sine wave. > > > > Consider that the wave spends the least amount of time at zero > > amplitude, since it traverses through that region more quickly than > > anywhere else. It spends the most time at the peaks, since it > > traverses through those regions more slowly than anywhere else. > > > > > > Eric Jacobsen > > Anchor Hill Communications > > http://www.anchorhill.com
I like to point out that sin(pi/6) = sin(5pi/6) = 1/2 and so a sinusoid spend two-thirds of its time exceeding 1/2.
Would you please be more specific?
Because when I am looking at the bell shape curve and the plot to its left,
I can see a one to one correspndance between the drawn horizontal lines (in
green) and the amplitude of the bell-curve.

http://www.mscsoftware.com/training_videos/patran/Reverb_help/index.html#page/Fatigue%20Quickstart%20Guide/fatq15_vibFAT.15.5.html

The top most horizontal line crosses only few points (maybe one or two),
the second line from the top, crosses even more line, and the third line,
crocess even more. And this count clearly reflects itself as the magnitude
on the bell-curve.

But, if we only consider the sine wave (let's just take only one perdiod),
then every horizontal line will only corss the sine wave at ONLY two points
(with the exception of the peak, crossing only once). Isn't this correct?

Then, why is the sine wave PDF curve shaped the way it is?

Thanks, 
--Rudy	 

_____________________________		
Posted through www.DSPRelated.com
On Tue, 28 Jan 2014 15:11:03 -0600, "rudykeram" <51467@dsprelated>
wrote:

>Would you please be more specific? >Because when I am looking at the bell shape curve and the plot to its left, >I can see a one to one correspndance between the drawn horizontal lines (in >green) and the amplitude of the bell-curve. > >http://www.mscsoftware.com/training_videos/patran/Reverb_help/index.html#page/Fatigue%20Quickstart%20Guide/fatq15_vibFAT.15.5.html > >The top most horizontal line crosses only few points (maybe one or two), >the second line from the top, crosses even more line, and the third line, >crocess even more. And this count clearly reflects itself as the magnitude >on the bell-curve. > >But, if we only consider the sine wave (let's just take only one perdiod), >then every horizontal line will only corss the sine wave at ONLY two points >(with the exception of the peak, crossing only once). Isn't this correct? > >Then, why is the sine wave PDF curve shaped the way it is?
Think of how a histogram has non-zero width intervals. As Dilip pointed out, it's pretty easy to show that a since wave spends most of its time away from the small amplitudes. It can't have equal probability for the small and large amplitudes if it spends most of its time closer to the large amplitudes than it does to the small, and most definitely can't have gaussian distribution. Consider severely limiting the sine wave so that it approaches a square wave. What's the distribution of the square wave? It's certainly not gaussian. Gradually reduce the amount of limiting on the sine wave and what happens to the distribution? Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Okay. Thanks, I can see this now. This explanation makes sense. 
But then, if this is the case, then probability density function is not
just purely a histogram of that function.
Because, clearly, if we cross a horizontal line over a sine curve to cross
the points with value of let's say 0.8, it clearly will cross the sine wave
at ONLY two points (given one period).
And, similarly, if we cross a horizontal line over a sine curve to have a
value of let's say 0.1, it clearly will cross the sine wave at ONLY two
points again (given one period). 
But, as I just learnt, since a sine wave will spend 2/3 of its time for
values greater than 0.5, and will spend only 1/3 of its time for values
less than 0.5, then the probability of landing 0.8 is higher than 0.1. And
that will explain the pdf curve drawn for the sine wave.

Then is this a correct inference to state that the PDF is not only the
histogram, and rather there is more to it ?

Thanks, 
--Rudy	 

_____________________________		
Posted through www.DSPRelated.com
rudykeram <51467@dsprelated> wrote:

> Would you please be more specific? > Because when I am looking at the bell shape curve and the > plot to its left, I can see a one to one correspndance between > the drawn horizontal lines (in green) and the amplitude of > the bell-curve.
> http://www.mscsoftware.com/training_videos/patran/Reverb_help/index.html#page/Fatigue%20Quickstart%20Guide/fatq15_vibFAT.15.5.html
The "crosses xx times" isn't the definition of PDF, but it works reasonably well in that case. If you consider a random walk, where someone takes a step forward or backward at each time period (say, second) then the resulting distribution is Gaussian. The random noise graph is essential a random walk. So, for the graph, consider that the line always has the same (absolute value of) slope, either + or -. The comment about line crossing applies to that spectrum, not the sinusoid. Try drawing a sinusoid with a fat marker and you will see that the slope affects the contribution. -- glen
rudykeram <51467@dsprelated> wrote:

(snip)

> Then is this a correct inference to state that the PDF is not only the > histogram, and rather there is more to it ?
No. It is the "number of times it crosses" that isn't, in general, correct. You have to divide the crossing by the absolute value of the slope at that point. Then (carefully) normalize the result. Consider a random strobe looking at an object moving sinusoidally. What is the distribution of the position? For a more practical example, consider a lawn sprinkler that moves sinusoidally. (There is a common design that pretty much does that.) What is the distribution of water across the lawn? -- glen
On Tue, 28 Jan 2014 16:46:43 -0600, "rudykeram" <51467@dsprelated>
wrote:

> >Okay. Thanks, I can see this now. This explanation makes sense. >But then, if this is the case, then probability density function is not >just purely a histogram of that function. >Because, clearly, if we cross a horizontal line over a sine curve to cross >the points with value of let's say 0.8, it clearly will cross the sine wave >at ONLY two points (given one period). >And, similarly, if we cross a horizontal line over a sine curve to have a >value of let's say 0.1, it clearly will cross the sine wave at ONLY two >points again (given one period). >But, as I just learnt, since a sine wave will spend 2/3 of its time for >values greater than 0.5, and will spend only 1/3 of its time for values >less than 0.5, then the probability of landing 0.8 is higher than 0.1. And >that will explain the pdf curve drawn for the sine wave. > >Then is this a correct inference to state that the PDF is not only the >histogram, and rather there is more to it ? > >Thanks, >--Rudy
Remember what a probability is, fundamentally. If a teenager spends five hours a day in school, nine hours at the skate park, and ten in bed, what are the probabilities of finding the teenager at each venue when sampled randomly throughout the day? There are only three locations (values), yet the probabilities for each are different. The plots are two dimensional. Time matters. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On 1/28/14 4:11 PM, rudykeram wrote:
> Would you please be more specific? > Because when I am looking at the bell shape curve and the plot to its left, > I can see a one to one correspndance between the drawn horizontal lines (in > green) and the amplitude of the bell-curve. > > http://www.mscsoftware.com/training_videos/patran/Reverb_help/index.html#page/Fatigue%20Quickstart%20Guide/fatq15_vibFAT.15.5.html > > The top most horizontal line crosses only few points (maybe one or two), > the second line from the top, crosses even more line, and the third line, > crocess even more. And this count clearly reflects itself as the magnitude > on the bell-curve. > > But, if we only consider the sine wave (let's just take only one perdiod), > then every horizontal line will only corss the sine wave at ONLY two points > (with the exception of the peak, crossing only once). Isn't this correct? > > Then, why is the sine wave PDF curve shaped the way it is? >
a sine wave PDF looks like http://www.atx7006.com/img/hist/adc_sinusoidal_histogram_test_code_hits.jpg except that it goes up to infinity on the sides. rudy, do you know how to derive the p.d.f. of a random variable that is the output of some continuous mapping from another random variable of known p.d.f.? that's how you determine why a p.d.f. curve is shaped the way it is. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."