# CMA Equalisation of FSK

We’ve just released a new experimental mode for Digital Voice called FreeDV 800XA. This uses the Codec 700C mode, 100 bit/s for synchronisation, and a 4FSK modem, actually the same modem that has been so successful for images from High Altitude Balloons.

FSK has the advantage of being a constant amplitude waveform, so efficient class C amplifiers can be used. However as it currently stands, 800XA has no real protection for the multipath common on HF channels, for example symbols that have an echo delayed by a few ms.

So I decided to start looking at equalisers. Some Googling suggested the Constant Modulus Algorithm (CMA) Equaliser might be a suitable choice for FSK, and turned up some sample code on DSP stack exchange.

I had a bit of trouble getting the algorithm to work for bandpass FSK signals, so posted this question on CMA equalisation for FSK. I received some kind help, and eventually made the equaliser work on a simulated HF channel. Here is the Octave simulation cma.m

How it works

The equaliser attempts to correct for the channel using the received signal, which is corrupted by noise.

There is a “gotcha” in using a FIR filter to equalise a channel response. Consider a channel H(z) with a simple 3 sample impulse response h(n). Now we could equalise this with the exact inverse 1/H(z). Here is a plot of our example channel frequency response and the ideal equaliser which is exactly the inverse:

Now here is a plot of the impulse responses of the channel h(n), and equaliser h'(n):

The ideal equaliser response h'(n) is much longer than the 3 samples of the channel impulse response h(n). The CMA algorithm requires our equaliser to be a FIR filter. Counter-intuitively, we need to use an FIR equaliser with a number of taps significantly larger than the expected channel impulse response we are trying to equalise.

One explanation for this – the channel response can be considered to be a Finite Impulse response (FIR) filter H(z). The exact inverse 1/H(z), when expressed in the time domain, is an Infinite Impulse Response (IIR) filter, which have, you know, an infinitely long impulse response!

Simulation

The figures below show the CMA equaliser doing it’s thing in a multipath channel with AWGN noise. In Figure 1 the error is reduced over time, and the lower plot shows the combined channel-equaliser impulse response. If the equaliser was perfect the combined channel-equaliser response would be 1.

Figure 2 below shows the CMA going to work on a FSK signal. The top subplot is the transmitted FSK signal, you can see the two different frequencies in the waveform. The middle plot shows the received signal, after it has been messed up by the multipath channel. It’s clear that the tone amplitudes are different. Looking carefully at the point where the tones transition (e.g. around sample 25 and 65) there is intersymbol interference due to multipath echoes, messing up the start of each FSK symbol.

However in the bottom subplot the equaliser has worked it’s magic and the waveform is looking quite nice. The tone levels are nearly equal and much of the ISI removed. Yayyyyyy.

Figure 4 shows the magnitude frequency response at several stages in the simulation. The top subplot is the channel response. It’s a comb filter, typical of multipath channels. The middle subplot is the equaliser response. Ideally, this should be the exact inverse of the channel. It’s pretty close at the low end but seems to lose it’s way at very low and high frequencies. The lower plot is the combined response, which is close to 0dB at the low frequencies. Cool.

Figure 4 is the transmit spectrum of the modem signal (top), and the spectrum after the channel has mangled it (lower). Note one tone is now lower than the other. Also note that the modem signal only has energy in the low-mid range of the spectrum. This might explain why the equaliser does a good job in that region of the spectrum – it’s where we have energy to drive the adaption.

Problems for HF Digital Voice

Unfortunately the CMA equaliser only works well at high SNRs, and takes seconds to converge. I am interested in low SNR (around 0dB in a 3000 Hz noise bandwidth) and it’s Push To Talk (PTT) radio so we a need fast initial training, around 100ms. Then it must follow the time varying HF channel, continually retraining on the fly.

For further work I really should measure BER versus Eb/No for a variety of SNRs and convergence times, and measure what BER improvement we are buying with equalisation. BER is King, much easier that squinting at time domain waveforms.

If the CMA cost function was used with known information (like pilot symbols or the Unique Word we have in 800XA) it might be able to work faster. This would involve deconvolution on the fly, rather than using iterative or adaptive techniques.

## 15 thoughts on “CMA Equalisation of FSK”

1. Steve Sampson, K5OKC says:

I’m always thinking about spread spectrum. Even if the regulatory agencies don’t like it. But what if you don’t call it spread spectrum. Call it FDFM (Frequency-Division FM).

Instead of sending all sixteen carriers in parallel, send two of them (1, 8), and then change to a new pair (2, 9) on the next Baud. Taking it to the next level, you could add a PRNG to select the pair in a known sequence (1 of 8) pseudo-random position pairs.

It would probably look like FHSS to a listener.

If carrier 1 got hit by a fade, but carrier 8 was good, then you know the missing bit, because if 8 is gone, 1 must have been lit. Multipath might be resolved by being lower in amplitude, or the wrong time for that carrier pair.

2. Diego says:

You dont have to necessarily do frequency hopping. The advantage you are describing is achievable with a guard interval between symbols. Thats what is used with OFDM insert guard intervals but use multiple carriers simultaneously to make up for speed loss due to the inserted breaks. However i have no clue if that concept is feasible for HF…

1. david says:

Actually the use of multiple carriers in OFDM is to make the symbol length significantly longer than the multipath delay, which allows techniques like the cyclix prefix. Yes OFDM can be used for HF.

