首页 > 解决方案 > 在 Modelica.Electrical.Quasistationary 中绘制时间信号

问题描述

我正在尝试对平衡的 3 相星形连接(参见照片 1) 照片 1进行建模,我想得到这个模拟结果(参见照片 2)照片 2:R1.V,R2.V,R3.V。以下是一些使用foto 3的基本方程式。

我尝试了很多次都没有成功,有人可以检查并修复我的模型,以便我可以获得像 foto 2 一样的模拟结果吗?

model Unnamed
 parameter Integer m=3 "Number of phases";
     Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Star starS annotation (
     Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=180,
        origin={-22,70})));
  Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Ground groundS
    annotation (Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=0,
        origin={-56,18})));
 Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Resistor resistor(R_ref=
        fill(1000, 3))
    annotation (Placement(transformation(extent={{42,60},{62,80}})));
  Modelica.Electrical.QuasiStationary.MultiPhase.Sources.VoltageSource
    voltageSource1(m=m,
    f=50,
    V=fill(230,m),
    phi=-Modelica.Electrical.MultiPhase.Functions.symmetricOrientation(3))
    "{(-(j - 1))*2*Modelica.Constants.pi/(m) for j in 1/m}"
    annotation (Placement(transformation(extent={{28,60},{8,80}})));
     Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Star starS1
                                                                     annotation (
     Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=0,
        origin={82,70})));
equation 
  connect(groundS.pin, starS.pin_n)
    annotation (Line(points={{-56,28},{-36,28},{-36,70},{-32,70}},
                                                 color={85,170,255}));
  connect(starS.plug_p, voltageSource1.plug_n)
    annotation (Line(points={{-12,70},{8,70}}, color={85,170,255}));
  connect(voltageSource1.plug_p, resistor.plug_p)
    annotation (Line(points={{28,70},{42,70}}, color={85,170,255}));
  connect(resistor.plug_n, starS1.plug_p)
    annotation (Line(points={{62,70},{72,70}}, color={85,170,255}));
  connect(starS1.pin_n, groundS.pin) annotation (Line(points={{92,70},{92,26},{-56,
          26},{-56,28}}, color={85,170,255}));
  annotation (uses(Modelica(version="3.2.2")));
end Unnamed;

谢谢

标签: modelicadymola

解决方案


Modelica.Electrical.QuasiStationary软件包是基于相量的,因此绘制正弦信号似乎有点困难 - 至少我没有找到直接的方法......

因此:使用 QuasiStationary 包有什么特别的原因吗?Modelica.Electrical.MultiPhase在我看来,更明显的方法是使用。例如,这可能会导致流动代码,该代码从以下位置复制和修改Modelica.Electrical.MultiPhase.Examples.TransformerYY

model ResistorThreephase "Test example with multiphase components"
  extends Modelica.Icons.Example;
  parameter Integer m=3 "Number of phases";
  parameter Modelica.SIunits.Voltage V=230 "Amplitude of Star-Voltage";
  parameter Modelica.SIunits.Frequency f=50 "Frequency";
  parameter Modelica.SIunits.Resistance RL=1e3 "Load Resistance";

  Modelica.Electrical.MultiPhase.Sources.SineVoltage sineVoltage(
    V=fill(V, m),
    freqHz=fill(f, m),
    m=m) annotation (Placement(transformation(
        origin={-30,20},
        extent={{-10,-10},{10,10}},
        rotation=180)));
  Modelica.Electrical.MultiPhase.Basic.Star starS(m=m)
    annotation (Placement(transformation(
        origin={-70,20},
        extent={{-10,-10},{10,10}},
        rotation=180)));
  Modelica.Electrical.Analog.Basic.Ground groundS annotation (Placement(
        transformation(extent={{-100,-40},{-80,-20}})));
  Modelica.Electrical.MultiPhase.Basic.Resistor loadR(m=m, R=fill(RL, m))
    annotation (Placement(transformation(extent={{20,10},{40,30}})));
  Modelica.Electrical.MultiPhase.Basic.Star starL(m=m)
    annotation (Placement(transformation(
        origin={70,20},
        extent={{-10,-10},{10,10}},
        rotation=0)));

equation 
  connect(starS.pin_n, groundS.p)
    annotation (Line(points={{-80,20},{-90,20},{-90,-20}}, color={0,0,255}));
  connect(starS.plug_p, sineVoltage.plug_n)
    annotation (Line(points={{-60,20},{-40,20}}, color={0,0,255}));
  connect(loadR.plug_n, starL.plug_p)
    annotation (Line(points={{40,20},{60,20}}, color={0,0,255}));
  connect(sineVoltage.plug_p, loadR.plug_p) annotation (Line(points={{-20,20},{20,20}}, color={0,0,255}));
  connect(starL.pin_n, groundS.p) annotation (Line(points={{80,20},{90,20},{90,-20},{-90,-20}}, color={0,0,255}));

  annotation (
    experiment(StopTime=0.03, __Dymola_Algorithm="Dassl"),
    uses(Modelica(version="3.2.3")));
end ResistorThreephase;

推荐阅读