I'm very new to RTL-SDR and signal processing in general, but have managed to get my device (NOOELEC NESDR Mini) working and data into Python (via the pyRTLSDR library).

I am able to output a complex-valued array of predefined length. I understand these are the I/Q values. The distribution of these values is what I'm interested in for now (rather than applying FFT and whatever comes after).

In a given sample, I found that the distribution of both the real and the imaginary parts of the array formed a truncated normal:

enter image description here

I had some questions regarding this:

  • How do I interpret the noise that is on top of these I/Q values?
  • Why are the values truncated between -1 and 1? Is the limitation of being inside the unit circle just a hardware thing, or a theoretical thing?
  • Can I extract just the noise from these values to get an array of true random numbers?

Further, can someone point me towards some literature so I better understand this initial step of the process?

Note that the SDR settings were left as default except the centre frequency, which is tuned to a local FM station:

# configure device
sdr.sample_rate = 2.048e6  # Hz
sdr.center_freq = 107.6e6  # Hz
sdr.freq_correction = 60   # PPM
sdr.gain = 'auto'
  • $\begingroup$ An RTL-SDR outputs 8-bit integer IQ values (0..255, or -128..127). How are you (or the python library) scaling these integer IQ pairs to get a range of -1.0 to 1.0 ? $\endgroup$
    – hotpaw2
    Jul 21 '21 at 21:10
  • $\begingroup$ That graph looks like a normal distribution of noise, except for the two end-most bins, which are higher than their adjacent neighbours. That looks like signal clipping, where the SDR's ADC limits are exceeded, The usual procedure for "out-of-bounds" ADC samples is clipping. Could be the result of auto gain setting? $\endgroup$
    – glen_geek
    Jul 21 '21 at 21:12
  • $\begingroup$ The auto gain setting on an R2832U RTL-SDR is often too high a gain (as it was likely designed for a different type and bandwidth of DTV signal). Try using manual gain, and reduce it so as not to see any (or too much) clipping. $\endgroup$
    – hotpaw2
    Jul 21 '21 at 21:24
  • $\begingroup$ Hi Kris, and welcome to ham.stackexchange.com! $\endgroup$
    – rclocher3
    Jul 22 '21 at 1:29

An RTL-SDR outputs 8-bit integer IQ values via its USB connection data packet. That creates a fixed limit to the range of possible values (0 to 255 unsigned, or -128 to 127 signed, not -1.0 to 1.0, unless scaled somewhere).

Your IQ signal will usually be a result of a mix of RF sources. A significant portion of RF noise is additive (a smaller portion might be intermodulation artifacts, etc.). Normally, you can't unmix an uncorrelated set of additive quantities, unless one of them (your FM station signal?) is perfectly known to you, and thus can be subtracted. You could try filtering out your assumed-non-noise signals in the frequency domain, and then analyzing what's left.

  • $\begingroup$ Thanks. It does seem as though the pyRTLSDR library is normalising the samples. Suppose I tuned into a local radio station playing a song; how would I go about doing what you mentioned at the end? (i.e "filtering out your assumed-non-noise signals in the frequency domain") $\endgroup$
    – Kris
    Jul 23 '21 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.