To help focus answers: The following is specific to “Energy” and “Power” as used for signal processing, not physical units of energy and power (then to ask can units of “Watts” and “Joules” be used, and if not- what then are the units that could be used that would make more sense). Further, this is specific to ergodic, stationary (if random) or otherwise deterministic discrete time signals with a finite duration, as well as discrete in frequency (via the DFT).
Specific to discrete time systems, and preferably without bringing in continuous time equivalents, I would like to confirm my understanding of the following. I'm looking both for confirmation or correction, and if I am correct I would be interested in other perhaps clearer or alternate ways to describe this or other related insights. Note that there is an interesting Time Frequency duality with Power and Energy. I summarize my questions at the end:
Confirming my understanding with some gaps as <_____>:
Given a finite duration of discrete time domain samples as $x[n]$, the conjugate product of each sample $|x[n]|^2$ would have both units of energy and units of power, and specifically it can be described as "<_____> Power" given it is the energy at that instant, over the time duration until the next sample.
Using SI units for clarity or explanatory analogy, if we provide the time duration of one sample as $T$ seconds, and $|x[n]|^2$ as energy in Joules, then we would have the <_____> power in each sample as $|x[n]|^2/T$ Joules/sec = Watts. I'll simplify this to the case where $T=1$ seconds such that, in this case, $|x[n]|^2$ is both the energy of one sample and the power over one sample duration.
If we sum all the samples for $|x[n]|^2$, we get the total energy:
$$E_T = \sum_n |x[n]|^2$$
If we average the energy of each sample over the time duration of all samples, we get the average or total power:
$$P_T = \frac{1}{N}\sum_n |x[n]|^2$$
Similarly, given a finite duration of discrete frequency domain samples as $X[k]$, the conjugate product of each sample would have both units of power and units of energy, and specifically it can be described as "<_____> Energy" given it is the power at that location in frequency over the frequency span until the next sample. The result of this is a power spectral density, as the power over some unit of BW.
Using SI units in this case, if we provide the frequency spacing of index $k$ as $B$ Hz, and $|X[k]|^2$ as power in Watts, then we would have the "<_____> Energy" in each bin as $X[k]^2/B$ Watts/Hz = Joules. I'll simplify this to the case of $B=1$ Hz, such that, in this case, $|X[k]|^2$ is both power of one sample and then energy over the frequency span of one bin.
If we sum all the samples for $|X[k]|^2$, we get the total power:
$$P_T = \sum_n |X[k]|^2$$
The total power times the total frequency span $N$ would be the total energy:
$$E_T = N\sum_n |X[k]|^2$$
Illustrating with a Simple Example:
Consider $x[n]$ as the samples for 1 cycle of a sinusoid.
$$x[n] = \cos(2\pi n/N), \space\space n = 0,1, \ldots N-1$$
If we use a scaled DFT given as:
$$X[k] = \frac{1}{N}\sum_{n=0}^{N-1}x[n]e^{-j 2\pi n k /N}$$
The result will be $$X[k] = [0, 0.5, 0, 0, \ldots, 0, 0, 0.5]$$
The total power $P_T$ as determined from the time domain samples is the variance of a cosine which is $\sigma_x^2 = 0.5 \text{ Watts}$.
The total energy $E_T$ as determined from the time domain samples is the $P_T$ times the time duration $N$: $E_T = N/2 \text{ Joules}$.
Consistently the total power $P_T$ as determined from the frequency domain samples is given as:
$$P_T = \sum_n X[k]^2 = 0.5^2 + 0.5^2 = 0.5 \text{ Watts}$$
And the total energy $E_T$ as determined from the frequency domain samples is given as:
$$E_T = N\sum_n |X[k]|^2 = N/2 \text{ Joules}$$
My Questions
- Are my statements accurate?
- Are there alternate, more concise and clearer ways to explain this (ideally without continuous time analogies)?
- What would the best terms be for the <_____> positions above in time and frequency. In the time domain, I have seen $x[n]^2$ for each sample referred to as "instantaneous power", although it is really instantaneous energy and then the power over one sample duration (which is nearly instantaneous, and approaches the continuous time instantaneous power as $T \rightarrow 0$). I'm fine with referring to it as "instantaneous power", but then what do we refer to the frequency domain counterpart to "instantaneous", as referring to something which occurs at one frequency?
For reference, there are related posts here on Stack Exchange, some with answers from me that I may need to update if there are flaws in my thought process:
Power spectral density vs Energy spectral density
what the difference between spectral density and the power spectral density?
Inconsistency between the units of power spectral density and the definition that people often give
Is there instantaneous energy for signals? Why is $\big|x(t)\big|^2$ instantaneous power?
And on the DFT scaling used: Larger FFT vs multiple averaged FFTs for detecting small CW signals