BLDC.ToMSL.UnwrapAngle

# .BLDC.ToMSL.UnwrapAngle

Angle tracking observer

## 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)`.

Generated at 2026-05-12T20:19:03Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos