Phasors package
Requirements.Units.Phasors
ยท source
Transformations between the polar and the rectangular form of a phasor
Extends Modelica.Icons.Package
A phasor (a quasi-static voltage or current, as in Modelica.Electrical.QuasiStatic) is
written in one of two coordinate systems: rectangular (real and imaginary part, as a Complex holds it) or polar
(magnitude and phase angle, as power-system libraries often carry it). A requirement may name either form, whichever form
the model has. These functions transform between the two, in both directions, and give a phase angle relative to another
phasor; every phase angle they return is in (-pi, pi]. The magnitude is the one the model carries: the MSL's quasi-static
phasors are RMS phasors, so their magnitude is an RMS value. A check model, hand-written or generated, writes
magnitude(v.re, v.im), not the formula. Examples.Elementary.Units.Phasors
asserts every function.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Contents
| Name | Kind | Description | |
|---|---|---|---|
| magnitude | function | Magnitude of a phasor from its real and imaginary parts | |
| phaseAngle | function | Phase angle of a phasor from its real and imaginary parts, in (-pi, pi] | |
| realPart | function | Real part of a phasor from its magnitude and phase angle | |
| imaginaryPart | function | Imaginary part of a phasor from its magnitude and phase angle | |
| wrapAngle | function | Angle wrapped to (-pi, pi] | |
| phaseDifference | function | Phase angle of one phasor relative to another, wrapped to (-pi, pi] |