function RotorPositionEstimation
extends Icons.Function;
input Types.ComplexVoltagePu u0Pu "Complex voltage at terminal in pu (base UNom)";
input Types.ComplexCurrentPu i0Pu "Complex current at terminal in pu (base UNom, SnRef)";
input Types.PerUnit MdPu "Direct axis mutual inductance in pu";
input Types.PerUnit MqPu "Quadrature axis mutual inductance in pu";
input Types.PerUnit LdPu "Direct axis stator leakage in pu";
input Types.PerUnit LqPu "Quadrature axis stator leakage in pu";
input Types.PerUnit RaPu "Armature resistance in pu";
input Types.PerUnit rTfoPu "Ratio of the generator transformer in pu (base UBaseHV, UBaseLV)";
input Types.PerUnit RTfoPu "Resistance of the generator transformer in pu (base SNom, UNom)";
input Types.PerUnit XTfoPu "Reactance of the generator transformer in pu (base SNom, UNom)";
input Types.ApparentPowerModule SNom "Nominal apparent power in MVA";
input Real md "Parameter for direct axis mutual inductance saturation modelling";
input Real mq "Parameter for quadrature axis mutual inductance saturation modelling";
input Real nd "Parameter for direct axis mutual inductance saturation modelling";
input Real nq "Parameter for quadrature axis mutual inductance saturation modelling";
output Types.PerUnit MsalPu "Constant difference between direct and quadrature axis saturated mutual inductances in pu";
output Types.Angle Theta0 "Start value of rotor angle: angle between machine rotor frame and port phasor frame";
output Types.VoltageModulePu Ud0Pu "Start value of voltage of direct axis in pu";
output Types.VoltageModulePu Uq0Pu "Start value of voltage of quadrature axis in pu";
output Types.CurrentModulePu Id0Pu "Start value of current of direct axis in pu";
output Types.CurrentModulePu Iq0Pu "Start value of current of quadrature axis in pu";
output Types.PerUnit LambdaAD0Pu "Start value of common flux of direct axis in pu";
output Types.PerUnit LambdaAQ0Pu "Start value of common flux of quadrature axis in pu";
output Types.PerUnit LambdaAirGap0Pu "Start value of total air gap flux in pu";
output Types.PerUnit Mds0Pu "Start value of direct axis saturated mutual inductance in the case when the total air gap flux is aligned on the direct axis in pu";
output Types.PerUnit Mqs0Pu "Start value of quadrature axis saturated mutual inductance in the case when the total air gap flux is aligned on the quadrature axis in pu";
output Types.PerUnit Cos2Eta0 "Start value of the common flux of direct axis contribution to the total air gap flux in pu";
output Types.PerUnit Sin2Eta0 "Start value of the common flux of quadrature axis contribution to the total air gap flux in pu";
output Types.PerUnit Mi0Pu "Start value of intermediate axis saturated mutual inductance in pu";
output Types.PerUnit MdSat0PPu "Start value of direct axis saturated mutual inductance in pu";
output Types.PerUnit MqSat0PPu "Start value of quadrature axis saturated mutual inductance in pu";
end RotorPositionEstimation;