AIM_SquirrelCage

model AIM_SquirrelCage "Asynchronous induction machine with squirrel cage rotor"
    extends Machines.Interfaces.PartialBasicInductionMachine(final idq_ss = airGapS.i_ss, final idq_sr = airGapS.i_sr, final idq_rs = airGapS.i_rs, final idq_rr = airGapS.i_rr, redeclare final Machines.Thermal.AsynchronousInductionMachines.ThermalAmbientAIMC thermalAmbient(final Tr = TrOperational), redeclare final Machines.Interfaces.InductionMachines.ThermalPortAIMC thermalPort, redeclare final Machines.Interfaces.InductionMachines.ThermalPortAIMC internalThermalPort, redeclare final Machines.Interfaces.InductionMachines.PowerBalanceAIMC powerBalance(final lossPowerRotorWinding = squirrelCageR.LossPower, final lossPowerRotorCore = 0), statorCore(final w = statorCoreParameters.wRef));

    output Modelica.SIunits.Current ir[2] = squirrelCageR.i "Rotor cage currents";
    Machines.BasicMachines.Components.AirGapS airGapS(final p = p, final Lm = Lm, final m = m) annotation (Placement(transformation(
        extent = {
            {-10, -10}, 
            {10, 10}},
        rotation = 270)));
    parameter Modelica.SIunits.Inductance Lm(start = 3 * sqrt(0.9333) / (2 * pi * fsNominal)) "Stator main field inductance per phase"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Modelica.SIunits.Inductance Lrsigma(start = 3 * (1 - sqrt(0.9333)) / (2 * pi * fsNominal)) "Rotor stray inductance per phase (equivalent three phase winding)"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Modelica.SIunits.Resistance Rr(start = 0.04) "Rotor resistance per phase (equivalent three phase winding) at TRef"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Modelica.SIunits.Temperature TrRef(start = 293.15) "Reference temperature of rotor resistance"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Machines.Thermal.LinearTemperatureCoefficient20 alpha20r(start = 0) "Temperature coefficient of rotor resistance at 20 degC"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Modelica.SIunits.Temperature TrOperational(start = 293.15) "Operational temperature of rotor resistance"
        annotation (Dialog(
            group = "Operational temperatures",
            enable = not useThermalPort));
    Machines.BasicMachines.Components.SquirrelCage squirrelCageR(final Lrsigma = Lrsigma, final Rr = Rr, final useHeatPort = true, final T_ref = TrRef, final alpha = Machines.Thermal.convertAlpha(alpha20r, TrRef)) annotation (Placement(transformation(
        origin = {0, -40},
        extent = {
            {-10, -10}, 
            {10, 10}},
        rotation = 270)));
