Modems are an interface between theoretical physics and what can actually be built. The laws of physics set the limits of modem performance, and ultimately the amount of power you need for a certain bit error rate at a receiver. With the right algorithm, we can reach the limits of modem performance.
I think that’s kind of cool. There aren’t many fields where we can do the best the Universe can offer with 20th century technology. For example an internal combustion powered car is only about 15% efficient in converting chemical energy into motion. Solar cells on your roof are also about 15% efficient. We can’t do practical nuclear fusion. But 6 billion GSM mobile phones have a modem that is 100% efficient in converting received radio energy into bits. Unless you are my 16 year old son and keeping forgetting to charge it.
This week I’ve been getting my head around GSM modems, and have worked up an Octave simulation of a couple of GMSK modems called gmsk.m. I started with this commonly used, non-coherent algorithm for GSM demodulation:
It has the advantage of being compatible with data-port capable legacy FM radios. However the best I can do in my simulations is 4.5dB away from theoretical. So I went looking for a better (hopefully close to ideal) demodulator. After some reading about MSK and GMSK and several days of confusion I eventually managed to make this “coherent” demodulator work (from the 1981 Murota paper listed below):
The adders on the RHS operate on bits and are implemented as XORs. I don’t fully understand the processing steps, especially the XORs at the end. It’s derived from an interpretation of MSK as a form of Offset QPSK, and mysteriously the inphase and quadrature arms operate at half the bit rate. But it works really well, so that’s enough for now.
The term “coherent” means we know the phase and frequency of the received signal. Coherent PSK and FSK modems have ideal performance, and often have matched filter and “integrate and dump” stages. The integrator can be seen as summing all of the energy in the bit, that’s the “Eb” part in Eb/No.
Here are the performance curves for the two modems on Eb/No and C/No:
The non-coherent modem is a leaving a lot of bits on the floor. I also note my coherent demod outperforms the laws of physics at high Eb/No. I think I’ll build a warp drive next.
These simulations are some distance from a practical modem. The coherent demod needs clock and phase recovery and a lot of real word testing. However this is all quite possible (it’s in every mobile phone) and I’ve worked through similar steps for the HF FDMDV modem.
The non-coherent modem starts to perform (a BER of less than 1E-2) at a C/No of around 50dB. Curiously, this is where analog FM modulators start to get happy, from the recent post on FSK over FM:
So the non-coherent demod is a nice match to legacy FM radios. I’m not sure if analog FM demodulators would be effective at lower C/Nos, even when teamed with the coherent demod. So I’m not convinced it’s possible to retrofit the coherent demod to existing FM radios, but it’s certainly realisable with a $20 SDR dongle.
GMSK Demod Walk Through
This section has some screen shots of the two demodulators in action. First, here is (one half) of the GMSK signal spectrum:
The lower plot is the cumulative power, and 99% of the power is at the 2460 Hz point, making 4920 Hz bandwidth total. This gives a BW/Rs ratio of 1.02, close to the 1.04 expected for BT=0.5 GMSK at Rs=4800Hz. Nice.
Here is the “eye diagram” of the non-coherent demod:
This explains why the non coherent demod struggles. The low pass filter introduces significant inter-symbol interference. One symbol affects the next one as the LPF smears the symbols into each other. The eye is quiet narrow, even with no noise. A modest amount of noise can close the eye and we get bit errors. We can’t widen the filter as it will let more noise power in.
Here is the filter and integrator outputs from the coherent demod, one plot for the cos (real) and sin (imaginary) arms, with no channel noise:
Here are the integrator outputs with an Eb/No of 8dB:
It’s almost the same! Quite a lot of noise hardly bothers it, the BER is about 1E-3 (1 in 1 thousand)!
Ideas for VHF FreeDV
Now Codec 2 at 1200 bit/s sounds OK at an error rate of 1% (1E-2). Reading off the curves that’s a C/No of 42.5dBHz at 4800 bit/s or 42.5 – 10log10(4800/1200) = 36.5dBHz at 1200 bit/s. We need about 47dBHz for a 12dB SNR (ie scratchy) analog FM copy, or 50dBHz for a good FM copy. So that makes a proposed 1200 bit/s Codec 2 system 10dB ahead of analog FM. I can currently work the local repeater on 500mW with my $50 FM HT, so this proposed system could do it on 50mW. Cool.
Hard to say if people will actually like using Codec 2 over VHF. Quality expectations are different to HF SSB, and people are used to high SNR FM. If most FM signals are strong the extra low level performance of a new digital mode may not be useful.
However if speech quality is king with all that system gain we could user higher quality speech codecs at a higher bit rate. If we have a good C/No would can increase the bit rate and hence speech quality, push against the “digital ceiling” in speech quality. One disadvantage of GMSK is that we can’t scale the bit rate in high C/No channels without making the RF bandwidth wider. mPSK is better at this, we can raise the number of bits/symbol and get a greater data throughput in the same RF bandwidth.
The extra system gain allows us to to explore other options. For example two channel TDMA would let us build diplexer free repeaters. This would require running the modem at 2400 bit/s, to get an average of 1200 bit/s. The hardware complexity would be similar to a $50 HT. A 1 watt TDMA repeater based on SDR could be built for $100, and do all sorts of clever things like form mesh networks with adjacent repeaters. Sprinkle them about hill tops in a humanitarian disaster situation, they could be treated as disposable.
I do think a new VHF DV mode must have some significant advantages to gain traction. Here are my current ideas:
- An entry level implementation using freely downloadable software that runs on a PC, a sound card, and legacy FM radios through the mic/spkr ports. People get frustrated when told to upgrade all of their radio hardware to one particular brand to use DV.
- Be an open standard, with a high performance open source implementation. No annoying closed source components, license fees, and encouraging rather than prohibiting experimentation.
- Outperform legacy analog and digital modes.
- Diplexor less, trivially simple repeaters.
- Variable speech quality levels.
GMSK Modem Resources
Here is a good treatment of various Digital Modulation schemes from Atlanta RF. The Dsplog site has a good explanation and Octave simulation of MSK that helped me get my head around coherent (G)MSK demodulators. I implemented the demodulator from the 1981 IEEE Trans paper “GSM Modulation for Digital Radio Telephony” from Murota and friends. I think this paper originally proposed using GMSK for digital mobile phones.