Hello Leif, Thank very much for your reply - surely I did not explain myself well. I am a newbie in this so please bare with me for stupidities I might be saying below.
Unfortunately I am now out of the office until mid-next week but I can provide more details and pictures of the problem then. In the meantime, please take a look in line below for comments... On 13 April 2014 02:37, Leif Asbrink <[email protected]> wrote: > Hello Mic, > > > I have done a bit of experience with RTL-SDR, which I am trying to use it > > as a spectrum scanner. > That should be possible although you can not expect miracles;-) > > > The first part of my plan involved connecting the RTL-SDR to a source of > > filtered white noise and measure the gain response. I do that with a > > Bladerf broadcasting a random signal in a 8MHz band around 626MHz. > ??????? > Gain response. Do you mean how the real gain changes for different > settings of hardware gain? > My understanding is the following: I must set the gain manually. I then acquire a snapshot of data and look at the signal dynamics. If the standard deviation is very low (say 1-2) and I have more gain available, I increase it until it reaches the maximum (46.9 dB on R820T). If the standard deviation is very high instead, then I lower the gain until it reaches the minimum. So, in the linear region of RTLSDR I should see the spectrum going up 10 dB when I set 10 dB more gain and so on. Ideally, if the plateau of the spectrum analyzer is at -70 dBm in a 8 MHz bandwidth, I should be able to see X dBm the same in my scanner I lowering the power to -80 dBm I should see it at X-10 dBm in my scanner. > > > The output of the bladerf is connected to a splitter and goes to a > spectrum > > analyser and a RTLSDR, so that I can always monitor the power level I > > inject into the dongle (around -65dBm). > OK. > > > I set a sampling frequency of 3.2MHz and discard frequency components > > outside +/- 1MHz in order to minimise aliasing in band. Packet losses are > > not important for a spectrum scanner so I don't consider that > possibility a > > problem. > I am afraid 3.2 MHz will cause loss of data points in an unpredictable > fashion. > You should not go above 2.4 MHz. When you loose data randomly you > might even get I and Q mixed up and you might get signal energy from > near the Nyquist frequency into the baseband below 1 MHz. > I don't believe I can ever get I&Q mixed up, but OK I will set the frequency lower. I am trying now to see if I can change the filter coefficients to allow less out-of-band aliasing. > > > I designed a simple software starting from rtl_sdr which > > 1) collects a packet > > 2) computes the standard deviation of the signal (which is assumed > > zero-mean) > But it is NOT zero mean. You should compute the average value, > then compute the standard deviation from the average value. > Well with the R820T the signal is brought to baseband with a DDC.. so if it is well done the mean should be very close to zero when the ADC is properly driven (only fixed point numerical noise should be left). Anyway, I compute STD against the measured mean already. > > > 3) if needed, adjusts manually the gain in order to excercise the optimal > > number of bits of RTL2832U and goes back to 1) > ???????? > It is unclear to me what you do here. > I tried to explain above, but I know it's a messy explanation... If only two bits of the ADC are exercised (values are -3 -1 +1 +3) and the current manual gain is lower than 49.6dB then I increase it. If the STD of the signal is higher than 128 / 3 and the current manual gain is higher than 0.0dB then I decrease it. > > 4) saves the packet to the disk and the parameters of its acquisition > into > > a header later processed with Octave > > > > Well it does not work very well. Essentially what I see is that when the > > number of bits exercised in the ADC is greater than 2-3, the channel > > already contains alias images of out-of-band signals. So my 8-MHz channel > > around 626MHz has long "skirts". > What you say is very confusing to me. It seems a lot of information > is missing. > A picture here would be helpful I know... will come soon. Essentially I would like to see in my spectrum the 8 MHz band occupied and sharp walls around it. Instead, the 8MHz band is there, the spectrum analyzer shows sharp walls around it but my measured one has noise leaking power in the adjacent bands, unless I set the gain very low, to say 10 dB, and only exercise 2 bits of the ADC. This essentially defeats my gain setting policy, that only looks at the signal STD... either I keep it strictly between 2 and 4 or I have leakage from out of band emissions. It is like the analog section is saturating a long way before the ADC saturates, or I am missing something? > > > Of course I tried using > > http://eartoearoak.com/software/rtlsdr-scanner > > for a comparison. > Something seems wrong with this link. The noise floor is very different > above and below the signal. I have not studied in detail, but at a first > glance > it does not look right. > > > I don't understand why a sampling of 2MHz is used there, when it is the > > bare minimum since the filter 3dB bandpass seems to be precisely that. > They look at the center and the aliases will be pretty well attenuated. > I guess they want a small safety margin vs the maximum at 2.4 MHz. > > >From what I have seen, they discard the very center and the sides in order to increase fidelity of the PSD. > > I see that all AGCs are disabled there, as I also did of course. But with > > high gain set (>30dB), skirts appear in that program too. Now what I > cannot > > see is the ADC dynamic corresponding to those data captures. > Again, I am confused. You say the signal is 8 MHz of random noise. > What do you mean by "skirts appear?" > In the spectrum analyzer I see an 8MHz band occupied nicely with a plateau at -65 dBm, noise floor everywhere else. Say this looks like smooth "rectangle". In RTLSDR-scanner , I see quite a bit of leakage so the plot looks more like a "trapezoid" > > Maybe you are looking at nonlinearities in the stages preceeding the > filter. You say inject -65 dBm. It that the total power in the full > bandwidth > of 8 MHz or is it what you read in some instrument bandwidth of your > spectrum analyzer? > The second. > > The 820T is more sensitive to out-of-band signals than E4000 and FC0013. > Look here: > https://www.youtube.com/watch?v=14CD1ERdRn0 > > In the E4000 tuner I know how to set the gain distribution and Linrad uses > that knowledge. You can see what it means here: > https://www.youtube.com/watch?v=cVU5X1d2XYU > > The problems with 820T seems to be filtering and aliasing. Front end > linearity seems good: > https://www.youtube.com/watch?v=e8UBxlBlM6k > > My experiments indicate that all the dongles are reasonably good and > use the 8 bit range of the RTL2832 chip reasonably well. The 820T does not > have zero IF so it suffers from mirror images. It seems to suffer also > from aliases on the signal itself as well as on the images. Maybe that > is what you see? > > Could be. > I think the FC0013 would be a better choice for a spectrum scanner. > > > What the above seems to suggest is that the ADC is not driven optimally > in > > the R820T? Ideally, one would expect to be able to exercise many bits > > without saturation of the tuner chain.. but there is little information > on > > the IF VGA. > > Any speculations on this topic? > I do not think your observation indicates that the ADC is not properly > driven. > I think the 820T suffers from other weaknesses. > Sure, but for 10 USD it does a very good job. I designed many signal grabbers (the last of which being based on MAX2169) so I can characterize what I receive well on those, but I could never match the price point of RTLSDR. > > Regards > > Leif / SM5BSZ > > > Thanks a lot again, Mic -- Michele Bavaro Consultant at OneTalent GNSS Mob. IT: +39 347 009 4377 Skype: onetalent-gnss http://www.onetalent-gnss.com
