2
$\begingroup$

I'm slightly confused by various statements around energy / power of PCM audio. Specifically, I came across two seemingly contradicting statements in these two answers:

  • Answer 1 states: [...] you can formally sum the squares of the samples and call it energy [...].

    $ E = \sum\limits_{n=0}^{N-1} s[n]^2 $

  • Answer 2 states: To measure the energy [...] calculate the RMS (Root-Mean-Square).

    $ E = \sqrt{\frac{\sum\limits_{n=0}^{N-1} s[n]^2}{N}} $

Note that the first answer also addresses the question of whether this definition directly relates to any physical energy. Let's ignore that aspect to focus on what's the more sensible approximation (probably by making the assumption there purely resistive load and that the audio system is linear).


My attempt to make sense of the two contradicting definitions

I'd assume that the second answer slightly mixes up average power and energy. The RMS seems to be related to approximating of average power over a certain time interval, because it uses a mean, not a sum. So to go from power to energy, one would have to multiply by time again (or here $N$).

Trying to find the source of the relationship of RMS with average power I came across this section of audio power on wikipedia. At least for a steady sinusoidal tone the average electrical power can be approximated by:

$ P_\mathrm{avg} = \frac{{V_\mathrm{RMS}}^2}{R} $

So basically when plugging in the squared RMS into the equation of Answer 2 and accounting for the "time integration", we get back the same result as Answer 1:

$ E ~=~ N \cdot \mathrm{RMS}^2 ~=~ N \cdot \left( \sqrt{\frac{\sum\limits_{n=0}^{N-1} s[n]^2}{N}} \right)^2 ~=~ \sum\limits_{n=0}^{N-1} s[n]^2 $

Now this leads me to my actual question: If the approximation of average power is based on the squared root mean square, why do we even take the root in the first place? Why isn't it popular to just use mean square if that is closer related to physical power/energy? There must be a flaw in my reasoning I guess.

$\endgroup$

1 Answer 1

4
$\begingroup$

Technically answer 2 is wrong. There is two things going on here.

Power vs Energy

Roughly speaking: Power is what happens right now and Energy is the time integral over power. Let's say you play a sine wave 1 W. The energy you consume depends on how long you play it. If you play it for one second you consume 1J (Joule = Watt Second). If you play it for a minute you consume 60J.

So we have

$$ E= \sum x^2[n] \\ P = \frac{1}{N} \sum x^2[n] = \frac{E}{N} \\ x_{RMS} = \sqrt{P} $$

Field quantities vs Power quantities

Many physical quantities are so-called "field quantities" (or root-power quantities) which (roughly speaking) describe "a single thing" and are the basic variables of the underlying differential equations. Examples are voltage, current, position, velocity, acceleration, pressure, volume velocity, electric or magnetic field, etc.

Power quantities (such as Energy, Power, Intensity) are "derived" quantities and in most cases based on multiplying two field quantities. Electrical power is voltage times current, mechanical power is force times velocity, acoustic power is pressure times volume velocity, acoustic intensity is pressure times particle velocity, etc.

That's why there are two different definitions for decibel ("dB"). See https://en.wikipedia.org/wiki/Decibel

Summary So answer 2 is wrong on both accounts. RMS is related to power, not energy and it has the wrong units: It's a field quantity not a power quantity.

This being said: RMS is a very useful concept for certain calculations. You can think of as "a DC signal with the same power as my original signal".

Actual acoustic power is much more complicated. Obviously it depends (obviously) on DAC and amplifier gain. Loudspeakers are not resistive but have significant reactance as well, the actual electrical power is quite complicated and has some interesting properties (e.g. it's often negative at certain times). The actual radiated power is only a small fraction of the electrical power: electrodynamic loudspeakers are very inefficient especially at lower frequencies. Finally, the room itself is has extremely complicated propagation properties. By the time it gets to your ears, the signal has undergone quite and interesting history.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.