Electrical angle sensor

Electrical rotor angle for p pole pairs, as a Hall or encoder sensor reports it (0…2π).

  • signal
  • rotational
  • Modelica Standard Library
  • 2 ports
  • 1 parameter
BlockElectrical angle sensorKindhallSensorLibraryMachines

Description

Outputs the electrical rotor angle of a machine with p pole pairs, wrapped to 0…2π, as a Hall or encoder commutation sensor reports it. It exerts no torque on the shaft.

Example

Resolver and Hall sensor A shaft turning at 10 rad/s read by a resolver, a Hall sensor, and an angle sensor.

Shaft 10 rad/sResolverHall sensorShaft angle
In Gradara, select a Electrical angle sensor block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:Angle sensorConstant speedResolver

Ports

Outputs 1

  • θey

    Electrical angle θe, in radians, in the range 0 to 2π.

Conserving terminals 1

  • shaftflange

    Shaft to measure, rotational. Draws no torque.

Parameters

  • Pole pairsp2

    ≥ 1

    Number of pole pairs, an integer ≥ 1. Match the machine.

Equations

Modelica
y = mod(p · (flange.φ + π/p), 2π) = mod(p · flange.φ + π, 2π)

Implementation

Modelica Standard Library 4.1.0Modelica.Electrical.Machines.Sensors.HallSensor
MSL documentation

Assumptions and limitations

  • The mounting offset is fixed at −π/p, so y = π when the shaft angle is zero. Account for this in commutation or Park transforms.
  • Continuous output: no quantization to Hall sectors or encoder counts.

See also

Select a block in Gradara and press F1 to open its page offline.