SM1000 Part 10 – First Over the Air Tests

Last night I visited Matt, VK5ZM, with a SM1000 Beta. He configured the SM1000 to interface to his IC706 using the CN12 connector patch socket. This allowed an RJ45 cable from the SM1000 to connect to the RJ45 mic/audio connector on the IC706. A few level adjustments and he was using FreeDV to talk to Andy, VK5AKH on 40m! It all went very smoothly.

Here is Matt in action, using the SM1000 in the hand-held mic configuration. He also tried a Heilsound headset, which also worked well.

Here is the audio received by Andy:

I was monitoring Matt’s FreeDV signal using FT817 and FreeDV on a laptop. I did notice a slope to the spectrum, and a cross shape to the scatter diagram (screenshot below). This suggests some of the carriers are at a lower level than others. This is bad news as these carriers will hit the noise floor sooner, causing bit errors and poor speech quality. I really need to look into this carefully, testing a selection of radios with a carefully crafted test signal to measure the tx transmit spectrum slope and flatness. This may explain why people running Flex Radios and SDRs get consistently good performance with FreeDV.

SM1000 Progress Update

Since the last post Rick has been doing some fine work on the enclosure. My beta PCB works well so we are happy with the electronics and firmware. Once we have checked the next revision of the enclosure we plan to start manufacturing the Beta units after the Chinese New Year holiday. I’ll start taking pre-orders shortly.

GMSK Modem Simulation

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 keep forgetting to charge it.

GMSK Demodulators

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 BER curves for the two modems on Eb/No and C/No scales:

The non-coherent modem is 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 world 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, as we discovered in 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 we can increase the bit rate and hence speech quality, pushing 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:

  1. 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.
  2. Be an open standard, with a high performance open source implementation. No annoying closed source components, license fees, and encouraging rather than prohibiting experimentation.
  3. Outperform legacy analog and digital modes.
  4. Diplexor less, trivially simple repeaters.
  5. 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.

FSK over FM

I’m interested in developing a VHF mode for FreeDV. One intriguing possibility is to connect a modem to legacy analog FM radios, which would allow them to be re-purposed for digital voice. One candidate is FSK at 1200 bit/s, which is often used over FM for APRS. This operates through FM radios using the mic/speaker ports on $50 HTs, no special data ports required.

So I want to know the performance of FSK over FM in terms of Bit Error Rate (BER) for a given SNR. That got me thinking. When you send FSK through a SSB radio, it faithfully mixes the tones up to RF and you get FSK over the channel. The SSB radio just adds a frequency translation step. So we can model FSK like this:

However sending a FSK modem signal through a FM radio is very different:

FSK over FM is not FSK when you look at the over the air waveform. The spectrum is no longer two tones bouncing back and forth. So what is it?

I wrote a simulation called fsk.m to find out. This involved building up a FSK modem, and an analog FM radio simulation. The modem took me only a few hours but I was struggling with the analog FM simulation for a week! In particular making my FM demodulator get the same results as the theory. FM is a bit old school for me, so I had to hit the ARRL handbook and do a bit of research.

FSK Modem

It’s a BEL202 simulation (as used for the APRS physical layer); 1200/2200 Hz tones, 1200 bit/s. I’m using the integrate and dump demodulation method and it matches the theoretical curves for non-coherent BFSK. Here is the FSK modem in action. First the FSK time domain signal and spectrum. The spectrum is a bunch of energy between 1200 and 2200 Hz. Makes sense as the modulator keeps moving back and forth between those two frequencies.

The next figure shows the sames signals with a 10dB SNR. Although the time domain signal looks bad, it actually has a Bit Error Rate (BER) of one error in every 1000 bits (BER = 0.001 = 1E-3). The reason it looks so bad is that in the time domain we are seeing the noise from the entire bandwidth (our sample rate is Fs=96kHz). The demod effectively filters most of that out.

