blockAtan2

Output atan(u1/u2) of the inputs u1 and u2

Information

Block that outputs the tangent-inverse y = atan2(u1, u2) of the input u1 divided by the input u2.

u1 and u2 shall not be zero at the same time instant. Atan2 uses the sign of u1 and u2 in order to construct the solution in the range -π ≤ y ≤ π, whereas Buildings.Controls.OBC.CDL.Reals.Atan gives a solution in the range -π/2 ≤ y ≤ π/2.

atan2.png

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.RealInputu1Input u1 for the atan2(u1/u2) function
Buildings.Controls.OBC.CDL.Interfaces.RealInputu2Input u2 for the atan2(u1/u2) function
Buildings.Controls.OBC.CDL.Interfaces.RealOutputyOutput with atan2(u1/u2)

Revisions

  • November 8, 2024, by Michael Wetter:
    Added final keyword to unit declaration as block is only valid for this unit.
    Also added displayUnit keyword.
  • March 7, 2023, by Jianjun Hu:
    Added unit rad to the output.
    This is for Buildings, issue 3277.
  • March 2, 2020, by Michael Wetter:
    Changed icon to display dynamically the output value.
  • January 3, 2017, by Michael Wetter:
    First implementation, based on the implementation of the Modelica Standard Library.