The function rotation_dq calculates the matrix R_dq that is the restriction of R_dq0 from dq0 to dq.
The matrix R_dq0 rotates dq0 variables around the o-axis in dq0-space with arbitrary angle theta.
It takes the form
                 [cos(theta), -sin(theta), 0]
  R_dq0(theta) = [sin(theta),  cos(theta), 0]
                 [  0,           0,        1]
and has the real eigenvector
  {0, 0, 1}
in the dq0 reference-frame.
Coefficient matrices of the form (symmetrical systems)
      [x, 0, 0 ]
  X = [0, x, 0 ]
      [0, 0, xo]
are invariant under transformations R_dq0
The connection between R_dq0 and R_abc is the following
R_dq0 = P0*R_abc*P0'.with P0 the orthogonal transform 'Transforms.P0'.
function rotation_dq extends Modelica.Icons.Function; input SI.Angle theta "rotation angle"; output Real[2, 2] R_dq "rotation matrix"; end rotation_dq;