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
  • Index
  • » Users
  • » GustavoP
  • » Profile

Posts

Posts

I'm new at modelica language and I'm trying to start a simple simulation in which I try to control the peak current value of a three-phase motor, using
a variable gain. However, I am having simple problems with the connections, and I have not found any example of any simulation similar to mine. In this case, the block '' Ventrada '' is just a sum of steps that makes the gain output value variable. I'm using '' signal current '' with m = 3. The way I managed to make the connection causes a problem  ''more variables than equations''. How to make the connection between the output of the '' Ventrada '' block and the '' gain '' more appropriately, as well as the output of the '' gain '' and '' signalCurrent '' block, respecting the number of phases in the system ?


Code:

model Bancada_de_Motores_Teste_Controle_Corrente

constant Integer m=3 "Number of phases";
  Modelica.Electrical.Machines.BasicMachines.AsynchronousInductionMachines.AIM_SquirrelCage aimc(Js = 0.00045,Lm = 0.16, Lrsigma = 0.16, Rr = 87.44, Rs = 35.58, TrOperational = 303.15, TsOperational = 303.15, fsNominal = 60, p = 2, phiMechanical(fixed = true), wMechanical(fixed = true))  annotation(
    Placement(visible = true, transformation(origin = {-12, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Ground ground annotation(
    Placement(visible = true, transformation(origin = {-70, 78}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.MultiPhase.Basic.Star star annotation(
    Placement(visible = true, transformation(origin = {-42, 88}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
  Modelica.Electrical.Machines.Utilities.TerminalBox terminalBox(terminalConnection = "D")  annotation(
    Placement(visible = true, transformation(origin = {-12, 18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Machines.Sensors.CurrentQuasiRMSSensor currentRMSSensor annotation(
    Placement(visible = true, transformation(origin = {-12, 32}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Mechanics.Rotational.Sensors.SpeedSensor speedSensor annotation(
    Placement(visible = true, transformation(origin = {18, 28}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Ventrada ventrada annotation(
    Placement(visible = true, transformation(origin = {-82, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Math.Gain gain(k = 1 / 12)  annotation(
    Placement(visible = true, transformation(origin = {-50, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.MultiPhase.Sources.SignalCurrent signalCurrent annotation(
    Placement(visible = true, transformation(origin = {-12, 66}, extent = {{-10, 10}, {10, -10}}, rotation = -90)));
equation
  connect(star.pin_n, ground.p) annotation(
    Line(points = {{-52, 88}, {-70, 88}}, color = {0, 0, 255}));
  connect(terminalBox.plug_sp, aimc.plug_sp) annotation(
    Line(points = {{-6, 12}, {-6, 4}}, color = {0, 0, 255}));
  connect(terminalBox.plug_sn, aimc.plug_sn) annotation(
    Line(points = {{-18, 12}, {-18, 4}}, color = {0, 0, 255}));
  connect(currentRMSSensor.plug_p, terminalBox.plugSupply) annotation(
    Line(points = {{-12, 22}, {-12, 14}}, color = {0, 0, 255}));
  connect(aimc.flange, speedSensor.flange) annotation(
    Line(points = {{-2, -6}, {18, -6}, {18, 18}}));
  connect(signalCurrent.plug_p, star.plug_p) annotation(
    Line(points = {{-12, 76}, {-12, 82}, {-32, 82}, {-32, 88}}, color = {0, 0, 255}));
  connect(signalCurrent.plug_n, currentRMSSensor.plug_n) annotation(
    Line(points = {{-12, 56}, {-12, 42}}, color = {0, 0, 255}));
  connect(ventrada.y[1], gain.u) annotation(
    Line(points = {{-70, 50}, {-62, 50}, {-62, 50}, {-62, 50}}, color = {0, 0, 127}));
  connect(signalCurrent.i, gain.y) annotation(
    Line(points = {{-24, 66}, {-34, 66}, {-34, 50}, {-38, 50}, {-38, 50}}, color = {0, 0, 127}));
protected
  annotation(
    uses(Modelica(version = "3.2.3")));
end Bancada_de_Motores_Teste_Controle_Corrente;

  • Index
  • » Users
  • » GustavoP
  • » Profile
You are here: