Four-element Hall-effect rotary encoder
Simscape / Electrical / Sensors & Transducers

The Hall-Effect Rotary Encoder block models a 360° rotary position sensor using four Hall elements equally spaced under a magnetized, rotating magnet. The elements generate four sinusoidal waveforms.

The voltages between the elements of the rotary encoder are described by the equations:
where:
vx is the voltage between elements xp and xn;
vy is the voltage between elements yp and yn;
Ax and Ay are the voltage amplitudes for the x and y axes that reflect the sensitivity mismatch;
Vx0 and Vy0 are the voltage offsets for the x and y axes;
β is the quadrature error.
The block uses this equation to decode the angle:
Use the Variables settings to specify the priority and initial target values for the block variables before simulation. For more information, see Set Priority and Initial Target for Block Variables.