Search code examples
pythonsignal-processinggnuradiolowpass-filter

GNU Radio Companion - How to calculate average power of a signal


How can I calculate the average power of a signal within a certain bandwidth and store that value in a variable that I can reference for later?

For example, I have a low pass filter 15kHz wide, I want to know if there's a tool in GNU Radio Companion that will allow me to calculate the average power over a certain time to see if the power level passes a threshold.


Solution

  • The power of a digital signal x[t] is simply abs(x)². Thus in order to do the following:

    calculate the average power

    • use the "complex to magnitude square" block to convert your signal to signal power

    over a certain time

    • use the "moving average" block to calculate the moving average of a specific time slice

    see if the power level passes a threshold

    • use the "threshold" block to calculate... you guessed it, the threshold.

    Have you read the tutorials? http://tutorials.gnuradio.org