Codec 2 and GMSK over VHF Radio Part 1

In the previous post comparing GMSK modem algorithms, I had some results suggesting we can build a Codec 2 VHF “mode” that outperforms legacy analog FM by 10dB (that’s a factor of 10 in power). It seemed to good too be true. So for the past few weeks I’ve been working with Daniel, VA7DRM, to test these ideas using real radios.

The Experiment

Starting with the “ideal” GMSK modem I developed in the previous post, I added the various building blocks required to make it operate over a real radio channel. For example initial frequency offset estimation, timing estimation, fine frequency and phase tracking, and frame sync.

Meanwhile, over in Canada Daniel has set up an experimental system to enable testing the modem over real radios. Here is a block diagram and photo:

We use a multi-mode 2M radio as the transmitter. We use it in SSB mode to play the GMSK modem signal over the air. In this mode, it’s up-converting the GMSK modem signal from a low IF of 1500Hz to 146 MHz. The GMSK modem signal is about 1200Hz wide, so fits neatly in the SSB radio passband.

We don’t use the radio in FM mode for GMSK as my work in the previous post shows that is how you build a crappy GMSK modem.

The tx is switched to FM for sending FM test signals. The SNR of the system is adjusted to be exactly the same for GMSK and FM.

A RTL style SDR dongle is used as the receiver in both modes. By adjusting the rx gain we can set up the SNRs we require to perform our tests. The gmsk.m GNU Octave simulation pops out a file of errors that can be used to simulate Codec 2 over this channel. The end result is we can listen to Analog FM and Codec 2 over GMSK for a range of channel SNRs.

I send a fixed frame of test data over the GMSK modem rather than Codec 2 data. A fixed frame makes it easier to measure bit error rates and do frame sync. I XOR the transmit an received bits to get an error pattern which can be used to simulate the exact effect of those bit errors on the Codec 2 bit stream. I actually cheated and used the 1300 bit/s Codec 2 mode instead of 1200, as it’s somewhat more robust to it errors. This is worth 0.35dB over the channel.

Here is a spectrogram (sideways waterfall) of one of the test samples from the SDR:

The GMSK signal is centred on 1500 Hz on the left. On the right is the FM signal, centred on a 12 kHz carrier. The FM signal is about 16 kHz wide, so we needed a higher centre frequency. First we send a 1000 Hz test tone, after FM modulation that produces the lines you can see in the FM spectrum. Then we switch to a sample of Daniel’s voice. That’s the fuzzier FM signal, as the carrier is bouncing all over the place.

The keenies will notice a small bit of DC at the lower far left hand side. That’s the nasty DC offset you get from SDR radios when the IQ balance is a bit off. It fades away as we nail it with a high pass filter. If it’s too high it upsets our GMSK demod.

If we average the spectrum over the entire run we get:

Note how much narrower the GMSK signal is than FM. This sample is for the C/No=43dB run in the table below.


To measure SNR requires a known noise bandwidth (e.g. 3000 Hz is common for HF SSB). However the bandwidth of the GMSK and FM signals is different. If we used a 3000 Hz noise bandwidth the FM signal wouldn’t fit. We could measure SNR using a 16 kHz bandwidth for both signals. However another way is to measure the noise using a 1 Hz noise bandwidth. This is known as C/No, or the carrier power divided by the radio channel noise power in a 1 Hz bandwidth.

The GMSK modem is about 1.5dB off theoretical performance. This is not bad, as it takes into account imperfections with the modem algorithms (e.g. errors in timing and phase estimation) and the experimental SSB radio/SDR signal path (e.g. SSB transmit filter, PA non-linearities). The FM demod software gives us a SNR about 3dB worse than theoretical FM demod performance for a given input C/No, possibly because of a non ideal FM modulator or perhaps under deviation. Once again, that’s acceptable.

Here are the results. Warning – turn down your volume control! The first FM sample is just loud noise. There are a few odds errors with the Codec 2 sample, e.g. it gets “four” wrong, possibly due to clipping of the input sample, or maybe a pitch estimation error. Must look into that some time, sure it can be fixed. Too busy playing modems lately!

