[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-discuss
Subject:    Re: How to convert dB to dBm and dBFS in GNURadio with USRP X310 and UBX-160
From:       "Marcus D. Leech" <patchvonbraun () gmail ! com>
Date:       2023-06-28 20:43:28
Message-ID: 1c6e7322-989c-2fa7-b3d6-9470bc12f3ef () gmail ! com
[Download RAW message or body]

On 28/06/2023 16:35, Dor Ratz wrote:
> Hey Marcus,
>
> Thanks.
>
> Let me see if I get it right.
>
> Please see the attached gnuradio setup below .
>
> 1. Does the USRP pass with Wire Format=Automatic the int16 samples to 
> the host computer? The ADC of X310 is 14 bits represented by 16 bits 
> samples, so the maximal possible value in time domain for a strong 
> enough signal is 2^(14-1)= (+-8192 ) ?
NO!  I've already said, the samples from the ADC are *scaled* before 
they hit the wire, into the wire format, which in this case
   is sc16.    Further, the samples that "hit the wire" are *after* any 
manipulations by the DDC.  The values on the wire
   can go from +/- 32767, although they rarely actually do.
>
> 2. So if I open the file sink (which was saved as short = int16) with 
> python as int16 and look in python in the time domain:
>
>   * In the time domain the maximal possible value is still (+-8192 ) ?
>
Once the samples hit the GR flow-graph they are typically in 
{-1.0,+1.0}, and then you can specify scaling coefficients when
   you save them as complex int16.

>   * In FFT, can I  calculate Power[dBFS] according to
>     20*log10(8192)=0[dBFS]?
>
I strongly suspect that you're trying to do power estimation based on an 
empirical model, rather than by actual measurement
   with actual calibration equipment present.    I have already said 
this is a bad approach, as have many others on this list.


>
> 3. If I want to open samples in QT GUI Sink as in the setup below, 
> then can I do it as below with IShort to Complex block with scale 
> factor = 8192, and then in the time domain in QT GUI Sink I will see :
>
>   * In time domain - a float value with maximal possible value of
>     (-+1) ? because it was normalized by 8192.
>   *  In FFT , can I  calculate Power[dBFS] according to
>     20*log10(1)=0[dBFS]?
>
>
> Thanks you,
>
> Dor
>
>
> image.png
>
> image.png
>
>
> image.png
>
>
> image.png
>
>
> ‫בתאריך יום ב׳, 26 ביוני 2023 ב-21:46 מאת ‪Marcus D. Leech‬‏ 
> <‪patchvonbraun@gmail.com‬‏>:‬
>
>     On 26/06/2023 14:43, Dor Ratz wrote:
>>     Thanks Marcus.
>>
>>     If so, then I can calibrate USRP -> GNURadio by writing down the :
>>
>>     - Power of the signal in FFT in [dB] -> convert to [dBm] by
>>     comparing power when connected to a spectrum analyzer and
>>     changing Gain, frequency and so on and comparing both [dB] in FFT
>>     on GNURadio and power[dBm] in laboratory spectrum analyzer.
>>     - Power of signal  [dBFS] by calculating from the time domain on
>>     QT GUI Sink as we said.
>>
>>     If I save the samples as int16 to File Sink, then when I open it
>>     with Python I should still see float values {-1,+1} and calculate
>>     power[dBFS] according to 20*log10(1)=0[dBFS]? Correct me if I'm
>>     wrong.
>     Int16 conversion in GR will use a conversion constant. Something
>     like +/- 32767
>
>>
>>     Am I missing something?
>>
>>     Thanks
>>     Dor
>>
>>
>>
>>     ‫בתאריך יום ב׳, 26 ביוני 2023 ב-21:02 מאת ‪Marcus D. Leech‬‏
>>     <‪patchvonbraun@gmail.com‬‏>:‬
>>
>>         On 26/06/2023 13:58, Dor Ratz wrote:
>>>         Hey Steve and Marcus,
>>>
>>>         Thanks a lot.
>>>
>>>         I'll try to do it.
>>>
>>>         _Questions regarding dBFS, if you maybe have a clue _
>>>
>>>          1. Does the GNURadio amplitude axis in QT GUI TIME DOMAIN
>>>             are always float-point values in the range {-1.0,+1.0}
>>>             for a received signal from USRP Source block?
>>>
>>         There's a STRONG convention in Gnu Radio that signals are
>>         always in the range {-1.0,+1.0}, and drivers for SDR devices
>>           are generally designed to comply with this.
>>
>>>          1. If the answer to 1 is yes, then if I see amplitude = 0.5
>>>             , does it mean 20*log10(0.5)=(-6dBFS) ? is that correct?
>>>
>>         Yes.
>>
>>>         I've assumed it because:
>>>
>>>         The ADC of X310 has 14 bits. so the MSB values are
>>>         2^(14-1)=2^13 = + - 8192 (signed values).
>>>
>>>         Power[dBFS] = 20*log10(voltage_value_measured/8192)
>>>
>>>         The problem is that Output Type and Wire Format in USRP
>>>         Source block are complex int16, so I'm not sure if the
>>>         samples that are streaming from USRP into the host computer
>>>         are 14 bits represented by 16 bits. And if yes, so do I need
>>>         to change the above calculation?
>>>
>>>
>>         ADC values are scaled into the wire-format.  But IN ADDITION,
>>         "raw" ADC values will almost never actually be seen in the
>>           signal flow once it gets to Gnu Radio, because they've been
>>         filtered by the DDC mechanism in the radio--this is true not
>>           just of USRPs, but most SDRs that have a bit of DSP between
>>         the ADC and the host interface.
>>
>>
>>>         Thanks
>>>         Dor
>>>
>>>
>>>         ‫בתאריך יום א׳, 25 ביוני 2023 ב-4:11 מאת ‪Steve Hubbard‬‏
>>>         <‪stevezsuzska@iinet.net.au‬‏>:‬
>>>
>>>             Hi Dor,
>>>
>>>             I don't follow all your email but in general you can add
>>>             the powers (magnitudes squared) of the FFT bins to give
>>>             you the equivalent of power in the time domain
>>>             (Parceval's theorem). Strictly speaking I recall there
>>>             is a slight tweak to the DC bin value but I don't
>>>             remember the detail. It goes without saying that
>>>             baseband signals and FFT bin values are complex (IQ).
>>>
>>>             Keep in mind that when you feed a single frequency into
>>>             an FFT, it may fall between 2 bins. In this case the
>>>             peak will be lowered (scalloping loss). You might want
>>>             to consider the use of a suitable window to compensate
>>>             for this. The window will lower the total power, which
>>>             you also need to allow for.
>>>
>>>             I think -15 dBm is the point beyond which saturation,
>>>             distortion or worse might occur. The point at which you
>>>             reach full scale on the ADC will depend on the front end
>>>             gain setting. I don't know what this might be for your
>>>             set up. At some gain settings compression might occur in
>>>             the analogue front end before you reach full scale. Gain
>>>             will also be frequency and temperature dependent to some
>>>             degree. The UBX-160 datasheet lacks detail.
>>>
>>>             I have experience calibrating the X310 but with a
>>>             different front end, using GNU radio to capture the
>>>             baseband signal but Matlab to process it.
>>>
>>>             Regards,
>>>
>>>             Steve
>>>
>>>             On 24/6/23 21:45, Dor Ratz wrote:
>>>>             Hello,
>>>>
>>>>             I wish to use USRPX310 with UBX-160 daughterboard as a
>>>>             calibrated spectrum analyzer to show the received
>>>>             signal power in units of [dBm] and [dBFS] for my setup.
>>>>
>>>>             I've read discussion
>>>>             <https://lists.gnu.org/archive/html/discuss-gnuradio/2017-06/msg00214.html> and
>>>>             the GNURadio FAQ
>>>>             <https://wiki.gnuradio.org/index.php/FAQ> before so I
>>>>             know I must calibrate my setup because the values in
>>>>             GNURadio don't mean a thing.
>>>>
>>>>             So I wanted to ask if this procedure seems to
>>>>             make sense for you. I will  be glad to receive any
>>>>             suggestions.
>>>>
>>>>
>>>>             I'm gonna connect my signal generator to
>>>>             spectrum analyzer to measure the cable loss.
>>>>             After that, gonna connect it to the USRP to measure the
>>>>             power[dB] in order to understand what is the power[dBm]
>>>>             in GNURadio.
>>>>             image.png
>>>>             Is this table correct to calibrate and calculate the
>>>>             Power[dBm] on GNURadio in FFT?
>>>>
>>>>             Signal generator Power[dBm] 	Power [dBm] on spectrum
>>>>             anlayzer 	Power[dB] on GNURadio in FFT 	Power[dBm] on
>>>>             GNURadio in FFT
>>>>             -60 	-61 	-66 	-61
>>>>             -65 	-66 	-71 	-66
>>>>             -70 	-71 	-76 	-71
>>>>             -75 	-76 	-81 	-76
>>>>             -80 	-81 	-86 	-81
>>>>             -85 	-86 	-91 	-86
>>>>             -90 	-91 	-96 	-91
>>>>
>>>>
>>>>             _Procedure for wideband signal (not CW)_
>>>>             Right now the power[dB] must be calculated with the
>>>>             occupied FFT bins, let's assume this is the signal and
>>>>             the NFFT=128, so we can see that the signal occupies
>>>>             only 2/10 grids in the FFT so:
>>>>
>>>>             Power_of_signal[dB] = Peak_power[dB]+
>>>>             10*log(FFT_bins_with_signal) = (-15dB) +
>>>>             10*log10((2/10)*(128)) = (-15dB) + (14) = (-1dB)
>>>>
>>>>             image.png
>>>>
>>>>             _Convert to dBFS for the USRP X310_
>>>>
>>>>             How do you propose to do it?
>>>>
>>>>             The ADC of X310 has 14 bits. so the MSB values are 2^13
>>>>             = + - 8192 (signed values).
>>>>
>>>>             Power[dBFS] = 20*log10(voltage_value_measured/8192)
>>>>
>>>>             _Some questions:_
>>>>             _
>>>>             _
>>>>
>>>>              1. Does the gnuradio amplitude axis in QT GUI TIME
>>>>                 DOMAIN are always float-point values in the range
>>>>                 {-1.0,+1.0} for a received signal from USRP?
>>>>              2. If the answer to 1 is yes, then if I see amplitude
>>>>                 = 0.5 , does it mean 20*log10(0.5)=(-6dBFS) ? is
>>>>                 that correct?
>>>>              3. I know that the maximum input power for the UBX is
>>>>                 (-15 dBm), but what does it mean that (-15dBm)
>>>>                 input power is 0[dBFS]?
>>>>              4. Has anyone had experience with RX power calibration
>>>>                 <https://files.ettus.com/manual/page_power.html> of
>>>>                 USRPX310 with UBX-160?
>>>>                 If I understand correctly, it is supporting the
>>>>                 power API:
>>>>
>>>>
>>>>             image.png
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>             Thanks
>>>>             Dor
>>>>
>>
>

[Attachment #3 (multipart/related)]

[Attachment #5 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 28/06/2023 16:35, Dor Ratz wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPY8uVPBz81XNoK3-tP-zFjpF0iFccb_tniLdXsc-0-sMN1G9w@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="rtl">
        <div dir="ltr">Hey Marcus,</div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">Thanks.</div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">Let me see if I get it right. </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">Please see the attached gnuradio setup below .</div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">1. Does the USRP pass with Wire Format=Automatic
          the int16 samples to the host computer? The ADC of X310 is 14
          bits represented by 16 bits samples, so the maximal possible
          value in time domain for a strong enough signal is 2^(14-1)=
          (+-8192 ) ?</div>
      </div>
    </blockquote>
    NO!  I've already said, the samples from the ADC are *scaled* before
    they hit the wire, into the wire format, which in this case<br>
      is sc16.    Further, the samples that "hit the wire" are *after*
    any manipulations by the DDC.  The values on the wire<br>
      can go from +/- 32767, although they rarely actually do.<br>
    <blockquote type="cite"
cite="mid:CAPY8uVPBz81XNoK3-tP-zFjpF0iFccb_tniLdXsc-0-sMN1G9w@mail.gmail.com">
      <div dir="rtl">
        <div dir="ltr"><a class="gmail_plusreply" moz-do-not-send="true"><br>
          </a></div>
        <div dir="ltr">2. So if I open the file sink (which was saved as
          short = int16) with python as int16 and look in python in the
          time domain:</div>
        <div dir="ltr">
          <ul>
            <li>In the time domain the maximal possible value is still
              (+-8192 ) ? <br>
            </li>
          </ul>
        </div>
      </div>
    </blockquote>
    Once the samples hit the GR flow-graph they are typically in
    {-1.0,+1.0}, and then you can specify scaling coefficients when<br>
      you save them as complex int16.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAPY8uVPBz81XNoK3-tP-zFjpF0iFccb_tniLdXsc-0-sMN1G9w@mail.gmail.com">
      <div dir="rtl">
        <div dir="ltr">
          <ul>
            <li>In FFT, can I  calculate Power[dBFS] according to
              20*log10(8192)=0[dBFS]?</li>
          </ul>
        </div>
      </div>
    </blockquote>
    I strongly suspect that you're trying to do power estimation based
    on an empirical model, rather than by actual measurement<br>
      with actual calibration equipment present.    I have already said
    this is a bad approach, as have many others on this list.<br>
    <br>
    <br>
    <blockquote type="cite"
cite="mid:CAPY8uVPBz81XNoK3-tP-zFjpF0iFccb_tniLdXsc-0-sMN1G9w@mail.gmail.com">
      <div dir="rtl">
        <div dir="ltr"><a class="gmail_plusreply" moz-do-not-send="true"><br>
          </a></div>
        <div dir="ltr">3. If I want to open samples in QT GUI Sink as in
          the setup below, then can I do it as below with IShort to
          Complex block with scale factor = 8192, and then in the time
          domain in QT GUI Sink I will see :</div>
        <div dir="ltr">
          <ul>
            <li>In time domain - a float value with maximal possible
              value of (-+1) ? because it was normalized by 8192.</li>
            <li> In FFT , can I  calculate Power[dBFS] according to
              20*log10(1)=0[dBFS]?</li>
          </ul>
          <div><br>
          </div>
          <div>Thanks you,</div>
          <div><br>
          </div>
          <div>Dor</div>
        </div>
        <div dir="ltr"><a class="gmail_plusreply" moz-do-not-send="true"><br>
          </a></div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr"><img src="cid:part1.BoegILtL.0RERQU0Y@gmail.com"
            alt="image.png" class="" width="472" height="265"><br>
        </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr"><img src="cid:part2.6EoBSWIG.76gR4yHs@gmail.com"
            alt="image.png" class="" width="472" height="113"><br>
        </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr"><img src="cid:part3.N3Iabyo9.PqJSYTmy@gmail.com"
            alt="image.png" class="" width="472" height="150"><br>
        </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr"><img src="cid:part4.yENLND8i.ofBwo6DV@gmail.com"
            alt="image.png" class="" width="472" height="129"><br>
        </div>
        <div dir="ltr"><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="rtl" class="gmail_attr">‫בתאריך יום ב׳, 26 ביוני 2023
          ב-21:46 מאת ‪Marcus D. Leech‬‏ &lt;‪<a
            href="mailto:patchvonbraun@gmail.com" moz-do-not-send="true"
            class="moz-txt-link-freetext">patchvonbraun@gmail.com</a>‬‏&gt;:‬<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <div>On 26/06/2023 14:43, Dor Ratz wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="rtl">
                <div dir="ltr">Thanks Marcus.</div>
                <div dir="ltr"><br>
                </div>
                <div dir="ltr">If so, then I can calibrate USRP -&gt;
                  GNURadio by writing down the :</div>
                <div dir="ltr"><br>
                </div>
                <div dir="ltr">- Power of the signal in FFT in [dB]
                  -&gt; convert to [dBm] by comparing power when
                  connected to a spectrum analyzer and changing Gain,
                  frequency and so on and comparing both [dB] in FFT on
                  GNURadio and power[dBm] in laboratory spectrum
                  analyzer.</div>
                <div dir="ltr">- Power of signal  [dBFS] by calculating
                  from the time domain on QT GUI Sink as we said.</div>
                <div dir="ltr"><br>
                </div>
                <div dir="ltr">If I save the samples as int16 to File
                  Sink, then when I open it with Python I should still
                  see float values {-1,+1} and calculate power[dBFS]
                  according to 20*log10(1)=0[dBFS]? Correct me if I'm
                  wrong.</div>
              </div>
            </blockquote>
            Int16 conversion in GR will use a conversion constant. 
            Something like +/- 32767<br>
            <br>
            <blockquote type="cite">
              <div dir="rtl">
                <div dir="ltr"><br>
                </div>
                <div dir="ltr">Am I missing something?</div>
                <div dir="ltr"><br>
                </div>
                <div dir="ltr">Thanks</div>
                <div dir="ltr">Dor</div>
                <div dir="ltr"><br>
                </div>
                <div dir="ltr"><br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="rtl" class="gmail_attr">‫בתאריך יום ב׳, 26
                  ביוני 2023 ב-21:02 מאת ‪Marcus D. Leech‬‏ &lt;‪<a
                    href="mailto:patchvonbraun@gmail.com"
                    target="_blank" moz-do-not-send="true"
                    class="moz-txt-link-freetext">patchvonbraun@gmail.com</a>‬‏&gt;:‬<br>
  </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div>
                    <div>On 26/06/2023 13:58, Dor Ratz wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="rtl">
                        <div dir="ltr">Hey Steve and Marcus,</div>
                        <div dir="ltr"><br>
                        </div>
                        <div dir="ltr">Thanks a lot. </div>
                        <div dir="ltr"><br>
                        </div>
                        <div dir="ltr">I'll try to do it.</div>
                        <div dir="ltr"><br>
                        </div>
                        <div dir="ltr"><u>Questions regarding dBFS, if
                            you maybe have a clue </u></div>
                        <div dir="ltr"><br>
                        </div>
                        <div dir="ltr">
                          <div dir="ltr">
                            <ol>
                              <li style="margin-right:15px">Does the
                                GNURadio amplitude axis in QT GUI TIME
                                DOMAIN are always float-point values in
                                the range {-1.0,+1.0} for a received
                                signal from USRP Source block? <br>
                              </li>
                            </ol>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    There's a STRONG convention in Gnu Radio that
                    signals are always in the range {-1.0,+1.0}, and
                    drivers for SDR devices<br>
                      are generally designed to comply with this.<br>
                    <br>
                    <blockquote type="cite">
                      <div dir="rtl">
                        <div dir="ltr">
                          <div dir="ltr">
                            <ol>
                              <li style="margin-right:15px">If the
                                answer to 1 is yes, then if I see
                                amplitude = 0.5 , does it mean
                                20*log10(0.5)=(-6dBFS) ? is that
                                correct?</li>
                            </ol>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    Yes.<br>
                    <br>
                    <blockquote type="cite">
                      <div dir="rtl">
                        <div dir="ltr">
                          <div dir="ltr">
                            <div>I've assumed it because:</div>
                            <div>
                              <div dir="ltr"><br>
                                The ADC of X310 has 14 bits. so the MSB
                                values are 2^(14-1)=2^13 = + - 8192
                                (signed values).</div>
                              <div dir="ltr"><br>
                              </div>
                              <div dir="ltr">Power[<span>dBFS</span>] =
                                20*log10(voltage_value_measured/8192)</div>
                            </div>
                            <div dir="ltr"><br>
                            </div>
                            <div>The problem is that Output Type and
                              Wire Format in USRP Source block are
                              complex int16, so I'm not sure if the
                              samples that are streaming from USRP into
                              the host computer are 14 bits represented
                              by 16 bits. And if yes, so do I need to
                              change the above calculation?</div>
                            <div dir="ltr"><br>
                            </div>
                            <div dir="ltr"><br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    ADC values are scaled into the wire-format.  But IN
                    ADDITION, "raw" ADC values will almost never
                    actually be seen in the<br>
                      signal flow once it gets to Gnu Radio, because
                    they've been filtered by the DDC mechanism in the
                    radio--this is true not<br>
                      just of USRPs, but most SDRs that have a bit of
                    DSP between the ADC and the host interface.<br>
                    <br>
                    <br>
                    <blockquote type="cite">
                      <div dir="rtl">
                        <div dir="ltr">
                          <div dir="ltr">
                            <div>Thanks</div>
                            <div>Dor</div>
                            <div><br>
                            </div>
                          </div>
                        </div>
                      </div>
                      <br>
                      <div class="gmail_quote">
                        <div dir="rtl" class="gmail_attr">‫בתאריך יום
                          א׳, 25 ביוני 2023 ב-4:11 מאת ‪Steve Hubbard‬‏
                          &lt;‪<a
                            href="mailto:stevezsuzska@iinet.net.au"
                            target="_blank" moz-do-not-send="true"
                            \
class="moz-txt-link-freetext">stevezsuzska@iinet.net.au</a>‬‏&gt;:‬<br>  </div>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
                          0.8ex;border-left:1px solid
                          rgb(204,204,204);padding-left:1ex">
                          <div>
                            <p>Hi Dor,</p>
                            <p>I don't follow all your email but in
                              general you can add the powers (magnitudes
                              squared) of the FFT bins to give you the
                              equivalent of power in the time domain
                              (Parceval's theorem). Strictly speaking I
                              recall there is a slight tweak to the DC
                              bin value but I don't remember the detail.
                              It goes without saying that baseband
                              signals and FFT bin values are complex
                              (IQ).<br>
                            </p>
                            <p>Keep in mind that when you feed a single
                              frequency into an FFT, it may fall between
                              2 bins. In this case the peak will be
                              lowered (scalloping loss). You might want
                              to consider the use of a suitable window
                              to compensate for this. The window will
                              lower the total power, which you also need
                              to allow for.</p>
                            <p>I think -15 dBm is the point beyond which
                              saturation, distortion or worse might
                              occur. The point at which you reach full
                              scale on the ADC will depend on the front
                              end gain setting. I don't know what this
                              might be for your set up. At some gain
                              settings compression might occur in the
                              analogue front end before you reach full
                              scale. Gain will also be frequency and
                              temperature dependent to some degree. The
                              UBX-160 datasheet lacks detail.<br>
                            </p>
                            <p>I have experience calibrating the X310
                              but with a different front end, using GNU
                              radio to capture the baseband signal but
                              Matlab to process it.<br>
                            </p>
                            <p>Regards,</p>
                            <p>Steve<br>
                            </p>
                            <div>On 24/6/23 21:45, Dor Ratz wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <div dir="rtl">
                                <div dir="ltr">Hello,</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">I wish to use USRPX310
                                  with UBX-160 daughterboard as a
                                  calibrated spectrum analyzer to show
                                  the received signal power in units of
                                  [dBm] and [dBFS] for my setup.</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">I've read <a
href="https://lists.gnu.org/archive/html/discuss-gnuradio/2017-06/msg00214.html"
                                    target="_blank"
                                    moz-do-not-send="true">discussion</a> and
                                  the <a
                                    href="https://wiki.gnuradio.org/index.php/FAQ"
                                    target="_blank"
                                    moz-do-not-send="true">GNURadio FAQ</a> before
                                  so I know I must calibrate my setup
                                  because the values in GNURadio don't
                                  mean a thing.</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">So I wanted to ask if
                                  this procedure seems to make sense for
                                  you. I will  be glad to receive any
                                  suggestions.</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">I'm gonna connect my
                                  signal generator to spectrum analyzer
                                  to measure the cable loss.</div>
                                <div dir="ltr">After that, gonna connect
                                  it to the USRP to measure the
                                  power[dB] in order to understand what
                                  is the power[dBm] in GNURadio.</div>
                                <div dir="ltr"><img
                                    src="cid:part5.YQz0AjVQ.CtIAhVre@gmail.com"
                                    alt="image.png" class="" width="542"
                                    height="378"><br>
                                </div>
                                <div dir="ltr">Is this table correct to
                                  calibrate and calculate the Power[dBm]
                                  on GNURadio in FFT?</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">
                                  <table cellspacing="0" border="0">
                                    <colgroup width="255"></colgroup> <colgroup
                                      width="217"></colgroup> <colgroup
                                      width="264"></colgroup> <colgroup
                                      width="280"></colgroup> <tbody>
                                      <tr>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  height="20" \
align="left"><font  size="3" face="">Signal
                                            generator Power[dBm]</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="left">Power [dBm] on  spectrum anlayzer</td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="left"><font size="3"  face="">Power[dB] on
                                            GNURadio in FFT</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="left"><font size="3"  face="">Power[dBm] on
                                            GNURadio in FFT</font></td>
                                      </tr>
                                      <tr>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  height="20" \
                align="right"><font
                                            size="3" face="">-60</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right">-61</td>  <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-66</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-61</font></td>
                                      </tr>
                                      <tr>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  height="20" \
                align="right"><font
                                            size="3" face="">-65</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right">-66</td>  <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-71</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-66</font></td>
                                      </tr>
                                      <tr>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  height="20" \
                align="right"><font
                                            size="3" face="">-70</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right">-71</td>  <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-76</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-71</font></td>
                                      </tr>
                                      <tr>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  height="20" \
                align="right"><font
                                            size="3" face="">-75</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right">-76</td>  <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-81</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-76</font></td>
                                      </tr>
                                      <tr>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  height="20" \
                align="right"><font
                                            size="3" face="">-80</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right">-81</td>  <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-86</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-81</font></td>
                                      </tr>
                                      <tr>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  height="20" \
                align="right"><font
                                            size="3" face="">-85</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right">-86</td>  <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-91</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-86</font></td>
                                      </tr>
                                      <tr>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  height="20" \
                align="right"><font
                                            size="3" face="">-90</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right">-91</td>  <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-96</font></td>
                                        <td
                                          \
style="border-width:1px;border-style:solid;border-color:rgb(0,0,0)"  \
align="right"><font size="3"  face="">-91</font></td>
                                      </tr>
                                    </tbody>
                                  </table>
                                </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><u>Procedure for wideband
                                    signal (not CW)</u></div>
                                <div dir="ltr">Right now the power[dB]
                                  must be calculated with the occupied
                                  FFT bins, let's assume this is the
                                  signal and the NFFT=128, so we can see
                                  that the signal occupies only 2/10
                                  grids in the FFT so:</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">Power_of_signal[dB] =
                                  Peak_power[dB]+
                                  10*log(FFT_bins_with_signal) =
                                  (-15dB) + 10*log10((2/10)*(128)) =
                                  (-15dB) + (14) = (-1dB)</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><img
                                    src="cid:part6.egllrIlv.792MzNkN@gmail.com"
                                    alt="image.png" class="" width="542"
                                    height="519"><br>
                                </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><u>Convert to dBFS for
                                    the USRP X310</u></div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">How do you propose to do
                                  it? </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">The ADC of X310 has 14
                                  bits. so the MSB values are 2^13 = + -
                                  8192 (signed values).</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">Power[dBFS] =
                                  20*log10(voltage_value_measured/8192)</div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><u>Some questions:</u></div>
                                <div dir="ltr"><u><br>
                                  </u></div>
                                <div dir="ltr">
                                  <ol>
                                    <li>Does the gnuradio amplitude axis
                                      in QT GUI TIME DOMAIN are
                                      always float-point values in the
                                      range {-1.0,+1.0} for a received
                                      signal from USRP? </li>
                                    <li>If the answer to 1 is yes, then
                                      if I see amplitude = 0.5 , does it
                                      mean 20*log10(0.5)=(-6dBFS) ? is
                                      that correct?</li>
                                    <li>I know that the maximum input
                                      power for the UBX is (-15 dBm),
                                      but what does it mean that
                                      (-15dBm) input power is 0[dBFS]? </li>
                                    <li>Has anyone had experience with <a
href="https://files.ettus.com/manual/page_power.html" target="_blank"
                                        moz-do-not-send="true">RX power
                                        calibration</a> of USRPX310 with
                                      UBX-160?<br>
                                      If I understand correctly, it is
                                      supporting the power API:</li>
                                  </ol>
                                  <div><br>
                                  </div>
                                  <div><img
                                      src="cid:part7.RGwUrXfl.43U9OU7O@gmail.com"
                                      alt="image.png" class=""
                                      width="542" height="101"><br>
                                  </div>
                                </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr"><br>
                                </div>
                                <div dir="ltr">Thanks</div>
                                <div dir="ltr">Dor</div>
                                <div dir="ltr"><br>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                        </blockquote>
                      </div>
                    </blockquote>
                    <br>
                  </div>
                </blockquote>
              </div>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>


["image.png" (image/png)]
["image.png" (image/png)]
["image.png" (image/png)]
["image.png" (image/png)]
["image.png" (image/png)]
["image.png" (image/png)]
["image.png" (image/png)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic