REQUEST FOR QUOTE → Request a quote
SpecForge Editorial Team

How Quadrature A and B Signals Encode Rotation Direction

Table of Contents
  1. Why Two Channels Are Needed at All
  2. The Four-Step State Sequence
  3. Which Channel Leads Determines Direction
  4. x1, x2, and x4 Decoding Compared
  5. The Index Channel and Why It Is Separate
  6. Where This Shows Up in Real Machinery
  7. Limits and Common Failure Modes
How Quadrature A and B Signals Encode Rotation Direction

An incremental quadrature encoder outputs two square-wave channels, A and B, deliberately shifted by 90 electrical degrees, so the controller can derive direction, position, and speed from one pair of wires [S2][S3].

The 90° phase offset is not a decorative feature. It is what lets a decoder sample one channel at the exact instant the other is steady, removing ambiguity and turning a simple pulse train into bidirectional position feedback [S3][S4].

Why Two Channels Are Needed at All

A single pulse stream from a one-channel sensor tells you only that the shaft moved; the rising edges look identical whether the disc turns clockwise or counter-clockwise, so direction is mathematically unrecoverable from that signal alone [S3][S4]. Quadrature solves this by adding a second track offset by a quarter of a marking width, so the two outputs are 90°, or one quarter cycle, out of phase. The name quadrature comes directly from that quarter-cycle relationship [S2][S3]. On an optical disc the offset is mechanical: two photo sensors sit slightly displaced around the slotted perimeter, and as the slots pass they produce the A and B streams in sequence [S5].

The Four-Step State Sequence

Every full cycle of channel A passes through four stable (A, B) combinations, which is the minimum count needed to hold one bit of direction information alongside the pulse count [S3]. The canonical sequence is: step 1 both low, step 2 A high B low, step 3 both high, step 4 A low B high, then repeat [S3]. Rotating one way, the controller sees states advance 1, 2, 3, 4 in order; rotating the other way, the same states appear in reverse, 4, 3, 2, 1 [S3]. A reading where both channels appear to change at the same instant is invalid quadrature, usually caused by electrical noise or a pulse rate faster than the decoder can follow, and it should be treated as a missed transition rather than a real position step [S3].

Which Channel Leads Determines Direction

how do quadrature A and B signals show rotation direction? - Which Channel Leads Determines Direction
how do quadrature A and B signals show rotation direction? - Which Channel Leads Determines Direction

Direction is read entirely from phase order: if channel A rises before channel B, the shaft is turning one way; if B rises before A, it is turning the other way [S2][S3][S4]. A hardware or firmware decoder implements this by watching for an edge on either channel and immediately checking the steady state of the other channel at that moment [S3]. Under the common counting convention, if A rises while B is low, the position counter increments; if A rises while B is high, the counter decrements [S3]. The same logic works in reverse on the B channel edges, so direction is resolved on every transition, not just on A's rising edge. This is what allows a quadrature decoder to follow a shaft that jitters back and forth near a stop, where a single-channel pulse counter would just keep accumulating one direction [S4].

x1, x2, and x4 Decoding Compared

Each line on the encoder disc produces one full cycle on each channel, and each cycle contains four edges, two rising and two falling per channel, so a decoder can register one, two, or four counts per line depending on which edges it watches [S3][S4]. The common configurations: x1 counts one edge of A only; x2 counts both edges of A; x4 counts every rising and falling edge of both A and B, producing four counts per mechanical line [S3][S4]. For a 1000-line encoder that is 1000 counts/rev at x1, 2000 counts/rev at x2, and 4000 counts/rev at x4, with no change to the hardware [S4]. Most modern motor drives default to x4 because the extra resolution is essentially free once the quadrature signals are already present [S4].

The tradeoff is decoder bandwidth: at x4, the controller must resolve four edges per line, so the maximum usable shaft speed for a given PPR drops by a factor of four compared to x1 before edges start to be missed [S3]. Encoder resolution terminology itself is inconsistent across vendors, with PPR, CPR, lines, and counts used loosely, and that inconsistency is the most common source of math errors in motor-control sizing [S3].

The Index Channel and Why It Is Separate

how do quadrature A and B signals show rotation direction? - The Index Channel and Why It Is Separate
how do quadrature A and B signals show rotation direction? - The Index Channel and Why It Is Separate

