Thursday, January 27, 2011

GNU Radio energy detector implementation

After the goals of our project became more clear, I decided to revamp my energy detector implementation, particularly the 'stats' block.

The new 'stats' block is derived from gr_sync_block so we override the work() method to implement the statistics gathering. Using the old gr_bin_statistics_f as a template I arrived at a more streamlined detector based on a constant threshold value. I feel that solidifying this implementation will ease future work on an adaptive threshold.

'stats':


  • for each FFT frame, calculate the average energy for a given filter bank
    • accrue up to N (window size) stats
  • when you have N stats gathered, generated a message with a decision
    • if T > threshold, return a 1 otherwise a 0
  • as new FFT frames become available, pop the oldest value and push the new one on

1 comment: