CMI Code

Coded Mark Inversion, a line code providing excellent clock recovery features.

Introduction to Coded Mark Inversion (CMI)

Coded Mark Inversion (CMI) is a type of used in digital transmission systems, particularly in high-speed optical communications. Its name perfectly describes its operation:

  • Coded: It transforms the input binary stream into a new, specific waveform.
  • Mark: In telecommunication terminology, a "mark" traditionally represents a logical '1'.
  • Inversion: The code's key feature is that the polarity representing a '1' is inverted for each consecutive '1' that is transmitted.

CMI is designed to combine the advantages of other codes, such as excellent synchronization properties and the absence of a DC component, making it robust for high-performance links.

The CMI Encoding Rules

The CMI algorithm is a two-part rule that depends on whether the input bit is a '0' or a '1'. It uses a bipolar signal with three levels: positive (+V), negative (-V), and zero.

Rule for Logical '0'

A logical '0' is always encoded as a signal transition from a negative level (-V) to a positive level (+V) occurring in the middle of the bit period (TT). The signal stays at -V for the first half of the bit duration and at +V for the second half. This guaranteed transition is crucial for clock recovery.

Rule for Logical '1' (Mark)

A logical '1' is encoded as a constant voltage level maintained for the entire bit period (TT). The key is that the polarity of this level alternates for each subsequent '1' transmitted. For instance:

  • The first '1' is sent as +V.
  • The second '1' is sent as -V.
  • The third '1' is sent as +V, and so on.

Interactive CMI Encoding

Enter binary sequence (0s and 1s only)

Current Bit: 1
+5V-5V0V10110100
CMI: 0 → -V then +V (mid-bit transition), 1 → constant level with alternating polarity

DC Component

CMI:0.00V

Spectral Information

Clock Frequency:1.00 Hz
Main Lobe Bandwidth:0 - 2.00 Hz

Analysis of CMI Properties

CMI code exhibits several desirable properties that make it well-suited for high-reliability transmission links.

  • Guaranteed Clock Synchronization: CMI ensures frequent signal transitions regardless of the input data sequence. A transition is guaranteed in the middle of every '0', and the level change between consecutive '1's also provides timing information. This makes it very easy for the receiver to perform .
  • No DC Component: The code is perfectly DC-balanced. The encoding of a '0' is inherently balanced (half the time at -V, half at +V). The alternating polarity of the '1's ensures that, over time, the average voltage level is zero, regardless of the data pattern. This is a critical advantage for systems coupled via transformers or capacitors.
  • Bandwidth Usage: The primary trade-off of CMI is its bandwidth requirement. Due to the fast transition within each '0' bit, the main lobe of its power spectrum extends to twice the clock frequency (2fclk2f_{clk} or 2/T2/T). This is twice the bandwidth required by simpler codes like NRZ, making it less spectrally efficient.
  • Simple Error Detection: CMI provides inherent error detection capability. If the receiver detects a violation of the coding rules (e.g., two consecutive '1's with the same polarity, or a '0' without a mid-bit transition), it knows a transmission error has occurred.
    CMI Code | Teleinf Edu