# FreeDV Robustness Part 4

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:

1. 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.
2. 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).
3. 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.
4. 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”.
5. 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.

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:

1. 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.
2. 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.

Status

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.

Results

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:

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!

1. 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.
2. Add auxiliary carriers to improve speech quality in high SNR channels, and heuristics to know when this information is safe to use.
3. Refine the modem algorithms to reduce delay. Re factor Octave code. Port Octave code to C.
4. Tune LDPC decoding.
5. Experiment with clipping/compression to improve PAPR, and interleaving to improve performance in fast fades.
6. Integrate into the FreeDV GUI program and the SM1000. For example will the LDPC decoder run on the STM32F4?
7. FreeDV maintenance, re-factoring.

Some more blue sky ideas for further R&D:

1. Given the relatively short block length, is an LDPC code the best choice?
2. 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.
3. 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.
4. 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):

Donation in US\$:

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!

## 5 thoughts on “FreeDV Robustness Part 4”

1. Congratulations, David. Very interesting work which is providing a continued bright future for HF Digital Voice. Good luck in your “Further Work” efforts.

Mel, K0PFX

2. Well done for pressing on, David.

I have tried FreeDV on HF over quite good paths and, to be honest, I did not find the results that good. Even when the channel is ‘well-behaved’ the speech quality is, to my ears, poor. I find that from D-STAR equally poor. Some of this is doubtless down to my brain not being tuned into ignoring the impairments inherent in these digital modes, whereas it is very well tuned to rejecting the whole gamut of analogue impairments. I must have got used to the audio quality from cellular phones now. Am I deceiving myself that it’s an accecptable subnstitue for POTS?

A few ideas from here:

1. WebSDR receivers (www.websdr.org) are a good way of monitoring / testing your own transmissions over real-world HF channels / paths. Models of channels are fine as far as they go but are, I suspect, too optimistic.

2. Synchronisation of complex digital voice modes on HF channels is a pain in the backside. I like to work fast break-in phone nets. I don’t want the speed of operation compromised by the modems having to ‘do a dance and light some lights’ at the start of each over.

3. There seems to be a general obsession with bandwidth reduction as part of the push to digital. Personally, I see this as somewhat secondary to getting a good working alternative to analogue. As regards FreeDV over HF, I suggest always making use of a minimum 2.1 kHz BW. Looking to our inevitable SDR-based future, we should not feel bound to view the bandwidth of today’s analogue SSB channel filters as a constraint. If a digital mode needs 3 or 5 kHz BW at RF to make it work, then why not? I do accept however, that more than 5 kHz could be a problem on HF (but less so on VHF).

4. Finally, I know everything has to be digital thesedays, but you are attempting the hardest thing of all with digital voice over HF. Look what’s happened to DRM – in some ways an easier task and with significant commercial resources thrown at it. Accepting that it is absolutely the norm now (indeed, highly advantageous) to ‘A/D – process as digital – and D/A’ at some point (or more than one point), would not an alternative (intermediate to some fully digital future, perhaps) be to seek to maximise the effectiveness of analogue SSB modulation on HF in some way? Good frequency response tailoring and speech compression is a must for effective communication over HF channels, but how many signals do we hear where one or both of these is sub-standard – in both amateur and commercial spheres! RX noise reduction seems most effective when there is little noise on the channel to start off with, so work to do there. Auto-netting onto frequency of analogue SSB – some sort of pilot carrier for the 21st century, perhaps combined with a digital data ‘helper’ channel that could tell the RX-end of the link something useful about the TX-end.

Anyway, enough from me. Best regards and do keep up the good work,

Mark.

1. david says:

Hello Mark,

Thank you for your comments and encouragement. To date I have been concentrating on low quality, low SNR. To get cell phone type quality we need a codec in > 5000 bit/s range. This is possible on high SNR channels. A BER of say 1% requires an Eb/No of 20dB. A bit rate of 5000 bit/s is a QPSK symbol rate of 2500 baud. So that’s a SNR of Eb/No+10log10(Rs/Nbw)=20+10log10(2500/3000)=19.2 dB. It’s an interesting area.

Another idea that interests me is wideband speech, using narrowband modulation. For example we could have a speech codec that handles 100Hz-7kHz of audio, but still only consume 2000 Hz of RF bandwidth, and be “noise free”.

The obsession with RF bandwidth reduction is also due to operational constraints – SSB users will tend to talk over DV. A narrow and powerful DV modem signal encourages them to move.

Cheers,

David

3. John says:

Hi David,

Most impressive and interesting.

Your curve of snr vs error rate is most imformative. Gotta wonder why? Too much spread spectrum mixed in as “noise”?

I suppose a lower bound of some sort is text to speech?

Sending end turns speech into text which passes over the channel and is returned to speech on the far end.

I suppose one could try this as Olivia hooked to some text to speech package.

Maybe one day with a personalization module to make the speech sound like my own voice?

I guess one could also use pactor or equiv. for two way comm.?

Your work is VERY impressive !!

John

4. Kevin N8VNR says:

When you mentioned pilots not being all that common, I was reminded of DRM (which someone then mentioned in a comment).

The main specs are pretty easy to find at http://www.drm.org/?page_id=114
What was more difficult to chase down was the ham adaptation that was in use on the air for a couple years: http://www.qslnet.de/member/hb9tlk/drm_h.html

I don’t imagine you’d want to reimplement that whole thing since it’s a bit heavy, but maybe you can scrounge it for modulation and error correction ideas.