Changeset 703

Show
Ignore:
Timestamp:
10/15/2007 09:30:26 PM (15 months ago)
Author:
AHaumer
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Modelica/trunk/Modelica/Electrical/Machines.mo

    r701 r703  
    11within Modelica.Electrical; 
     2 
    23 
    34package Machines "Library for electric machines"  
     
    12151216even though the source's or load's starpoint are grounded; you may use a reasonable high earthing resistance. 
    12161217</HTML>"), 
    1217         Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, 
    1218                 {100,100}}), graphics), 
     1218        Diagram(graphics), 
    12191219        experiment(StopTime=0.1), 
    12201220        experimentSetupOutput); 
    12211221      Modelica.Electrical.MultiPhase.Sources.SineVoltage source(freqHz=fill(50, 3), 
    12221222          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))); 
    12271225      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))); 
    12321228      Modelica.Electrical.Analog.Basic.Ground groundS  
    12331229        annotation (Placement(transformation(extent={{-100,-80},{-80,-60}},  
     
    12401236              rotation=0))); 
    12411237      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))); 
    12461240      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))); 
    12511243      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))); 
    12561246      Modelica.Electrical.Analog.Basic.Ground ground  
    12571247        annotation (Placement(transformation(extent={{-10,-80},{10,-60}},  
    12581248              rotation=0))); 
    12591249      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))); 
    12641252      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))); 
    12691255      Sensors.CurrentRMSsensor currentRMSsensorL  
    12701256        annotation (Placement(transformation(extent={{40,20},{60,0}}, rotation= 
     
    12741260                0))); 
    12751261      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))); 
    12801264      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))); 
    12851267      Modelica.Electrical.Analog.Basic.Ground groundL  
    12861268        annotation (Placement(transformation(extent={{80,-80},{100,-60}},  
     
    13001282    equation  
    13011283      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})); 
    13031285      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})); 
    13051287      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})); 
    13071289      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})); 
    13091291      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, 
    13111293              0,255})); 
    13121294      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})); 
    13141296      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})); 
    13161298      connect(electricalPowerSensorS.plug_ni, currentRMSsensorS.plug_p)  
    13171299        annotation (Line(points={{-70,10},{-60,10}}, color={0,0,255})); 
     
    13191301        annotation (Line(points={{60,10},{70,10}}, color={0,0,255})); 
    13201302      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})); 
    13221304      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})); 
    13241306      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})); 
    13261308      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})); 
    13281310      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})); 
    13301312      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})); 
    13321314      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})); 
    13351317      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})); 
    13381320      connect(currentRMSsensorS.plug_n, transformer.plug1) annotation (Line( 
    13391321          points={{-40,10},{-20,10}},  
     
    58815863                rotation=0))); 
    58825864        annotation (Diagram(graphics), 
    5883                              Icon(coordinateSystem(preserveAspectRatio=false,  
    5884                 extent={{-100,-100},{100,100}}), graphics={ 
     5865                             Icon(graphics={ 
    58855866              Ellipse(extent={{-90,60},{30,-60}}, lineColor={0,0,255}),  
    58865867              Ellipse(extent={{-30,60},{90,-60}}, lineColor={0,0,255}),  
     
    60706051      constant Integer m(final min=1) = 3 "Number of phases"; 
    60716052      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))); 
    60766055      Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p(final m=m)  
    60776056        annotation (Placement(transformation(extent={{-110,-10},{-90,10}},  
     
    60936072              rotation=-90))); 
    60946073      annotation (Diagram(graphics), 
    6095                            Icon(coordinateSystem(preserveAspectRatio=false,  
    6096               extent={{-100,-100},{100,100}}), graphics={ 
     6074                           Icon(graphics={ 
    60976075            Ellipse( 
    60986076              extent={{-70,70},{70,-70}},  
     
    61476125      constant Integer m(final min=1) = 3 "Number of phases"; 
    61486126      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))); 
    61536129      Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p(final m=m)  
    61546130        annotation (Placement(transformation(extent={{-110,-10},{-90,10}},  
     
    61706146              rotation=-90))); 
    61716147      annotation (Diagram(graphics), 
    6172                            Icon(coordinateSystem(preserveAspectRatio=false,  
    6173               extent={{-100,-100},{100,100}}), graphics={ 
     6148                           Icon(graphics={ 
    61746149            Ellipse( 
    61756150              extent={{-70,70},{70,-70}},  
     
    62246199      constant Integer m(final min=1) = 3 "Number of phases"; 
    62256200      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))); 
    62306203      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))); 
    62356206      Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p(final m=m)  
    62366207        annotation (Placement(transformation(extent={{-110,-10},{-90,10}},  
     
    62426213        annotation (Placement(transformation(extent={{-10,-110},{10,-90}},  
    62436214              rotation=0))); 
    6244       annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ 
    6245                 -100,-100},{100,100}}), graphics={ 
     6215      annotation (Icon(graphics={ 
    62466216            Ellipse( 
    62476217              extent={{-70,70},{70,-70}},  
     
    73157285        "stator zero-sequence current"; 
    73167286    // 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)  
    73187288        "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)  
    73207290        "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)  
    73227292        "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)  
    73247294        "rotor space phasor current / rotor fixed frame"; 
    73257295      Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_sp(final m=m)