Site menu Baseband digital modulation: m-to-n codes

Baseband digital modulation: m-to-n codes

This article builds upon the introductory article about baseband modulation where Manchester code was explained, and hopefully understood and accepted by the reader as a viable code.

Modulating a message in a way that is recoverable at RX side and still frugal in bandwidth is difficult, and implementing advanced strategies on simple hardware is even more difficult.

Most recent advances in modulation technology prefer to employ simple transmitters and receivers, with the simplest circuits possible, using simple encodings as NRZ; and delegate message conditioning to higher levels, that can be implemented even in software.

The simplest of these "advanced" techniques is the m-to-n codes. For every "m" bits of the message, they send "n" chirps.

The chirp sequence is chosen accordingly to the value of m-bit token, and the library of chirp sequences is chosen in order to maximize the benefits: low bandwidth, good spectrum, good clock recovery and tolerance against noise and distortions.

Manchester encoding is actually a simple 1-to-2 code, since it replaces bits 0 and 1 for chirps 01 and 10, respectively. Let's see an example of a "real" m-to-n code, like 3b/4b:

Original message
Message encoded with 3b4b codebook

The codebook, if correctly devised, "whitens" (randomizes) bit stream somewhat by itself, regardless of message contents. It also secures clock recovery at RX side because the there are no long stretches of the same chirp value (maximum is 3 in the example above).

Clock recovery is achieved by comparing the chirp stream with the codebook, and looking for valid symbols. Not all chirp sequences are permissible.

Chirps are distinguishable even against each other. for example, the sequence 01100110 is most probably a couple of 0110 chrips, because the 1100 in the middle is not in the codebook. 1001 is in the book, but then we need to check the previous and next chirps to confirm this hypotesis.

Another example: given the sequence token ...11110100... and not knowing the chirps before or after this token, find the phase:

Moreover, m-to-n codes add a degree of error correction capability to the communication. For example, a received chirp pattern 1111 is invalid, but if the RX trusts its current clock calibration, it may decide to cast it to 1101, because 1101 is the valid code most similar to 1111.