This next plot shows the output from the 1200 and 2200Hz integrators in the FSK demodulator for the 10dB SNR case. The height measures the energy of the tone during that bit period. As we would expect, they are mirror images. When one detects a large amount of energy, the other detects a small amount of the other tone.

Analog FM

The next step was to build a simulation of the modulator and demodulator in an analog FM radio. I wrote some code to test the input Carrier to Noise Ratio (CNR) versus output SNR. The test signal was a 1000 Hz tone, and the modulator had a maximum deviation of 5kHz, and a maximum input audio frequency of 3 kHz. After the demodulator I notched out the 1000 Hz tone so I could measure the noise power, the input to the notch filter was signal plus noise.

Here is the spectrum at the FM demodulator input for a 1000 Hz test tone:

The top plot is the tx signal centred on a 24 kHz carrier, in the bottom plot it has been mixed down to baseband and filtered. The FM signal is 16 kHz wide, as per Carsons rule. Here is the output of the FM demodulator:

At the top is a nice sine wave, and the bottom also shows the sine wave. You can see the effect of the output 3kHz low pass filter used to limit the noise bandwidth of the demod output.

When tested over a range of CNR inputs, I achieved output SNRs (red) in line with the text books (green):

At about 9dB the demodulator falls away from theory as the FM demodulator falls over, this is pretty typical. The theoretical model I have used is only valid above this 9dB threshold. You often hear this threshold effect in FM. The blue line is SSB for comparison. Over a certain threshold FM does quite a bit better in terms of output SNR for the same input CNR.

FSK over FM

OK so lets combine the simulations and look at the BER performance:

Oh dear. If my simulations are accurate, it appears FSK over FM is a lemon. About 7dB worse than regular FSK for the same BER. So using a FSK modem over a SSB radio would allow you to use 7dB less power than running the same modem through a FM radio. Coherent PSK is 3dB better again that FSK so that would get you a 10dB improvement. Simple FSK or PSK transmitters are easy to build too, and needing 7-10dB less output power would simplify them again (e.g. 100mW versus 1W).

Here is the spectrum at the FM demodulator input when sending FSK:

Note the FM spectrum looks nothing like regular FSK “over the air”, which looks like this:

So What went Wrong?

Given the plot of analog FM performance (say compared to SSB) above I had expected better results from FSK over FM.

I think I know where the problem lies. The input CNR is a measure of carrier power to noise power in the input bandwidth of the demodulator. Another way of looking at the VHF channel noise is a “floor”, which can be modelled as the average noise power per 1 Hz of bandwidth, called No.

So the Universe has given us a fixed “noise floor”, which will be the same for any modem. The FM demod input bandwidth is much wider, so it’s sucking up much more noise from the channel, which the poor demodulator has to deal with.

Lets plot the analog FM demod performance again, this time against C/No rather than C/N:

This takes into account the noise bandwidth, everything is “normalised” to the noise floor. When the C/No is beneath 48dB SSB looks much better. We can see a 7dB improvement over FM at low C/No values. This also explains why the microwave guys prefer SSB for their long shots.

Here is the BER curve scaled for C/No:

Conclusion

It appears the key to good modem performance is the RF bandwidth of the signal. Given a constant noise floor No, the signal bandwidth sets the total noise power N=NoB the demodulator has to deal with.

This has put me off the idea of a FreeDV VHF mode based on BEL202 FSK through legacy FM radios. I’d really like to come up with a mode that has sparkling BER versus SNR performance. I haven’t spent years making Codec 2 operate at low bit rates just to throw those gains away in the modem!

Couple of ways forward:

  • Take a look at GMSK.
  • Consider developing a version of the SM1000 into an (open source) VHF SDR radio that can do PSK. Not as crazy as it seems. We are already planning a HF SDR version. Radio hardware is getting simple now the signal processing is all moving to software. We can make the modem so efficient that the PA can be modest (100s of mW).
  • Dream up waveforms that can pass through legacy FM radios and have a low over-the air bandwidth. For example FSK that shifts between 300 and 400 Hz. In the past I’ve dreamed up new Codec 2 modes (1300 and 450 bit/s) to suit the properties of HF channels. So why not design a modem waveform to suit us? Go open source!
  • Cop the performance hit and use BEL202 FSK. It might still be useful to use legacy FM radios for DV even with a 7dB loss in modem performance. It seems to work fine for APRS. If your C/No is high (as is often the case) then FSK over FM will have zero errors.

SM1000 Part 9 – First Betas

Edwin and his team at Dragino have hand assembled the first two SM1000 Beta units in Shenzhen. I’m working with him to perform some initial tests while we wait a few days for the prototype enclosures to be made. Then Rick and I will both get a SM1000 shipped to us for testing. We’ve found a few little issues so far which we will correct before the Qty 100 beta run later this month.




SM1000 Part 8 – Video and Beta CAD work

Over the last few months Rick KA8BMA has been working steadily on the schematic, PCB, and enclosure CAD work for the SM1000 Beta. This is now complete, the Beta PCBs have been made, and the first 2 Beta units are being hand assembled by Edwin at Dragino. Rick and I will test these, then kick off the Qty 100 Beta run which I estimate will be on sale in January.

I’m a bit intimidated by the mechanical CAD work required to make an enclosure, but Rick has stepped right up and done a fine job designing a bent metal case comprised of two U-shaped halves. This can be economically made in small quantities. This sort of case is more suited to the “small box on the desk” form factor, but that’s OK for now. It still has an aperture for the internal microphone. Click for larger images.




Last week I visited VK2 and gave a talk at the ARNSW Home Brew Group meeting at Dural, on the NW edge of Sydney. I had a very pleasant day with Peter Marx who was kind enough to drive me there and record the talk. As well as the standard intro to Codec 2 and FreeDV the second half covers the SM1000.

OpenRadio Part 3 – Filters

Over the past week I’ve built my own OpenRadio prototype, using the construction notes Mark has put together as a guide.

To help others I measured a few DC voltages and recorded them. I found one small bug in my assembly: one of the flip-flop pins was not soldered correctly, leading to erratic signals. After that I set the LO to receive a 14 MHz signal and managed to receive a carrier from my FT-817, via about 60dB of in-line attenuation. At the moment I am using SpectraView running under Wine as the SDR software, however we really should get a Linux/Open Source SDR program running for the mini-conf. I only have a mono input sound card in my laptop so I’m getting a mirror image of the received spectrum. Still, good enough to get started.

I connected the radio to an external antenna and tuned to a local AM station on 1310 kHz. This sounded very strong but distorted. When I tuned to 7.150 MHz I could still hear AM radio signals, which suggests very strong local signals overloading the mixer. I tested this idea by inserting a 20dB attenuator in line with the antenna and sure enough the AM signal on 1310 kHz became clear and I could no longer hear AM stations on 7.150 MHz.

I could even see the AM signal on my oscilloscope – it measures 1Vrms (20mW) on the antenna terminals! That’s enough to light a LED (10mA at 2V).

However an attenuator is not ideal, so using the tables from my trusty copy of RF Circuit Design I built a simple High Pass Filter to attenuate broadcast signals by about 20dB, but pass other HF signals above 3 MHz. This consists of a 1nF capacitor and two 4.5uH inductors (21 turns on a 7mm diameter pencil) in a “Pi” arrangement. This worked well, the AM signals sound fine and no break through on other HF frequencies.

I also tested Mark’s 27 MHz Low Pass transmit filter, this cleaned up the PSK31 tx signal nicely, 2nd harmonic at least 30dB down with about 1Vrms into 50 ohms (20mW) transmit power. Here is a photo of my OpenRadio with both filters on the right. The larger coils at the top are part of the 3 element 3MHz high pass filter, which then connects to the 7 element 27MHz low pass filter.

