This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Incremental Shaft Encoder

Model device that converts information about angular shaft position into electrical pulses




The Incremental Shaft Encoder block represents a device that converts information about the angular position of a shaft into electrical pulses. The block produces N pulses on ports A and B per shaft revolution, where N is the value you specify for the Pulses per revolution parameter. Pulses A and B are 90 degrees out of phase. If the shaft rotates in a positive direction, then A leads B. The block produces a single index pulse on port Z once per revolution. The Z pulse positive transition always coincides with an A pulse positive transition, and Z pulse length is equal to that for the A and B pulses. The voltages at output ports A, B, and Z are defined relative to the REF reference port voltage.

Use this block if you need to model the shaft encoder signals, either to support development of a decoding algorithm, or to include the quantization effects. Otherwise, use the Simscape™ Ideal Rotational Motion Sensor block.

Basic Assumptions and Limitations

The Incremental Shaft Encoder block has the following limitations:

  • The Incremental Shaft Encoder block is not linearizable. Use the Simscape Ideal Rotational Motion Sensor block for control design studies where you need to linearize your model.


Pulses per revolution

The number of pulses produced on each of the A and B phases per revolution of the shaft. The default value is 2.

Output voltage amplitude

The amplitude of the shaft encoder output voltage when the output is high. The default value is 5 V.

Index pulse offset relative to shaft initial angle

The offset of the index pulse Z relative to the angle of the shaft at the start of the simulation. This parameter lets you set the initial location of the index pulse. The default value is 0°.


The block has the following ports:


Mechanical rotational conserving port associated with the sensor positive probe


Mechanical rotational conserving port associated with the sensor negative (reference) probe


Encoded electrical output


Encoded electrical output


Index, or synchronization, electrical output


Floating zero volt reference

Was this topic helpful?