blog

Image of old radio by Milivoj Kuhar on Unsplash

Bringing Radio to a Software Engineer’s World

by

When we think of the term radio, “high-tech” isn’t the first word that comes to mind anymore. A lot of people will think of analog commercial radio (“FM/AM“), something that started up around the 1920s. In fact, many airports, public safety organizations, and businesses still use conventional analog radio to communicate. However, digital radio completely dominates cellular communication and is increasing in usage with public safety organizations.

Given how low-level analog radio electronics are, how do software engineers and computers fit into the picture? Software-defined radio (SDR) is a way of performing radio communications using software components in place of hardware components (e.g., mixers, modulators, filters, etc.).

Radio on an Abstract Level: Signal Processing

Everything about a radio revolves around signal processing. The oscillating current at the transmitter antenna will create electromagnetic waves which induce a similar oscillating current in the receiver antenna. This is the basic signal that the radio starts with. It then goes through a series of processes such as amplification, tuning, filtering, and demodulating before it can finally be presented as, in the case of transmitting voice, a sound signal that can be outputted using a speaker.

Each step involves some form of signal processing using a variety of electrical components. The complexity of those electrical components varies depending on the type/quality of radio you want and the type of modulation used on the original signal. For example, one of the simplest radio receivers to build would be a crystal radio, basic schematic shown below, that can be used to receive strong stations using amplitude modulation (AM) by just hooking up a piezoelectric earphone to the output.

wire schematics

Crystal radio schematic by Chetvorno released to Public Domain.

Another example would be a superheterodyne receiver, basic schematic shown below. This is the most common design used in modern radios and has much better selectivity than a crystal radio, and likewise a much more complicated design.

wire schematics

Superheterodyne receiver schematic by Appaloosa released under CC-BY-SA 3.0 license.

Computers and Real-Time Signal Processing

One of the advantages to implementing signal processing using electronic components was that it was the only practical way of doing real-time signal processing. In computers, signal-processing is a very CPU-intense operation. Since computers are designed as general processing machines, they are not optimized for this and, in the past, were not able to perform at the level necessary to optimally implement this kind of signal processing.

Dedicated hardware called digital signal processors (DSPs) were needed to even attempt to implement this kind of processing. The cost of the hardware limited this to military and research industries. However, technology moves at an incredible pace and computers have gotten exponentially faster and more efficient. Now, computers are capable of performing the necessary tasks and hardware for it has gotten much less expensive. In combination with this, open source projects such as GNU Radio have started up, introducing software-defined radio (SDR) to the world of open-source software. All of this has opened up SDR to amateur hobbyists.

Advantages of Software-Defined Radio

I have only recently (within the last year or two) become interested in radio technology. I am still learning about radios and have not had the chance to get any hands-on experience with SDR. Just from reading though, I can understand some of the advantages.

By the time I became interested in computers and began tinkering with software, the era of computers requiring messing around with the hardware and electronics was on a decline. As such, I am a newbie when it comes to building electronics. I tinkered a little with them in college, but most of the time in those courses was digital design, which operates on a higher-level than capacitors, resistors, inductors, and transistors. SDR would allow me to explore the lower-level concepts of radio from the comfort of the software environment that I am familiar with.

Some radio designs that are extremely difficult or impractical to implement using electronics, can be better implemented using SDR. This opens up a lot of frontiers that have never been explored with radio. The sample below shows how easy it is to put together an FM receiver in the GNU Radio Companion interface (part of the GNU Radio project) which lets you build on existing library components and focus on implementing more complex designs on top of it.

Software screen capture

Screenshot of GNU Radio Companion (GRC) from GRC project page.

Image of LCD

With more systems switching from conventional analog radio to trunked radio systems and/or digital radio, it is common for conventional radio equipment to contain firmware for processing these systems, as seen in the RadioShack Pro-106 / GRE PSR-500 scanner shown to the right. SDR provides a flexible environment for processing a variety of these systems without the need to switch hardware or upgrade device firmware.

The biggest problem that SDR faces is the process of analog-to-digital and digital-to-analog conversion. This is a general problem that computers face when interacting with real-world signals, but in the case of radio, it especially becomes an issue because of the large amount of data that needs to be converted and the sensitivity of that data to interference.

I look forward to continuing the exploration of the vast hobby of radio and hopefully getting some hands-on experience with SDR.

+ more