SDRLab: an RTL-SDR interface to LabVIEW for educational purposes

The RTL-SDR project aims to use cheap USB DVB-T receviers as Software Defined Radio receivers. I've recently made some SubVIs for LabVIEW that grab I/Q samples from these devices, and I've also implemented a demodulator for FM broadcasts.

It's important to note that the corresponding National Instruments USRP hardware have much better performance and also able to transmit as well, so actually USRP is suitable for industrial purposes, while RTL-SDR might only be recommended for students and hobbyists. There's a table below that shows a comparison between some parameters of the two systems. (However, these are also dependent on hardware configuration, e. g. for RTL-SDR dongles the tuner chip on the panel.)

NI USRP-2922 RTL-SDR
Frequency range 400 Mhz - 4.4 GHz 50 MHz - 1800 MHz
Bandwidth max. 40 MHz max. 2 MHz
Bit depth max. 16 bit 8 bit
2×2 MIMO available yes no
Transmit capability yes no

RTL-SDR devices also suffer from image rejection problems, "birdies" showing up in the spectrum, and intermodulation products. Anyway, they have quite a good sensitivity, and can be used to receive amateur radio operators, PMR walkie-talkies, FM radio and also TV audio. There have even been successful experiments to decode raw GSM packets and GPS signals with these devices.

Nevertheless, our project might help some people to start out with SDR and signal processing, particularly other students, who can't afford costly hardware, but can buy a DVB-T tuner for ~15 USD, and might start to experiment with LabVIEW using real-world signals. Similarly LabVIEW supports cheap devices like Arduino with a free add-on. Considering the limitations of RTL-SDR, the software we release is useful mainly for educational purposes.

There's a list of compatible hardware devices over here. You can also search for RTL-SDR or RTL2832U on eBay.

Requirements

  • An RTL-SDR compatible DVB-T dongle,
  • RTL-SDR windows binaries downloaded,
  • driver already set up (easiest way is to follow this tutorial and install the driver along with SDR#),
  • National Instruments LabVIEW 2011.

How to run

  • Unpack the supplied project and open sdrlab.lvproj.
  • Copy START_RTL_TCP.bat to the directory where rtl_tcp is located, and run it.
  • Now you can run the toplevel.vi that is supplied with the project, you can leave address and port settings as is and press Play.

Notes

  • In this version, after changing parameters like frequency and gain, you'll have to wait about 10 seconds to hear the changes taking effect. It might help if you find the frequency of a strong FM broadcast station in SDR# before trying this program.
  • The project will run as well on Student Edition, without the Modulation Toolkit. (If LabVIEW complains about it, run sdrlab_no_mt.lvproj.) It may also run on the Linux version of LabVIEW, but you have to use the corresponding rtl_tcp version.
  • Anyway, if you want to use Modulation Toolkit for processing the I/Q samples grabbed from RTL-SDR, there's a modulation_toolkit_example.vi included, which basically does something similar to toplevel.vi. (However, the support for this toolkit is only partially tested for now.)
  • rtl_tcp is quite bogous at the moment, many times it rather fails and exits than accepting the TCP connection, especially when you try to connect the second time. If it happens, pressing (or pressing and holding) Ctrl+C in the terminal window might help to restart it.

The project is available for download and use under the BSD licence:

I would like to say thanks to Ferenc Ender for his great course on LabVIEW I've taken at the university last year (and this software also started out as homework for this course). Also thanks to Alipio Fernandez for testing and feedback.

-- András Retzler, HA7ILM

Hozzászólások

I am a beginner regarding Labview.
The interface with the toplevel VI is really amazing and so far as I know the only one till now for RTL-SDR (I have one with the E4000 and a
Funcube Pro)
The sound with your interface very clear!

I try to rebuild your interface with the mod_toolkit_example.VI in order to achieve a continious and clear sound with the modulation toolkit.
However, the sound is very creaky. I really don't know how to solve this problem. Besides of that it stops after a while.
I wonder if you are familiar with the WaveIO soundcard interface for Labview from Christian Zeitnitz?
http://www.zeitnitz.de/Christian/waveio?mid=9

I'm happy if you've found SDRLab useful.
The most challenging thing was to get clear audio, without any clicks, lags, etc.

As far as I remember, built-in sound VIs do have a small buffer so you can't just pipe one second of demodulated audio into them at once. However, from rtl_tcp you get quite big chunks of data. Feeding the sound VIs properly is a specific part of toplevel.vi, and there's also a SubVI included to help that.

Lags can also occur if your demodulating process is slow, therefore Sound Output Write VI gets less data than required (underrun). Also note that you can easily make an SDR application that uses multiple CPU cores if you follow some rules. The approach used in SDRLab is called "pipelining", and is described here. (It's basically a while loop with feedback nodes in it.)

Progress bars on the left side of the panel are to indicate which part of the demodulating process finishes last for one iteration (thus it takes the most time).

Thanks for mentioning WaveIO, I was aware of it during the development, but I ended up not using it. It would also be nice if someone managed to build a version using that, as of those SubVIs look quite robust.

Új hozzászólás

Sima szöveg

  • A HTML jelölők használata nem megengedett.
  • A webcímek és email címek automatikusan kattintható hivatkozásokká alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
CAPTCHA