Demystifying Forward Error Correction: Enhancing Data Reliability in Digital Radio Communication

Introduction to Article-Series

Throughout the next several articles, I'm going to do a deep dive article series to better understand the FT8 protocol.  Just a warning -- there's going to be some math.

Getting Started with FT8 in Amateur Radio: A Beginners Guide

Exploring FT4 and FT8: Revolutionizing Amateur Radio Communication

How WSJT-X Synchronizes FT8 Transmissions

Demystifying Forward Error Correction: Enhancing Data Reliability in Digital Radio Communication

Understanding Maidenhead Grid Squares in Amateur Radio

 

Why We Need Forward Error Correction (FEC) in Amateur Radio

Amateur radio operators often deal with less-than-ideal transmission conditions, ranging from atmospheric disturbances that cause interference and fading, to station-specific issues, such as frequency drift, loose connections, and interference from nearby devices.  And the problems only increase with distance, crowded bands, and unpredictable atmospheric conditions.  So how do you efficiently deal with the problem of missing/flipped bits while maintaining a suitably fast data transmission rate using minimal bandwidth?  One solution is Forward Error Correction.  

Understanding How FEC Works

Uncorrected 2-State Communication

For most digital transmission protocols, data travels as a binary series of states.  The "0's" and the "1's" become 0 V and 3.3V/5V in UART, I²C, SPI, etc. in PCB traces.  In Radio, the "0's" and "1's" might be a pair of closely spaced frequencies in Frequency Shift Keying (FSK), the presence or absence of a frequency in On-Off Keying (OOK), etc., or the transition direction in Manchester-encoded transmissions. 

In each of these cases, the only way to deal with a missing bit of information is to transmit more bits of information to make up for it.  Those extra bits might look like an extra parity bit, a Cyclic Redundancy Check (CRC) codeword, or some hashed value.  In each case though, there is usually just enough information to detect that a transmission error has occurred, but there often isn't enough information to determine where the error is, let alone correct it.

4-State Communication

You can only transmit so much data using two states (Shannon-Hartley Theorem.)  To increase data throughput, engineers found ways to increase the number of states.  For example, in Pulse Amplitude Modulation (PAM4), there are four amplitude states, each corresponding to a specific bit pattern pair (00,01,10,11).  Quad Frequency Shift Keying (QFSK) is similar, except each bit pair is represented by one of four frequencies.

Adding Forward Error Correction

Four states, represented by bit pairs (00, 01, 10, 11) might seem that you can only transmit 4 bits of information.  But that just means you've not yet started to use your imagination. Additional information can be stuffed into the transitions between states! 

Not only do the original bit pairs exist (00, 01, 10, 11), but each transition (00→01, 00→10, 00→11, 01→00, 01→10, 01→11, 10→00, 10→01, 10→11, 11→00, 11→01, 11→10) can contain information as well.  So how do engineers make use of that?  

Often, engineers only allow a single bit flip at a time (Gray Code).  So the bit pair "00" can only transition to "01" or "10", "01" can only transition to "00" or "11", etc.  If we represented these bit pairs as radio frequencies, f1, f2, f3, and f4, then f1→f2, or f1→f3 is an allowed transition, but f1→f4 is not.  And to make things a little more complicated, f1→f1 might not be allowed either.

On the receiver end, the detector circuit will always expect a single-bit transition from each timing interval.  If it sees two bits flip, then it knows something has gone awry.  And when the next bits come in (hopefully they arrive without error), due to the rules we've created, the receiver can often correct the error.

The premise of forward error correction is to provide additional information during sending that allows the receiver to detect and ultimately correct the issue.  

Forward Error Correction in FT8

Things get interesting, and I hope a bit easier to understand when you move to octets (3 bits) that correspond to 23=8 bits of information.  The rules are the same as for the quad-state example mentioned above.  Except now there are 8 frequencies, with each frequency corresponding to a particular bit state: f1→(0,0,0), f2→(0,0,1), f3→(0,1,0), f4→(0,1,1), f5→(1,0,0), f6→(1,0,1), f7→(1,1,0), f8→(1,1,1).  That can be a bit difficult to keep track of mentally, so I've chosen to represent the states as colors as shown in the image below.  

In this image, the (0,0,0) state is represented as white, the (1,1,1) state is represented as Black, the states (1,0,0), (0,1,0), (0,0,1) are represented as the primary colors Red, Green, and Blue, respectively, and the states (1,0,1), (0,1,1), and (1,1,0) are represented as the secondary colors Magenta, Cyan, and Yellow, respectively.  

Remember, we're only going to allow one bit to flip at a time.  That limits each successive state to just three choices.  For example, Black, (0,0,0), can only transition to (1,0,0), Red, (0,1,0), Green, or (0,0,1), Blue.  Blue, (0,0,1) can only transition to Black (0,0,0), Cyan (0,1,1), or Magneta (1,0,1), etc. 

Engineers can make additional rules, such as "always change something" and "no backsies" which means that you should never expect to see the same state appear again until a minimum of three transitions have passed.  For example, Cyan→Blue→Cyan would be an error, as would Cyan→Cyan→Blue but Cyan→Blue→Black→Green→Cyan is okay.

All of that clever bit of pre-planning means that not only can you detect bit-flips, but you can correct them!  Decoding data on the receiving end uses some clever math as well, but it is beyond the scope of this article.  

Conclusion

In conclusion, Forward Error Correction (FEC) in FT8, a mode popular among amateur radio operators, exemplifies the balance between efficiency and reliability in digital communication. By using a sophisticated system of octet-states, each representing different frequency states with a one-bit flip rule, FEC in FT8 ingeniously handles errors under various transmission challenges. This method not only enhances data integrity but also optimizes bandwidth usage, crucial in crowded radio spectra. FEC's role in FT8 highlights the ingenuity required to maintain robust communication in amateur radio, demonstrating a significant advancement in overcoming the limitations of traditional binary systems.