phaseAngle function

Requirements.Units.Phasors.phaseAngle  ยท source

Icon of phaseAngle

Phase angle of a phasor from its real and imaginary parts, in (-pi, pi]

Extends Modelica.Icons.Function

Rectangular to polar: the phase angle atan2(im, re), in (-pi, pi]. A phasor of zero magnitude has phase angle 0. For a Complex it equals Modelica.ComplexMath.arg.

Inputs are the real and imaginary parts, in the same unit; the output phi is in radian. The magnitude is magnitude; the angle relative to another phasor is phaseDifference. Examples.Elementary.Units.Phasors asserts it against its closed form and the round trip between the two forms.

Copyright © 2026 Model Based Innovation LLC. All rights reserved.

Inputs

NameTypeDescription
re inputRealReal part
im inputRealImaginary part

Outputs

NameTypeDescription
phi outputSI.AnglePhase angle, in (-pi, pi]