
Fun with Software-Defined Radios: Mapping the Spectrum in the Mission, SF - slewis
https://medium.com/@BeepLabs/fun-with-software-defined-radios-d547c83a7492
======
agoetz
If you try to estimate power spectral density using the intuitive unbiased
estimator (the DFT), you are going to have a bad time. A vanilla periodogram
has very high sideband leakage, which means that the energy of the signal at a
single frequency will look as if it "smeared out" across neighboring
frequencies. The standard solution to this is to use the so-called 'modified
periodogram' where the implicit rectangular window is replaced by a different
windowing function with lower sideband leakage. In general, there is a direct
tradeoff between sideband power and center frequency power, and in this
application, you would do well to use a different window, such as the
blackman-harris, or hamming window. See [1] for more details.

In addition even the modified periodogram discussed above has asymptotically
nonzero variance [2], which means no matter how many samples you take, you
will still have 'noise' in your PSD estimate. If you use biased estimators of
the periodogram, such as the welch-bartlett method or the blackman-tukey
algorithm, you will get much better results.

[1] [http://www.ni.com/white-paper/4844/en/](http://www.ni.com/white-
paper/4844/en/)

[2] [http://www.mathworks.com/help/signal/ug/nonparametric-
method...](http://www.mathworks.com/help/signal/ug/nonparametric-methods.html)

~~~
throwacnt
In theory, everything you write is correct.

In practice, none of it matter in this case. The leakage of rectangular window
is ~30dB at a distance of 30 bins, and they aggregate more than 30 adjacent
bins together ("re-bin"), making the leakage no more than 1 bin. To make
things worse, the dynamic range of their receiver barely scrapes 40dB (peak)
or 30dB (SFDR/SINR) - rendering the use of a more sophisticated window a moot
point.

------
fapjacks
If the $650 pricetag for the hardware described in the post leaves a bad taste
in your mouth, you can use a fifteen dollar (including shipping) SDR from
China[0] for basically the same spectrum coverage and utility[1].

[0]: [http://www.amazon.com/RTL2832U-Low-Cost-Software-
Compatible-...](http://www.amazon.com/RTL2832U-Low-Cost-Software-Compatible-
Packages/dp/B00SXZDUAQ/) [1]: [http://www.rtl-sdr.com/](http://www.rtl-
sdr.com/)

~~~
npen
Hi, author here -- I agree, the BladeRF is overkill for this kind of
application. But, we were done with what we needed it for and it was just
sitting around our lab so we decided to use it. I did use an RTL-SDR to poke
around in the lower half of UHF, though.

~~~
mspecter
Also check out the HackRF One! You can look at a much wider spectrum, as well
as broadcast. The thing itself is 300$, and completely open.
([https://www.sparkfun.com/products/13001](https://www.sparkfun.com/products/13001))

~~~
bigiain
For those of you, like me, outside the US, be prepared for some interesting
questions on ordering a HackRFOne (or I suspect the BladeRF or USRP or
probably any other transmit-capable SDR):

Your recent SparkFun order contains 2x WRL-00705, 1x WRL-13001. This item is
export controlled by the United States government. By law, we are required to
gather the following information from you as the importer:

1) Do you intend to sell or send this item to anyone in any of the following
countries: Cuba, Iran, North Korea, Sudan, or Syria?

2) Will this be used in any military applications?

3) Will you be the ultimate end user of this item? If no, please go to 3.a.

3.a) If you are not the end user, who will this item be sold or transferred
to? Please include full name, physical address, end use and confirmation that
they will not sell or transfer this item to any party in Cuba, Iran, North
Korea, Sudan or Syria.

4) What is the end use of this item?

5) Where is the location where the item will be used?

Response to all five questions is necessary before we are able to ship your
order.

(I hate to consider which "lists" I'm now on...)

~~~
makomk
Quite a lot of things seem to be export-controlled, for example this
microcontroller dev board is:
[https://www.sparkfun.com/products/12646](https://www.sparkfun.com/products/12646)

~~~
bigiain
To be honest, I'm not at all surprised - considering you can use it to do
stuff like this:
[https://media.defcon.org/DEF%20CON%2023/DEF%20CON%2023%20pre...](https://media.defcon.org/DEF%20CON%2023/DEF%20CON%2023%20presentations/Lin%20Huang%20&%20Qing%20Yang/DEFCON-23-Lin-
Huang-Qing-Yang-GPS-Spoofing.pdf)

(But then, you can use a hammer to bash someone's brains in, and we don't
export control them...)

------
ChuckMcM
I have been interested in this stuff since I saw a presentation on SDR by the
folks at Ettus Research (and their amazing SDR setup). I eventually bought a
HackRF One from Greatscott Gadgets to play with and it, like the BladeRF can
cover a lot of ground with a pretty wide chunk (its only 20Mhz bandwidth
generally but this has not been a limitation so far). So far I've been looking
at beacons and other iOT type things, and decoding the remote control to my
ceiling fan (fun). Very fun stuff to look at the spectrum and see what is
there.

------
gbtw
Essentially what you really want to build is the University of Twente SDR
that's been up for a few years and you can listen in on over the web :)

[http://websdr.ewi.utwente.nl:8901/](http://websdr.ewi.utwente.nl:8901/)

------
vvanders
Love the penny antenna.

~~~
bigiain
I would have (in fact have done) gone for a diy discone or logperiodic antenna
for wideband reception like this...

