Skip to content

Resolves the problems with zero system (#4654) #4656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
within Modelica.Electrical.Machines.BasicMachines.Components;
model ZeroImpedance "Zero system impedance"
extends Analog.Interfaces.OnePort(i(start=0));
parameter SI.Inductance L "Inductance";
parameter Boolean useZeroSystem=true "= true, if zero current is explicitely computed" annotation(Evaluate = true);
equation
if useZeroSystem then
v = L*der(i);
else
i = 0;
end if;

annotation (Icon(graphics={
Line(points={{-90,0},{-60,0}}, color={0,0,255}),
Line(points={{62,0},{90,0}}, color={0,0,255}),
Ellipse(extent={{-50,30},{-8,-32}}, lineColor={0,0,255}),
Ellipse(extent={{-20,30},{22,-32}}, lineColor={0,0,255}),
Ellipse(extent={{10,30},{52,-32}}, lineColor={0,0,255}),
Text(
extent={{-150,50},{150,90}},
textString="%name",
textColor={0,0,255}),
Rectangle(extent={{-60,30},{-50,-32}}, lineColor={28,108,200}),
Rectangle(extent={{52,30},{62,-32}}, lineColor={28,108,200})}),
Documentation(info="<html>
<p>
For a short explanation of the zero system see <a href=\"modelica://Modelica.Magnetic.FundamentalWave.UsersGuide.ZeroSystem\">the User&apos;s Guide of the FundamentalWave library</a>.
</p>
</html>"));
end ZeroImpedance;
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PartialAirGap
AirGapS
AirGapR
ZeroImpedance
Inductor
SquirrelCage
DamperCage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ model IMC_YD
Machines.BasicMachines.InductionMachines.IM_SquirrelCage aimc(
p=aimcData.p,
fsNominal=aimcData.fsNominal,
useZeroSystem=false,
Rs=aimcData.Rs,
TsRef=aimcData.TsRef,
alpha20s(displayUnit="1/K") = aimcData.alpha20s,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ partial model PartialBasicInductionMachine
parameter Integer p(min=1, start=2) "Number of pole pairs (Integer)";
parameter SI.Frequency fsNominal(start=50)
"Nominal frequency";
parameter Boolean useZeroSystem=true "= true, if zero current is explicitely computed"
annotation(Evaluate=true);
parameter SI.Temperature TsOperational(start=293.15)
"Operational temperature of stator resistance" annotation (Dialog(group=
"Operational temperatures", enable=not useThermalPort));
Expand Down Expand Up @@ -81,7 +83,8 @@ partial model PartialBasicInductionMachine
extent={{-10,-10},{10,10}},
rotation=270,
origin={20,20})));
Modelica.Electrical.Analog.Basic.Inductor lszero(final L=Lszero)
BasicMachines.Components.ZeroImpedance lszero(final L=Lszero, final
useZeroSystem=useZeroSystem)
annotation (Placement(transformation(extent={{0,40},{-20,60}})));
Machines.Losses.InductionMachines.Core statorCore(
final coreParameters=statorCoreParameters,
Expand Down
3 changes: 2 additions & 1 deletion Modelica/Electrical/Machines/UsersGuide/Concept.mo
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class Concept "Concept"
<li>constant parameters, i.e., no saturation, no skin effect</li>
</ul>
<p>
You may have a look at a short summary of space phasor theory at <a href=\"https://www.haumer.at/refimg/SpacePhasors.pdf\">https://www.haumer.at/refimg/SpacePhasors.pdf</a>
You may have a look at a short summary of space phasor theory at <a href=\"https://www.haumer.at/refimg/SpacePhasors.pdf\">https://www.haumer.at/refimg/SpacePhasors.pdf</a><br>
For a short explanation of the zero system see <a href=\"modelica://Modelica.Magnetic.FundamentalWave.UsersGuide.ZeroSystem\">the User&apos;s Guide of the FundamentalWave library</a>.
</p>
<strong>Further development:</strong>
<ul>
Expand Down
12 changes: 10 additions & 2 deletions Modelica/Electrical/Polyphase/Basic/ZeroInductor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ within Modelica.Electrical.Polyphase.Basic;
model ZeroInductor "Linear zero sequence inductor"
extends Polyphase.Interfaces.OnePort;
parameter SI.Inductance Lzero "Zero sequence inductance";
parameter Boolean useZeroSystem=true "= true, if zero current is explicitely computed" annotation(Evaluate = true);
SI.Current i0;
SI.Voltage v0;
equation
m*i0 = sum(i);
v0 = Lzero*der(i0);
if useZeroSystem then
v0 = Lzero*der(i0);
else
i0 = 0;
end if;
v = fill(v0, m);
annotation (defaultComponentName="inductor", Documentation(info="<html>
<p>
Model of a polyphase zero sequence inductor.
For a short explanation of the zero system see <a href=\"modelica://Modelica.Magnetic.FundamentalWave.UsersGuide.ZeroSystem\">the User&apos;s Guide of the FundamentalWave library</a>.
</p>
<h4>Implementation</h4>
<blockquote><pre>
Expand All @@ -30,5 +36,7 @@ v = Lzero*sum(der(i)) = Lzero*der(sum(i))
textColor={0,0,255}),
Text(
extent={{-150,-80},{150,-40}},
textString="m=%m")}));
textString="m=%m"),
Rectangle(extent={{-60,30},{-50,-32}}, lineColor={28,108,200}),
Rectangle(extent={{52,30},{62,-32}}, lineColor={28,108,200})}));
end ZeroInductor;
3 changes: 3 additions & 0 deletions Modelica/Magnetic/FundamentalWave/BaseClasses/Machine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ partial model Machine "Base model of machines"
parameter Integer p(min=1, start=2) "Number of pole pairs (Integer)";
parameter SI.Frequency fsNominal(start=50)
"Nominal frequency";
parameter Boolean useZeroSystem=true "= true, if zero current is explicitely computed"
annotation(Evaluate=true);
parameter SI.Temperature TsOperational(start=293.15)
"Operational temperature of stator resistance" annotation (Dialog(group=
"Operational temperatures", enable=not useThermalPort));
Expand Down Expand Up @@ -116,6 +118,7 @@ partial model Machine "Base model of machines"
final TRef=TsRef,
final Lsigma=Lssigma,
final ratioCommonLeakage=ratioCommonStatorLeakage,
final useZeroSystem=useZeroSystem,
final effectiveTurns=effectiveStatorTurns,
final TOperational=TsOperational,
final GcRef=statorCoreParameters.GcRef,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ model SymmetricPolyphaseWinding
parameter Real ratioCommonLeakage(final min=0, final max=1)=1
"Ratio of common stray inductance / total stray inductance";
parameter SI.Inductance Lzero "Zero sequence inductance of winding";
parameter Boolean useZeroSystem=true "= true, if zero current is explicitely computed";
parameter Real effectiveTurns=1 "Effective number of turns per phase";
parameter SI.Conductance GcRef "Electrical reference core loss reluctance";
final parameter Integer nBase=Modelica.Electrical.Polyphase.Functions.numberOfSymmetricBaseSystems(m)
Expand Down Expand Up @@ -76,7 +77,8 @@ model SymmetricPolyphaseWinding
final Lsigma=(1 - ratioCommonLeakage)*Lsigma)
"Symmetric winding"
annotation (Placement(transformation(extent={{-10,-20},{10,0}})));
Modelica.Electrical.Polyphase.Basic.ZeroInductor zeroInductor(final m=m, final Lzero=Lzero)
Modelica.Electrical.Polyphase.Basic.ZeroInductor zeroInductor(final m=m, final Lzero=Lzero,
final useZeroSystem=useZeroSystem)
if mBase<>2 "Zero sequence inductance of winding"
annotation (Placement(transformation(
origin={-70,-30},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ model IMC_YD
Magnetic.FundamentalWave.BasicMachines.InductionMachines.IM_SquirrelCage aimc(
p=aimcData.p,
fsNominal=aimcData.fsNominal,
useZeroSystem=false,
TsRef=aimcData.TsRef,
alpha20s(displayUnit="1/K") = aimcData.alpha20s,
Jr=aimcData.Jr,
Expand All @@ -37,8 +38,7 @@ model IMC_YD
TsOperational=293.15,
effectiveStatorTurns=aimcData.effectiveStatorTurns,
alpha20r=aimcData.alpha20r,
TrOperational=293.15,
stator(zeroInductor(i0(nominal=10))))
TrOperational=293.15)
annotation (Placement(transformation(extent={{20,10},{40,30}})));
Modelica.Electrical.Machines.Sensors.CurrentQuasiRMSSensor currentQuasiRMSSensor
annotation (Placement(transformation(
Expand Down
27 changes: 27 additions & 0 deletions Modelica/Magnetic/FundamentalWave/UsersGuide/ZeroSystem.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
within Modelica.Magnetic.FundamentalWave.UsersGuide;
class ZeroSystem "Explanation of the zero system"
extends Modelica.Icons.Information;
annotation (Documentation(info="<html>
<p>
The polyphase winding relates the currents to the magnetic potential phasor of the fundamental wave and the derivative of the magnetic flux phasor of the fundamental wave to the voltages,
taking the orientation of the phases into account. However, for the number of phases <code>m &gt; 2</code> the zero sequence system has to be treated with care.
This happens in the zero inductance:
</p>
<p>
<code>i0 = sum(i)/m;</code><br>
<code>v0 = Lzero*der(i0);</code><br>
<code>v0</code> is included in all phases with the same phase shift.
</p>
<p>
This is equivalent to the zero inductor used in the
<a href=\"modelica://Modelica.Electrical.Machines.Interfaces.PartialBasicInductionMachine\">machine model of <code>Modelica.Electrical.Machines</code></a> after applying
space phasor transformation.
</p>
<p>
In some cases it could be desired to suppress the calculation of the zero system. This can be done in both machine models (<code>Modelica.Magnetic.FundamentalWave</code> and
<code>Modelica.Electrical.Machines</code>) by setting the Boolean parameter <code>useZeroSystem = false</code> (which by default is <code>true</code>).
This ensures that the zero current is equal to zero and there is no need to calculate it:<br>
<code>i0 = 0;</code>
</p>
</html>"));
end ZeroSystem;
1 change: 1 addition & 0 deletions Modelica/Magnetic/FundamentalWave/UsersGuide/package.order
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Concept
Polyphase
WindingModel
ZeroSystem
Parameters
Contact
ReleaseNotes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ model IMC_YD "Induction machine with squirrel cage starting Y-D"
Magnetic.FundamentalWave.BasicMachines.InductionMachines.IM_SquirrelCage imc(
p=imcData.p,
fsNominal=imcData.fsNominal,
useZeroSystem=false,
TsRef=imcData.TsRef,
alpha20s(displayUnit="1/K") = imcData.alpha20s,
Jr=imcData.Jr,
Expand All @@ -98,8 +99,7 @@ model IMC_YD "Induction machine with squirrel cage starting Y-D"
TsOperational=293.15,
effectiveStatorTurns=imcData.effectiveStatorTurns,
alpha20r=imcData.alpha20r,
TrOperational=293.15,
stator(zeroInductor(i0(nominal=10))))
TrOperational=293.15)
annotation (Placement(transformation(extent={{20,-90},{40,-70}})));
Modelica.Electrical.Machines.Sensors.CurrentQuasiRMSSensor
currentQuasiRMSSensor annotation (Placement(transformation(extent={{-10,10},{10,-10}}, rotation=270,
Expand Down