blockSinCosEvaluation

Evaluation of Sin/Cos-resolver signals

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Information

Evaluates the input signals from a SinCosResolver:

  • y[1] = offset + cos(p*phi)
  • y[2] = offset - cos(p*phi)
  • y[3] = offset + sin(p*phi)
  • y[4] = offset - sin(p*phi)

to obtain the electrical angle phi and the electrial angular velocity w:

  • phi = angle (continuous)
  • w = angular velocity

Subtracting the inputs pairwise y[1] - y[2] and y[3] - y[4] eliminates the offset. The results are interpreted as real and imaginary part of a space phasor. Calculating the angle of the space phasor using atan2 gives the desired rotor angle, wrapped to the interval [0, 2*p). This calculation is sensitive on amplitude errors of the input signal, and the result cannot be differentiated.

An alternative algorithm with better stability and robustness is a tracking obeserver: The space phasor is rotated (Park-transform) by an angle that is determined by a fast integral controller bringing the imaginary part of the rotated phasor to zero. Differentiating the output gives the angular velocity.

Note:

Usually the number of pole pairs p matches the number of pole pairs of the permanent magnet synchronous machine. Therefore the results directly provide the electrical rotor angle, i.e. p*phiMechancial, and the electrial angular velocity, i.e. p*wMechancial.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TimeTi1e-6Integral time constant of controller
Modelica.Units.SI.Anglephi00Initial mechanical angle (zero position)

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInput[4]uResolver signals
Modelica.Blocks.Interfaces.RealOutputphiElectrical angle
Modelica.Blocks.Interfaces.RealOutputwElectrical angular velocity

Components

TypeNameDefaultDescription
Modelica.Blocks.Math.FeedbackfeedbackCos
Modelica.Blocks.Math.FeedbackfeedbackSin
Modelica.Electrical.Machines.SpacePhasors.Blocks.Rotatorrotator
Modelica.Blocks.Continuous.IntegratorintegralController
Modelica.Blocks.Math.Gaingain