Hackaday Dictionary: Software Defined Radio (SDR)

We are entering a new era of radio technology. A new approach to building radios has made devices like multi-band cell phones and the ubiquitous USB TV receivers that seamlessly flit from frequency to frequency possible. That technology is Software Defined Radio, or SDR.

A idealized radio involves a series of stages. Firstly, an antenna receives the radio signal, converting it into an electrical signal. This signal is fed into a tuned resonator which is tuned to a particular frequency. This amplifies the desired signal, which is then sent to a demodulator, a device which extracts the required information from the carrier signal. In a simple radio, this would be the audio signal that was encoded by the transmitter. Finally, this signal is output, usually to a speaker or headphones.

A replica foxhole crystal set. Photo: Bill Jackson
A replica foxhole crystal set. Photo: Bill Jackson

That’s how your basic crystal radio works: more sophisticated radios will add features like filters that remove unwanted frequencies or additional stages that will process the signal to create the output that you want. In an FM radio, for example, you would have a stage after the demodulator that detects if the signal is a stereo one, and separates the two stereo signals if so.

To change the frequency that this radio receives, you have to change the frequency that the resonator is tuned to. That could mean moving a wire on a crystal, or turning a knob that controls a variable capacitor, but there has to be a physical change in the circuit. The same is true of the additional mixing stages that refine the signal. These circuits may be embedded deeply in the guts of the radio, but they are still there. This is the limitation with normal receivers: the radio can’t receive a signal that is outside the range that the resonator circuit can tune to, or change the way it is demodulated and processed. If you want to receive multiple frequency bands or different types of signals, you need to have separate pathways for each band or type of signal, physically switching the signal between them. That’s why you have physical AM/FM switches on radios: they switch the signal from an AM radio processing path to an FM one.

Software Defined Radios remove that requirement. In these, the resonator and demodulator parts of the radio are replaced by computerized circuits, such as analog to digital converters (ADCs) and algorithms that extract the signal from the stream of data that the ADCs capture. They can change frequencies by simply changing the algorithm to look for another frequency: there is no need for a physical change in the circuit itself. So, an SDR radio can be tuned to any frequency that the ADC is capable of sampling: it is not restricted by the range that a resonator can tune to. Similarly, the demodulator that extracts the final signal you want can be updated by changing the algorithm, changing the way the signal is processed before it is output.

This idea was first developed in the 1970s, but it didn’t really become practical until the 1990s, when the development of flexible field-programmable gate array (FPGA) chips meant that there was enough processing power available to create single chip SDR devices. Once programmed, an FPGA has no problem handing the complex tasks of sampling, demodulating and processing in a single device.

Most modern SDRs don’t just use a single chip, though. Rather than directly converting the signal to digital, they use an analog front end that receives the raw signal, filters it and converts it down to a fixed frequency (called the intermediate frequency, or IF) that the ADCs in the FPGA can more easily digitize. This makes it cheaper to build: by converting the frequency of the signal to this intermediate frequency, you can use a simpler FPGA and a cheaper ADC, because they don’t have to directly convert the maximum frequency you want to receive, only the IF. As long as the front end can convert a band of signals down to an intermediate frequency that the FPGA can digitize, the SDR can work with it.

bladerf
The BladeRF, a modern SDR device that can receive and transmit signals between 300 MHz and 3 GHz

This flexibility means that SDR devices can handle a huge range of signals at relatively low cost. The $420 BladeRF, for instance, can receive and transmit signals from 300 MHz to 3.8 GHz at the same time, while the $300 HackRF One can work with signals from 1 MHz up to an incredible 6 GHz. The ability of the BladeRF to both receive and transmit means that you can use it to build your own GSM phone network, while the low cost of the HackRF One makes it a favorite of radio hackers who want to do things like make portable radio analyzers. Mass produced models are even cheaper: by hacking a $20 USB TV receiver that contains an SDR, you can get a radio that can, with a suitable antenna, do things like track airplanes or receive satellite weather images. And all of this is possible because of the idea of Software Defined Radio.

[Main image source: DVB dongle by Dsimic on Wikipeda CC-BY-SA]