Mark and I even had a OpenRadio to OpenRadio PSK31 QSO on the 40m Ham Band! I had about 40mW transmit power on 40m. This was actually NVIS propagation so 100km up and down to the ionosphere and 10km across Adelaide!

So our #2 prototype helps us confirm that the design is working. I’ve followed Mark’s construction notes and made some of my own, and obtained experience in setting up the Arduino and Spectraview software. The broadcast HPF design may be useful for others who experinece strong local interference.

Well done Mark on a fine job designing OpenRadio and writing the support Arduino software. He has put in a tremendous amount of work to develop and test the hardware, written a lot of software, and carefully documented everything on the OpenRadio Wiki. This is a great resource that will be useful to many others. Next step is the kit production. Right on schedule for linux.conf.au in January.

FreeDV Robustness Part 4

I’m working on increasing the robustness of FreeDV over HF radio channels, in particular compared to analog SSB.

Why HF Digital Voice so Hard

HF radio channels are bad news for digital data. Here is a plot of the Bit Error Rate (BER) versus Eb/No for two different modems (DQPSK and QPSK) and two different channels (AWGN and HF). Four curves in total, click for a larger version.

Think of Eb/No as the SNR of one bit. It turns out that for a given bit rate, SNR = Eb/No plus a fixed scaling factor. So if you raise SNR by 1 dB. Eb/No goes up by 1 dB. The “CCIR poor” HF channel model I used is from data extracted from the very handy PathSim channel simulator. An AWGN channel is typical for a line of sight VHF: just noise without frequency selective fading.

Curves for two types of modems are illustrated: Differential QPSK (DQPSK), and Coherent QPSK (QPSK). DQPSK is commonly used on HF as it greatly simplifies the demodulator design. However if it can be made to work, QPSK is better. Less power for a given BER.

A couple of things to note:

  1. You need a lot of Eb/No on HF to get a low bit error rate. This explains why reliable HF data needs lots of transmit power. Or you can use a very low bit rate, so each bit has more energy in it. This also makes Digital Voice (DV) on HF hard. For example the FreeDV 1600 mode needs a BER of 2% for an “armchair” copy. Using a 1600 bit/s (800 symbols/s) DQPSK modem that’s an Eb/No of 15dB or a SNR (3kHz noise bandwidth) of SNR = Eb/No – 10log10(3000/800) = 9.2dB.
  2. HF channels are much tougher than AWGN. Looking at the 2% BER line AWGN DQPSK only requires about 6dB, which is 9dB less than the HF fading channel (or 12.5% of the power).
  3. The slope of the HF curve is nearly flat. Adding power doesn’t make much difference to the BER. So you need to add a lot of power to significantly reduce BER. Curiously, it also tells us that the “digital cliff” is more like a lightly sloping hill. As we reduce power the BER doesn’t change much. This suggests that HF DV will gradually get less intelligible as we lower the SNR.
  4. As the HF curves are so flat, a useful approximation is: “Your bit error rate is 10%. The Universe doesn’t care how much power you have. Deal with it”.
  5. Small changes in the AWGN demodulator performance can have a huge effect on BER for HF channels. For example the difference between coherent and differential QPSK is 4-5dB, that’s like increasing power by a factor of 3! You really don’t want an inefficient demodulator on HF.

New FreeDV Mode Concept

I’ve learnt some lessons from thinking about analog SSB. At low SNRs, analog SSB still gets through, however the quality is pretty bad. Lots of noise, words lost in fades, and we tend to yell, repeat things, and use the phonetic alphabet. In other words, the “information rate” slows, there is delay, but we get the message through using “Human” error correction. Eventually.

The digital voice equivalent is a low bit rate speech codec. So in an inspired two hours I quickly hacked up a 450 bit/s Codec 2 mode. Here it is compared to the 1300 bit/s mode used for FreeDV 1600.

