Coding

AMI Code

Alternate Mark Inversion: a bipolar code that eliminates DC component.

Introduction to AMI

Alternate Mark Inversion (AMI) is a type of that uses three voltage levels: positive (+V), zero (0), and negative (-V). Its name refers to the coding rule: "Mark" is an older telecommunications term for a logical '1', and successive marks receive alternating polarity. AMI was developed in part to limit the DC component found in simpler codes such as NRZ. AMI is also called bipolar line coding. It was used in early PCM systems, including the North American T1 system.

The Rules of AMI Coding

The encoding process for AMI follows two rules:

  • Logical '0' (Space):A binary '0' is always represented by a zero voltage level (0V) for the entire bit duration.
  • Logical '1' (Mark): A binary '1' is represented by a non-zero voltage pulse (either +V or -V). The pulse polarity alternates for successive '1' bits: if the last '1' was encoded as +V, the next '1' must be encoded as -V, and vice versa. Pulse width is described relative to the bit period TT, while its value and shape depend on the interface. In ITU-T G.703, they are specified by a pulse mask, so the AMI rule does not by itself imply return-to-zero coding.

For example, for the binary sequence 10110011011001:
The encoded AMI signal would be: +V,0V,−V,+V,0V,0V,−V+V, 0V, -V, +V, 0V, 0V, -V.

Advantages and Disadvantages of AMI

Advantages

  • Limited DC Component: Alternating mark polarity makes positive and negative pulses cancel in pairs in an ideal, balanced waveform. The average DC component then tends toward zero, which supports transmission over AC-coupled lines. .
  • Simple Error Detection:In unmodified AMI, a violation of the alternating-polarity rule can indicate a transmission error. If the receiver sees two consecutive pulses with the same polarity, such as +V followed by +V, it detects a "bipolar violation". In HDB3 and B8ZS, similar violations are intentional parts of the substitution pattern.
  • Spectral Properties: An ideal AMI spectrum has zero DC component. The location of its main maximum depends on the pulse shape and data statistics. For typical pulses, it is approximately near half the bit rate (Rb/2R_b / 2), while the required bandwidth depends on the pulse shape.

The Main Limitation

  • Loss of Synchronization with Long Zero Strings:Logical '0's are encoded as zero voltage, so a long sequence of '0's produces a flat signal on the line. Without transitions, the receiver's clock-recovery circuit may lose synchronization, increasing the risk of misinterpreting subsequent bits.

The Solution: High-Density Bipolar Codes

To limit the problem of long zero strings, modified bipolar codes were developed. Zero-substitution codes preserve AMI properties related to the DC component and increase the pulse density needed for synchronization.

  • HDB3 (High-Density Bipolar 3-zero): Used primarily in the European E1 PCM standard. The code permits at most three consecutive zeros. When a fourth zero appears (00000000), it is replaced by 000V000V or B00VB00V. VV denotes a bipolar violation, a pulse with the same polarity as the previous mark, while BB denotes a normal alternating pulse. The choice depends on the number of B pulses between consecutive V violations. This makes successive V pulses alternate in polarity and avoids introducing a DC component.
  • B8ZS (Bipolar with 8-Zero Substitution): Used in the North American T1 PCM standard. This code tackles the problem by substituting a sequence of eight consecutive zeros (0000000000000000) with the special violation pattern 000VB0VB000VB0VB.

Related articles