[amsat-bb] Re: ARISSat TLM decoding using FCD

Phil Karn karn at philkarn.net
Tue Aug 9 01:01:21 PDT 2011

On 8/8/11 5:23 AM, g0mrf at aol.com wrote:

> I've been tracking doppler by hand. Seems to work OK but it's very
> important to keep the CW in the 'blue' window. I would think jumps
> would not be good. Perhaps frequent doppler updates.  - So very small
> jumps.

Jumps per se are not a problem. I.e., if you're off frequency, the
sooner you correct it the better; there's no need to tune back
gradually. The error correcting code I'm using is pretty strong but it
does have its limits, and being significantly off frequency can take out
a lot of the information it needs to function.

ARISSat-1 is transmitting FEC coded DBPSK - differential binary phase
shift keying. A '0' is sent as a 180 degree phase reversal of the
carrier and a '1' is sent as no reversal. Because the data being coded
and sent is actually coming from a HDLC encoder that stuffs 0's when
necessary, there should be plenty of 0's in the transmitted data stream.
That's important for clock recovery at the receiver.

Differential encoding permits a very simple and robust method of
demodulation. There's no need for a phase lock loop to track the carrier
as in the Phase III 400 bps modems; that would be essentially hopeless
on a signal that fades as quickly as this one does.

I first convert the signal to complex baseband, i.e., I & Q signals with
the carrier nominally at zero Hz. If you were to plot these I&Q values
on an X/Y scope, and if your tuning were perfect, you'd see a vector
(the signal carrier) at some random phase angle flipping randomly back
and forth 180 degrees, e.g., between 37 deg and 217 deg.

Because the data is encoded in the *change* of that phase, there's no
need to know the absolute phase. To decode the DBPSK data you simply
take the dot product of consecutive pairs of I & Q samples. You multiply
the two I values, multiply the two Q values, and add them. If there's
been no phase change, i.e., a 1 was sent, then the dot product will be
positive no matter what the absolute phase angle. If the phase did flip,
then the dot product will be negative, again no matter what the phase angle.

I actually use the magnitudes of the dot products for something called
"soft decision decoding" in the error correction algorithm (a Viterbi
decoder) but that's a refinement. The basic idea is to simply look for a
change or no change in carrier phase from one bit to the next without
caring about the absolute phase.

Now what happens if you're mistuned? Well, the carrier vector no longer
remains stationary on the X/Y scope; it begins to rotate at the rate of
your tuning error. If you're tuned 10 Hz high, i.e., the carrier is
coming out 10 Hz low, then the carrier vector will rotate clockwise 10
times per second. If you're tuned 10 Hz low, then the vector rotates
counterclockwise 10 times per second. (Mathematically, counterclockwise
rotation is positive and clockwise is negative.)

This can obviously wreak havoc with demodulation if you're too far off
frequency. But because the comparisons are done between adjacent bits
you only have to worry about how much it rotates in one bit time, which
at 1000 Hz is 1 millisecond. If you're 10 Hz off, then the vector will
rotate 10/1000 = 1/100 of a revolution or 3.6 degrees; not much. Taking
the dot product of two vectors 3.6 degrees apart gives almost the same
answer as two vectors 0 deg apart. Same for vectors 183.6 deg apart
instead of 180 deg.

So being off by 10 Hz isn't much of a problem. If your radio tunes in 10
Hz steps, and you can accurately compute Doppler, then don't hesitate to
do lots of 10 Hz tuning steps to stay on frequency. (This assumes that
your radio tunes smoothly, which all modern radios seem to do.)

But as you get farther off frequency things begin to degrade, slowly at
first, then quickly. If you're 100 Hz off, that's 1/10 of a revolution
or 36 degrees. The cosine of 36 degrees is about .81, so you lose about
1.84 dB of performance (.81 is an amplitude ratio so you have to use the
dB voltage formula, 20 log10(0.81)). At 200 Hz, you're off 72 deg and
you've lost a full 10.2 dB!

Fortunately, my decoder does a search around the nominal frequency so
you can actually be offtuned this much and the demodulator will still
work. But I only search a +/- 200 Hz window in 100 Hz steps because
beyond that the signal will start to get chopped off by the edges of the
SSB filter in your radio. (And Doug was complaining that my demodulator
wouldn't run in real time on his old, slow Pentium III!)

Frequency tracking is clearly the biggest weakness in my whole scheme,
and it argues very strongly for wideband SDR-like radios instead of SSB
receivers with narrow filters. A receiver wide enough to capture not
only the signal but the entire Doppler range of +/- 3.3 kHz for 2m could
eliminate all tuning during the pass because the computer could do it
all in software.


More information about the AMSAT-BB mailing list