IPB

Welcome Guest ( Log In | Register )

Rms value of a signal having more than two frequencies
ksr
post Mar 16 2012, 05:36
Post #1





Group: Members
Posts: 17
Joined: 2-December 11
From: bangalore
Member No.: 95532



Hi guys,

I want to know how to calculate from a pcm file the following things...

1. Rms value of a signal when it is having single frequency and also multiple frequencies .
2. Rms value of harmonic components of a signal when it is having single frequency and also multiple frequencies .
3 Rms value of noise..

By using above values i want to calculate SNR, THD , THD+N.

Thanks in Advance
Go to the top of the page
+Quote Post
 
Start new topic
Replies (1 - 16)
Woodinville
post Mar 17 2012, 06:03
Post #2





Group: Members
Posts: 1414
Joined: 9-January 05
From: In the kitchen
Member No.: 18957



The first is easy rms = sqrt( sum (i=0 to n-1) sample(i)^2)/n)

The rest are rather ill-defined for an arbitrary signal.

This post has been edited by db1989: Mar 17 2012, 16:58
Reason for edit: merging posts; deleting pointless full quotes from both


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
Alexey Lukin
post Mar 17 2012, 06:59
Post #3





Group: Members
Posts: 206
Joined: 31-July 08
Member No.: 56508



QUOTE (ksr @ Mar 16 2012, 00:36) *
2. Rms value of harmonic components of a signal when it is having single frequency and also multiple frequencies .

This is most easily done using windowed FFT spectrum and Parseval's theorem that links RMS of spectral components with RMS of the signal. You need to locate which spectrum parts correspond to harmonics and calculate their RMS, keeping aside the rest of the spectrum.


QUOTE (ksr @ Mar 16 2012, 00:36) *
3 Rms value of noise..

See answers to 1. and 2.
And also "Personal Computer Audio Quality Measurements".
Go to the top of the page
+Quote Post
albertoh
post Mar 17 2012, 13:03
Post #4





Group: Members
Posts: 8
Joined: 31-July 11
From: Spain
Member No.: 92674



QUOTE (ksr @ Mar 16 2012, 04:36) *
1. Rms value of a signal when it is having single frequency and also multiple frequencies .
2. Rms value of harmonic components of a signal when it is having single frequency and also multiple frequencies .
3 Rms value of noise..


2.- Do a Fourier analysis of the PCM signal to get the harmonic components, then calculate the RMS value of each component.

3.- By definition, RMS value of (white) noise is zero.
Go to the top of the page
+Quote Post
pdq
post Mar 17 2012, 13:38
Post #5





Group: Members
Posts: 3450
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



QUOTE (albertoh @ Mar 17 2012, 08:03) *
3.- By definition, RMS value of (white) noise is zero.

Huh? sad.gif
Go to the top of the page
+Quote Post
Porcus
post Mar 17 2012, 14:29
Post #6





Group: Members
Posts: 1995
Joined: 30-November 06
Member No.: 38207



I was under the impression that what electrical engineers call 'RMS power', is -- assuming constant Ohmian resistance load -- just average of square voltage. Then the RMS of a unit-amplitude sine, is the average of the sin^2, which is 1/2. Or have I gotten it wrong?

In that case, white noise sure as hell doesn't have zero RMS power. (The problem is rather, does it posess any such figure at all. Measurability.)


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
romor
post Mar 17 2012, 15:26
Post #7





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



QUOTE (Porcus @ Mar 17 2012, 15:29) *
The problem is rather, does it posess any such figure at all. Measurability.

Why would it not?
White noise RMS is constant on arbitrary range, only depending on constant peak value which was used prior creation


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
Speedskater
post Mar 17 2012, 16:08
Post #8





Group: Members
Posts: 139
Joined: 12-December 07
From: Cleveland, OH
Member No.: 49500



QUOTE (Porcus @ Mar 17 2012, 09:29) *
I was under the impression that what electrical engineers call 'RMS power', is --

I know that most of us have heard it a thousand time but:

Power is power, "RMS" is not part of power. The "RMS" is associated with the voltage (or maybe current) measurement used to determine power. Now sometimes the label "RMS Power" is used to show that real power is being discussed rather than "peak power" or "instantaneous power".


--------------------
Kevin
Go to the top of the page
+Quote Post
Porcus
post Mar 17 2012, 18:18
Post #9





Group: Members
Posts: 1995
Joined: 30-November 06
Member No.: 38207



