Rms value of a signal having more than two frequencies |
Rms value of a signal having more than two frequencies |
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 |
|
|
|
![]() |
Mar 17 2012, 06:03
Post
#2
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. 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 |
|
|
|
Mar 17 2012, 06:59
Post
#3
|
|
|
Group: Members Posts: 147 Joined: 31-July 08 Member No.: 56508 |
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. 3 Rms value of noise.. See answers to 1. and 2. And also "Personal Computer Audio Quality Measurements". |
|
|
|
Mar 17 2012, 13:03
Post
#4
|
|
|
Group: Members Posts: 8 Joined: 31-July 11 From: Spain Member No.: 92674 |
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. |
|
|
|
Mar 17 2012, 13:38
Post
#5
|
|
|
Group: Members Posts: 3080 Joined: 1-September 05 From: SE Pennsylvania Member No.: 24233 |
|
|
|
|
Mar 17 2012, 14:29
Post
#6
|
|
![]() Group: Members Posts: 1468 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.) -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Mar 17 2012, 15:26
Post
#7
|
|
![]() Group: Members Posts: 607 Joined: 16-January 09 Member No.: 65630 |
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 (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Mar 17 2012, 16:08
Post
#8
|
|
|
Group: Members Posts: 128 Joined: 12-December 07 From: Cleveland, OH Member No.: 49500 |
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
|
|
|
|
Mar 17 2012, 18:18
Post
#9
|
|
![]() Group: Members Posts: 1468 Joined: 30-November 06 Member No.: 38207 |
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 . -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Mar 17 2012, 18:42
Post
#10
|
|
![]() Group: Members Posts: 607 Joined: 16-January 09 Member No.: 65630 |
Are you serious?
-------------------- Scripts (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Mar 17 2012, 21:49
Post
#11
|
|
|
Group: Members Posts: 4132 Joined: 2-September 02 Member No.: 3264 |
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. |
|
|
|
Mar 17 2012, 22:07
Post
#12
|
|
![]() Group: Members Posts: 607 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 (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Mar 17 2012, 22:27
Post
#13
|
|
|
Group: Members Posts: 3080 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!
|
|
|
|
Mar 17 2012, 22:46
Post
#14
|
|
![]() Group: Members Posts: 1468 Joined: 30-November 06 Member No.: 38207 |
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!' This post has been edited by Porcus: Mar 17 2012, 22:53 -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Mar 18 2012, 05:37
Post
#15
|
|
![]() Group: Members Posts: 607 Joined: 16-January 09 Member No.: 65630 |
Apples and oranges
We are talking about PCM data if you didn't know -------------------- Scripts (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Mar 18 2012, 07:10
Post
#16
|
|
![]() Group: Members Posts: 1354 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
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 |
|
|
|
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.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd May 2013 - 13:16 |