Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Model of rectifier cannot be initialized

Model of rectifier cannot be initialized

Hi,
I wanted to simulate a 3 phase rectifier unit. In order to have a better overview I did not use the multiphase models. I use the standard electrial.analog parts to model the recitifer connected to a 3 phase grid, having a simple load. However, as soon as I added three inductor to the model, the model cannot be initialized or shows strange results.
Any ideas?

model CircuitWithL
Modelica.Electrical.Analog.Basic.Ground ground annotation(
    Placement(visible = true, transformation(origin = {-90, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Sources.SineVoltage u(V = 230 * sqrt(2), freqHz = 50) annotation(
    Placement(visible = true, transformation(origin = {-80, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
  Modelica.Electrical.Analog.Sources.SineVoltage v(V = 230 * sqrt(2), freqHz = 50, phase = 2.0944) annotation(
    Placement(visible = true, transformation(origin = {-80, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
  Modelica.Electrical.Analog.Sources.SineVoltage w(V = 230 * sqrt(2), freqHz = 50, phase = 4.18879) annotation(
    Placement(visible = true, transformation(origin = {-80, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D1 annotation(
    Placement(visible = true, transformation(origin = {0, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D2 annotation(
    Placement(visible = true, transformation(origin = {20, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D3 annotation(
    Placement(visible = true, transformation(origin = {40, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D4 annotation(
    Placement(visible = true, transformation(origin = {0, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D5 annotation(
    Placement(visible = true, transformation(origin = {20, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D6 annotation(
    Placement(visible = true, transformation(origin = {40, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Basic.Capacitor C(C = 1e-3) annotation(
    Placement(visible = true, transformation(origin = {62, 20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Electrical.Analog.Basic.Resistor resistor(R = 1e-2) annotation(
    Placement(visible = true, transformation(origin = {136, 20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Electrical.Analog.Basic.Inductor L1(L = 1e-5)  annotation(
    Placement(visible = true, transformation(origin = {-50, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Electrical.Analog.Basic.Inductor L2(L = 1e-5) annotation(
    Placement(visible = true, transformation(origin = {-50, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Electrical.Analog.Basic.Inductor L3(L = 1e-5) annotation(
    Placement(visible = true, transformation(origin = {-52, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
initial equation
  C.v = 580;
  L1.i=0;
  L2.i=-230 * sqrt(2)/2;
  L3.i=-230 * sqrt(2)/2;
equation
  connect(w.n, ground.p) annotation(
    Line(points = {{-90, -6}, {-90, -22}}, color = {0, 0, 255}));
  connect(w.n, v.n) annotation(
    Line(points = {{-90, -6}, {-90, 20}}, color = {0, 0, 255}));
  connect(v.n, u.n) annotation(
    Line(points = {{-90, 20}, {-90, 60}}, color = {0, 0, 255}));
  connect(D4.n, D1.p) annotation(
    Line(points = {{0, -20}, {0, -20}, {0, 60}, {0, 60}}, color = {0, 0, 255}));
  connect(D5.n, D2.p) annotation(
    Line(points = {{20, -20}, {20, -20}, {20, 60}, {20, 60}}, color = {0, 0, 255}));
  connect(D6.n, D3.p) annotation(
    Line(points = {{40, -20}, {40, -20}, {40, 60}, {40, 60}}, color = {0, 0, 255}));
  connect(D4.p, D5.p) annotation(
    Line(points = {{0, -40}, {20, -40}, {20, -40}, {20, -40}}, color = {0, 0, 255}));
  connect(D5.p, D6.p) annotation(
    Line(points = {{20, -40}, {40, -40}, {40, -40}, {40, -40}}, color = {0, 0, 255}));
  connect(D6.p, C.n) annotation(
    Line(points = {{40, -40}, {62, -40}, {62, 10}}, color = {0, 0, 255}));
  connect(D1.n, D2.n) annotation(
    Line(points = {{0, 80}, {20, 80}, {20, 80}, {20, 80}}, color = {0, 0, 255}));
  connect(D2.n, D3.n) annotation(
    Line(points = {{20, 80}, {40, 80}, {40, 80}, {40, 80}}, color = {0, 0, 255}));
  connect(D3.n, C.p) annotation(
    Line(points = {{40, 80}, {62, 80}, {62, 30}}, color = {0, 0, 255}));
connect(C.n, resistor.n) annotation(
    Line(points = {{62, 10}, {136, 10}}, color = {0, 0, 255}));
connect(C.p, resistor.p) annotation(
    Line(points = {{62, 30}, {136, 30}}, color = {0, 0, 255}));
connect(u.p, L1.p) annotation(
    Line(points = {{-70, 60}, {-60, 60}, {-60, 60}, {-60, 60}}, color = {0, 0, 255}));
connect(v.p, L2.p) annotation(
    Line(points = {{-70, 20}, {-60, 20}}, color = {0, 0, 255}));
connect(w.p, L3.p) annotation(
    Line(points = {{-70, -6}, {-62, -6}}, color = {0, 0, 255}));
connect(L1.n, D1.p) annotation(
    Line(points = {{-40, 60}, {0, 60}, {0, 60}, {0, 60}}, color = {0, 0, 255}));
connect(L2.n, D2.p) annotation(
    Line(points = {{-40, 20}, {20, 20}, {20, 60}, {20, 60}}, color = {0, 0, 255}));
connect(L3.n, D3.p) annotation(
    Line(points = {{-42, -6}, {40, -6}, {40, 60}, {40, 60}}, color = {0, 0, 255}));
  annotation(
    experiment(StartTime = 0, StopTime = 0.04, Tolerance = 1e-06, Interval = 4.004e-05));

end CircuitWithL;

Re: Model of rectifier cannot be initialized

i Tried your model and got a matrix singular error. Somtimes a numerical singular can be caused by the ground block. You could try to move your ground to other pin (like D6.p or resistor.n) and see if its works.

If i rememberd corretly, this happend to me once on some circuit and had to used two ground instead of one in order to make my model works.

hope it helps you debug your model

Cheers
A

There are 0 guests and 0 other users also viewing this topic
You are here: