# Calculating the power of a signal

I'm trying to calculate the power of a signal and my tutor has given me this formula to do it. I've spent the past while building a program and now the foundations are there it's time to implement the maths side of it. The problem is I can't actually read it. Would someone be able to transcribe it and explain it to me?

## migrated from sound.stackexchange.comFeb 14 '15 at 3:39

This question came from our site for sound engineers, producers, editors, and enthusiasts.

The formula is a variation on: Root Mean Square (RMS). It's missing the root function.

From Wikipedia:

If you summed values without squaring them, a symmetrical waveform would have zero power. Squaring the samples avoids this.

The 1/N sigma stuff is the arithmetic mean. This is your equation.

By taking the square root, you remove the nonlinear distortion caused by squaring your original samples. You may wish to double-check with your tutor: accidents can happen when transcribing equations (no finger pointing!)

The power of a signal is something different from the level of the signal. I'm not sure how to give a simple explanation of power, so here are a few key points:

• Power is not a linear function of the signal; when you double $x$, you don't double the power of $x$ - you quadruple it.
• Power does not depend on the polarity of the signal. A negative signal has the same amount of power as a positive signal.

There are two ways to talk about power:

• The instantaneous power of a signal is $x^2(t)$. This is the power at time $t$ (ie: right now) and it doesn't depend on what happens to the signal before or after this moment. Notice that this formula fits both of the points from above.
• The average power of a signal is the average of the instantaneous power - if your signal has a power of $1$ half of the time and $3$ the other half, then the average power is $2$.

If you remember that the average of $N$ points is

$$\frac{1}{N} \sum\limits_{i=1}^N p_i$$

then you can see that your formula is a calculation of the average power of $x(t)$.

• Assume for a moment that the function, x, given by the OP represents a voltage. Then the formula is computing mean square voltage over the interval from t=1 to t=T. To get average power, you would only need to divide by the load. If x represents current, then the formula computes mean square current and you would multiply by the load to get average power over the interval. So the formula is related to power, even though it is not power. I think you can't compute power without knowing the load. – mkeith Feb 15 '15 at 0:56
• Generally, in the world of signal processing, power is the square of the signal. Whether or not it's equivalent to the power dissipated in a load doesn't really matter for understanding how the formula works. You're right, though - if this is a voltage, the real-world power is off by a factor of the load. – Greg d'Eon Feb 15 '15 at 1:04

It looks like the formula is telling you to compute the sum of the squares of x over an interval from t = 1 to t = T. Then divide by T. I assume x is a discrete time function. (Like a series of samples from an ADC, for example). This is the mean of the sum of the squares.

First: the picture has the equation below written on it.

$$P_x = \frac{1}{T} \sum\limits_{t=1}^{T} x^2(t)$$

Where $$\ x(t) \$$ is the signal, $$\ t \$$ is the time or sample number and $$\ T \$$ is the final time or total period of the signal if $$\ t_1 = 1 \$$. This is how you calculate the power of the signal. The units you end up with are Watts, $$\ W \$$.

Read this article written Here that describes how it is done and can be implemented in MATLAB.

An added note which may be useful for you or others is that you may want to describe the power in unites of $$\ dBW \$$. To do this use the below equation described here:

$$P_{dBW} = 10 \log P_{W}$$