I’m working on increasing the robustness of FreeDV over HF radio channels, in particular compared to analog SSB.
Why HF Digital Voice so Hard
HF radio channels are bad news for digital data. Here is a plot of the Bit Error Rate (BER) versus Eb/No for two different modems (DQPSK and QPSK) and two different channels (AWGN and HF). Four curves in total, click for a larger version.
Think of Eb/No as the SNR of one bit. It turns out that for a given bit rate, SNR = Eb/No plus a fixed scaling factor. So if you raise SNR by 1 dB. Eb/No goes up by 1 dB. The “CCIR poor” HF channel model I used is from data extracted from the very handy PathSim channel simulator. An AWGN channel is typical for a line of sight VHF: just noise without frequency selective fading.
Curves for two types of modems are illustrated: Differential QPSK (DQPSK), and Coherent QPSK (QPSK). DQPSK is commonly used on HF as it greatly simplifies the demodulator design. However if it can be made to work, QPSK is better. Less power for a given BER.
A couple of things to note:
- You need a lot of Eb/No on HF to get a low bit error rate. This explains why reliable HF data needs lots of transmit power. Or you can use a very low bit rate, so each bit has more energy in it. This also makes Digital Voice (DV) on HF hard. For example the FreeDV 1600 mode needs a BER of 2% for an “armchair” copy. Using a 1600 bit/s (800 symbols/s) DQPSK modem that’s an Eb/No of 15dB or a SNR (3kHz noise bandwidth) of SNR = Eb/No – 10log10(3000/800) = 9.2dB.
- HF channels are much tougher than AWGN. Looking at the 2% BER line AWGN DQPSK only requires about 6dB, which is 9dB less than the HF fading channel (or 12.5% of the power).
- The slope of the HF curve is nearly flat. Adding power doesn’t make much difference to the BER. So you need to add a lot of power to significantly reduce BER. Curiously, it also tells us that the “digital cliff” is more like a lightly sloping hill. As we reduce power the BER doesn’t change much. This suggests that HF DV will gradually get less intelligible as we lower the SNR.
- As the HF curves are so flat, a useful approximation is: “Your bit error rate is 10%. The Universe doesn’t care how much power you have. Deal with it”.
- Small changes in the AWGN demodulator performance can have a huge effect on BER for HF channels. For example the difference between coherent and differential QPSK is 4-5dB, that’s like increasing power by a factor of 3! You really don’t want an inefficient demodulator on HF.
New FreeDV Mode Concept
I’ve learnt some lessons from thinking about analog SSB. At low SNRs, analog SSB still gets through, however the quality is pretty bad. Lots of noise, words lost in fades, and we tend to yell, repeat things, and use the phonetic alphabet. In other words, the “information rate” slows, there is delay, but we get the message through using “Human” error correction. Eventually.
The digital voice equivalent is a low bit rate speech codec. So in an inspired two hours I quickly hacked up a 450 bit/s Codec 2 mode. Here it is compared to the 1300 bit/s mode used for FreeDV 1600.
|1300 bit/s Codec 2|
|450 bit/s Codec 2|
This is a good example of the 450 bit/s mode. It makes a bigger mess of other samples. But hey, it’s preliminary, not the best we can do at 450 bit/s. I was shooting for something right on the edge of intelligibility, as that’s where SSB is at low SNRs.
As the bit rate is so low, we have a lot of options. For a start we are 10log10(1600/450) = 5.5dB better off in SNR than the FreeDV 1600 mode. Secondly it frees up bandwidth to apply FEC. So I’m experimenting with a powerful LDPC code from the CML library suggested to me by Bill Cowley, VK5DSP. The Peak to Average Power Ratio (PAPR), or crest factor, is also reduced as we have less FDM carriers.
For this new mode I’m trying coherent QPSK rather than differential QPSK. This is unusual for FDM modems on HF, but has big gains as shown above. Coherent QPSK requires much less power than differential QPSK for the same bit error rate. It does require some overhead, in the form of “pilot symbols”. These are known symbols we transmit in order to estimate or probe the channel phase and amplitude.
I’m using a half rate LDPC code, so the bit rate over the channel is 900 bit/s. There are 9 carriers at a symbol rate of 62.5 baud, and every 5th symbol is a pilot. No high power BPSK pilot tones are required, the pilot symbols can be used instead to estimate the frequency offset and provide frame synchronisation.
OK, so that takes care of low SNR performance – i.e. getting poor quality, but intelligible speech through a HF channel.
Lets now try to extend that to obtain higher voice quality on high SNR channels:
- The uncoded error rate will be less than 1% so we disable the LDPC decoder. Now we don’t have to wait for the LDPC parity bits, therefore the decoding delay will be small (similar to FreeDV 1600). On poor channels we click on the “FEC” check box and the delay increases to about 1 second but the system works on low SNR channels. Remember with low SNR analog SSB you are already repeating yourself and using phonetics, so the effective delay is also in the order of seconds compared to an armchair SSB copy.
- We can send auxillary carriers to add to the 450 bit/s Codec 2 information and improve the speech quality. For example extra LSP vectors, or gain and pitch bits. If these carriers are 6dB lower than the core information, the total power will only increase by 10*log10(1+0.25)= 0.5dB. So if we get a few s-points above the system “floor” – quality will increase – just like SSB.
For the past year I’ve had several attempts at an improved FreeDV mode, hitting several dead ends. “Research and Disappointment” at it’s finest. However it’s started coming together over the last few months.
A key assumption is that low quality at low SNR is OK. This assumption has yet to be tested in real time conversations. The other biggie is coherent demodulation, this works much better than differential PSK. However it’s unusual, and might break with very fast fading. We shall see.
My current ideas are complex and may be wrong. So I want the “minimum effort” path to test them. This still meant writing a bunch of high-level Octave simulations over the course of several months, each building on the next. For now I’m ignoring issues like delay, real time operation, and many other details. The focus is on getting a digital voice signal through poor HF channels. That’s the toughest problem we face. Everything else can be refined later.
To make the modem work on real channels I had to develop new frequency offset and coarse timing estimation (frame sync) code. Just recently I made it to the point where I have wave files that can be played over real HF channels, then processed with off-line Octave simulations.
Thanks to Tony VK3JED, Mel K0PFX, Gerry N4DV, and Michael DL2FW for helping me collect off air samples. This is tricky, as there is no real time feedback. The guys would send me a sample, I would process it, then I would get back to them with feedback. I had to ask Mel and Gerry (located 800 miles apart) to reduce their tx power as I was getting zero bit errors all the time. Eventually they settled on a few watts of tx power, and pointing their beams in the wrong direction. That way I could actually see some bit errors and get a real feel for the “floor” in the new waveform.
Let work through the results for one example that had an average SNR of -5dB:
|Off Air FreeDV modem signal|
|Reference (Error free) Codec 2 at 450 bit/s|
|-5dB Average SNR Decoded 450 bit/s Codec 2|
|SSB over same channel|
The off air signal has a strong high frequency interfering SSB signal that makes our modem signal hard to hear, it’s lower down coming in and out of the noise. The demodulator filters take care of that OK. The modem signal decodes successfully about 50% of the time, there is a big chunk in the middle missing as it disappears into the noise. Not much I can do about that. The SSB signal is at about the same peak power. I can make out the phonetics and a few words in the SSB.
I’ve been using the FreeDV GUI program to visualise the off air signal:
You can see the spectrum shows zilch at the moment the screen shot was captured, our poor little modem signal has “submerged”! The waterfall below shows the signal over time. It’s not pretty.
The next few plots show the modem at work:
Note the diagonal lines in the “Estimated HF channel phase”. This indicates a small frequency offset. They take about 100 frames (2 seconds) to wrap around so that’s a 0.5Hz frequency offset. You can see the “channel amp” and “SNR est (dB)” diving in the middle of the sample, and the bit errors going crazy at the same time.
The FEC frames are 576 bits long. The FEC breaks down at about 10% errors or 60 bit errors in a single frame. You can see that quite clearly in the bit error plots. The “Coded Errors” (output from the FEC decoder) are zero until we hit about about 60 un-coded errors/frame.
Further Work and How You Can Help
Lots more to go however this is looking promising. The rest is engineering. I’d like some help with this, from people with skills like C programming, basic statistics (like understanding what variance is), and Octave.
Without any help, this is what my lonely future looks like for the next 6 months!
- Improve the speech quality of the 450 bit/s Codec 2 mode, e.g. better vector quantisation, adaptive equalisation and filtering of the input speech.
- Add auxiliary carriers to improve speech quality in high SNR channels, and heuristics to know when this information is safe to use.
- Refine the modem algorithms to reduce delay. Re factor Octave code. Port Octave code to C.
- Tune LDPC decoding.
- Experiment with clipping/compression to improve PAPR, and interleaving to improve performance in fast fades.
- Integrate into the FreeDV GUI program and the SM1000. For example will the LDPC decoder run on the STM32F4?
- FreeDV maintenance, re-factoring.
Some more blue sky ideas for further R&D:
- Given the relatively short block length, is an LDPC code the best choice?
- Investigate the possibility that 8PSK may perform close to QPSK on fading channels (unlike AWGN channels). This would have fewer carriers so better PAPR, so may out perform QPSK. Thanks John Gibbs NN7F for this idea.
- Investigate FDM using continuous phase modulation like GMSK that can use non-linear power amplification. This will use at least twice the bandwidth of QPSK, however given our low bit rate this is still quite feasible in a standard 2000 Hz SSB channel. This would be a mode that can drop “straight in” to FM VHF radios. Thanks again John for pointing this possibility out.
- Investigate FEC codes that can be configured to reduce PAPR, thanks Gregory for reminding me about this.
If you can’t code you can also donate to the this project via PayPal (which also allows credit card donations):
Or you can buy a SM1000 when they become available at the end of this year. Commercial sponsorship is very welcome but everything I write must be LGPL or equivalent.
I do this work full time and don’t have much other income right now. What did you spend on your last piece of radio gear? How does it compare to a project than will bring you a new, 21st century voice mode? Does it support free and open radio or were you paying license fees for the software in that radio?
BTW I also need a second hand ThinkPad X220/X230 laptop if anyone is feeling especially generous! They can be had on ebay.au for around AUD$400. Simulations are a bit slow on my 2008 vintage X200 model and I think the fan is dying!