blockUnwrapAngle

Angle tracking observer

Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).

Information

An angle tracking observer is a very robust method to determine the angle of a space phasor. If we calculate cos and sin of a wrapped angle - no matter whether in the interval [0, 2π) or (-π, +π] - we can use this algorithm to unwrap the angle.

Rotating the space phasor by an angle that is determined by the controller - whose goal is to bring the imaginary part to zero - the result is the desired continuos angle. The result can be differentiated to obtain the angular velocity, but as a bonus the input of the integral controller already is the angular velocity. The result approximates the desired angle by a firstOrder whose time constant is the integral time constant:

Im(ej(φ-φ'))=sin(φ-φ') which can be approximated by (φ-φ')

Using an integral contoller, the transfer function of the closed loop can be determined as: φ'=φ/(1 + s*TI).

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TimeTi1e-6Integral time constant of controller
Modelica.Units.SI.Anglephi00Initial angle

Connectors

TypeNameDefaultDescription
RealInputu (from SISO)Connector of Real input signal
RealOutputy (from SISO)Connector of Real output signal
Modelica.Blocks.Interfaces.RealOutputwAngular velocity

Components

TypeNameDefaultDescription
Modelica.Blocks.Math.Coscos1
Modelica.Blocks.Math.Sinsin1
Modelica.Electrical.Machines.SpacePhasors.Blocks.Rotatorrotator
Modelica.Blocks.Continuous.IntegratorintegralController
Modelica.Blocks.Math.Gaingain