Re: Determining peak instantaneous power in waveform

2022-05-18 Thread John Ackermann N8UR

Hi Ron --

Your papr.c program looks like it will do just what I want.  I'll grab it.

Thanks again for the help you provide!

John


On 5/18/22 00:23, Ron Economos wrote:
I have a block that may be useful for you. It just prints the peak IQ 
level. It's usually placed just before a hardware sink block.


https://github.com/drmpeg/gr-iqlevels

The output looks like this:

peak real = +1.631239e-01, -1.961090e-01, 0, 0
peak imag = +2.698523e-01, -1.962542e-01, 0, 0

It's printing the maximum I and Q level in both positive and negative 
directions and the total number of times they exceeded +/- 1.0.


I also have an offline program that does PAPR calculations. It just 
takes a float IQ file as input.


https://github.com/drmpeg/dtv-utils/blob/master/papr.c

The output looks like this:

Peak magnitude = 0.869561
average power = 0.040009514, peak power = 0.756135583 @ 121986288

Maximum PAPR = 12.764364
percentage above 0 dB = 36.79375350
percentage above 1 dB = 28.40112150
percentage above 2 dB = 20.49609423
percentage above 3 dB = 13.58977407
percentage above 4 dB = 8.10234174
percentage above 5 dB = 4.22610082
percentage above 6 dB = 1.86289176
percentage above 7 dB = 0.66361316
percentage above 8 dB = 0.18129208
percentage above 9 dB = 0.03537920
percentage above 10 dB = 0.00439378
percentage above 11 dB = 0.00032525
percentage above 12 dB = 0.1121

peak real positive = 0.840840, peak imaginary positive = 0.798450
peak real negative = -0.791407, peak imaginary negative = -0.821772

peak real positive @ 1703752736, peak imaginary positive @ 1624430697
peak real negative @ 1846543928, peak imaginary negative @ 2753521145

Ron

On 5/17/22 12:44, John Ackermann N8UR wrote:

Hi --

I have broadband HF data recorded off the air (ham radio bands 384 kHz 
wide) and am trying to figure out what sort of gain settings I need to 
play it back on a USRP without distortion.  My worry is the way 
multiple fairly strong signals could add together in phase to create 
momentary spikes way higher than the visible average (I think this is 
called crest factor in digital signals?).


Is there a (relatively) straightforward way to measure this with 
Gnuradio blocks?  If so, can anyone point me in the right direction to 
build a GRC flow graph to read an IQ file and print out the peak 
instantaneous power seen in the file, relative to 100% (ie, I don't 
need calibrated numbers, just to know how to set the gain in Gnuradio 
for undistorted playback).


Thanks!
John





Re: Determining peak instantaneous power in waveform

2022-05-17 Thread Ron Economos

  
  
I have a block that may be useful for you. It just prints the
  peak IQ level. It's usually placed just before a hardware sink
  block.

https://github.com/drmpeg/gr-iqlevels
The output looks like this:
peak real = +1.631239e-01, -1.961090e-01, 0, 0
  peak imag = +2.698523e-01, -1.962542e-01, 0, 0

It's printing the maximum I and Q level in both positive and
  negative directions and the total number of times they exceeded
  +/- 1.0.
I also have an offline program that does PAPR calculations. It
  just takes a float IQ file as input.
https://github.com/drmpeg/dtv-utils/blob/master/papr.c

 The output looks like this:
Peak magnitude = 0.869561
  average power = 0.040009514, peak power = 0.756135583 @ 121986288
  
  Maximum PAPR = 12.764364
  percentage above 0 dB = 36.79375350
  percentage above 1 dB = 28.40112150
  percentage above 2 dB = 20.49609423
  percentage above 3 dB = 13.58977407
  percentage above 4 dB = 8.10234174
  percentage above 5 dB = 4.22610082
  percentage above 6 dB = 1.86289176
  percentage above 7 dB = 0.66361316
  percentage above 8 dB = 0.18129208
  percentage above 9 dB = 0.03537920
  percentage above 10 dB = 0.00439378
  percentage above 11 dB = 0.00032525
  percentage above 12 dB = 0.1121
  
  peak real positive = 0.840840, peak imaginary positive = 0.798450
  peak real negative = -0.791407, peak imaginary negative =
  -0.821772
  
  peak real positive @ 1703752736, peak imaginary positive @
  1624430697
  peak real negative @ 1846543928, peak imaginary negative @
  2753521145

Ron

On 5/17/22 12:44, John Ackermann N8UR
  wrote:

Hi --
  
  
  I have broadband HF data recorded off the air (ham radio bands 384
  kHz wide) and am trying to figure out what sort of gain settings I
  need to play it back on a USRP without distortion.  My worry is
  the way multiple fairly strong signals could add together in phase
  to create momentary spikes way higher than the visible average (I
  think this is called crest factor in digital signals?).
  
  
  Is there a (relatively) straightforward way to measure this with
  Gnuradio blocks?  If so, can anyone point me in the right
  direction to build a GRC flow graph to read an IQ file and print
  out the peak instantaneous power seen in the file, relative to
  100% (ie, I don't need calibrated numbers, just to know how to set
  the gain in Gnuradio for undistorted playback).
  
  
  Thanks!
  
  John
  
  

  




Determining peak instantaneous power in waveform

2022-05-17 Thread John Ackermann N8UR

Hi --

I have broadband HF data recorded off the air (ham radio bands 384 kHz 
wide) and am trying to figure out what sort of gain settings I need to 
play it back on a USRP without distortion.  My worry is the way multiple 
fairly strong signals could add together in phase to create momentary 
spikes way higher than the visible average (I think this is called crest 
factor in digital signals?).


Is there a (relatively) straightforward way to measure this with 
Gnuradio blocks?  If so, can anyone point me in the right direction to 
build a GRC flow graph to read an IQ file and print out the peak 
instantaneous power seen in the file, relative to 100% (ie, I don't need 
calibrated numbers, just to know how to set the gain in Gnuradio for 
undistorted playback).


Thanks!
John