Original
1300 bit/s Codec 2
450 bit/s Codec 2

This is a good example of the 450 bit/s mode. It makes a bigger mess of other samples. But hey, it’s preliminary, not the best we can do at 450 bit/s. I was shooting for something right on the edge of intelligibility, as that’s where SSB is at low SNRs.

As the bit rate is so low, we have a lot of options. For a start we are 10log10(1600/450) = 5.5dB better off in SNR than the FreeDV 1600 mode. Secondly it frees up bandwidth to apply FEC. So I’m experimenting with a powerful LDPC code from the CML library suggested to me by Bill Cowley, VK5DSP. The Peak to Average Power Ratio (PAPR), or crest factor, is also reduced as we have less FDM carriers.

For this new mode I’m trying coherent QPSK rather than differential QPSK. This is unusual for FDM modems on HF, but has big gains as shown above. Coherent QPSK requires much less power than differential QPSK for the same bit error rate. It does require some overhead, in the form of “pilot symbols”. These are known symbols we transmit in order to estimate or probe the channel phase and amplitude.

I’m using a half rate LDPC code, so the bit rate over the channel is 900 bit/s. There are 9 carriers at a symbol rate of 62.5 baud, and every 5th symbol is a pilot. No high power BPSK pilot tones are required, the pilot symbols can be used instead to estimate the frequency offset and provide frame synchronisation.

OK, so that takes care of low SNR performance – i.e. getting poor quality, but intelligible speech through a HF channel.

Lets now try to extend that to obtain higher voice quality on high SNR channels:

  1. The uncoded error rate will be less than 1% so we disable the LDPC decoder. Now we don’t have to wait for the LDPC parity bits, therefore the decoding delay will be small (similar to FreeDV 1600). On poor channels we click on the “FEC” check box and the delay increases to about 1 second but the system works on low SNR channels. Remember with low SNR analog SSB you are already repeating yourself and using phonetics, so the effective delay is also in the order of seconds compared to an armchair SSB copy.
  2. We can send auxillary carriers to add to the 450 bit/s Codec 2 information and improve the speech quality. For example extra LSP vectors, or gain and pitch bits. If these carriers are 6dB lower than the core information, the total power will only increase by 10*log10(1+0.25)= 0.5dB. So if we get a few s-points above the system “floor” – quality will increase – just like SSB.

Status

For the past year I’ve had several attempts at an improved FreeDV mode, hitting several dead ends. “Research and Disappointment” at it’s finest. However it’s started coming together over the last few months.

A key assumption is that low quality at low SNR is OK. This assumption has yet to be tested in real time conversations. The other biggie is coherent demodulation, this works much better than differential PSK. However it’s unusual, and might break with very fast fading. We shall see.

My current ideas are complex and may be wrong. So I want the “minimum effort” path to test them. This still meant writing a bunch of high-level Octave simulations over the course of several months, each building on the next. For now I’m ignoring issues like delay, real time operation, and many other details. The focus is on getting a digital voice signal through poor HF channels. That’s the toughest problem we face. Everything else can be refined later.

To make the modem work on real channels I had to develop new frequency offset and coarse timing estimation (frame sync) code. Just recently I made it to the point where I have wave files that can be played over real HF channels, then processed with off-line Octave simulations.

Results

Thanks to Tony VK3JED, Mel K0PFX, Gerry N4DV, and Michael DL2FW for helping me collect off air samples. This is tricky, as there is no real time feedback. The guys would send me a sample, I would process it, then I would get back to them with feedback. I had to ask Mel and Gerry (located 800 miles apart) to reduce their tx power as I was getting zero bit errors all the time. Eventually they settled on a few watts of tx power, and pointing their beams in the wrong direction. That way I could actually see some bit errors and get a real feel for the “floor” in the new waveform.

Let work through the results for one example that had an average SNR of -5dB:

Off Air FreeDV modem signal
Reference (Error free) Codec 2 at 450 bit/s
-5dB Average SNR Decoded 450 bit/s Codec 2
SSB over same channel

The off air signal has a strong high frequency interfering SSB signal that makes our modem signal hard to hear, it’s lower down coming in and out of the noise. The demodulator filters take care of that OK. The modem signal decodes successfully about 50% of the time, there is a big chunk in the middle missing as it disappears into the noise. Not much I can do about that. The SSB signal is at about the same peak power. I can make out the phonetics and a few words in the SSB.

I’ve been using the FreeDV GUI program to visualise the off air signal:

You can see the spectrum shows zilch at the moment the screen shot was captured, our poor little modem signal has “submerged”! The waterfall below shows the signal over time. It’s not pretty.

The next few plots show the modem at work:

Note the diagonal lines in the “Estimated HF channel phase”. This indicates a small frequency offset. They take about 100 frames (2 seconds) to wrap around so that’s a 0.5Hz frequency offset. You can see the “channel amp” and “SNR est (dB)” diving in the middle of the sample, and the bit errors going crazy at the same time.

The FEC frames are 576 bits long. The FEC breaks down at about 10% errors or 60 bit errors in a single frame. You can see that quite clearly in the bit error plots. The “Coded Errors” (output from the FEC decoder) are zero until we hit about about 60 un-coded errors/frame.

Further Work and How You Can Help

Lots more to go however this is looking promising. The rest is engineering. I’d like some help with this, from people with skills like C programming, basic statistics (like understanding what variance is), and Octave.

Without any help, this is what my lonely future looks like for the next 6 months!

  1. Improve the speech quality of the 450 bit/s Codec 2 mode, e.g. better vector quantisation, adaptive equalisation and filtering of the input speech.
  2. Add auxiliary carriers to improve speech quality in high SNR channels, and heuristics to know when this information is safe to use.
  3. Refine the modem algorithms to reduce delay. Re factor Octave code. Port Octave code to C.
  4. Tune LDPC decoding.
  5. Experiment with clipping/compression to improve PAPR, and interleaving to improve performance in fast fades.
  6. Integrate into the FreeDV GUI program and the SM1000. For example will the LDPC decoder run on the STM32F4?
  7. FreeDV maintenance, re-factoring.

Some more blue sky ideas for further R&D:

  1. Given the relatively short block length, is an LDPC code the best choice?
  2. Investigate the possibility that 8PSK may perform close to QPSK on fading channels (unlike AWGN channels). This would have fewer carriers so better PAPR, so may out perform QPSK. Thanks John Gibbs NN7F for this idea.
  3. Investigate FDM using continuous phase modulation like GMSK that can use non-linear power amplification. This will use at least twice the bandwidth of QPSK, however given our low bit rate this is still quite feasible in a standard 2000 Hz SSB channel. This would be a mode that can drop “straight in” to FM VHF radios. Thanks again John for pointing this possibility out.
  4. Investigate FEC codes that can be configured to reduce PAPR, thanks Gregory for reminding me about this.

If you can’t code you can also donate to the this project via PayPal (which also allows credit card donations):

Donation in US$:


Or you can buy a SM1000 when they become available at the end of this year. Commercial sponsorship is very welcome but everything I write must be LGPL or equivalent.

I do this work full time and don’t have much other income right now. What did you spend on your last piece of radio gear? How does it compare to a project than will bring you a new, 21st century voice mode? Does it support free and open radio or were you paying license fees for the software in that radio?

BTW I also need a second hand ThinkPad X220/X230 laptop if anyone is feeling especially generous! They can be had on ebay.au for around AUD$400. Simulations are a bit slow on my 2008 vintage X200 model and I think the fan is dying!

OpenRadio Part 2 – Prototype Works!