QUOTE (romor @ Mar 17 2012, 15:26) *
QUOTE (Porcus @ Mar 17 2012, 15:29) *
The problem is rather, does it posess any such figure at all. Measurability.

Why would it not?


Let X be defined for t in the interval (0,1), and for each t, draw X(t) standard normal. Then you have one model for Gaussian white noise. Define for each k>0, the set of times in (0,1) such that |X|<k. Problem: does this set have a well-defined length? Sometimes, a careless exercise leads to fallacious 'must be zero' conclusions for what should really be 'must be zero if it is well-defined'. Example: http://en.wikipedia.org/wiki/Vitali_set .


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
romor
post Mar 17 2012, 18:42
Post #10





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



Are you serious?


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
saratoga
post Mar 17 2012, 21:49
Post #11





Group: Members
Posts: 5156
Joined: 2-September 02
Member No.: 3264



QUOTE (Porcus @ Mar 17 2012, 12:18) *
QUOTE (romor @ Mar 17 2012, 15:26) *
QUOTE (Porcus @ Mar 17 2012, 15:29) *
The problem is rather, does it posess any such figure at all. Measurability.

Why would it not?


Let X be defined for t in the interval (0,1), and for each t, draw X(t) standard normal. Then you have one model for Gaussian white noise. Define for each k>0, the set of times in (0,1) such that |X|<k. Problem: does this set have a well-defined length? Sometimes, a careless exercise leads to fallacious 'must be zero' conclusions for what should really be 'must be zero if it is well-defined'. Example: http://en.wikipedia.org/wiki/Vitali_set .


Power is the time derivative of energy. This is well defined for any conceivable signal given that energy must be both finite and band-limited over any finite interval.
Go to the top of the page
+Quote Post
romor
post Mar 17 2012, 22:07
Post #12





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



IMHO only issue that OP may have, would be approximate result of RMS due to windowing, while DFT-ing


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
pdq
post Mar 17 2012, 22:27
Post #13





Group: Members
Posts: 3450
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



The only way that a signal can have an RMS of zero is if it is zero. Period!
Go to the top of the page
+Quote Post
Porcus
post Mar 17 2012, 22:46
Post #14





Group: Members
Posts: 1995
Joined: 30-November 06
Member No.: 38207



QUOTE (romor @ Mar 17 2012, 18:42) *
Are you serious?


What part do you have issues with?

There are a few fallacies one could make when naively calculating as if everything were finite-dimensional. Passing to 'white noise measures to 0 in RMS' from naive calculation on the Fourier coefficients, is one of them. White noise as defined e.g. by http://en.wikipedia.org/wiki/White_noise#W...8white_noise.29 , is a fairly nasty mathematical object. It is not the time-derivative in the ordinary sense, of any 'signal' (defining a 'signal' to be a function from a time interval into the reals).


Edit: pdq, put ' in L2' before the '. Period!' wink.gif

This post has been edited by Porcus: Mar 17 2012, 22:53


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
romor
post Mar 18 2012, 05:37
Post #15





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



Apples and oranges
We are talking about PCM data if you didn't know


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
Woodinville
post Mar 18 2012, 07:10
Post #16





Group: Members
Posts: 1414
Joined: 9-January 05
From: In the kitchen
Member No.: 18957



QUOTE (Porcus @ Mar 17 2012, 10:18) *
QUOTE (romor @ Mar 17 2012, 15:26) *
QUOTE (Porcus @ Mar 17 2012, 15:29) *
The problem is rather, does it posess any such figure at all. Measurability.

Why would it not?


Let X be defined for t in the interval (0,1), and for each t, draw X(t) standard normal. Then you have one model for Gaussian white noise. Define for each k>0, the set of times in (0,1) such that |X|<k. Problem: does this set have a well-defined length? Sometimes, a careless exercise leads to fallacious 'must be zero' conclusions for what should really be 'must be zero if it is well-defined'. Example: http://en.wikipedia.org/wiki/Vitali_set .


For anything of a limited bandwidth, this is a pointless objection.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
albertoh
post Mar 18 2012, 14:11
Post #17





Group: Members
Posts: 8
Joined: 31-July 11
From: Spain
Member No.: 92674



I was wrong. I messed RMS value and DC value. crying.gif blink.gif RMS value of white noise is not zero. DC value of white noise is zero. I also assumed that the original question was referred to "white" noise instead of the more generic "noise".



Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd December 2014 - 13:18