equation
    connect(airGapS.flange,inertiaRotor.flange_a) annotation (Line(points = {
        {10, 0}, 
        {36, 0}, 
        {36, 0}, 
        {70, 0}}));
    connect(airGapS.support,internalSupport) annotation (Line(points = {
        {-10, 0}, 
        {-40, 0}, 
        {-40, -90}, 
        {60, -90}, 
        {60, -100}}));
    connect(airGapS.spacePhasor_r,squirrelCageR.spacePhasor_r) annotation (Line(
        points = {
            {10, -10}, 
            {10, -30}},
        color = {0, 0, 255}));
    connect(lssigma.spacePhasor_b,airGapS.spacePhasor_s) annotation (Line(
        points = {
            {20, 10}, 
            {10, 10}},
        color = {0, 0, 255}));
    connect(squirrelCageR.heatPort,internalThermalPort.heatPortRotorWinding) annotation (Line(
        points = {
            {-10, -40}, 
            {-10, -60}, 
            {0, -60}, 
            {0, -80}},
        color = {191, 0, 0}));

    annotation (
        defaultComponentName = "aimc",
        Documentation(info = "<html>\n<p><strong>Model of a three phase asynchronous induction machine with squirrel cage.</strong><br>\nResistance and stray inductance of stator is modeled directly in stator phases, then using space phasor transformation. Resistance and stray inductance of rotor's squirrel cage is modeled in two axis of the rotor-fixed coordinate system. Both together connected via a stator-fixed <em>AirGap</em> model. The machine models take the following loss effects into account:\n</p>\n\n<ul>\n<li>heat losses in the temperature dependent stator winding resistances</li>\n<li>heat losses in the temperature dependent cage resistances</li>\n<li>friction losses</li>\n<li>core losses (only eddy current losses, no hysteresis losses)</li>\n<li>stray load losses</li>\n</ul>\n\n<p><strong>Default values for machine's parameters (a realistic example) are:</strong><br></p>\n<table>\n<tr>\n<td>number of pole pairs p</td>\n<td>2</td><td> </td>\n</tr>\n<tr>\n<td>stator's moment of inertia</td>\n<td>0.29</td><td>kg.m2</td>\n</tr>\n<tr>\n<td>rotor's moment of inertia</td>\n<td>0.29</td><td>kg.m2</td>\n</tr>\n<tr>\n<td>nominal frequency fNominal</td>\n<td>50</td><td>Hz</td>\n</tr>\n<tr>\n<td>nominal voltage per phase</td>\n<td>100</td><td>V RMS</td>\n</tr>\n<tr>\n<td>nominal current per phase</td>\n<td>100</td><td>A RMS</td>\n</tr>\n<tr>\n<td>nominal torque</td>\n<td>161.4</td><td>Nm</td>\n</tr>\n<tr>\n<td>nominal speed</td>\n<td>1440.45</td><td>rpm</td>\n</tr>\n<tr>\n<td>nominal mechanical output</td>\n<td>24.346</td><td>kW</td>\n</tr>\n<tr>\n<td>efficiency</td>\n<td>92.7</td><td>%</td>\n</tr>\n<tr>\n<td>power factor</td>\n<td>0.875</td><td> </td>\n</tr>\n<tr>\n<td>stator resistance</td>\n<td>0.03</td><td>Ohm per phase at reference temperature</td>\n</tr>\n<tr>\n<td>reference temperature TsRef</td>\n<td>20</td><td>&deg;C</td>\n</tr>\n<tr>\n<td>temperature coefficient alpha20s </td>\n<td>0</td><td>1/K</td>\n</tr>\n<tr>\n<td>rotor resistance</td>\n<td>0.04</td><td>Ohm at reference temperature</td>\n</tr>\n<tr>\n<td>reference temperature TrRef</td>\n<td>20</td><td>&deg;C</td>\n</tr>\n<tr>\n<td>temperature coefficient alpha20r </td>\n<td>0</td><td>1/K</td>\n</tr>\n<tr>\n<td>stator reactance Xs</td>\n<td>3</td><td>Ohm per phase</td>\n</tr>\n<tr>\n<td>rotor reactance Xr</td>\n<td>3</td><td>Ohm</td>\n</tr>\n<tr>\n<td>total stray coefficient sigma</td>\n<td>0.0667</td><td> </td>\n</tr>\n<tr>\n<td>stator operational temperature TsOperational</td>\n<td>20</td><td>&deg;C</td>\n</tr>\n<tr>\n<td>rotor operational temperature TrOperational</td>\n<td>20</td><td>&deg;C</td>\n</tr>\n<tr>\n<td>These values give the following inductances:</td>\n<td> </td><td> </td>\n</tr>\n<tr>\n<td>stator stray inductance per phase</td>\n<td>Xs * (1 - sqrt(1-sigma))/(2*pi*fNominal)</td><td> </td>\n</tr>\n<tr>\n<td>rotor stray inductance</td>\n<td>Xr * (1 - sqrt(1-sigma))/(2*pi*fNominal)</td><td> </td>\n</tr>\n<tr>\n<td>main field inductance per phase</td>\n<td>sqrt(Xs*Xr * (1-sigma))/(2*pi*fNominal)</td><td> </td>\n</tr>\n</table>\n</html>"));
end AIM_SquirrelCage;