Since the first post on the OpenRadio project Mark has been moving ahead and leaps and bounds. In just a few late nights work he has assembled and tested the radio, managed to receive off air signals, and even tested the PSK31 transmitter! Fine business Mark.

Mark writes:

Hooked it up to a real antenna tonight:

That’s me decoding actual 20m PSK31 signals!

Signal path is:
Antenna —RF—-> OpenRadio SDR —-IQ–>|Laptop|—-IQ—> Spectravue
(IQ Demod) —SSB—> fldigi

Mark managed to build the radio in 1-2 hours, including taking plenty of photos to document assembly and aid others. Now not everyone will have Mark’s radio assembly skills. However even allowing for a learning curve and a few coffee breaks we are on track for a one-day (say 6 hour) mini-conf assembly time.

A working prototype verifies the hardware design, so we are now getting ready to re-spin the PCB and start putting the kits together.

In other news Edwin from Dragino has added the OpenRadio kit to his store. We estimate the kits will be available for shipping in December. Kim, Mark and I, are still deciding if we will bring a bunch of kits to LCA, or have delegates pre-order them from Dragino. More on that shortly.

Links

OpenRadio Wiki

OpenRadio – a one day Software Defined Radio project

For the 2015 Linux Conference, I am working with Kim Hawtin and Mark Jessop on a 1 day Open Radio Mini-conference.

In this mini-conf a classroom of people will solder together their very own software defined radio (SDR) transceivers in just a few hours. It will be capable of receiving signals on the HF radio bands (3 to 30 MHz), and short range transmission of FSK/PSK data on the 13.5 and 27 MHz ISM bands (no license required).

The project is being documented on our OpenRadio Wiki. It’s completely open source and we have published the PCB CAD files, and the parts list with Digikey/Element14 catalogue part numbers. It’s based on the soft-rock radio designs.

We have put a lot of effort into making the radio easy to build. For example a minimum of (large footprint) surface mount parts, and a simple, fast to assemble design. We have intentionally included one or two inductors and transformers to wind to give people a taste of the complete radio assembly experience. With a little supervision, the project is quite suitable for radio/electronics beginners or school age children. It’s a “crystal set” for the 21st century.

Mark has done a great job designing the radio, and we have just received the prototype PCBs:

This week we will assemble and test the first prototypes, measure how long they take to build, and noting possible snags for inexperienced builders. Then our good friend Edwin from Dragino will prepare and ship kits for the mini-conf.

The resources we create for this project (wiki, CAD files, software, kits from Dragino) will remain available after LCA. So you, your radio club, hackerspace, or even school class will have access to an easy to build a Software Defined Radio (SDR).

JackPair – Secure Phone Calls using Codec 2

I’ve just found out about a new Kickstarter for JackPair, a device that enables secure phone calls over a mobile phone. It uses Codec 2.

Over the past 12 months I have been approached by a couple of groups interested in building a similar product (but not JackPair). These groups asked me to develop a modem that could pass data through a cell phone voice codec. Given I know modems and codecs it was a good fit. Quite a challenge too, to get 1200 – 2400 bit/s through a voice codec. To both groups I said I would only do the job if it was open source, and it never went any further.

I feel a product like this must be open source, in order to audit it and know it is really secure. So the software should be GPL and the hardware open. An end user must be able to (re)flash from blank silicon using their own trusted firmware. The paranoid could even do this every time they use it. Or solder their own device from scratch. That’s where I’m heading with my open source radio work – make the radio hardware trivial, and the software open and capable of running on commodity CPU.

The SM1000 has the hardware to build a JackPair type product, e.g Codec 2, DSP capability, microphone and speaker amps, and line audio interfaces. It would need a different firmware load (modem, crypto). The SM1000 is open hardware, so a good starting point.

Clearly the JackPair is a product whose time has come. I support this sort of project (secure telephony for everybody) as I feel my governments response to terrorism is more of a concern than terrorism itself. Good to see it happening, and nice to see Codec 2 helping make the world a better place.