Implemented according to [1].
References:
[1] J. Machowski, J. W. Bialek, und J. R. Bumby, Power system dynamics, 2nd ed. Oxford: John Wiley, 2008.
function ABCtoDQ_Machowski_Kundur input Real f_abc[3]; input Real theta; output Real f_dq[2]; constant Real[2, 3] K_mat = {{2/3*cos(theta), 2/3*cos(theta - 2*pi/3), 2/3*cos(theta + 2*pi/3)}, {2/3*sin(theta), 2/3*sin(theta - 2*pi/3), 2/3*sin(theta + 2*pi/3)}}; end ABCtoDQ_Machowski_Kundur;