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.
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|
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:
- The Codec 2 speech quality could be improved with some more work.
- We can do 2 channel, no diplexer TDMA for a 3dB hit in C/No (as we would need to double the bit rate).
- 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.
- 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?
- 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:
It all helps! Thanks.