Engee documentation

Hall-Effect Rotary Encoder

Four-element rotation angle sensor based on the Hall effect.

blockType: AcausalElectricPowerSystems.Sensors.HallEffectRotaryEncoder

Path in the library:

/Physical Modeling/Electrical/Sensors & Transducers/Hall-Effect Rotary Encoder

Description

Block Hall-Effect Rotary Encoder Simulates a 360-degree rotation angle sensor using four Hall sensors evenly positioned under a rotating magnet. The sensors generate four sine waves.

hall effect rotary encoder 1

The equations

The voltages between the elements of the rotation angle sensor are described by the equations:

where

  • — tension between the elements and ;

  • — tension between the elements and ;

  • and — voltage amplitudes for the axes and reflecting sensitivity mismatch;

  • and — voltage offsets for the axes and ;

  • — quadrature error.

The angle of rotation is calculated using the formula:

Variables

Use the parameter group Initial Targets to set the priority and initial target values for the block parameter variables before modeling. For more information, see Configuring physical blocks using target values.

Ports

Conserving

# R — sensor shaft
rotational mechanics

Details

A mechanical rotary port corresponding to the positive connection of the sensor.

Program usage name

rod_flange

# C — sensor housing
rotational mechanics

Details

A mechanical rotary port corresponding to a negative (support) connection.

Program usage name

case_flange

# yp — the positive terminal associated with the Hall voltage occurring along the axis
electricity

Details

A positive electrical port connected to the output of the Hall sensor in the positive direction of the axis .

Dependencies

To use this port, set the parameter Output interface meaning Electrical connections.

Program usage name

p_y

# yn — the negative terminal is connected to the Hall voltage that occurs along the axis
electricity

Details

A negative electrical port connected to the output of the Hall sensor in the negative direction of the axis .

Dependencies

To use this port, set the parameter Output interface meaning Electrical connections.

Program usage name

n_y

# xp — the positive terminal associated with the Hall voltage occurring along the axis
electricity

Details

A positive electrical port connected to the output of the Hall sensor in the positive direction of the axis .

Dependencies

To use this port, set the parameter Output interface meaning Electrical connections.

Program usage name

p_x

# xn — the negative terminal associated with the Hall voltage occurring along the x-axis
electricity

Details

A negative electrical port connected to the output of the Hall sensor in the negative direction of the axis .

Dependencies

To use this port, set the parameter Output interface meaning Electrical connections.

Program usage name

n_x

Output

# Angle — angle of rotation, rad
scalar

Details

The decoded angle of rotation of the magnetic field in the plane - , is returned as a scalar in the range of 0 before .

Dependencies

To use this port, set the parameter Output interface meaning Decoded angular position.

Data types

Float64

Complex numbers support

No

Parameters

Parameters

# X-axis voltage amplitude — tension along the axis
V | uV | mV | kV | MV

Details

Voltage amplitude along the axis .

Units

V | uV | mV | kV | MV

Default value

2.5 V

Program usage name

V_x

Evaluatable

Yes

# Y-axis voltage amplitude — tension along the axis
V | uV | mV | kV | MV

Details

Voltage amplitude along the axis .

Units

V | uV | mV | kV | MV

Default value

2.5 V

Program usage name

V_y

Evaluatable

Yes

# X-axis voltage offset — voltage shift along the axis
V | uV | mV | kV | MV

Details

Potential difference when an electric current flows through a conductor in the absence of an external magnetic field along the axis .

Units

V | uV | mV | kV | MV

Default value

0.0 V

Program usage name

V0_x

Evaluatable

Yes

# Y-axis voltage offset — voltage shift along the axis
V | uV | mV | kV | MV

Details

Potential difference when an electric current flows through a conductor in the absence of an external magnetic field along the axis .

Units

V | uV | mV | kV | MV

Default value

0.0 V

Program usage name

V0_y

Evaluatable

Yes

# Quadrature error — quadrature error
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

The magnitude of the quadrature error. Quadrature switching can reduce bias errors.

Units

rad | deg | rev | mrad | arcsec | arcmin | gon

Default value

0.0 deg

Program usage name

quadrature_error_amount

Evaluatable

Yes

# Output interface — interface for decoded information
Electrical connections | Decoded angular position

Details

Interface for decoded information, available values:

  • Electrical connections;

  • Decoded angular position.

Values

Electrical connections | Decoded angular position

Default value

Electrical connections

Program usage name

sensor_output_type

Evaluatable

No