Table of Contents
Introduction
Average signal power is important in calculating performance metrics such as signal to noise (SNR) ratio. Read on for how to derive and calculate the average signal power for a finite-length, discrete-time signal. Be sure to check out the post on deriving power and energy for a discrete-time signal.
More DSP blogs:
Signal Power Derivation
The average power of a signal x[n] is defined as
(1)
The expectation operator operates as an average or mean. For simplicity, and to make this practical for real-world RF systems, it is assumed that x[n] is N samples long beginning at time n=0. Therefore the expectation from (1) can be expanded according to
(2)
Examples of Signal Power with Math
Calculating Power with Python
The average power for a complex sinusoid with with amplitude A = 3 is calculated according to (6),
(7)
Equations (6) and (7) are verified using simulation. The following code creates a complex sinusoid of N=1024 samples with amplitude A = 3 and a random frequency and then computes the average power:
import numpy as np
# build a complex sinusoid A = 3 omega = np.random.uniform(-np.pi,np.pi) n = np.arange(0,1024) complexSinusoid = A*np.exp(1j*omega*n)
# calculate average power
averagePower = np.mean(np.abs(complexSinusoid)**2)
print('avg power = ' + str(np.round(averagePower,2)))
Running the script produces:
avg power = 9.0
which aligns with the mathematical calculation.
Conclusion
This blog describes the average power mathematically, provides a derivation for the average power of a complex sinusoid and verifies the result using a Python simulation.
More DSP blogs: