{"id":407,"date":"2019-03-14T20:13:20","date_gmt":"2019-03-14T20:13:20","guid":{"rendered":"https:\/\/geekblog.febo.com\/?p=407"},"modified":"2019-03-14T22:38:25","modified_gmt":"2019-03-14T22:38:25","slug":"peak-vs-average-power-in-complex-waveforms-and-gnuradio","status":"publish","type":"post","link":"https:\/\/blog.febo.com\/?p=407","title":{"rendered":"Peak vs. Average Power in Complex Waveforms (and Gnuradio)"},"content":{"rendered":"<p>One of my Gnuradio projects is a <A HREF=\"https:\/\/blog.febo.com\/?p=293\">tool that records IQ data covering 375 kHz<\/A> &#8212; which is enough to capture an entire HF ham band (except for 80\/75M).  A neat trick is to retransmit such a recording to allow local receivers to tune in The Signals From The Past (of course, with very low power and tiny antenna so as to prevent interference).  For example, I can take a recording of 14.000 &#8211; 14.350 MHz and play it back from 29.000 to 29.350 MHz.  I use an Ettus USRP-1 to do this; it&#8217;s capable of about 0 dBm output.<\/p>\n<p>If you think of the 275 kHz wide recording as a single waveform, it&#8217;s interestingly complicated.  All sorts of signals of various amplitudes and frequencies appear and disappear, their phase vectors adding and subtracting.  Such a waveform can have a very high peak-to-average power ratio.  I decided to do some tests to see how much head-room is necessary to avoid distortion.<\/p>\n<p>I played back the recording with the USRP feeding a spectrum analyzer through a 20dB pad.  I can adjust the level of the digital stream, and I can also inject a single CW tone at the center of the band.  Here is a screenshot of three conditions captured using the &#8220;max hold&#8221; trace function:<\/p>\n<p><a href=\"http:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/PEAK_AVG.png\" data-rel=\"penci-gallery-image-content\" ><img decoding=\"async\" src=\"http:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/PEAK_AVG.png\" alt=\"PEAK_AVG\" width=\"640\" height=\"454\" class=\"aligncenter size-full wp-image-408\" srcset=\"https:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/PEAK_AVG.png 640w, https:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/PEAK_AVG-300x213.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>The orange trace shows the maximum power CW signal by itself &#8212; about -3 dBm.  The &#8220;pedestal&#8221; at the bottom of the screen might include some distortion products, or might just be phase noise.  If I deliberately overdrove the CW level, I got a very wide response that doesn&#8217;t appear here, so I think this is below the clipping level.<\/p>\n<p>The yellow trace shows the playback with a gain value of 200.  It&#8217;s very clean with no distortion.  There&#8217;s enough headroom for the maximum instantaneous signal to avoid clipping.<\/p>\n<p>The blue trace shows what happens when the gain is increased to 300 &#8212; clipping occurs and the occupied spectrum increases tremendously, though only for an instant at a time.  The max hold function captures this; a real time spectrum analyzer would do a better job.<\/p>\n<p>The spectrum analyzer can also do channel power measurements.  This capture shows the occupied bandwidth, and power within that bandwidth, of the unclipped waveform:<\/p>\n<p><a href=\"http:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/CLEAN_CH_PWR.png\" data-rel=\"penci-gallery-image-content\" ><img decoding=\"async\" src=\"http:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/CLEAN_CH_PWR.png\" alt=\"CLEAN_CH_PWR\" width=\"640\" height=\"454\" class=\"aligncenter size-full wp-image-410\" srcset=\"https:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/CLEAN_CH_PWR.png 640w, https:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/CLEAN_CH_PWR-300x213.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Apparently no one is at the extreme top or bottom of the band, as the 99% bandwidth is 312 kHz (I&#8217;ve seen it show up to 350 kHz).  The average power in that bandwidth is -22.75 dBm (remember, there&#8217;s a 20 dB pad).  Assuming that there&#8217;s not much room to increase the drive before clipping sets in, that means there&#8217;s about a 20 dB difference between the average clean power, and the maximum CW power.  <\/p>\n<p>Here&#8217;s what happened when I cranked the drive way up:<\/p>\n<p><a href=\"http:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/CLIPPED_CH_PWR.png\" data-rel=\"penci-gallery-image-content\" ><img decoding=\"async\" src=\"http:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/CLIPPED_CH_PWR.png\" alt=\"CLIPPED_CH_PWR\" width=\"640\" height=\"454\" class=\"aligncenter size-full wp-image-412\" srcset=\"https:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/CLIPPED_CH_PWR.png 640w, https:\/\/blog.febo.com\/wp-content\/uploads\/2019\/03\/CLIPPED_CH_PWR-300x213.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Average power is up by about 10 dB, but the occupied bandwidth has grown to 460 kHz.  And if we could capture instantaneous values, it would be wider than that.<\/p>\n<p>This is why it&#8217;s so important to use clean amplifiers with lots of headroom for video and complex digital waveforms.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of my Gnuradio projects is a tool that records IQ data covering 375 kHz &#8212; which is enough to capture an entire HF ham band (except for 80\/75M). A&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[4,9],"tags":[49,13,50,48],"class_list":["post-407","post","type-post","status-publish","format-standard","hentry","category-ham-radio","category-sdr","tag-fieldfox","tag-gnuradio","tag-hamsci","tag-usrp"],"_links":{"self":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=407"}],"version-history":[{"count":7,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/407\/revisions"}],"predecessor-version":[{"id":417,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/407\/revisions\/417"}],"wp:attachment":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}