blockUnwrapAngle
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
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | Ti | 1e-6 | Integral time constant of controller |
| Modelica.Units.SI.Angle | phi0 | 0 | Initial angle |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput | u (from SISO) | Connector of Real input signal | |
| RealOutput | y (from SISO) | Connector of Real output signal | |
| Modelica.Blocks.Interfaces.RealOutput | w | Angular velocity |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Math.Cos | cos1 | ||
| Modelica.Blocks.Math.Sin | sin1 | ||
| Modelica.Electrical.Machines.SpacePhasors.Blocks.Rotator | rotator | ||
| Modelica.Blocks.Continuous.Integrator | integralController | ||
| Modelica.Blocks.Math.Gain | gain |