-1

The N210 is connected to the RF frontend, which gets configured using the GNU Radio Companion.

I can see the signal with the FFT plot; I need the received signal (usrp2 output) as digital numbers.The usrp_sense_spectrum.py output the power and noise_floor as digital numbers as well.

I would appreciate any help from your side.

Abs
  • 111
  • 1
  • 2
  • 13
  • This was also discussed on the mailing lists of GNU Radio and the USRP-users mailing list: http://lists.gnu.org/archive/html/discuss-gnuradio/2015-06/msg00025.html there seems to be consesus that the user will need to both understand the math involved in depth and calibrate his USRP himself. – Marcus Müller Jun 05 '15 at 16:47
  • 1
    I don't know how you managed, but you made your question worse. `usrp_spectrum_sense` is **nothing** more than an FFT plot, which you have already implemented. As at least two people on three forums told you now, you will **never** get physical power indications out of the USRP if you don't calibrate. "dB" is not a "decimal format", it stands for decibel and is a relative measurement for two numbers. In this case, the numbers that the FFT plot calculates are simply represented in relation to 1. – Marcus Müller Jun 11 '15 at 08:15
  • 1
    What you're confusing "dB" with is possible things like "dBm", which actually is a measurement in dB relative to milliwatt. If you need that, you will have to calibrate -- feed in an RF signal with a known power (in milliwatt) and look at the spectrum plot. Then you know that everything that is, for example, 3dB stronger in the plot is about 3dB stronger than the known signal. Please, please, please read the wikipedia article on decibel first. – Marcus Müller Jun 11 '15 at 08:18
  • Thank you Marcus all the information given is very helpful. I apreciate that. – Abs Jun 15 '15 at 16:56

2 Answers2

1

Answer from the USRP/GNU Radio mailing lists:

Dear Abs,

you've asked this question on discuss-gnuradio and already got two answers. In case you've missed those, and to avoid that people tell you what you already know:

Sylvain wrote that, due to a large number of factors contributing to what you see as digital amplitude, you will need to calibrate yourself, using exactly the system you want to use to measure power:

You mean you want the signal power as a dBm value ?

Just won't happen ... Too many things in the chain, you'd have to calibrate it for a specific freq / board / gain / temp / phase of the moon / ...

And I explained that if you have a mathematical representation of how your estimator works, you might be able to write a custom estimator block for both of your values of interest:

>

I assume you already have definite formulas that define the estimator for these two numbers. Unless you can directly "click together" that estimator in GRC, you will most likely have to implement it. In many cases, doing this in Python is rather easy (especially if you come from a python or matlab background), so I'd recommend reading at least the first 3 chapters of https://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials

If these answers didn't help you out, I think it would be wise to explain what these answers are lacking, instead of just re-posting the same question.

Best regards, Marcus

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
0

I suggest that you write a python application and stream raw UDP bytes from the USRP block. Simply add a UDP Sink block and connect it to the output of the UDH: USRP Source block. Select an appropriate port and stream to 127.0.0.1 (localhost)

Now in your python application open a listening UDP socket on the same port and receive the data. Each sample from the UDH: USRP Source is a complex pair of single prevision floats. This means 8 bytes per sample. The I float is first, followed by the Q float.

Note that the you need to pay special attention to the Payload Size field in the UDP Sink. Since you are streaming localhost, you can use a very large value here. I suggest you use something like 1024*8 here. This means that each packet will contain 1024 IQ Pairs.

I suggest you first connect a Signal Source and just pipe a sin() wave over the UDP socket into your Python or C application. This will allow you to verify that you are getting the float bytes correct. Make sure to check for glitches due to overflowing buffers. (this will be your biggest problem).

Please comment or update your post if you have further questions.

benathon
  • 7,455
  • 2
  • 41
  • 70
  • I don't recommend doing this, it has no advantage over getting the samples out of the device using UHD, the designated USRP driver framework. It also doesn't solve the problem that OP has, namely determining these values. – Marcus Müller Jun 05 '15 at 16:48