FreeDV and Codec 2 2015 Road Map

Last week I had a great chat with Gary Pearce KN4AG from Ham Radio Now:

Which brings me to my plans for 2015……..

2015 Open Digital Voice Road Map

I’m pretty excited about where Open Source Digital Radio is going in 2015. My goals for this year are:

  • A “sub zero” negative SNR FreeDV HF mode.
  • VHF FreeDV mode(s) that demonstrates a TDMA repeater in a 5kHz channel, diversity reception, high bit rate audio/data, and operation at 10dB less C/No than analog FM or 1st generation DV systems.
  • SM1000 speaker-mic and SM2000 VHF radio in production.

This figure shows the work packages we need to execute to make this happen:

The amount of blue shading indicates progress to date. It’s doable, but we could use some help – see below. The custom VHF radio product is the audacious stretch goal, but we need custom hardware to demonstrate the potential of open source VHF DV. In particular decent modems, TDMA, diversity, and variable bit rate (VBR). Sub-carrier VBR is explained in the next section. I’m no Icom, but do have the huge open source advantage of “owning the stack” and a very impressive brains trust that is forming up behind this work.

Sub Carrier Variable Bit Rate

HF and VHF channels vary wildly in quality due to multipath fading. If the channel is really poor it’s essential to push through with low quality, but intelligible speech. However if the channel is good, you may have 20dB more signal to noise ratio available. Current digital (and to a lessor extent analog) voice radio systems just toss that 20dB away. Systems are designed for the worst case, with power heaped on to survive the fading.

I’ve been brainstorming a sub-carrier idea. We send the must-have information using a full power, low bit rate to survive the worst case. On HF this might be 450 bit/s. At the same time, we transmit a higher bit rate sub-carrier at say 10dB less power. When the channel is good, we use the high bit rate carrier. When it’s poor, we fall back to just the low bit rate carrier.

This is better than a protocol based system that negotiates the bit rate, as it requires no back channel and can handle rapid changes in channel quality. It does however require a demodulator that can determine when the sub-carrier is viable. This needs some smarts to avoid rapid high/low quality switching, or for Ham radio could be manually switch-able so the operator has full control.

Sending a second, low power carrier has negligible impact on our total transmit power, e.g. 11 W total rather than 10W (0.4dB). It does use more bandwidth, and will require some implementation tricks (e.g. two class C amplifiers at VHF, but no changes at HF with a linear amplifier). The addition of a low power sub-carrier will have a small impact on peak/average power ratio (PAPR) compared to multiple carriers at the same power. Another bonus.

It’s an idea we can implement as we have complete control over the stack. From microphone to antenna and back again. Go Open Source.

I’d like to try this trick for both HF and VHF.

Daniel has illustrated it well for GMSK carriers:

Old school, analog colour TV worked like this. You get the black and white image information and sync signals on one carrier, then a sub-carrier carries the colour information. In weak signal situations you get black and white. Hmm, I wonder if this analog analogy is too dated. Showing my age.

Codec 2 and AMBE 2+

I recently compared a few AMBE 2+ samples with Codec 2, both at 2400 bit/s. I think they are close enough, except for the $100k up-front license fee, several $ per-unit license fee, policy of eternal lock-in through standardisation, patent encumbrances, and being forbidden by law to modify and learn anything about the algorithm. Not sure why Codec 2 is louder. I listen to them through my laptop speaker as that’s close to a radio.

Codec Female Male
Original female male
AMBE 2+ female male
Codec 2 female male

I cheated a bit, and ran both of them through a a 200Hz high pass filter. AMBE does a better job between 0 and 200 Hz. However most radio systems use an audio bandwidth of 400 to 2600 Hz. Indeed analog FM in VHF applications is sharply filtered at 400Hz so various control tones are not heard.

This isn’t the best we can do with Codec 2, it can be improved further.

Get Involved

There is a fine group of people who are already working with me. They are having fun and working on a really useful and meaningful project. Here are some examples:

  • Rick, KA8BMA and I have had a great year building the SM1000 together.
  • Mel Whitten K0PFX and his band of merry Hams have done a fantastic job promoting HF DV and testing FreeDV.
  • Daniel, VA7DRM has been zooming around British Columbia testing VHF diversity and prototypes of a 2nd generation VHF DV system.
  • Richard Shaw has been doing fine work on cross platform build systems and packaging of FreeDV and Codec 2.
  • Many people have provided invaluable, high level technical advice on RF, Modems, HF and VHF channels and DSP. You know who you are.
  • Many other contributors, large and small, through donations, testing, donations of test equipment, promotion, porting, contract development or small patches, some of which have expressly asked to remain anonymous (e.g. for commercial reasons).

