modelDemoEncoder
Demonstrate various encoder / resolver models
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
The reference frequency signal is integrated to obtain the angle, which is measured by:
- an ideal AngleSensor and an ideal SpeedSensor,
- a HallSensor,
- a SinCosResolver, the outputs are interpreted by the block SinCosEvaluation,
- an IncrementalEncoder, the outputs are interpreted by the blocks EncoderTimeSpan and EncoderPulseCount.
For p=1, all results are identical.
For p>1, the results of the HallSensor and the SinCosEvaluation are p times the other results.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | m | 5 | Number of phases |
| Integer | p | 2 | Number of pole pairs |
| Integer | pRev | 128 | Pulses per revolution |
| Modelica.Units.SI.Angle | phi0 | 0 | Initial mechanical angle (zero position) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Sources.Trapezoid | refFrequency | ||
| Modelica.Blocks.Continuous.Integrator | f2pos | ||
| Modelica.Mechanics.Rotational.Sources.Position | position | ||
| Modelica.Mechanics.Rotational.Sensors.AngleSensor | angleSensor | ||
| Modelica.Mechanics.Rotational.Sensors.SpeedSensor | speedSensor | ||
| Sensors.SinCosResolver | sinCosResolver | ||
| Utilities.SinCosEvaluation | sinCosEvaluation | ||
| Sensors.IncrementalEncoder | incrementalEncoder | ||
| Utilities.EncoderTimeAndCount | encoderTimeAndCount | ||
| Utilities.EncoderTimeSpan | encoderTimeSpan | ||
| Utilities.EncoderPulseCount | encoderPulseCount | ||
| Sensors.HallSensor | hallSensor | ||
| ToMSL.UnwrapAngle | unwrapAngle | ||
| Utilities.HallTimeSpan | hallTimeSpan |