# Wrong dB

**URL:** <https://www.ruby-forum.com/t/wrong-db/161876>\
**Category:** GNU Radio\
**Created:** [March 3, 2009, 10:50am UTC](https://www.ruby-forum.com/t/wrong-db/161876 "2009-03-03T10:50:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![feldmaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/46a35a/32.png) [@feldmaus](https://www.ruby-forum.com/u/feldmaus)\
**Post date:** [March 3, 2009, 10:50am UTC](https://www.ruby-forum.com/t/wrong-db/161876/1 "2009-03-03T10:50:08Z")

</div>

Hi All,

i think i have a misunderstanding, but i don’t know where it is.

I tried out an example named \<usrp\_am\_mw\_rcv.py\> with  
a Hardware Signal Generator connected to my USRP.  
My Signal Generator generates a sin Signal with 7.0711e-3V effective  
at f=1.05e6 Hz.

So my power is,  
P = U\*I = U^2/R, with I = U/R  
P = (7.0711e-3\_V)^2/50\_Ohm  
P = 1e-6 W

Now we convert this into dB,  
P\_dB = 10 \* log10 (P/P\_0), with P\_0 = 1W  
p\_dB = -60\_dB

But my measured Power is -11,933\_dB so what is my Problem ?  
Any Hints ?

The example can be found in,  
/usr/local/share/gnuradio/examples/usrp/usrp\_am\_mw\_rcv.py

Regards Markus

---

<div class="post-metadata">

**Author:** ![feldmaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/46a35a/32.png) [@feldmaus](https://www.ruby-forum.com/u/feldmaus)\
**Post date:** [March 3, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/wrong-db/161876/2 "2009-03-03T15:27:05Z")

</div>

On Tue, Mar 03, 2009 at 09:49:02AM +0000, feldmaus wrote:

> i think i have a misunderstanding, but i don’t know where it is.

Here it is:

> Now we convert this into dB,  
> P\_dB = 10 \* log10 (P/P\_0), with P\_0 = 1W  
> p\_dB = -60\_dB

Here, you’re comparing with 1W. You could have randomly chosen something  
else, such as 1mW, yielding yet another relation.

> But my measured Power is -11,933\_dB so what is my Problem ?  
> Any Hints ?

Here, you’re comparing with something else. There’s a lot of stuff  
between the coax connector and your software, so you can’t trivially  
translate sample values into Volts. Calibrating a USRP/GNU Radio setup  
to actually measure physical units is not easy. That’s why it uses ‘dB’  
and not ‘dBW’ or ‘dBm’, it’s merely a relation.

Cheers,  
MB

---

<div class="post-metadata">

**Author:** ![feldmaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/46a35a/32.png) [@feldmaus](https://www.ruby-forum.com/u/feldmaus)\
**Post date:** [March 3, 2009, 4:01pm UTC](https://www.ruby-forum.com/t/wrong-db/161876/3 "2009-03-03T16:01:51Z")

</div>

Martin B. \<braun [int.uni-karlsruhe.de](http://int.uni-karlsruhe.de)\> writes:

> Here, you’re comparing with something else. There’s a lot of stuff  
> between the coax connector and your software, so you can’t trivially  
> translate sample values into Volts. Calibrating a USRP/GNU Radio setup  
> to actually measure physical units is not easy. That’s why it uses ‘dB’  
> and not ‘dBW’ or ‘dBm’, it’s merely a relation.

You are right. There is many stuff between USRP and my Generator, but  
the difference between -11.933dB(W or m) to -60dB is very big.  
So there should be a misunderstanding or big problem ?

Therefore i tested the output of my hardwaregenerator  
with a hardware scope. My cables are ok.

Which dB is shown on the FFT-Plot ?

I also tried it on my own python program with the following  
modules:  
[USRP Source]–\>[Compl\_To\_Mag]–\>[Throttle]–\>[FFT-Sink]

Is that ok to analyze the magnitude and freq of my sin signal ?

Or do i have to pay attention to decimation, sample rate and  
IF Frequency to not violate the Nyquist criteria ?

Regards Markus

---

<div class="post-metadata">

**Author:** ![feldmaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/46a35a/32.png) [@feldmaus](https://www.ruby-forum.com/u/feldmaus)\
**Post date:** [March 3, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/wrong-db/161876/4 "2009-03-03T16:31:56Z")

</div>

On Tue, Mar 03, 2009 at 02:52:44PM +0000, feldmaus wrote:

> So there should be a misunderstanding or big problem ?  
> Don’t confuse dB and dBW. You want to see -60dBW, but you see -11.9dB.  
> That’s because your justing looking at numbers, not voltages.

> I also tried it on my own python program with the following  
> modules:  
> [USRP Source]–\>[Compl\_To\_Mag]–\>[Throttle]–\>[FFT-Sink]
> 
> Is that ok to analyze the magnitude and freq of my sin signal ?

Only their relations, i.e. ‘there is twice as much energy around f1 than  
there is around f2’. Take a look at the FFT sink code and you’ll find  
averaging etc. GNU Radio does not know the precise antenna voltage.  
Besides, there is a FFT sink for complex signals and you won’t need a  
throttle here, as the sampling rate is limited by the USRP.

Cheers  
mb

---

<div class="post-metadata">

**Author:** ![feldmaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/46a35a/32.png) [@feldmaus](https://www.ruby-forum.com/u/feldmaus)\
**Post date:** [March 3, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/wrong-db/161876/5 "2009-03-03T18:18:36Z")

</div>

Martin B. schrieb:

> Don’t confuse dB and dBW. You want to see -60dBW, but you see -11.9dB.  
> That’s because your justing looking at numbers, not voltages.  
> However there should be a reference point ?  
> So if you are right, which is the reference number ?  
> From this to my Number should be a difference of 60dB.  
> Only their relations, i.e. ‘there is twice as much energy around f1 than  
> there is around f2’. Take a look at the FFT sink code and you’ll find  
> averaging etc. GNU Radio does not know the precise antenna voltage.  
> Besides, there is a FFT sink for complex signals and you won’t need a  
> throttle here, as the sampling rate is limited by the USRP.  
> As i know at this moment and as my results says that is not correct.  
> You need a Throttle, otherwise your application  
> is busy. Maybe you can substitute the throttle, but thats it.  
> The USRP transmits as much data as it can to your computer.

Regards Markus

---

<div class="post-metadata">

**Author:** ![feldmaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/46a35a/32.png) [@feldmaus](https://www.ruby-forum.com/u/feldmaus)\
**Post date:** [March 3, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/wrong-db/161876/6 "2009-03-03T18:53:58Z")

</div>

On Tue, Mar 3, 2009 at 12:16 PM, Markus F.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Martin B. schrieb:
> 
> > Don’t confuse dB and dBW. You want to see -60dBW, but you see -11.9dB.  
> > That’s because your justing looking at numbers, not voltages.
> 
> However there should be a reference point ?  
> So if you are right, which is the reference number ?  
> From this to my Number should be a difference of 60dB.

Usually when dealing with ADCs, the reference is a full scale conversion  
(dBFS).

The amount of gain applied to the signal externally may very well be  
unknown to the system, but you can still maintain some level of  
confidence of signal levels using dBFS.

```
http://en.wikipedia.org/wiki/DBFS

```

Brian

---

<div class="post-metadata">

**Author:** ![feldmaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/46a35a/32.png) [@feldmaus](https://www.ruby-forum.com/u/feldmaus)\
**Post date:** [March 3, 2009, 7:13pm UTC](https://www.ruby-forum.com/t/wrong-db/161876/7 "2009-03-03T19:13:24Z")

</div>

On Tuesday 03 March 2009 18:16:36 Markus F. wrote:

> Martin B. schrieb:
> 
> > Don’t confuse dB and dBW. You want to see -60dBW, but you see -11.9dB.  
> > That’s because your justing looking at numbers, not voltages.
> 
> However there should be a reference point ?  
> So if you are right, which is the reference number ?  
> From this to my Number should be a difference of 60dB.

The reference point is 0dbFS - FS meaning Full Scale, -32768…32767.  
The  
signal power you need to get this readings from the ADC, or more exactly  
from  
the FPGA depends on the daughterboard, PGA setting on the daughterboard,  
decimation …

You have to calibrate your USRP to get from the sampling values to input  
power  
in Watts.

> > Only their relations, i.e. ‘there is twice as much energy around f1 than  
> > there is around f2’. Take a look at the FFT sink code and you’ll find  
> > averaging etc. GNU Radio does not know the precise antenna voltage.  
> > Besides, there is a FFT sink for complex signals and you won’t need a  
> > throttle here, as the sampling rate is limited by the USRP.
> 
> As i know at this moment and as my results says that is not correct.  
> You need a Throttle, otherwise your application  
> is busy. Maybe you can substitute the throttle, but thats it.  
> The USRP transmits as much data as it can to your computer.

The USRP outputs 64MS per second, divided by the decimation value, so it  
is  
rate limited. Maybe your computer is not able to keep up with that, so  
you  
have the _feeling_ the USRP is not rate limited, but thats just wrong.

Stefan

–  
Stefan Brüns / Bergstraße 21 / 52062 Aachen  
mailto:lurch at gmx.li [http://www.kawo1.rwth-aachen.de/~lurchi/](http://www.kawo1.rwth-aachen.de/~lurchi/)  
phone: +49 241 53809034 mobile: +49 151 50412019

---

<div class="post-metadata">

**Author:** ![feldmaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/46a35a/32.png) [@feldmaus](https://www.ruby-forum.com/u/feldmaus)\
**Post date:** [March 3, 2009, 8:22pm UTC](https://www.ruby-forum.com/t/wrong-db/161876/8 "2009-03-03T20:22:17Z")

</div>

Stefan Brüns wrote:

> You have to calibrate your USRP to get from the sampling values to input power  
> in Watts.

Absolutely!!

You can’t get even close to “real” numbers without knowing  
reasonably-precise figures for gains (losses) in the entire  
chain from the antenna up to the application. Digital filters have  
gains/losses, there are gains/losses in all the bits of  
analog gear in front of the A/D as well.

For my radio astronomy work, I generally don’t pay too much attention to  
calibration within the application, but rather  
use calibrations when post-processing the logged data. We also use  
“calibration sources”–radio sources in the  
sky with known, stable, flux densities at the observing frequency.  
Radio telescopes regularly measure signals  
down in the pico-watts, to a reasonable degree of repeatability and  
precision.

–  
Marcus L.  
Principal Investigator, Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.
