# Calculating power in frequency band using power spectral density

In a text I am using it states:

The fourier transform $F(\omega)$ has both positive and negative frequencies and $F(\omega) = F^*(-\omega)$. The power spectral density $S(\omega)$ is similarly defined to have the positive and negative frequencies, and the power spectral density is similarly equally divided between the positive and negative frequencies. Thus power spectrum $S(\omega)$ is symmetric about $\omega = 0$. So the contribution to the total power that is contained in the band $[\omega_1, \omega_2]$ is $$P_{[\omega_1, \omega_2]} = \frac{1}{2 \pi} \int_{\omega_1}^{\omega_2} [S(\omega) + S(-\omega)]d \omega.$$

Question: If $S(\omega)$ is the power per frequency $\omega$, even though $\omega$ takes both positive and negative values, I still don't see why the power contained in the band $[\omega_1, \omega_2]$ is not simply given by $$\frac{1}{2 \pi}\int_{\omega_1}^{\omega_2} S(\omega) d \omega?$$ I am only beginning to learn about these things, hence there might be something trivial that I am missing. Thanks.

It's less about power spectrum and more about Fourier transform of real signals. Let's take an easy signal, $g(x) = \cos(10\pi x)$.

Then: $$F(\omega) = \frac{\delta(\omega -10) + \delta (\omega +10)}2.$$

When you ask "what is the energy in the band $\omega = [9,11]$ you ask what is the energy of that cosine (of course this is an example).

If you look only at the positive side of the frequency you lose half the energy.

• Since $S(\omega)=S(-\omega)$, one can also write $$P_{[\omega_1,\omega_2]}=2\times\frac{1}{2 \pi}\int_{\omega_1}^{\omega_2} S(\omega) d \omega=\frac{1}{ \pi}\int_{\omega_1}^{\omega_2} S(\omega) d \omega$$
– msm
Jul 31 '17 at 14:20
• @Cherny Thanks for your answer. Is the reason this applies for real signals because we need the opposite sign frequencies to cancel the complex terms from the complex exponential? Also just to confirm, your example relates to my question if I take $S(- \omega) := \frac{\delta(10 - \omega)}{2}$ and $S( \omega) := \frac{\delta(\omega + 10)}{2}$ and hence $\int[S(-\omega) + S(\omega)]d \omega$ gives the total energy? Jul 31 '17 at 15:36
• @msm Thanks for your comment. How do we know that $S(\omega) = S(-\omega)$? Aug 2 '17 at 11:21
• @TimDavids about the example - yes, this is the example i related to. About the removal of complex part, the complex part is only a symptom, to understand better, think of transform to sin and cos , then when you relate to a frequency you relate to it's cosine and sine, the "negative" part is just more comfortable because it's easier functions and it's an eigen function for convolution systems. sorry for the late and long response ! Aug 2 '17 at 11:51

If the power spectral density $S(\omega)$ is defined for both positive and negative frequencies, then the power in the frequency band $[\omega_1, \omega_2]$ in the usual meaning assigned to the expression by engineers is \begin{align}P_{[\omega_1, \omega_2]} &= \frac{1}{2\pi}\int_{\omega_1}^{\omega_2} S(\omega)\, \mathrm d\omega + \frac{1}{2\pi}\int_{-\omega_2}^{-\omega_1} S(\omega)\, \mathrm d\omega \tag{1}\\ &= \frac{1}{\pi}\int_{\omega_1}^{\omega_2} S(\omega)\, \mathrm d\omega \tag{2} \end{align} where in going from $(1)$ to $(2)$ we have used the fact that $S(\omega)$ is an even (nonnegative) function of $\omega$. Note that $(2)$ is not quite the same as what the OP claims to be the value of $P_{[\omega_1, \omega_2]}$: that is based on a literal reading of the phrase "power in the frequency band $[\omega_1, \omega_2]$" which ignores negative frequencies completely. Be that as it may, what is missing from $(1)$ and $(2)$ is the caveat that the formulas apply only if there are no impulses (Dirac $\delta$'s) in $S(\omega)$ at $\pm\omega_1$ or $\pm\omega_2$. While technically a sinusoid at radian frequency exactly $\omega_i$ is in the band $[\omega_1, \omega_2]$, the definition $(1)$ or $(2)$ in terms of integrals makes it difficult to distinguish whether the integrals are giving us $P_{[\omega_1, \omega_2]}$ or $P_{(\omega_1, \omega_2)}$. Everyone agrees that if $a < 0 < b$, then $$\int_a^b \delta(x)\, \mathrm dx = 1$$ but what about $$\int_0^b \delta(x)\, \mathrm dx ??$$ Should the integral equal $1$ as if the lower limit were $0^-$, or $0$ as if the lower limit were $0^+$, or $\frac 12$ as if "half" the impulse is included in the integral? Specifically, what is $P_{[0,\omega_2]}$, the power in the low-pass band up to radian frequency $\omega_2$? Well, from $(1)$ we get that $$P_{[0, \omega_2]} = \frac{1}{2\pi}\int_{-\omega_2}^{\omega_2} S(\omega)\, \mathrm d\omega$$ which is perfectly correct but if $S(\omega)$ includes an impulse at $\omega = 0$, say $2\pi \delta(\omega)$, (meaning that the signal has a nonzero DC component of $\pm 1$) but no impulse at $\omega_2$, then we don't get $(2)$ but rather \begin{align} P_{[0, \omega_2]} &= \frac{1}{2\pi}\int_{-\omega_2}^{\omega_2} S(\omega)\, \mathrm d\omega\\ &= 1 + \frac{1}{\pi}\int_{0^+}^{\omega_2} S(\omega)\, \mathrm d\omega \end{align} Put another way, if we want to use $(2)$ as is when $\omega_1 = 0$ and there is an impulse at $0$, then we must include only "half" the impulse, that is, $\pi\delta(\omega)$ as being in the range of integration. $\int_0^{\omega_2}S(\omega)\, \mathrm d\omega$