Phasors package

Requirements.Units.Phasors  ยท source

Icon of Phasors

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

NameKindDescription
magnitudefunctionMagnitude of a phasor from its real and imaginary parts
phaseAnglefunctionPhase angle of a phasor from its real and imaginary parts, in (-pi, pi]
realPartfunctionReal part of a phasor from its magnitude and phase angle
imaginaryPartfunctionImaginary part of a phasor from its magnitude and phase angle
wrapAnglefunctionAngle wrapped to (-pi, pi]
phaseDifferencefunctionPhase angle of one phasor relative to another, wrapped to (-pi, pi]