blockSinCosEvaluation
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
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | Ti | 1e-6 | Integral time constant of controller |
| Modelica.Units.SI.Angle | phi0 | 0 | Initial mechanical angle (zero position) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput[4] | u | Resolver signals | |
| Modelica.Blocks.Interfaces.RealOutput | phi | Electrical angle | |
| Modelica.Blocks.Interfaces.RealOutput | w | Electrical angular velocity |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Math.Feedback | feedbackCos | ||
| Modelica.Blocks.Math.Feedback | feedbackSin | ||
| Modelica.Electrical.Machines.SpacePhasors.Blocks.Rotator | rotator | ||
| Modelica.Blocks.Continuous.Integrator | integralController | ||
| Modelica.Blocks.Math.Gain | gain |