The A and B channels are relative counters: they tick up and down indefinitely but carry no absolute angle information, so after a power cycle the controller has no idea where the shaft is until it sees a reference [S4][S5]. The Index channel, also called Z, adds one pulse per revolution at a fixed mechanical position on the disc, acting as a once-per-turn home mark [S4][S5]. When the controller sees Index it can latch the current A/B count as the absolute angle for that revolution, which is what closed-loop drives use to recover position after an encoder fault or a power-on reset [S4][S5]. The slot that generates Index is a single opening on an otherwise opaque track, so it produces one clean pulse per mechanical turn regardless of disc resolution [S5].

Where This Shows Up in Real Machinery

Quadrature feedback is the default closed-loop position sensor on servo motors, CNC spindles, conveyor speed measurement, robotics joints, and elevator door positioning, because it gives bidirectional position from a cheap, rugged two-channel device [S1][S2][S5]. On conveyor lines the same pair of channels is used for measuring linear distance with a measuring wheel, where reversing the wheel direction would otherwise corrupt the length total [S1]. For a deeper look at how physical mounting, like belt tensioners, affects the feedback chain, see Locknut torque for eccentric fixed belt tensioners. When a feedback device sits in a hazardous-area enclosure or on a motor exposed to corrosive plant air, the sensing technology is still the same A/B pair, only the housing and sealing change, as catalogued in ISO 12944 corrosivity categories C1 to CX and coating durability ranges. Stepper sizing mistakes, where a designer pairs a NEMA frame to a torque target that the magnets cannot deliver, are a separate problem, summarised in NEMA 17/23/34/42 vs 42/57/86/110: Frame Size Does Not Buy Torque.

Limits and Common Failure Modes

how do quadrature A and B signals show rotation direction? - Limits and Common Failure Modes
how do quadrature A and B signals show rotation direction? - Limits and Common Failure Modes

Three failure modes show up repeatedly in quadrature systems. First, missed edges: the decoder is asked to count faster than its input filter or timer resolution can follow, so some transitions are dropped and the count drifts relative to true shaft angle [S3]. Second, simultaneous transitions: both channels appear to change at the same instant, which is illegal in valid quadrature and almost always means noise coupling into long encoder cables or a marginal supply rail [S3]. Third, index loss: a contaminated disc, scratched reticle, or weak magnet on a magnetic encoder suppresses the once-per-turn Z pulse, and the drive can no longer re-home on power-up [S4][S5]. For process plants where the encoder is part of a larger instrumentation chain, the same diagnostic pattern shows up on pressure transmitters and flow meters, where a single missed edge of feedback has the same root cause, a signal chain that is too slow for the mechanical event rate.

Track these signals to watch the field: (1) the rising share of motor drives defaulting to x4 decoding in firmware release notes, since x4 has been the dominant default since roughly 2020 and any new opt-out would be notable; (2) the consolidation of PPR, CPR, and counts-per-revolution terminology in vendor datasheets, which still varies line by line [S3]; (3) the migration from optical to magnetic encoders in food-grade and washdown applications, where the A/B output stays identical and the change is only in the sensing element [S2][S3].

For component-level specifications, see construction machinery and equipment.

Frequently asked questions

How does a quadrature decoder determine shaft rotation direction from channels A and B?

The decoder watches for an edge on either channel and immediately checks the steady state of the other channel at that instant. Under the standard convention, if A rises while B is low, the position counter increments; if A rises while B is high, it decrements, which is how a 1000-line encoder can register both CW and CCW motion on a single pair of wires.

9 sources
  1. Quadrature Encoders - The Ultimate Guide
  2. Determining Direction with Quadrature Signals
  3. Quadrature Encoders: How They Work | A/B Signals ... (Aug 2, 2026)
  4. Quadrature Encoders (A, B, Index) Explained (Aug 17, 2026)
  5. Interfacing with Quadrature Encoders
  6. Quadrature encoders tutorial. How does it Work? (Oct 29, 2020)
  7. Consider the two quadrature pulse signals (say, A and B) ... (Apr 28, 2016)
  8. Optical quadrature encoders & how they work (Feb 22, 2014)
  9. How to handle quadrature encoder pulses when the rotation ... (Nov 9, 2017)

Need to source matching manufacturers or get a quote?

SpecForge connects industrial buyers with verified manufacturers. Submit your requirement and we will route it to matched suppliers.

Submit RFQ now →
Ask SpecForge AI