Don’t Just Talk. Act

What did you do during the Open Source Digital Radio revolution?

Contributions count much more than suggestions. Suggestions add to my TODO list, contributions make it shorter. I’m just one guy working part time for nearly zero income and have my limits. If you can help make my TODO list shorter rather than longer please contact me!

If you have a great, must-have suggestion, then I will politely ask you to step up and submit a patch for it. Now you have my attention!

Can you code in C, use Octave/Matlab, write a radio or protocol specification, provide me with RF test equipment, or use a soldering iron to design and make VHF radios? Please contact me.

If you don’t have time or skills then you can still support this work by buying a SM1000 or simply donating. I also need my sig-gen and spec-an either replaced or fixed! Let me know if you need my shipping address :-)

Donation in US$:


24 thoughts on “FreeDV and Codec 2 2015 Road Map”

  1. Hi David and all,

    I have been working with RFM69 being driven by a PIC32 running RetroBSD. Th1s RF chip based module can transmit 0.1watt at 433 mhz and has a decent data receiver.

    I think a really neat FreeDV walkie talkie with digital data path could be put together pretty simply.

    Add to this some mesh networking, a roof top antenna and I suspect a whole city could be covered.

    So how many MIPS do we really need for Codec2? PIC32 is MIPS so most of the code should ‘just run’.

    It’s getting me excited :) :)

    This is a really GREAT ham project David!! :) :).

    John, NI1B

    1. Hi John,

      Unfortunately Codec 2 requires hardware floating point.

      Re the RFM69 what is the C/No versus BER performance?

      We are working on very simple radio architectures that could also be made into low cost SDR HTs – that are completely open – including the radio.

      Cheers,

      David

  2. Hi David,

    I don’t know about C/No for this chip. The mfgr rates it in terms of path loss.

    A quick estimate was a mile or more given a clear path. I have a ping working so putting one in the car would give a coarse estimate.

    From what I can tell the chip has an 8051 type core probably 100mips more or less?. I am wondering whether the ‘prom’ is flash or hard coded?

    I am thinking is ‘must’ be flash? So who knows what other DSP type work it might do for us?

    Given my numerous parts cabs (resistors, caps, etc.),

    It amazes me what one chip can do! So far it looks pretty bullet proof?

    I suppose I could try to bandaid on onto our product?

    Analog design sure looks different these days :).

    Lots of fun.

    John

  3. Your comment in the video, that the SM1000 can be used for other projects, I think should be highlighted better when you produce your 4-color brochure :-)

    This is a really nice digital interface to radios. People spend a lot of money and pull their hair out over the junky signallink interface, and your product is like a signallink, only has a powerful CPU, and decent isolation transformers.

    It shouldn’t be long before people start flashing other digital modes.

  4. Hi David!

    You are doing really amazing work! Thanks! Just a question: wouldn’t it be soon time to release some “stable” version of Codec2? (You can always release Codec3 later 😉 but I think it already is good enough to be used in various projects. I think this would make Codec2 much more attractive …)

    Thank You!
    Petr

    1. Hi Petr,

      There are some people on the Codec 2 mailing list who agree with you. However my interest area is in new versions of Codec 2. Would you like to help to release a stable version of Codec 2?

      – David

      1. Hi David!

        I was thinking a bit about this and I think that you are actually producing new and new variants of Codec2 – mostly each one of them having different bitrate. So what about “publishing”/freezing those variants or “profiles” one by one?

        By doing so you could work on new variants while the people can actually start using those “frozen” or “published” ones. (You can name it e.g. Codec2-1200 or even Codec2-1200b if different “profiles” have the same bitrate. One has to decide which variant of Codec2 to use anywas – since it is not signalled in the bitstream [for obvious reasons])…

        Petr

        1. Hi Petr,

          Yes a few people on the Codec 2 mailing list have suggested similar ideas. Release and version control is something we need help on. Would you like to help? I am very busy pushing FreeDV forward so this is something I need others to assist with.

          Thanks,

          David

      1. I don’t think the Win32 directives are reqd for codec2 any more, as it can be easily cross compiled to Windows. Codec2 and FreeDV needs to be cross platform – Linux only is not OK. We want to use cmake rather than be locked to an IDE. Would love to have help with FreeDV, but not interested in complete re-writes. What we have works well, has a growing user base, and we have solved a lot of problems to get it working. I have no interest in solving them all over again. FreeDV does require some maintenance and refactoring. Would love to have some one step up and help – it’s relatively straight forward GUI programming, no DSP.

        1. I was limiting my comments to codec2. I think if people really want a stable version, then there will be one build for each OS.

          In the industry we don’t do macro switches in C anymore, which define all the different OS’s in one source tree. We use 10 or 12 separate distributions, each for a particular product or OS.

          That kind of kludge code un-maintainable (i.e., expensive).

          I don’t think it would be too difficult to create four different distributions, each keyed to the product it will run on, if in the end it was labeled “stable.”

          But, people have to start somewhere. I merely offered a way forward, but I have no dog in the hunt.

          Including an IDE configuration in the stable distribution costs nothing. Someone else can include a Makefile. I’m not impressed with any arguments against IDE’s.

  5. IMBE/P25-Phase-1 and some digital broadcast standards chose to run more error correction around the ‘essential’ voice components and less around ‘enhancing’ audio components. I wonder what the pros and cons are of wrapping different levels of error correction vs running multi-carrier with multiple class-C amps?

  6. The idea of using two sub-carriers is a good one. I wondered if the various fields in the Codec2 frame could be sliced up to produce say:

    – a 450bps stream with the bare-minimum data for intelligible speech but sent in the most robust manner
    – lesser streams which carry the less-significant parts of the fields that can be decoded and included to imporove audio quality if SNR is good enough.

    A way of achieving this was to consider PSK constellations; the most significant stream would use phase shifts of say 90°, the lesser ones would shift that by 45°, the next one by 22.5°, etc.

    The analogue TV analogy is a good one, but yes, it might be lost on some people.

    Amusing anecdote: I have XAnalogTV (see Xsecreensaver) in my screensaver rotation, one time I was at my mother’s place with my laptop and the nieces, one saw the screensaver and asked: “What’s wrong with the computer?” (They had never seen an analogue TV set with bad reception before.) Kids these days! 😉

  7. Please, a question.
    I’m very much interested in digital voice on HF. Should we expect new releases of freedv software with progressive improvement of speech quality,while reducing bandwidth and improving readability, noise/signal ratio, even readability under noise level?
    Thanks a lot and best regards.
    IK6AIZ Ciro.

  8. Hi David

    Using SM1000/Alinco DR8 rx and long wire ae on 40m at my QTH Carwoola nr Canberra I was able to get some valid decoding on last weekend’s early morning test transmissions from Adelaide at 1600bps (over a path of about 700km). When it decoded the audio quality was good. The tones however, had to be at least 4 S points above the noise floor otherwise sync was lost, it also took 3-4 seconds for the SM1000 to acquire sync so fluctuating signals were a problem. Overall this situation is a bit similar to HF DRM.

    Lowest possible receive noise therefore seems an important objective for successful HF DV, more so than for HF SSB. In the modern high electrical HF noise environment that we have to put up with in urban areas this is a challenge.

    I think separate TX/RX antennas maybe part of the answer and I am looking to install a low noise active magnetic loop RX only antenna at my QTH to see if I can get locally generated noise down by 10 dB or so. The magnetic loop is a good deal less susceptible to local electrical noise (SMPS etc) and positioning it around the yard to the quietest location could also help. I am also looking at the possibility of a phasing network to null out significant noise sources. I hope there will be further testing opportunities in the near future to see if this helps.

    I also like the two carrier idea, it makes sense and I would be keen to try it out at some stage.

    73 Jim VK2JHG

    1. Hello Jim,

      Thanks you for your signal report, and good to know you could hear us. Later this year I will port a FreeDV 700 mode to the SM1000, this works at much lower SNR channels than FreeDV 1600. Like you, I am also interested in ways we can combat the urban noise floor. I would like to try DSP techniques, for example a 2nd receiver listening to local noise and an adaptive filter than can that can cancel that noise.

      Cheers David.

  9. Hi David,

    I’ve been reading through your codec2 blogs, and am quite excited. Hopefully I will be in a position to be involved soon.

    I am curious about the idea of ‘multi-quality’ transmission. It seems to me that another way of describing the system is to transmit subsets of the bits with different energy per bit.

    Would it be possible to have a single bitstream, where some of the bits have more FEC than others?

    Given the HF modem with multiple subcarriers, could some of the subcarriers use a different modulation with more bits per symbol, so that the subcarrier is transmitted with the same power level as the others, but you get the effect of less energy per bit?

    Thanks
    Jon

Comments are closed.