|
| 1 | +within OpenIPSL.Electrical.Machines.PSSE; |
| 2 | +model CIM5 "PSSE CIM5 three-phase induction motor model" |
| 3 | + extends OpenIPSL.Electrical.Machines.PSSE.BaseClasses.baseMotor; |
| 4 | + //import Modelica.Constants.eps; |
| 5 | + import OpenIPSL.NonElectrical.Functions.SE; |
| 6 | + |
| 7 | + parameter Integer Mtype = 1 "1- Motor Type A; 2- Motor Type B" annotation (Dialog(group= |
| 8 | + "Motor Setup"), choices(choice=1, choice=2)); |
| 9 | + parameter OpenIPSL.Types.PerUnit Ra=0 "Stator resistance" annotation (Dialog(group="Machine parameters")); |
| 10 | + parameter OpenIPSL.Types.PerUnit Xa=0.0759 "Stator reactance" annotation (Dialog(group="Machine parameters")); |
| 11 | + parameter OpenIPSL.Types.PerUnit Xm=3.1241 "Magnetizing reactance" annotation (Dialog(group="Machine parameters")); |
| 12 | + parameter OpenIPSL.Types.PerUnit R1=0.0085 "1st cage rotor resistance" annotation (Dialog(group="Machine parameters")); |
| 13 | + parameter OpenIPSL.Types.PerUnit X1=0.0759 "1st cage rotor reactance" annotation (Dialog(group="Machine parameters")); |
| 14 | + parameter OpenIPSL.Types.PerUnit R2=0 "2nd cage rotor resistance. To model single cage motor set R2 = 0." annotation (Dialog(group="Machine parameters")); |
| 15 | + parameter OpenIPSL.Types.PerUnit X2=0 "2nd cage rotor reactance. To model single cage motor set X2 = 0." annotation (Dialog(group="Machine parameters")); |
| 16 | + parameter OpenIPSL.Types.PerUnit E1=1 "First Saturation Voltage Value" |
| 17 | + annotation (Dialog(group="Machine parameters")); |
| 18 | + parameter OpenIPSL.Types.PerUnit SE1 = 0.06 "Saturation Factor at E1" annotation (Dialog(group="Machine parameters")); |
| 19 | + parameter OpenIPSL.Types.PerUnit E2=1.2 "Second Saturation Voltage Value" |
| 20 | + annotation (Dialog(group="Machine parameters")); |
| 21 | + parameter OpenIPSL.Types.PerUnit SE2 = 0.6 "Saturation Factor at E2" annotation (Dialog(group="Machine parameters")); |
| 22 | + parameter Modelica.Units.SI.Time H = 0.4 "Inertia constant" annotation (Dialog(group="Machine parameters")); |
| 23 | + parameter Real T_nom = 1 "Load torque at 1 pu speed" annotation (Dialog(group="Machine parameters")); |
| 24 | + parameter Real D = 1 "Load Damping Factor" annotation (Dialog(group="Machine parameters")); |
| 25 | + |
| 26 | + |
| 27 | + OpenIPSL.Types.PerUnit TL "Load torque"; |
| 28 | + |
| 29 | + OpenIPSL.Types.PerUnit Epr "Real voltage behind transient reactance"; |
| 30 | + OpenIPSL.Types.PerUnit Epi "Imaginary voltage behind transient reactance"; |
| 31 | + OpenIPSL.Types.PerUnit Eppr "Real voltage behind sub-transient reactance"; |
| 32 | + OpenIPSL.Types.PerUnit Eppi "Imaginary voltage behind sub-transient reactance"; |
| 33 | + OpenIPSL.Types.PerUnit Epp "Voltage magnitude behind sub-transient reactance"; |
| 34 | + OpenIPSL.Types.PerUnit Ekr "Real voltage component related to 2nd cage for sub-transient reactance"; |
| 35 | + OpenIPSL.Types.PerUnit Eki "Imaginary voltage component related to 2nd cage for sub-transient reactance"; |
| 36 | + OpenIPSL.Types.PerUnit NUM "Numerator expression for determining EQC"; |
| 37 | + OpenIPSL.Types.PerUnit EQC "Intermediate step equation C"; |
| 38 | + OpenIPSL.Types.PerUnit EQ1 "Intermediate step equation 1"; |
| 39 | + OpenIPSL.Types.PerUnit EQ2 "Intermediate step equation 2"; |
| 40 | + OpenIPSL.Types.PerUnit EQ3 "Intermediate step equation 3"; |
| 41 | + OpenIPSL.Types.PerUnit EQ4 "Intermediate step equation 4"; |
| 42 | + OpenIPSL.Types.PerUnit EQ5 "Intermediate step equation 5"; |
| 43 | + OpenIPSL.Types.PerUnit EQ6 "Intermediate step equation 6"; |
| 44 | + OpenIPSL.Types.PerUnit EQ7 "Intermediate step equation 7"; |
| 45 | + OpenIPSL.Types.PerUnit EQ8 "Intermediate step equation 8"; |
| 46 | + OpenIPSL.Types.PerUnit EQ9 "Intermediate step equation 9"; |
| 47 | + OpenIPSL.Types.PerUnit EQ10 "Intermediate step equation 10"; |
| 48 | + OpenIPSL.Types.PerUnit EQ11 "Intermediate step equation 11"; |
| 49 | + OpenIPSL.Types.PerUnit EQ12 "Intermediate step equation 12"; |
| 50 | + OpenIPSL.Types.PerUnit EQ13 "Intermediate step equation 13"; |
| 51 | + OpenIPSL.Types.PerUnit EQ14 "Intermediate step equation 14"; |
| 52 | + OpenIPSL.Types.PerUnit EQ15 "Intermediate step equation 15"; |
| 53 | + OpenIPSL.Types.PerUnit EQ16 "Intermediate step equation 16"; |
| 54 | + OpenIPSL.Types.PerUnit EQ17 "Intermediate step equation 17"; |
| 55 | + OpenIPSL.Types.PerUnit EQ18 "Intermediate step equation 18"; |
| 56 | + OpenIPSL.Types.PerUnit EQ19 "Intermediate step equation 19"; |
| 57 | + OpenIPSL.Types.PerUnit EQ20 "Intermediate step equation 20"; |
| 58 | + OpenIPSL.Types.PerUnit EQ21 "Intermediate step equation 21"; |
| 59 | + OpenIPSL.Types.PerUnit EQ22 "Intermediate step equation 22"; |
| 60 | + OpenIPSL.Types.PerUnit EQ23 "Intermediate step equation 23"; |
| 61 | + OpenIPSL.Types.PerUnit EQ24 "Intermediate step equation 24"; |
| 62 | + OpenIPSL.Types.PerUnit Omegar "Rotor angular velocity"; |
| 63 | + |
| 64 | + OpenIPSL.Types.PerUnit Ls "Sum of stator and magnetization reactances"; |
| 65 | + OpenIPSL.Types.PerUnit Ll "Stator reactance"; |
| 66 | + OpenIPSL.Types.PerUnit Lp "Total reactance for stator and 1st cage rotor reactances"; |
| 67 | + OpenIPSL.Types.PerUnit Lpp "Total reactance for stator, 1st, and 2nd cage rotor reactances"; |
| 68 | + |
| 69 | + OpenIPSL.Types.PerUnit Xa_c "Variable stator reactance"; |
| 70 | + OpenIPSL.Types.PerUnit Xm_c "Variable magnetic impedance"; |
| 71 | + OpenIPSL.Types.PerUnit X1_c "Variable 1st cage rotor cage reactance"; |
| 72 | + OpenIPSL.Types.PerUnit X2_c "Variable 2nd cage rotor cage reactance"; |
| 73 | + |
| 74 | + OpenIPSL.Types.PerUnit constant1 "Intermediate constant 1"; |
| 75 | + OpenIPSL.Types.PerUnit constant2 "Intermediate constant 2"; |
| 76 | + OpenIPSL.Types.PerUnit constant3 "Intermediate constant 3"; |
| 77 | + OpenIPSL.Types.PerUnit constant4 "Intermediate constant 4"; |
| 78 | + OpenIPSL.Types.PerUnit constant5 "Intermediate constant 5"; |
| 79 | + |
| 80 | + Modelica.Units.SI.Time Tp0 "Transient open-circuit time constant"; |
| 81 | + Modelica.Units.SI.Time Tpp0 "Sub-transient open-circuit time constant"; |
| 82 | + |
| 83 | +initial equation |
| 84 | + if Sup == false then |
| 85 | + der(s) = 0; |
| 86 | + der(Ekr) = 0; |
| 87 | + der(Eki) = 0; |
| 88 | + der(Epr) = 0; |
| 89 | + der(Epi) = 0; |
| 90 | + |
| 91 | + else |
| 92 | + s = (1 - C.eps); |
| 93 | + |
| 94 | + end if; |
| 95 | + |
| 96 | +equation |
| 97 | + |
| 98 | + Xa_c = if (Ctrl == false) then Xa else (we_fix.y/w_b)*(Xa); |
| 99 | + Xm_c = if (Ctrl == false) then Xm else (we_fix.y/w_b)*(Xm); |
| 100 | + X1_c = if (Ctrl == false) then X1 else (we_fix.y/w_b)*(X1); |
| 101 | + X2_c = if (Ctrl == false) then X2 else (we_fix.y/w_b)*(X2); |
| 102 | + Ls = Xa_c + Xm_c; |
| 103 | + Ll = Xa_c; |
| 104 | + Lp = Xa_c + X1_c*Xm_c/(X1_c + Xm_c); |
| 105 | + Lpp = if (Mtype == 1 and R2 == 0 and X2 == 0) then Lp elseif (Mtype == 1) then Xa_c + X1_c*Xm_c*X2_c/(X1_c*X2_c + X1_c*Xm_c + X2_c*Xm_c) elseif (Mtype == 2 and R2 == 0 and X2 == 0) then Lp else Xa_c + (Xm_c*(X1_c+X2_c)/(X1_c + X2_c + Xm_c)); |
| 106 | + Tp0 = if (Mtype == 1) then (X1_c + Xm_c)/(w_b*R1) elseif (Mtype == 2 and R2 == 0 and X2 == 0) then (X1_c + Xm_c)/(w_b*R1) else (X1_c + X2_c +Xm_c)/(w_b*R2); |
| 107 | + Tpp0 = if (Mtype == 1 and R2 == 0 and X2 == 0) then 1e-7 elseif (Mtype == 1) then (X2_c + (X1_c*Xm_c/(X1_c + Xm_c)))/(w_b*R2) elseif (Mtype == 2 and R2 == 0 and X2 == 0) then 1e-7 else (1/((1/(X1_c+Xm_c) + 1/X2_c)))/(w_b*R1); |
| 108 | + constant5 = Ls - Lp; |
| 109 | + constant3 = Lp - Ll; |
| 110 | + constant4 = (Lp - Lpp)/((Lp - Ll)^2); |
| 111 | + constant2 = (Lp - Lpp)/(Lp - Ll); |
| 112 | + constant1 = (Lpp - Ll)/(Lp - Ll); |
| 113 | + Eppr = EQ1 + EQ2; |
| 114 | + EQ1 = Epr*constant1; |
| 115 | + EQ2 = Ekr*constant2; |
| 116 | + EQ3 = Tpp0*der(Ekr); |
| 117 | + EQ3 = EQ4 + EQ5; |
| 118 | + EQ4 = (Tpp0*w_b*s)*Eki; |
| 119 | + EQ5 = Epr - Ekr - EQ6; |
| 120 | + EQ6 = Ii*constant3; |
| 121 | + EQ7 = EQ5*constant4; |
| 122 | + EQ8 = EQ7 + Ii; |
| 123 | + EQ9 = EQ8*constant5; |
| 124 | + EQ10 = Eppi*EQC; |
| 125 | + EQ11 = Epi*(Tp0*w_b*s); |
| 126 | + EQ12 = EQ10 + EQ11 - Epr - EQ9; |
| 127 | + EQ12 = Tp0*der(Epr); |
| 128 | + EQC = NUM/(Epp + C.eps); |
| 129 | + NUM = SE(Epp,SE1,SE2,1,1.2); |
| 130 | + Epp = sqrt(Eppr^2 + Eppi^2); |
| 131 | + EQ13 = EQC*Eppr; |
| 132 | + EQ14 = Epr*(Tp0*w_b*s); |
| 133 | + EQ22 = Ir - EQ21; |
| 134 | + EQ15 = EQ22*constant5; |
| 135 | + EQ16 = EQ15 - EQ14 - EQ13 - Epi; |
| 136 | + EQ16 = Tp0*der(Epi); |
| 137 | + EQ17 = Ir*constant3; |
| 138 | + EQ18 = EQ17 + Epi - Eki; |
| 139 | + EQ21 = EQ18*constant4; |
| 140 | + EQ19 = Ekr*(Tpp0*w_b*s); |
| 141 | + EQ20 = EQ18 - EQ19; |
| 142 | + EQ20 = Tpp0*der(Eki); |
| 143 | + EQ24 = Epi*constant1; |
| 144 | + EQ23 = Eki*constant2; |
| 145 | + Eppi = EQ23 + EQ24; |
| 146 | + Vr = Eppr + Ra*Ir - Lpp*Ii; |
| 147 | + Vi = Eppi + Ra*Ii + Lpp*Ir; |
| 148 | + s = (1 - Omegar); |
| 149 | + der(s) = (TL - Te_motor)/(2*H); |
| 150 | + Te_sys = Te_motor*CoB; |
| 151 | + Te_motor = Eppr*Ir + Eppi*Ii; |
| 152 | + TL = T_nom*(1 - s)^D; |
| 153 | + |
| 154 | + annotation (preferredView = "info",Dialog(group="Machine parameters"), |
| 155 | + Documentation(info="<html> |
| 156 | +<p>The CIM5 induction motor model represents an induction machine that can be either model a single or double cage motor. The model can represent two distinct |
| 157 | +impedance circuits depending on the selected type.</p> |
| 158 | +<p>The load torque equation for the CIM5 motor model is defines as:</p> |
| 159 | +<blockquote><pre> |
| 160 | +TL = T(1+w)^D |
| 161 | +</pre></blockquote> |
| 162 | +
|
| 163 | +<p>The modelling of such devices is based, mainly, on the following references:</p> |
| 164 | +<ul> |
| 165 | +<li><p>Siemens: \"PSS®E Model Library\" |
| 166 | +<a href=\"modelica://OpenIPSL.UsersGuide.References\">[PSSE-MODELS]</a>.</p> |
| 167 | +</li> |
| 168 | +<li><p>PowerWorld: Load Characteristic Models |
| 169 | +<a href=\"modelica://OpenIPSL.UsersGuide.References\">[PSSEMotor]</a>.</p> |
| 170 | +</li> |
| 171 | +</ul> |
| 172 | +</html>")); |
| 173 | +end CIM5; |
0 commit comments