3. Diego says:

Thanks David, that makes more sense now, im starting to remember some terms like rake receiver, i have to dig out my scripts now i completely forgot about drm which is using cofdm in hf… University days are long past.

1. david says:

But your idea of guard intervals on the FSK symbols is a good one, combined with Phil’s ideas below. We would need to up the average data rate to compensate, so the overall BW could be a problem.

4. Phil Karn says:

I was also going to suggest adding frequency hopping to M-ary FSK to mitigate multipath, right along Steve’s lines. It should perform well as long as the symbol duration isn’t so short that you lose a significant fraction of its total energy in delayed multipath components.

This does have the advantage over OFDM of maintaining a constant signal envelope.

1. david says:

Thanks Guys. Will it be possible to freq hop on a Rs=400 Hz, 800 bit/s 4FSK waveform in 2000 Hz of bandwidth we have available with SSB radios? Also I imagine we would need a higher bit rate in order to use FEC to code over the bits lost through multipath?

1-2ms multipath is not uncommon, we currently have Rs=400Hz, Ts=2.5ms

1. Phil Karn says:

For a channel with 1-2 ms multipath spread, what does the integral of the squared impulse response look like? I.e., how much of the energy in a 2.5 ms pulse arrives within that 2.5 ms, how much in the following 0.5 ms, and so on?

Frequency hopping is a natural addition to M-ary FSK. As Steve says, you just change the tone set on every symbol. How much bigger you make the complete list of tones is a parameter you can choose. If the main goal is multipath elimination, you only need make that set big enough so that when you return to the start of the list the multipath energy from the previous use of that subset has decayed away.

There are other good reasons to spread, of course, the main one being resistance to narrowband fading and CW jamming.

1. david says:

Early days so I don’t have data on the energy spread. The ITU-T HF channel models I develop with (CCIR poor etc) use a two path model (direct and delayed) multiplied by time varying complex gains. If the direct path gain wanders towards zero, all of the energy can be on the delayed path

I’m still struggling to see how freq hopping will fit in a SSB radio BW. Perhaps you can illustrate with an example pls?

Our current 4FSK tone set is 800, 1200, 1600, 2200 Hz. The radio BW is 400 to 2600Hz.

1. Phil Karn says:

Oh, forgot to address the bandwidth issue. I had been thinking about the really slow M-ary FSK schemes like WSPR and JT-65. But for voice, I think it’s time to push back against the SSB bandwidth limitation. You get better frequency diversity that way, and it might let you back off a little on time diversity to keep the delay from getting objectionable.

Here in the US it’s pretty easy to get a STA (Special Temporary Authorization) to overcome a regulatory limit as long as you do your homework. And I’m not even sure that frequency hopping necessarily qualifies as “broadband” scheme. At any given instant it’s still pretty narrow, and I don’t know of any regulatory limits on how fast you can retune your radio.

2. Phil Karn says:

Note also that you don’t actually have to throw away the delayed multipath components when you hop. You can run several overlapping detectors. E.g., if your symbols are 2.5 ms long and the channel spreads the energy uniformly over 5 ms, then you could start one detector integrating the first symbol for 5 ms, then at 2.5 ms start a second detector to integrate the second symbol for 5 ms, and so on. This is analogous to the use of a RAKE receiver in direct sequence. In Qualcomm IS-95 CDMA we used 3 rake channels and that seemed to grab just about all the symbol energy there was to grab. Of course, this was land mobile in the 900 MHz band, not HF.

5. Diego says:

What about trying it out in VHF band with an FM channel instead of HF SSB channels which might need special licensing to do FH(SS)? I know propagation is slightly different there…

6. John says:

Hi David and all,

I gotta wonder whether the 2khz radio channel isn’t another relic? Given a fast ADC and software so it is ‘called a radio receiver’, I wonder whether frequency hopping on a much wider channel like CDMA as phil describes it makes MUCH more sense at HF?

The ‘transmitter’ emits a single tone that also hops. There are no multi-tone transmitter issues to worry about. The ‘radio’ could ‘test’ other frequency bands as the communications proceeded. All this in real time!

It would be fun to watch this ‘radio’ move up to 50MHz or even 144MHz when ducting was detected :).

I wonder who will be first to try this on the air?

Most of the software and other technology required seem to me to be here already!

John

1. Steve says:

The single tone would have to be phase modulated though, which I was thinking two tones using FSK would combine simplicity with diversity. The two tones far enough away to combat a fade.

7. John says:

Hi Steve,

I am wondering if the hopping makes ‘real’ phase modulation also not really needed. From what I understand about CDMA, The wide RF band goes to a ‘dedicated’ processing channel. Once in the digital domain lots of ‘computer tricks’ can be used to extract the signal. Some dedicated to telling a signal is really there, some to sync issues, and some to carrying an actual user signal.

I would be interested in what Phil might suggest as a ‘ham oriented’ CDMA signal to occupy say one whole amateur band leaving ‘holes’ for the ‘regular’ signals since these frequencies would probably not carry that much user information?

I have the linrad stuff running with a remote receiver-display. So all that is really needed is some sort of ‘transmitter’ to begin playing.

I think it would be fun to be able to ‘ping’ David with some sort of ‘low bandwidth’ signal to see whether a ‘voice’ channel is possible at that time.

I gather this sort of thing is what the CDMA telephones do.

Lots of fun :).

John