C/No Analog FM Codec 2 BER Speex
35.5 Listen Listen 0.035 n/a
37.2 n/a Listen 0.008 n/a
43 Listen Listen 0.00 n/a
53 Listen Listen 0.00 Listen
63 Listen Listen 0.00 n/a

In these tests, Codec 2 is working at a much lower C/No than analog FM, with the system gains predicted gains in the previous blog post. Codec 2 starts to deliver intelligible speech (with some errors) at a C/No of 35dB. By 53dB FM is sounding better (although still noisy), so I estimate the cross over point at 48dB, a 13dB gain for the Codec 2/GMSK system over Analog FM. I suspect we also have a similar system gain over 1st generation, closed source codec VHF digital voice systems like DSTAR and DPMR.

I am interested in your thoughts on the relative speech quality, please feel free to comment. The FM samples sound a bit noisy to me, but Daniel thinks they are about right.

There are a lot of knobs we can twiddle with this spare system gain:

  1. The Codec 2 speech quality could be improved with some more work.
  2. We can do 2 channel, no diplexer TDMA for a 3dB hit in C/No (as we would need to double the bit rate).
  3. We can cover a much larger geographical area. IIRC radio waves get attenuated by 6dB as the distance doubles. So a 12dB gain is 4 times the range, which (Area = pi*r*r) means about 16 times the area for the same power. That would help repeaters, developing world, and emergency communications networks.
  4. We can change the Codec bit rate as the channel C/No improves. Who says the speech quality has to remain static under all channel conditions? For less C/No than required by current FM systems we could run a 8000 bit/s speech codec like Speex (see sample above). A little bit higher and it could sound like Skype (using Opus). Wideband audio on your HT anyone? Or mobile in your car?
  5. We can use power control like cell phones, e.g. tell the far end to back off the tx power. Saving battery and RF interference. Would be really useful for ad-hoc mesh networks too (managing the hidden transmitter problem)

Help Us Change VHF Voice Forever!

The key to our improvements is “we own the stack”. Codec open, modem open, protocol open. No one telling us where we can and can’t experiment. We are only limited by imagination and the laws of physics. By we I mean you – it’s open source.

Two guys half way around the world from each other are working on improving VHF voice by a factor of 10. With second hand laptops running open software, a $20 SDR dongle, Ham Radio, good modem design and a little foil.

This is a once in 100 year opportunity. We really need some help, e.g. VHF radio front end design, Octave refactoring, Octave to C porting, GUI C/C++ coding (also see list of tasks at the end of this post). It’s fun and rewarding work. Do you want to be a part of it? Please email me.

If you can’t contribute technically, here’s the donate button:

Donation in US$:

It all helps! Thanks.

