Digital Signal Processing for Ham Radio

Why do DSP?

Many radio amateurs involved in weak signal work invest considerable sums in hardware -- the best preamps, legal limit amplifiers, and the biggest antennas they can fit into their back yards. Unfortunately, they squander much of this capability on inefficient modulation schemes such as SSB and CW. This page describes how radio amateurs can use digital signal processing to take a "brains over brawn" approach to maximizing the effectiveness of their stations .

Why do DSP in Software?

A lot of hams think they need a special DSP chip (TMS320, 56001, etc) to do digital signal processing. This is simply not true! Modern general purpose CPUs have become quite capable digital signal processors in their own right.

The Intel Pentium is one example. Its major difference from the 486 is a fast pipelined floating point unit. With careful and admittedly tricky programming, this CPU can stage one floating point multiply or add per clock cycle. At clock speeds up to 166 MHz, this is better than all but high-end dedicated DSPs. And that's floating point, so you don't have to worry about fixed-point scaling and overflow. So there is much that can be done with just a sound card -- you don't need a dedicated DSP box!

Achieving maximum performance is, however, a challenge. The Intel floating point stack is not highly conducive to pipelining, and the architecture now has a lot of kludges grafted onto it to work around these problems (notably the FXCH instruction). But careful programming does pay off. Here are some samples of hand-optimized assembler code for various DSP operations on the Pentium:

Note the "braiding" of the instruction stream to minimize instruction stalls. To do this I've made heavy use of the FXCH instruction, which is free (executes in 0 clocks) when paired with an arithmetic operation.

A High Performance Software Modem

Lately I've been working on a "software modem" designed to run on just a PC and sound card -- no special DSP hardware required. Here's a preliminary writeup on this project that is still in preparation.

Here's an audio sample (.au format 64kb/s mu-law PCM) of what this modem sounds like. The carrier frequency is 1600 Hz, the user data rate is 1200 bps and the Eb/N0 is 4 dB. The sample contains 5 packets, each carrying a preamble, a header and 256 data bytes. The preamble begins with a 53.3 millisecond burst of unmodulated carrier that is the most easily heard part of the packet. (The actual data in each packet is the beginning of the C program that was used to generate it.) I've put a 1 second pause between each packet to make it easier to tell by ear that a signal is actually there. Since the modem works with 9600 16-bit linear samples per second, I used the sox utility to convert the format to 64kb/s mu-law. It sounds the same to me, though.

Even at this low S/N ratio, my demodulator can easily decode this data. I haven't yet nailed down the exact implementation loss, but I think I'm within 1 dB of theory. The Fano decoder is starting to breathe hard at this point. Give it an extra db or so of S/N and the decoder will merely twiddle its thumbs.

Error Control Coding

I gave a tutorial on error control coding at the 1995 annual TAPR (Tucson Amateur Packet Radio) meeting. Here are the slides in postscript from my talk. TAPR's web site has the audio from my talk in Real Audio format.

I've written software to implement the Reed-Solomon block codes and the Viterbi and Fano algorithms for decoding convolutional error correcting codes. They're available here under the terms of the GPL.

Demodulating ACE telemetry with software

I have written a demodulator in C for the Advanced Composition Explorer spacecraft that can run on any UNIX-like system with audio A/D capabilities. The ACE spacecraft uses the CCSDS standard coding schemes, and I had to modify and generalize my FEC decoders somewhat to handle them. I will eventually put these new versions into my existing FEC packages, but for now you can extract them from my acedemod package.

Error Control Audio Demos

Here's a little multimedia presentation (text plus audio) that demonstrates the potential of error control coding for amateur communications over noisy channels.

And here's another demo that compares analog SSB voice to what can be done with digital voice transmission using the same total RF power.

Jason Woodard at the University of Southampton in the UK has also put up some interesting web pages on speech coding, with quite a bit of theory background.

New Link Layer Protocols

I've been working on a brand new link layer protocol for packet radio that incorporates error control coding, collision avoidance in the presence of hidden terminals, and other significant advances over AX.25. Here are some Postscript files on that project.

Other Interesting Packet Radio Stuff

Tim Shepard, KD1KY. Tim's MIT PhD thesis, Decentralized Channel Management in Scalable Multihop Spread-Spectrum Packet Radio Networks, is an excellent work. Tim found that there is essentially no limit to how large and dense a packet radio network can be as long as it uses spread spectrum, transmitter power control and minimum-energy routing.

Proposed Coded AO-40 Telemetry Format

This paper proposes a coded telemetry format for the Amsat-Oscar-40 spacecraft that substantially outperforms the current uncoded format under noisy and/or fading conditions. (v1.0 added 2 Jan 2002)
Last updated: 2 Jan 2002