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
hallSensorLibraryMachinesDescription
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
Also in this example:Angle sensorConstant speedResolver
Ports
Outputs 1
-
θe
yElectrical angle θe, in radians, in the range 0 to 2π.
Conserving terminals 1
-
shaft
flangeShaft to measure, rotational. Draws no torque.
Parameters
-
Pole pairs
p2≥ 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.0
MSL documentation Modelica.Electrical.Machines.Sensors.HallSensorAssumptions 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.