David’s FreeDV Update – March 2024

This month was spent building up the “classical” DSP support code around the Radio Autoencoder, so I could test it over the air using real radio signals. Can we repeat the impressive low SNR results from simulation over real radio channels? This meant coding up an OFDM modem in PyTorch, lots of testing, and a bunch of support scripts to drive the radio hardware.

The algorithms we developed last year on improving FreeDV acquisition and designing filters came in handy, especially at the low SNRs required for this work.

The first test was “over the cable” (OTC) at VHF (144.5 MHz) using a HackRF transmitter, switchable attenuator as the “channel”, and a RTLSDR as the receiver. The noise (N) is injected by the physical properties (noise figure) of the RTLSDR receiver, so the S/N is controllable by the level (S) presented by the switchable attenuator. My calculations indicated it should work around the -135dBm level, and sure enough it did – sounding just like the simulations (see Feb 2024 for examples). This was a great confidence boost as it’s hard to argue with real world noise, but easy to mess up the calibration of noise simulated by software.

For comparison a narrow band FM signal will fall over at around -120dBm, and a first generation digital VHF radio (using proprietary speech codecs) perhaps a few dB lower. Although to be fair the digital VHF systems also transmit ancillary digital data at the same time, which consumes some of their power and bandwidth.

Radio Autoencoder VHF signal on my spectrum analyser – getting hard to measure as it’s close to the noise floor of the spec-an

Next step was HF radio, a somewhat tougher channel. This required quite a bit more work on the OFDM sync algorithms, but eventually I was ready to transmit a signal using my HF radio. I sent a 5W signal over a 500km HF path to a KiwiSDR, and passed the received signal through the Radio Autoencoder system. Much to my surprise, it worked first time! Good quality audio over several different paths and channel types, up to 2000 km away. It seems quite robust to the channels I have tested so far, including NVIS, EMI corrupted receivers, and SNRs below 0dB.

Plot of test signal sent over HF radio – a sine wave tone, compressed SSB, Radio Autoencoder signal. All signals have the same RMS power.
Sine wave header and compressed SSB received over a 475km HF path
Radio Autoencoder signal received over the same 475km HF path
Spectrogram of received signals over a 30km Near Vertical Incidence (NVIS) path – chosen as the fading is pretty bad when the ground and sky wave mix. Note the “barber pole” effect on the Radio Autoencoder signal RHS.

These are encouraging results for the Radio Autoencoder. I’m now pondering next steps. I think it makes sense to test the system with some more samples and over different channels. Plus so many things we could do with the Machine Learning side, like using ML instead of classical DSP for synchronisation, and trying our PAPR reduction system over the air. Also, at some point we need a C port so this can be used in real time by anyone.

FreeDATA Update

Part of our ARDC grant activities is to support the FreeDATA project. Simon and team have recently completed a major re-write and FreeDATA is back on the air. This month I’ve been working with Simon on a faster modem waveform for “ACK” packets, that will help speed up the FreeDATA protocol. I’m also pleased to see FreeDATA working over real HF channels, including this 7 hour 1.44Mbyte file transfer over an 800km path.

Mooneer’s FreeDV Update – February 2024

This month, freedv-gui got the following bug fixes and feature enhancements:

  • Added support for displaying cardinal directions (e.g. N/S/E/W) instead of headings in degrees.
  • Improved audio device detection performance when using PortAudio by caching device info.
  • Shrink height of received callsign list on main window to keep it from going off the screen.

ezDV also got the following changes:

  • Lowered AGC target level to prevent OVL LED from unnecessarily flashing on RX.
  • Disabled LED blinking in fuel gauge mode due to low reliability.
  • Added glitch filter to GPIOs to prevent unintended toggling.
  • Improved reliability of Icom radio support in congested Wi-Fi environments.
  • Fully refresh web UI after ezDV comes back from being rebooted (intended to ensure user gets any HTML/JS changes as part of a firmware update).
  • Fixed bug preventing Wi-Fi scan from actually stopping when user switches away from Wi-Fi tab on web UI.
  • Don’t remove Wi-Fi networks from the network list if they don’t appear in a subsequent scan.
  • Build system: adjusted copyright date in web UI based on firmware build date.
  • Default radio port to 50001 to match Icom defaults.
  • Cleaned up compiler warnings in code.
  • Fixed crash if Wi-Fi goes down during a network scan.
  • Build system: use official Codec2 release instead of codec2-dev.
  • Refactored USB power detection so that it’s more resilient to missed interrupts.