42 thoughts on “Hackaday Dictionary: Software Defined Radio (SDR)

  1. I’d love to get my hands on something the size of a Samsung Galaxy Note that runs Android and has an RTL dongle built in. They have microusb dongles these days too, but an integrated unit would be even nicer.

        1. Right. I’m not interested in using an app that accesses someone’s far flung SDR over the Internet. Not my intent at all. I’m more interested in having something always on me that can pick up interesting signals around me.

      1. You could hack up the phones USB and solder it inside the case if there was enough physical free room for a nano RTL-SDR anywhere inside the case. the Birdies would probably be very nasty though.

    1. There should just be a phone case with room to put your gadget (connected to the USB) in so that it looks clean and doesn’t have dangling stuff on it that can snap off and that makes it cumbersome to pocket it.
      So maybe design some custom case fro 3D printing?
      If it’s done right you can remove the original casing of the dongle to keep the whole assembly small.

  2. Uh… no. Very unlikely (as later stated) that you will have a device doing ADC at GHz frequencies for anything that anybody not a billionaire can buy. Instead, they use the superheterodyne method (as you also state). The SDR has a programmable oscillator with variable frequency. This oscillator output is then mixed with the input frequency to produce an intermediate frequency f_{IF} = f_{signal} – f_{int. osc.}. The f_{IF} is significantly lower than the f_{signal} (maybe a few MHz or a few kHz depending on the application) and is thus much simpler to digitize.

    1. Most cheap oscilloscopes have a real-time sampling rate of 1 Gz, so it isn’t totally unreasonable. However, I don’t think that the article is suggesting that any actually do sample at those rates.

  3. “…you have to change the frequency that the resonator is tuned to. That could mean moving a wire on a crystal…”
    I don’t think that’s right.
    I don’t see how moving the wire on the crystal (the P-N junction) will affect resonance. Moving the “wiper” across the coil (in effect, changing the inductance of the coil) will change frequency. So will changing the length of the antenna system. Messing with the rectifier won’t (just like fiddling with the earpiece won’t either).

    1. And moving a wire on a/the quartz crystal in a receiver also would not do any good. As the “physical switching”, e.g. AM/FM can also be done with semiconductors (CMOS switches), you just need much more of them if you build a CPU or FPGA. :-) But of course SDR is a nice technology.

  4. If your crystal radio set tunes with a poor “quality” (Q), you receive a wider bandwidth – and may hear two stations at once. The SDR deliberately has a wide bandwidth, then uses Digital Signal Processing (DSP) to select one of the radio stations.

  5. Since others have picked on the technical details of this article…
    A resonator doesn’t amplify anything. It attenuates the outlying frequencies, leaving the desired range of frequencies for further processing/amplifying/mixing/detecting, etc.

  6. Can someone point me to a source that describes the nuts and bolts of using SDRSharp (or any SDR program)? I’m not a math whiz and just want to listen, but the many choices of filters and other options in the program are confusing to a novice. For example, when might I want to use a particular filter and what will it accomplish, etc. Many thanks in advance.

  7. Years ago there were ham radios that could only get say 2 meters. Then there were radios that would get the whole public service VHF band and suffer frorn 2 or more stations showing up in a mess of intermodulation. And the scanner that would get FM broadcast, worthless as an FM radio for sure. When a quality Japan ham receiver could be whipped by a bottom cost car radio, it shows that general coverage doesn’t work too well.

  8. It would be helpful if someone who understood how a radio actually works, would write one of these “How it works” articles.
    An antenna doesn’t convert radio waves into electricity. It captures radio frequency electrical waves so they can be processed by amplifiers and filters and such. It is itself, usually, a tuned resonator, but broad band antennas (Discone, and others) do also exist that are not frequency specific.
    It’s helpful, but not always necessary, to then amplify the signal. Filtering will help keep out unwanted signals and noises.
    At this point you may be able to either “detect”/de-modulate the signal with no other processing, but only if it’s quite low in frequency, or, mix it down to a more suitable frequency.
    Mixing is most efficiently done by literally multiplying the instantaneous signal voltage, by the frequency of your “Local Oscillator” or LO for short. This is something an SDR does in two ways.
    First, in hardware, and then with a second stage, in software. It’s this second stage that makes SDR so flexible!
    Because each sample is an instantaneous measure of the signal, you can just multiply it by whatever frequency’s instantaneous voltage you want. I do this with my old copy of GoldWave all the time. but I’m limited to 96khz or so because of my sound cards limitations. I can save these low frequency radio waves as .wav files.

    https://drive.google.com/open?id=0BxjV7AG0dyW8OFF3NG9oZlhRVDg

    That is an example at 44100 Hz
    Just re-sample down to 22050 to hear the hidden signal. 8-)
    That is basically what an SDR does, just at higher frequencies.
    Have fun.

  9. For those interested in SDR development, I’ve run across a software library that is developed with SDR in mind. No, I had absolutely nothing to do with it. I do however think it is a masterpiece of work after studying it for some time. If you need a light-weight SDR library written in very clean ‘C’ with tons of examples for DSP, then you should check out this library that is not (from what I can tell) referenced nearly enough. http://liquidsdr.org/ Many of the examples output octave scripts for visualization and evaluation.

    Also, I ran across this video that shows the progress of the liquid-dsp author working on this library over a period of years in a very cool visual that apparently shows off some software that depicts how software authors on github contribute to a project over time. (very nice work in itself!). https://www.youtube.com/watch?v=sUrc9TczyFU

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.