Ticket #4535: QuickRInverterSingle.mo

File QuickRInverterSingle.mo, 3.6 KB (added by Pierre Haessig <pierre.haessig@…>, 7 years ago)

model to reproduce the singularity issue

Line 
1model QuickRInverterSingle "single phase: singularity when ground between inductors"
2 import Modelica.SIunits.{Frequency,Voltage,Resistance,Inductance};
3 parameter Frequency f_grid = 50 "grid frequency";
4 parameter Voltage Vg = 230 * sqrt(2) "Grid amplitude voltage";
5 parameter Resistance Rf = 100e-3 "filter resistance";
6 parameter Inductance Lf = 0.2 "filter inductance";
7 Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage1(V = 100) annotation(
8 Placement(visible = true, transformation(origin = {-80, -10}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
9 Modelica.Electrical.Analog.Basic.Inductor Lfa(L = Lf) annotation(
10 Placement(visible = true, transformation(origin = {36, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
11 Modelica.Electrical.Analog.Basic.Ground neutral annotation(
12 Placement(visible = true, transformation(origin = {84, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
13 Modelica.Electrical.Analog.Basic.Inductor Lfb(L = Lf) annotation(
14 Placement(visible = true, transformation(origin = {36, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
15 Modelica.Electrical.Analog.Basic.Resistor R1(R = 1e5) annotation(
16 Placement(visible = true, transformation(origin = {-40, 30}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
17 Modelica.Electrical.Analog.Basic.Resistor R2(R = 1e5) annotation(
18 Placement(visible = true, transformation(origin = {-40, -30}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
19 Modelica.Electrical.Analog.Basic.Resistor R3(R = 1e5) annotation(
20 Placement(visible = true, transformation(origin = {0, 30}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
21 Modelica.Electrical.Analog.Basic.Resistor R4(R = 1e5) annotation(
22 Placement(visible = true, transformation(origin = {0, -30}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
23equation
24 connect(neutral.p, Lfa.n) annotation(
25 Line(points = {{74, 0}, {60, 0}, {60, 10}, {46, 10}, {46, 10}, {46, 10}}, color = {0, 0, 255}));
26 connect(Lfb.p, R3.n) annotation(
27 Line(points = {{26, -10}, {0, -10}, {0, 20}, {0, 20}}, color = {0, 0, 255}));
28 connect(Lfa.p, R1.n) annotation(
29 Line(points = {{26, 10}, {-40, 10}, {-40, 20}, {-40, 20}}, color = {0, 0, 255}));
30 connect(R3.n, R4.p) annotation(
31 Line(points = {{0, 20}, {0, 20}, {0, -20}, {0, -20}}, color = {0, 0, 255}));
32 connect(R1.n, R2.p) annotation(
33 Line(points = {{-40, 20}, {-40, 20}, {-40, -20}, {-40, -20}}, color = {0, 0, 255}));
34 connect(R2.n, constantVoltage1.n) annotation(
35 Line(points = {{-40, -40}, {-40, -40}, {-40, -60}, {-80, -60}, {-80, -20}, {-80, -20}}, color = {0, 0, 255}));
36 connect(constantVoltage1.n, R4.n) annotation(
37 Line(points = {{-80, -20}, {-80, -20}, {-80, -60}, {0, -60}, {0, -40}, {0, -40}}, color = {0, 0, 255}));
38 connect(R1.p, constantVoltage1.p) annotation(
39 Line(points = {{-40, 40}, {-40, 40}, {-40, 50}, {-80, 50}, {-80, 0}, {-80, 0}}, color = {0, 0, 255}));
40 connect(constantVoltage1.p, R3.p) annotation(
41 Line(points = {{-80, 0}, {-80, 0}, {-80, 50}, {0, 50}, {0, 40}, {0, 40}}, color = {0, 0, 255}));
42 connect(Lfb.n, Lfa.n) annotation(
43 Line(points = {{46, -10}, {60, -10}, {60, 10}, {46, 10}}, color = {0, 0, 255}));
44 annotation(
45 Diagram(coordinateSystem(extent = {{-100, -100}, {150, 100}}, initialScale = 0.1), graphics = {Text(origin = {23, 83}, extent = {{-113, 9}, {113, -9}}, textString = "singularity for R1.p.v
46 when ground is placed between the two inductors")}),
47 Icon(coordinateSystem(extent = {{-100, -100}, {150, 100}})),
48 __OpenModelica_commandLineOptions = "",
49 uses(Modelica(version = "3.2.2")));
50end QuickRInverterSingle;