More information can be found in the commit history below:

(Note that all commit logs above were generated with the following command line:)

git log --author="member@email" --after "Month 1, 2024" --before "Month 31, 2024" --all > commit.log

David’s FreeDV Update Feb 2024

This month I’ve been working on a feasibility study using an autoencoder derived from RDOVAE [1], based on code originally written by Jean Marc Valin and Jan Büthe for an Opus application. The goal is to see if we can send good quality speech over HF multipath channels at low SNRs.

The autoencoder takes as input a typical set of vocoder features (short term spectrum, pitch, voicing), then applies time based prediction and transforms to arrive at a small number of parameters that can be sent over a channel. This is similar to an old school vocoder that uses classical DSP, except Machine Learning (ML) allows us to learn non-linear transforms and prediction, which tend to be more powerful.

Usually, after the transformation/prediction stage we then quantise to a low bit rate, then use Forward Error Correction (FEC) and modems to send the bits over a channel. However this latest work takes a novel twist – we train the autoencoder to generate PSK symbols that we send over the channel. It effectively combines quantisation, channel coding, and modulation. The symbols tend to cluster around +/-1 like BPSK but are continuously valued. So it’s like a discrete time, continuously valued (analog) PSK.

Scatter Plot showing the signal constellation from the Radio Autoencoder, with symbols mapped to two dimensions like QPSK. Unlike conventional PSK, they are continuously valued.
A 3D scatter plot makes the picture clearer. Most symbols are at the +/- 1 points – the network has learned that in the presence of noise, these are the best points.


This month I’ve been building up the code required to test the idea over multipath (HF) channels. This mean reshaping the PSK symbols into an OFDM modem frame, and adding a multipath simulation. The initial results are encouraging, with speech quality better than any existing FreeDV mode, and competitive with SSB at low SNRs. At high SNRs the quality is also quite good, better than analog FM.

Simulated SSB with compressor at -3dB SNR on an AWGN channel.

The Radio Autoencoder at -3dB SNR on an AWGN channel.

Spectrogram of received signal at -3dB SNR, the autoencoder output has been mapped to an OFDM signal about 1000 Hz wide.

However this is all early days. To expedite answering the key questions, the current simulation ignores a lot of real world issues like acquisition, phase, frequency and timing offset correction. I reasoned that we have classical DSP solutions to these problems that work pretty well, so instead I focused on multipath performance as experience has shown that is the toughest issue with HF digital speech.

The ML code used for training includes a channel model. As an experiment, I added a saturating HF power amplifier model. The output was an OFDM modem waveform with a 1dB Peak to Average Power Ratio (PAPR), which is an excellent result. Our FreeDV waveforms run at around 4.5 dB, and SSB with a good compressor 4-6dB.

ML systems tend to work well until they experience conditions outside what they have been trained for. So I’m taking small steps, and planning to test a variety of channel impairments one by one, looking for that “ML gotcha”. I’m also spending way to much time checking my channel model calculations – handling the shift from digital PSK to analog has taken some careful thought and is a bit mind bending after 35 years of work in digital PSK!

The next step is to build up acquisition and synchronization code, and get to a point where we can send and receive signals over real RF channels. I’ll start with an Over The Cable (OTC) test on the bench, and work up to the point where we can play stored files over real HF channels.

[1] J.-M. Valin, J. Büthe, A. Mustafa, Low-Bitrate Redundancy Coding of Speech Using a Rate-Distortion-Optimized Variational Autoencoder, Proceedings of International Conference on Acoustics, Speech, and Signal Processing (ICASSP), 2023.