Home▸Articles▸Robotics & Kinematics

Quadrature Rotary Encoders: Decoding Motion with Phase Shifts

A fundamental component in robotics, quadrature encoders provide precise position and velocity feedback using phase-shifted signals.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What Quadrature Rotary Encoders Are

Quadrature rotary encoders are sensors used to measure angular position and rotational speed of a shaft or轴的旋转角度和速度。它们通过两个相位差为90度的光电读头读取带有槽孔的圆盘来实现这一功能。

这些编码器通常由一个圆盘(或称光栅盘)和两个固定位置的光电传感器组成,当圆盘旋转时,传感器会检测到不同的信号变化。通过分析这两个信号之间的相位差,可以精确地计算出圆盘的位置和速度。

How Quadrature Encoders Work

Quadrature encoders operate on the principle of phase-shifted square-wave signals. As a slotted disc rotates past two fixed optical sensors, the sensors detect changes in light intensity due to the presence or absence of slots. These changes are translated into square-wave pulses that are 90 degrees out of phase with each other.

通过分析这两个信号的相位差,可以确定圆盘的位置和速度。具体来说,当A相脉冲上升沿时,B相在下一个周期内会有一个下降沿,反之亦然。这种相位关系使得编码器能够准确地解码旋转角度和速度变化。

live demo · related simulation● LIVE

Why Quadrature Encoders Matter

Quadrature encoders are essential in robotics and automation systems for precise motion control. They provide real-time feedback on the position and velocity of a shaft, which is crucial for tasks requiring high accuracy, such as robotic arms, CNC machines, and precision machinery.

此外,它们还用于实现闭环控制系统中的速度和位置控制。通过将编码器输出与目标值进行比较,并调整电机驱动器的输入,可以实现精确的位置和速度控制。

Real-World Applications

Quadrature encoders are widely used in various applications, including industrial automation, medical devices, and consumer electronics. For example, they are integral to the operation of robotic arms in manufacturing plants, ensuring that each movement is precise and controlled.

在消费电子领域,它们用于实现精确的电机控制,如打印机、扫描仪和硬盘驱动器中的步进电机。通过使用这些编码器,设备可以准确地跟踪其运动,并提供一致且可靠的操作。

Frequently asked questions

What is the difference between A and B signals in quadrature encoders?

The A and B signals are 90 degrees out of phase with each other. This phase shift allows the encoder to determine both direction (clockwise or counterclockwise) and position changes as the shaft rotates.

How do quadrature encoders handle missed edges?

Missed edges can cause errors in position decoding, especially at low speeds. Modern encoders often include error correction algorithms to mitigate these issues, but they may also provide a reset function to synchronize the encoder state when necessary.

Can quadrature encoders be used for linear motion measurement?

Yes, quadrature encoders can be adapted for linear motion by using a linear scale instead of a rotary disc. This is commonly done in applications like machine tools and precision stages where linear position feedback is required.

What are the advantages of using quadrature encoders over other types of sensors?

Quadrature encoders offer high accuracy, reliability, and robustness. They provide both position and velocity information simultaneously, making them ideal for complex motion control systems where precise feedback is critical.

Try it live

Everything above runs in your browser — open Quadrature Rotary Encoder (2D Disc & Scope) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Quadrature Rotary Encoder (2D Disc & Scope) simulation

What did you find?

Add reproduction steps (optional)