24 thoughts on “Codec 2 and GMSK over VHF Radio Part 1”

  1. You can’t compare apples for apples this way, at least not as these things are used in the REAL WORLD

    It is IMPROPER to compare an analog and digital system on SNR because they are very different beasts. Of course the digital will outperform the analog system one it get sa lower BER.

    The test should be , at what power level can you achieve a readability 5 conversation ? , at what power level can you achieve a readability 3 conversation ?
    The power level requird should be normalized for a 0dB noise figure (so the front end of the receiver system is taken out of the equation)

    Why ? because that is how we use our radios.
    I have no doubt that with a modem operating with a SSB radio, it will outperform the FM radio hands down.

    1. Hi Glen,

      As explained in the blog post, we are using C/No, not SNR to try to compare “apples with apples”. We have demonstrated roughly equivalent speech quality with DV at 13dB less transmit power than Analog FM. We have demonstrated readability 5 DV when Analog FM is readability 0.

      Can you please explain more about how we can normalise for the rx front end noise figure? How would this affect our tests? We used the same rx for both FM and DV. It’s an area I am fuzzy and would love to get a better understanding.

      The performance gains are not because we used a SSB radio, this was just a convenient way to get our modem signal up to VHF.



      1. Howdy
        Well, the performance of the radio can be measured using a noise figure meter, or at least estimated.

        The digital side can be vary closely estimated probably within 0.5dB CNR.
        But the analog one is a bit iffy, what with different performance of limiters and detectors.

        If you want a measurement, I’d suggest using a couple of modern radios and stick a 20dB , 1dB NF preamp in front of them… that will reduce the NF contribution from the radio…. But if you are just measuing say a multimode radio, the front end ND will be the same for both modes, so it won’t matter.

        Also, a 6dB CNR requirement reduction will only double your range when you have a free space path.
        Best to assume about 38dB/decade rather than 20dB, at least until you go beyond line of site. The slope of the prop loss curve has a few inflection points – free space 20dB/decade) , then suburban (around 38dB/decade) plane earth not big obs , then 1 or 2 obstructions, then scatter…..

        1. Thanks Glen, that’s interesting about the urban propagation loss. Nice.

          Yes we used the same Rx for both FM and GMSK, so assume No would be the same. I’m guessing a better NF would drop No by the same amount for both schemes? So the relative improvement would be the unchanged.

          Daniel is planning to develop a 2dB ish NF TDMA capable radio for this project.

  2. For example, one could put a one-time pad of gigabytes on a USB key in each transmitter, choose an offset into that key based on the transmitter’s time of day clock, and preface the transmission with the offset. Then some of the gain from speech compression could be used for forward error correction to get those bytes across. Key material would be wasted when nobody is transmitting, and some key would be reused because transmitter clocks are not perfectly in sync. No big deal.

    As long as the transmission is different than what some king, his nobles, and their army demand, what else would you want to change about it? Do the technological limitations of what could be produced by antique radio equipment still make sense as KISS, or is it just historical baggage? What about the band and channel plan? Suppose you ignore the official map where some conquistador announces a continent belongs to a King of Europe, and look at the present actual uses homesteaded by the installed base of equipment. What kind of new transmission types would coexist and cooperate with existing uses, without necessarily interoperating?

    I’m sure that lots of radio experimenters will need to put their strenuous objections on record here that they’ve adopted “ham” as their middle name and written their identifying number on their arms, er, ballcaps. That kind of legitimate work is crucial too, without it this project wouldn’t exist. Since I expect hams find it legally difficult to express support, I won’t find a lack of support expressed discouraging.

    1. I have also been thinking on this area, and spoke about it in my 2015 presentation The applications for this technology are wider than Ham Radio, which generally prohibits encryption. It’s just a nice place to start (great people and a license to experiment). If you want to add crypto then go for it! – the biggest issue is simply getting started. Lot’s of people making suggestions, not many cutting code ….

  3. Yea, nice work David.
    What SNR do your simulations say the modem will work to, BER =1/50, BER = 1/1000 ?

    I reckon, for a readability of 3/5 you will get the following on a decent radio
    T sky=290k, NF RX = 627k (a reasonable VHF receiver without any thing fancy) Ttot = 917k

    analog FM ’25k’ : -123dBm (assumption – 4dB CNR requirement)
    codec2 GMSK , linear radio, SSB passband : -130dBm (assumption – 6dB CNR requirement)
    3/5 difference = 7dB.

    5/5 readibility :
    analog FM ’25k’ : -119dBm (assumption – 8dB CNR requirement)
    codec2 GMSK , linear radio, SSB passband : -127dBm (assumption – 8dB CNR requirement)
    5/5 difference – 8dB.

    note- my assumptions of 6 or 8 dB CNR req for codec2 gmsk. I’m assuming you are not coherently detecting

    But, David, if you are going to use a SSB radio, then why not QPSK ?

    That will be good for another 3dB, perhaps, depending on how hard you want to push your amplifier. The advantage of GSMK is the use of a non linear amplifier, given.


    1. Hi Glen,

      The Codec 2/GMSK combination sounds error free at Eb/No = 6dB, 1% BER. I think that’s a SNR of 6dB if we assume a noise BW of 1200 Hz and 1200 bit/s. It’s a coherent demod. You can maybe drop it 2dB for less than 5/5 readability.

      For example: the 35.5dB C/No test point on the blog post (which I would say is still 5/5) works out to 35.5 + 10*log10(1200) = 4.7dB Eb/No (and SNR if you use a 1200 Hz noise BW).

      Thanks for the calculations, great to have another way of working it out, especially to actual levels at the antenna. Your real world experience is very valuable. Sound’s like we are close to each other.

      After SNR=Eb/No=6dB, the DV system is noise free. That’s an important gain as well, constant hiss is very fatiguing. But then so is Codec 2 as well for some people I guess

      Re the SSB radio. I’m not proposing everybody uses SSB radios to send Codec 2 over GMSK. It was just something we had laying around so we could quickly test this concept. It’s just a mixer. We are just 2 guys working part time to test an audacious goal – so we improvised.

      For people to use this for real, we need a new generation of VHF radio hardware. A radio you and I can buy, power up, and start using. That’s what Daniel and I plan to build in 2015. Like the SM1000, but a real TDMA capable, “open” VHF radio people can use – and hack. For a couple of hundred bucks.

      QPSK is an option but needs a linear(ish) PA. GMSK can be interpreted as offset QPSK at half the symbol rate (so the papers say). It would save some bandwidth but even GMSK is only using 1200Hz which is a huge improvement over current VHF systems. I’m not sure PSK will give us 3dB Eb/No versus BER gains? My understanding (and simulations) show GMSK pretty close to PSK.



  4. The improvement in performance isn’t surprising when you consider the SSB receiver has a 8-9dB improvement in it’s minimum discernable signal (MDS) compared to the FM radio. The front end of the SSB rig limits the noise power to a 2700Hz channel, where as a FM rig limits the noise power to 16kHz, a factor of nearly four times greater. So a little maths shows;

    MDS = -174dB + NF + 10log(BW)

    assuming the same total cascased NF = 4 then my calculator comes up with;

    MDS(ssb) = -174dB + NF + 10log(2700) = -135.7dB
    MDS(fm) = -174dB + NF + 10log(16000) = -127.9dB

    Difference is 7.8dB, now the total cascaded NF of many SSB rigs is far less than FM radios (NF=4 cf NF=16) since many designers aren’t really concerned with NF in FM systems. This further increases the difference, it’s also why weak signal nuts put 0.5dB NF preamps in their VHF systems and let physics take care of the remaining cascading NF.

    These figures above correlate nicely with the typical receive figures for both types of radios I’ve got access to on the bench at home. So based on the above different receivers will vary mainly due to topology and the total cascaded NF figure.

    The advantage of DV (codec2 + GMSK) here may be the reduction in noise power and improvement in MDS. Something to consider.

    73 Matthew, VK5ZM

    1. Thanks Matt, yes I agree. Basically it’s that FM demod sucking up noise from a much wider bandwidth …..

      1. Most VHF/UHF systems are designed to go horizon to horizon with less than 1000m of elevation at any particular end. Basically over those paths you’ve got a fixed path loss which means designers can cheat, use lesser quality RF parts in the front end (read lazy design) and let the NF rise what’s a few dB between friends?

        Most of the noise in the front end of your FM rig comes from your first mixer that is if they haven’t put a cheap (not so strong) LNA in front.

        In truth the only specification that is heavily tested is adjacent channel rejection, since when you’re racking and stacking analogue signals you don’t want to listen to your neighbour.


        1. Thanks Matt, very useful to have that real world end-user information. I guess at the other end of the link budget a 5W PA at VHF is cheaper than a 2dB NF. So I wonder – what’s the best use of a proposed system like ours with a 10dB gain over legacy analog FM and 1st gen DV? I don’t think it’s weak signal performance. I guess dropping power levels could be useful for adjacent channel rejection. Maybe TDMA repeaters? Noise free?

  5. > So Matt (and Glen) – why aren’t designers of FM radios concerned about NF?

    Because the companies just sell a bigger radio or more repeaters or $$$

  6. David,

    I’m a retired engr and have done some field work with radios. While the expansion of coverage calculation you made is correct, the world is not a featureless flat plane. Download some terrain database examples and run some SPLAT coverage maps along rivers. 3db changes are virtually nil. 10db expands the circle, but there will still be serious holes which will not be filled.

    I was in western Montana mountains working on railroad coverage problems. We had both VHF and UHF going side by side along a river. There were 2 different base stations, one at 8kft elevation. There were snow storms at that elevation that we could SEE the signal fading probably 40db completely wiping out the UHF link. The repeater was solar powered and inaccessible in winter! There was no way to guarantee a solid link.

    Some other considerations I’d throw into the mix:
    – don’t be stuck with arbitrary bandwidths. Look at existing ch spacing plans and see what USABLE bw makes sense.
    – single freq TDMA should be strongly considered as “repeaters” on VHF could be done without cavities. The existing freq pairs are completely used in most areas, not just metros.
    – there should be provision for a non-trivial transparent data. Repeaters could tx the freq of other local repeaters as well as adjacent regional repeaters. This has the potential for HUGE paradigm shift in radio operations incorporating aspects of cellular and trunking.
    – There needs to be digital addressing protocol to allow single station and group calling.

    I started to write a paper on the value of data for TAPR DCC a few years ago and realized that while it had significant potential, it would be a massive uphill struggle in the days of 8051s. With today’s low cost SoC and an integrated data function…

    Please don’t just address the user-user case, consider more integrated system features. Even if you just make provision for data, that is better than none.

    Write to me directly if you want more as I’m sorry to wander off topic.

    1. Hi Barry,

      Thank you for your interesting real world experience and suggestions. Yes, a diplexer free TDMA repeater is a great idea.

      Your ideas of passing data between repeaters reminds me of mesh networks. Good stuff.

      To make your vision happen, please step up and get involved. So many people give me suggestions, but I’m just one guy and can only do so much. What we really need are people who “make things happen”. Sound like you have some fantastic skills there – please help us!



  7. Hi,
    Thanks for you very nice work.
    I found one short mistake
    “We can cover a much larger geographical area. IIRC radio waves get attenuated by 6dB as the distance doubles. So a 12dB gain is 4 times the range, which (Area = pi*r*r) means pi*16 = about 50 times the area for the same power. That would help repeaters, developing world, and emergency communications networks. ”
    Double de Distance -> 4 times Area
    4 Times Distance -> 16 times Area not 50 times ( pi was already there)


    1. Hi Harry,

      Thank you for checking and finding that mistake. Great thing about blogging and open source!


  8. Hi David,

    A nice investigation – great work! A couple of small points:

    What is the modulation index of the FM signal? Of course wideband FM has a higher detection threshold than NBFM. Your spectrum shows several harmonics of the sine wave fundamental – I was expecting it might be narrower for these radios, which would improve the FM performance a bit more.

    Also, you commented that neither of the SDR demods are optimum and the FM has somewhat more loss (compared to theory) than the GMSK demod – why is that? I’m assuming it should be possible for the SDR FM detector to be very close to ideal, but digital demods will always suffer to some extent from sync losses and small overheads in framing etc. This is only a minor factor and will not improve the FM scheme by much!

    In general we should certainly expect digital modes to offer better performance than analog. PSK would give better results than GMSK, but PSK might be more affected by (say) non-linear transmitters.

    Your post has stressed the power advantages of the digital mode compared to FM, but it also provides a great demo of the BW savings. For terrestrial comms where link distances are modest and bandwidth is so precious, this is a huge advantage!

    73, Bill

    1. Hi Bill!

      The modulation index I assumed for Ham VHF is (max deviation)/(max mod freq) = 5000/3000. Not sure exactly what the analog modulator in the radio is set up for.

      I’m using Octave simulations for the demods. The GMSK demod combined with the experimental radio set up has a total implementation loss of 1.5dB. We haven’t tuned the system at all so that’s pretty good for a first pass.

      For example we could have SSB PA non-linearities, the SDR samples only have 4 bits of dynamic range, phase noise in a $20 SDR dongle, power variations over time as the PA heat up, demod DPLL and timing est tuning.

      My coherent Octave demod is close to optimum when tested with simulated GMSK signals and an AWGN channel, 0.5dB implementation loss.

      My FM demod is optimum when tested with in simulation, see the recent “FSK over FM” post. Not sure why we are losing 3dB output SNR in these experiments, possibly under deviation, e.g. the level of the 1000 Hz tone we were playing into the analog FM modulator.

      IIRC PSK is about 1.5dB better than GMSK with BT=0.5, might be able to improve that.

      Want to try playing with this over the air here in Adelaide?



  9. Hi Carlos,

    No, as I have shown in previous posts that using the data port (and analog FM modulator/demodulator) port leads to poor modem performance.



Comments are closed.