Skip to content

Continuous angle for rectangular to polar #4573

Open

Description

@AHaumer

According to the discussion in #4363, we should have an eye how the angle (and - if possible - the angular velocity) of a phasor given as rectangular representation can be obtained. Preferably the angle should be continuous, a wrap in the interval [0, 2*pi) or (-pi, +pi] can be done easily. Using the function atan2 is not the best idea: The result is wrapped in the interval (-pi, +pi] and a "step" from -pi to +pi or vice versa isn't a step but a ramp depending on the output interval. This of course is not desired for regression testing.
The solution could be a Phase Locked Loop / Angle Tracking Observer as suggested in #3914.
We could discuss here and post a test implementation.
@casella @christiankral @dietmarw and all other Modelicans you're invited to give your opinion.
Additonal reading could be:
Masoud Karimi-Ghartemani, Enhanced Phase-Locked Loop Structures for Power and Energy Applications and a Tutorial at PowerSim by the same author.

Activity

  1. added
    enhancement
    L: Blocks
    L: Electrical.Machines
    discussion
    on Mar 6, 2025
  2. added this to the MSL4.2.0 milestone on Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

L: BlocksL: Electrical.Machinesdiscussionenhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions