Changeset 703
- Timestamp:
- 10/15/2007 09:30:26 PM (15 months ago)
- Files:
-
- 1 modified
-
Modelica/trunk/Modelica/Electrical/Machines.mo (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Modelica/trunk/Modelica/Electrical/Machines.mo
r701 r703 1 1 within Modelica.Electrical; 2 2 3 3 4 package Machines "Library for electric machines" … … 1215 1216 even though the source's or load's starpoint are grounded; you may use a reasonable high earthing resistance. 1216 1217 </HTML>"), 1217 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, 1218 {100,100}}), graphics), 1218 Diagram(graphics), 1219 1219 experiment(StopTime=0.1), 1220 1220 experimentSetupOutput); 1221 1221 Modelica.Electrical.MultiPhase.Sources.SineVoltage source(freqHz=fill(50, 3), 1222 1222 V=fill(sqrt(2/3)*100, 3)) 1223 annotation (Placement(transformation( 1224 extent={{10,10},{-10,-10}}, 1225 rotation=-90, 1226 origin={-90,-10}))); 1223 annotation (Placement(transformation(extent={{-80,0},{-100,-20}}, 1224 rotation=-90))); 1227 1225 Modelica.Electrical.MultiPhase.Basic.Star starS 1228 annotation (Placement(transformation( 1229 extent={{10,-10},{-10,10}}, 1230 rotation=-90, 1231 origin={-90,-40}))); 1226 annotation (Placement(transformation(extent={{-80,-50},{-100,-30}}, 1227 rotation=-90))); 1232 1228 Modelica.Electrical.Analog.Basic.Ground groundS 1233 1229 annotation (Placement(transformation(extent={{-100,-80},{-80,-60}}, … … 1240 1236 rotation=0))); 1241 1237 Sensors.VoltageRMSsensor voltageRMSsensorS 1242 annotation (Placement(transformation( 1243 extent={{10,10},{-10,-10}}, 1244 rotation=-90, 1245 origin={-40,-10}))); 1238 annotation (Placement(transformation(extent={{-30,0},{-50,-20}}, 1239 rotation=-90))); 1246 1240 Modelica.Electrical.MultiPhase.Basic.Delta deltaS 1247 annotation (Placement(transformation( 1248 extent={{10,-10},{-10,10}}, 1249 rotation=-90, 1250 origin={-40,-30}))); 1241 annotation (Placement(transformation(extent={{-30,-40},{-50,-20}}, 1242 rotation=-90))); 1251 1243 Modelica.Electrical.Analog.Basic.Resistor earth(R=1e6) 1252 annotation (Placement(transformation( 1253 extent={{10,10},{-10,-10}}, 1254 rotation=-90, 1255 origin={0,-40}))); 1244 annotation (Placement(transformation(extent={{10,-30},{-10,-50}}, 1245 rotation=-90))); 1256 1246 Modelica.Electrical.Analog.Basic.Ground ground 1257 1247 annotation (Placement(transformation(extent={{-10,-80},{10,-60}}, 1258 1248 rotation=0))); 1259 1249 Sensors.VoltageRMSsensor voltageRMSsensorL 1260 annotation (Placement(transformation( 1261 extent={{10,-10},{-10,10}}, 1262 rotation=-90, 1263 origin={40,-10}))); 1250 annotation (Placement(transformation(extent={{50,-20},{30,0}}, rotation 1251 =-90))); 1264 1252 Modelica.Electrical.MultiPhase.Basic.Delta deltaL 1265 annotation (Placement(transformation( 1266 extent={{10,10},{-10,-10}}, 1267 rotation=-90, 1268 origin={40,-30}))); 1253 annotation (Placement(transformation(extent={{50,-20},{30,-40}}, 1254 rotation=-90))); 1269 1255 Sensors.CurrentRMSsensor currentRMSsensorL 1270 1256 annotation (Placement(transformation(extent={{40,20},{60,0}}, rotation= … … 1274 1260 0))); 1275 1261 Modelica.Electrical.MultiPhase.Basic.Resistor load(R=RL) 1276 annotation (Placement(transformation( 1277 extent={{10,10},{-10,-10}}, 1278 rotation=-90, 1279 origin={90,-10}))); 1262 annotation (Placement(transformation(extent={{100,0},{80,-20}}, 1263 rotation=-90))); 1280 1264 Modelica.Electrical.MultiPhase.Basic.Star starL 1281 annotation (Placement(transformation( 1282 extent={{10,10},{-10,-10}}, 1283 rotation=-90, 1284 origin={90,-40}))); 1265 annotation (Placement(transformation(extent={{100,-30},{80,-50}}, 1266 rotation=-90))); 1285 1267 Modelica.Electrical.Analog.Basic.Ground groundL 1286 1268 annotation (Placement(transformation(extent={{80,-80},{100,-60}}, … … 1300 1282 equation 1301 1283 connect(starS.pin_n, groundS.p) 1302 annotation (Line(points={{-90,- 30},{-90,-60}}, color={0,0,255}));1284 annotation (Line(points={{-90,-50},{-90,-60}}, color={0,0,255})); 1303 1285 connect(source.plug_n, starS.plug_p) 1304 annotation (Line(points={{-90, 0},{-90,-50}}, color={0,0,255}));1286 annotation (Line(points={{-90,-20},{-90,-30}}, color={0,0,255})); 1305 1287 connect(starL.pin_n, groundL.p) 1306 annotation (Line(points={{90,- 30},{90,-60}}, color={0,0,255}));1288 annotation (Line(points={{90,-50},{90,-60}}, color={0,0,255})); 1307 1289 connect(load.plug_n, starL.plug_p) 1308 annotation (Line(points={{90, 0},{90,-50}}, color={0,0,255}));1290 annotation (Line(points={{90,-20},{90,-30}}, color={0,0,255})); 1309 1291 connect(earth.n,ground. p) 1310 annotation (Line(points={{ 1.83697e-015,-30},{0,-30},{0,-60}}, color={0,1292 annotation (Line(points={{-6.12323e-016,-50},{0,-50},{0,-60}}, color={0, 1311 1293 0,255})); 1312 1294 connect(electricalPowerSensorS.plug_nv, starS.plug_p) 1313 annotation (Line(points={{-80,0},{-80,- 50},{-90,-50}}, color={0,0,255}));1295 annotation (Line(points={{-80,0},{-80,-30},{-90,-30}}, color={0,0,255})); 1314 1296 connect(source.plug_p, electricalPowerSensorS.plug_p) 1315 annotation (Line(points={{-90, -20},{-90,10}}, color={0,0,255}));1297 annotation (Line(points={{-90,0},{-90,10}}, color={0,0,255})); 1316 1298 connect(electricalPowerSensorS.plug_ni, currentRMSsensorS.plug_p) 1317 1299 annotation (Line(points={{-70,10},{-60,10}}, color={0,0,255})); … … 1319 1301 annotation (Line(points={{60,10},{70,10}}, color={0,0,255})); 1320 1302 connect(electricalPowerSensorL.plug_ni, load.plug_p) 1321 annotation (Line(points={{90,10},{90, -20}}, color={0,0,255}));1303 annotation (Line(points={{90,10},{90,0}}, color={0,0,255})); 1322 1304 connect(currentRMSsensorS.plug_n, voltageRMSsensorS.plug_p) 1323 annotation (Line(points={{-40,10},{-40, -20}}, color={0,0,255}));1305 annotation (Line(points={{-40,10},{-40,0}}, color={0,0,255})); 1324 1306 connect(currentRMSsensorL.plug_p, voltageRMSsensorL.plug_p) 1325 annotation (Line(points={{40,10},{40, -20}}, color={0,0,255}));1307 annotation (Line(points={{40,10},{40,0}}, color={0,0,255})); 1326 1308 connect(electricalPowerSensorL.plug_nv, starL.plug_p) 1327 annotation (Line(points={{80,0},{80,- 50},{90,-50}}, color={0,0,255}));1309 annotation (Line(points={{80,0},{80,-30},{90,-30}}, color={0,0,255})); 1328 1310 connect(voltageRMSsensorS.plug_n, deltaS.plug_p) 1329 annotation (Line(points={{-40, 0},{-40,-40}}, color={0,0,255}));1311 annotation (Line(points={{-40,-20},{-40,-20}}, color={0,0,255})); 1330 1312 connect(deltaL.plug_p, voltageRMSsensorL.plug_n) 1331 annotation (Line(points={{40,- 40},{40,0}}, color={0,0,255}));1313 annotation (Line(points={{40,-20},{40,-20}}, color={0,0,255})); 1332 1314 connect(deltaS.plug_n, voltageRMSsensorS.plug_p) 1333 annotation (Line(points={{-40,- 20},{-50,-20},{-50,-20},{-40,-20}},1334 color={0,0,255}));1315 annotation (Line(points={{-40,-40},{-50,-40},{-50,0},{-40,0}}, color={0, 1316 0,255})); 1335 1317 connect(deltaL.plug_n, voltageRMSsensorL.plug_p) 1336 annotation (Line(points={{40,- 20},{50,-20},{50,-20},{40,-20}}, color={0,1337 0,255}));1318 annotation (Line(points={{40,-40},{50,-40},{50,0},{40,0}}, color={0,0, 1319 255})); 1338 1320 connect(currentRMSsensorS.plug_n, transformer.plug1) annotation (Line( 1339 1321 points={{-40,10},{-20,10}}, … … 5881 5863 rotation=0))); 5882 5864 annotation (Diagram(graphics), 5883 Icon(coordinateSystem(preserveAspectRatio=false, 5884 extent={{-100,-100},{100,100}}), graphics={ 5865 Icon(graphics={ 5885 5866 Ellipse(extent={{-90,60},{30,-60}}, lineColor={0,0,255}), 5886 5867 Ellipse(extent={{-30,60},{90,-60}}, lineColor={0,0,255}), … … 6070 6051 constant Integer m(final min=1) = 3 "Number of phases"; 6071 6052 Modelica.Blocks.Interfaces.RealOutput V 6072 annotation (Placement(transformation( 6073 extent={{10,-10},{-10,10}}, 6074 rotation=-90, 6075 origin={0,-110}))); 6053 annotation (Placement(transformation(extent={{10,-120},{-10,-100}}, 6054 rotation=-90))); 6076 6055 Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p(final m=m) 6077 6056 annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, … … 6093 6072 rotation=-90))); 6094 6073 annotation (Diagram(graphics), 6095 Icon(coordinateSystem(preserveAspectRatio=false, 6096 extent={{-100,-100},{100,100}}), graphics={ 6074 Icon(graphics={ 6097 6075 Ellipse( 6098 6076 extent={{-70,70},{70,-70}}, … … 6147 6125 constant Integer m(final min=1) = 3 "Number of phases"; 6148 6126 Modelica.Blocks.Interfaces.RealOutput I 6149 annotation (Placement(transformation( 6150 extent={{10,-10},{-10,10}}, 6151 rotation=-90, 6152 origin={0,-110}))); 6127 annotation (Placement(transformation(extent={{10,-120},{-10,-100}}, 6128 rotation=-90))); 6153 6129 Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p(final m=m) 6154 6130 annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, … … 6170 6146 rotation=-90))); 6171 6147 annotation (Diagram(graphics), 6172 Icon(coordinateSystem(preserveAspectRatio=false, 6173 extent={{-100,-100},{100,100}}), graphics={ 6148 Icon(graphics={ 6174 6149 Ellipse( 6175 6150 extent={{-70,70},{70,-70}}, … … 6224 6199 constant Integer m(final min=1) = 3 "Number of phases"; 6225 6200 Modelica.Blocks.Interfaces.RealOutput P 6226 annotation (Placement(transformation( 6227 extent={{-10,-10},{10,10}}, 6228 rotation=-90, 6229 origin={-50,110}))); 6201 annotation (Placement(transformation(extent={{-60,100},{-40,120}}, 6202 rotation=-90))); 6230 6203 Modelica.Blocks.Interfaces.RealOutput Q 6231 annotation (Placement(transformation( 6232 extent={{-10,-10},{10,10}}, 6233 rotation=-90, 6234 origin={50,110}))); 6204 annotation (Placement(transformation(extent={{40,100},{60,120}}, 6205 rotation=-90))); 6235 6206 Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p(final m=m) 6236 6207 annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, … … 6242 6213 annotation (Placement(transformation(extent={{-10,-110},{10,-90}}, 6243 6214 rotation=0))); 6244 annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ 6245 -100,-100},{100,100}}), graphics={ 6215 annotation (Icon(graphics={ 6246 6216 Ellipse( 6247 6217 extent={{-70,70},{70,-70}}, … … 7315 7285 "stator zero-sequence current"; 7316 7286 // to be defined in model that extends from this partial (since airgap isn't included here) 7317 output Modelica.SIunits.Current idq_ss[2] 7287 output Modelica.SIunits.Current idq_ss[2] = zeros(2) 7318 7288 "stator space phasor current / stator fixed frame"; 7319 output Modelica.SIunits.Current idq_sr[2](each stateSelect=StateSelect.prefer) 7289 output Modelica.SIunits.Current idq_sr[2](each stateSelect=StateSelect.prefer) = zeros(2) 7320 7290 "stator space phasor current / rotor fixed frame"; 7321 output Modelica.SIunits.Current idq_rs[2] 7291 output Modelica.SIunits.Current idq_rs[2] = zeros(2) 7322 7292 "rotor space phasor current / stator fixed frame"; 7323 output Modelica.SIunits.Current idq_rr[2](each stateSelect=StateSelect.prefer) 7293 output Modelica.SIunits.Current idq_rr[2](each stateSelect=StateSelect.prefer) = zeros(2) 7324 7294 "rotor space phasor current / rotor fixed frame"; 7325 7295 Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_sp(final m=m)
