2

DCDC コンバーターの非常に単純なモデルを書きたいと思います。何らかの理由で、Dymola は、「モデルのポーズが適切ではなく」、Real 要素に対して過大評価されていると私に言いました。

それは非常に単純な問題かもしれませんが、私には見えません!

これが私のコードです:

model DCDC

  extends Modelica.Electrical.Analog.Interfaces.TwoPort;

  parameter Real demandedVoltage;

  Modelica.Electrical.Analog.Sensors.VoltageSensor sekVolt annotation (
      Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=270,
        origin={80,0})));
  Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor annotation (
      Placement(transformation(
        extent={{-10,10},{10,-10}},
        rotation=270,
        origin={-50,-30})));
  Modelica.Electrical.Analog.Sources.SignalCurrent signalCurrent annotation (
      Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=270,
        origin={-50,30})));
  Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage(V=
        vehicleVoltage)
    annotation (Placement(transformation(
        extent={{-10,10},{10,-10}},
        rotation=270,
        origin={50,30})));
  Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor1 annotation (
      Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=270,
        origin={50,-30})));
  Modelica.Blocks.Math.Division division
    annotation (Placement(transformation(extent={{6,22},{-10,38}})));
  Modelica.Blocks.Math.Product product
    annotation (Placement(transformation(extent={{8,-8},{-8,8}},
        rotation=270,
        origin={30,8})));
  Modelica.Blocks.Math.Gain gain(k=-1)
    annotation (Placement(transformation(extent={{-20,22},{-36,38}})));
  Modelica.Electrical.Analog.Sensors.VoltageSensor primVolt
                                                           annotation (
      Placement(transformation(
        extent={{-10,10},{10,-10}},
        rotation=270,
        origin={-80,0})));
equation 

  connect(currentSensor.p, signalCurrent.n) annotation (Line(
      points={{-50,-20},{-50,20}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(constantVoltage.n, currentSensor1.p) annotation (Line(
      points={{50,20},{50,-20}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(signalCurrent.p, p1) annotation (Line(
      points={{-50,40},{-50,50},{-100,50}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(currentSensor.n, n1) annotation (Line(
      points={{-50,-40},{-50,-50},{-100,-50}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(constantVoltage.p, p2) annotation (Line(
      points={{50,40},{50,50},{100,50}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(currentSensor1.n, n2) annotation (Line(
      points={{50,-40},{50,-50},{100,-50}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(primVolt.n, n1) annotation (Line(
      points={{-80,-10},{-80,-50},{-100,-50}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(primVolt.p, p1) annotation (Line(
      points={{-80,10},{-80,50},{-100,50}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(sekVolt.p, p2) annotation (Line(
      points={{80,10},{80,50},{100,50}},
      color={0,0,255},
      smooth=Smooth.None));
  connect(sekVolt.n, n2) annotation (Line(
      points={{80,-10},{80,-50},{100,-50}},
      color={0,0,255},
      smooth=Smooth.None));

  connect(gain.y, signalCurrent.i) annotation (Line(
      points={{-36.8,30},{-43,30}},
      color={0,0,127},
      smooth=Smooth.None));
  connect(division.y, gain.u) annotation (Line(
      points={{-10.8,30},{-18.4,30}},
      color={0,0,127},
      smooth=Smooth.None));
  connect(currentSensor1.i, product.u2) annotation (Line(
      points={{40,-30},{25.2,-30},{25.2,-1.6}},
      color={0,0,127},
      smooth=Smooth.None));
  connect(sekVolt.v, product.u1) annotation (Line(
      points={{70,0},{62,0},{62,-10},{34.8,-10},{34.8,-1.6}},
      color={0,0,127},
      smooth=Smooth.None));
  connect(product.y, division.u1) annotation (Line(
      points={{30,16.8},{30,34.8},{7.6,34.8}},
      color={0,0,127},
      smooth=Smooth.None));
  connect(primVolt.v, division.u2) annotation (Line(
      points={{-70,0},{14,0},{14,20},{14,20},{14,25.2},{7.6,25.2}},
      color={0,0,127},
      smooth=Smooth.None));
  annotation (
      Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,
            100}}), graphics), Icon(coordinateSystem(preserveAspectRatio=false,
          extent={{-100,-100},{100,100}}), graphics={
        Rectangle(
          extent={{-100,100},{100,-100}},
          lineColor={0,0,127},
          lineThickness=0.5,
          fillPattern=FillPattern.Solid,
          fillColor={215,215,215}),
        Line(
          points={{-100,100}},
          color={0,0,255},
          smooth=Smooth.None),
        Line(
          points={{-100,100},{-100,-100},{100,-100},{100,100},{-100,100}},
          color={0,0,127},
          thickness=0.5,
          smooth=Smooth.None),
        Line(
          points={{-100,-100},{100,100}},
          color={0,0,127},
          thickness=0.5,
          smooth=Smooth.None),
        Text(
          extent={{-60,80},{0,20}},
          lineColor={0,0,0},
          lineThickness=0.5,
          textString="DC"),
        Text(
          extent={{0,-20},{60,-80}},
          lineColor={0,0,0},
          lineThickness=0.5,
          textString="DC")}));
end DCDC;

うまくいけば、誰かがここで私の問題を理解してくれるかもしれません。前もって感謝します!

編集:答えの後、ハイブリッド(エネルギー/電源)供給用のコンバーターが必要なので、モデルを少し変更することにしました。結果のコンバーターは、次のコードで与えられます。

model DCDC2 "Component with two electrical ports, including current"

Real v_energy "Voltage drop over the energy port";
Real v_power "Voltage drop over the power port";
Real v_output "Voltage drop over the output port";
Real i_energy "Current flowing from pos. to neg. pin of the energy port";
Real i_power "Current flowing from pos. to neg. pin of the power port";
Real i_output "Current flowing from pos. to neg. pin of the output port";
Real p_energy;
Real p_power;
Real p_output;

parameter Real demandedVoltage;
parameter Real efficiency = 1;

Modelica.Electrical.Analog.Interfaces.PositivePin pinP_Energy
annotation (Placement(transformation(extent={{-110,50},{-90,70}})));
Modelica.Electrical.Analog.Interfaces.NegativePin pinN_Energy
annotation (Placement(transformation(extent={{-110,-70},{-90,-50}})));
Modelica.Electrical.Analog.Interfaces.PositivePin pinP_Power
annotation (Placement(transformation(extent={{90,50},{110,70}})));
Modelica.Electrical.Analog.Interfaces.NegativePin pinN_Power
annotation (Placement(transformation(extent={{90,-70},{110,-50}})));
Modelica.Electrical.Analog.Interfaces.PositivePin pinP_Output
annotation (Placement(transformation(extent={{-20,80},{20,120}})));
Modelica.Electrical.Analog.Interfaces.NegativePin pinN_Output
annotation (Placement(transformation(extent={{-20,-120},{20,-80}})));

equation 
  v_energy = pinP_Energy.v - pinN_Energy.v;
  v_power = pinP_Power.v - pinN_Power.v;
  v_output = pinP_Output.v - pinN_Output.v;

  0 = pinP_Energy.i + pinN_Energy.i;
  0 = pinP_Power.i + pinN_Power.i;
  0 = pinP_Output.i + pinN_Output.i;

  i_energy = pinP_Energy.i;
  i_power = pinP_Power.i;
  i_output = pinP_Output.i;

  p_energy = v_energy * i_energy;
  p_power = v_power * i_power;
  p_output = v_output * i_output;

  p_output = efficiency*(p_energy + p_power);
  i_output = i_energy + i_power;
  v_output = demandedVoltage;

  annotation (
  Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-   100},{100,
        100}}), graphics), Icon(coordinateSystem(preserveAspectRatio=false,
      extent={{-100,-100},{100,100}}), graphics={
    Rectangle(
      extent={{-100,100},{100,-100}},
      lineColor={0,0,127},
      lineThickness=0.5,
      fillPattern=FillPattern.Solid,
      fillColor={215,215,215}),
    Line(
      points={{-100,100}},
      color={0,0,255},
      smooth=Smooth.None),
    Line(
      points={{-100,100},{-100,-100},{100,-100},{100,100},{-100,100}},
      color={0,0,127},
      thickness=0.5,
      smooth=Smooth.None),
    Text(
      extent={{-68,60},{70,-66}},
      lineColor={0,0,0},
      textString="Hybrid
  DC
   Converter")}));
   end DCDC2;

2 つの単純な定電流源と 1 つの定電流負荷を使用してコンバーターをテストすると、再び特異点エラーが発生します。Dymola 2015 は、決定できない根拠がある可能性があることを教えてくれますが、そうであってはなりません。

model test2

Modelica_EnergyStorages.Sources.Loads.BooleanConstantCurrent
booleanConstantCurrent(I=40)
annotation (Placement(transformation(extent={{46,0},{26,20}})));
Modelica.Electrical.Analog.Basic.Ground ground
annotation (Placement(transformation(extent={{-84,-40},{-64,-20}})));
Modelica.Blocks.Sources.BooleanConstant booleanConstant
annotation (Placement(transformation(extent={{66,0},{46,20}})));
Modelica.Electrical.Analog.Basic.Ground ground1
annotation (Placement(transformation(extent={{26,-86},{46,-66}})));
ElectricalEnergyStorageSystem.Components.DCDC2 dCDC2_1(efficiency=1,
  demandedVoltage=15)
annotation (Placement(transformation(extent={{-44,0},{-24,20}})));
Modelica.Electrical.Analog.Sources.ConstantCurrent constantCurrent(I=5) 
annotation (Placement(transformation(
    extent={{-10,-10},{10,10}},
    rotation=270,
    origin={-74,10})));
Modelica.Electrical.Analog.Sources.ConstantCurrent   constantCurrent1(I=15) 
annotation (Placement(transformation(
    extent={{-10,-10},{10,10}},
    rotation=270,
    origin={6,10})));
Modelica.Electrical.Analog.Basic.Ground ground2
annotation (Placement(transformation(extent={{-4,-40},{16,-20}})));
equation 
connect(booleanConstantCurrent.on, booleanConstant.y) annotation (Line(
  points={{45,10},{45,10}},
  color={255,0,255},
  smooth=Smooth.None));
connect(booleanConstantCurrent.pin_n, ground1.p) annotation (Line(
  points={{36,0},{36,-66}},
  color={0,0,255},
  smooth=Smooth.None));
connect(dCDC2_1.pinP_Output, booleanConstantCurrent.pin_p) annotation (Line(
  points={{-34,20},{-34,76},{36,76},{36,20}},
  color={0,0,255},
  smooth=Smooth.None));
connect(booleanConstantCurrent.pin_n, dCDC2_1.pinN_Output) annotation (Line(
  points={{36,0},{36,-54},{-34,-54},{-34,0}},
  color={0,0,255},
  smooth=Smooth.None));
connect(constantCurrent1.p, dCDC2_1.pinP_Power) annotation (Line(
  points={{6,20},{-24,20},{-24,16}},
  color={0,0,255},
  smooth=Smooth.None));
connect(constantCurrent1.n, dCDC2_1.pinN_Power) annotation (Line(
  points={{6,0},{-24,0},{-24,4}},
  color={0,0,255},
  smooth=Smooth.None));
connect(constantCurrent.p, dCDC2_1.pinP_Energy) annotation (Line(
  points={{-74,20},{-44,20},{-44,16}},
  color={0,0,255},
  smooth=Smooth.None));
connect(constantCurrent.n, dCDC2_1.pinN_Energy) annotation (Line(
  points={{-74,0},{-44,0},{-44,4}},
  color={0,0,255},
  smooth=Smooth.None));
connect(constantCurrent1.n, ground2.p) annotation (Line(
  points={{6,0},{6,-20}},
  color={0,0,255},
  smooth=Smooth.None));
connect(ground.p, constantCurrent.n) annotation (Line(
  points={{-74,-20},{-74,0}},
  color={0,0,255},
  smooth=Smooth.None));
annotation (uses(
  Modelica_EnergyStorages(version="3.2.1"),
  Modelica(version="3.2.1"),
  Buildings(version="2.0.0")),    Diagram(coordinateSystem(preserveAspectRatio
      =false, extent={{-100,-100},{100,100}}), graphics));
end test2;

コードは次のモデルになります。(定電流負荷は Modelica_EnergyStorages ライブラリからのものです)

ここに画像の説明を入力

あなたが何とかその問題で私を助けてくれることを願っています! 前もって感謝します!

4

1 に答える 1

3

唯一の小さな問題は、宣言しdemandedVoltageたのに を使用していることですvehicleVoltage。モデルに他に問題はありません。

注:質問にテスト用の最小限のトップモデルを含めることをお勧めします。

TestDCDCSimulationX 3.6.5で、コンデンサを電源として、抵抗を負荷として使用して、トップモデルでモデルをテストしました。

次の図は、テスト モデルの概略図を示しています。

テストモデルの概略図

SimulationX で得られた結果を次の図に示します。

ここに画像の説明を入力

また、SimulationX によって生成された方程式系も確認しました。それはうまく見えます。

Dymola 2015 は、方程式よりも 2 つの変数が多いという誤ったエラー メッセージを生成します。このモデルのバグ レポートを Dymola のプロデューサーに発行する必要があります。Modelica モデルのシンボリック解析は非常に複雑であり、そのような問題が発生する可能性があることに注意してください。この場合、通常、ツールの管理者はバグレポートに感謝します。

解決策の説明: DCDC コンバーターは、コンデンサーから の一定電力を要求P=100Wし、コンデンサーの初期電圧は ですcapacitor1.v.start=10 V。これにより、次のエネルギー時間信号が得られます。

W = C/2*(v.start)^2-P*time = 50Ws - 100W*time

コンデンサ電圧信号は次のようになります。

capacitor1.v = 2*sqrt(W)/C = 2V/As * sqrt(50Ws-100Ws*time)

time = 0.5sコンデンサは空で、電流は発散します。SimulationX は time=0.5 でエラー メッセージを表示して正しく停止します。

結果を再現するための完全なモデル:

model TestDCDC
    model DCDC
        extends Modelica.Electrical.Analog.Interfaces.TwoPort;
        parameter Real demandedVoltage;
        Modelica.Electrical.Analog.Sensors.VoltageSensor sekVolt annotation(Placement(transformation(
            origin={80,0},
            extent={{-10,-10},{10,10}},
            rotation=270)));
        Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor annotation(Placement(transformation(
            origin={-50,-30},
            extent={{-10,10},{10,-10}},
            rotation=270)));
        Modelica.Electrical.Analog.Sources.SignalCurrent signalCurrent annotation(Placement(transformation(
            origin={-50,30},
            extent={{-10,-10},{10,10}},
            rotation=270)));
        Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage(V=demandedVoltage) annotation(Placement(transformation(
            origin={50,30},
            extent={{-10,10},{10,-10}},
            rotation=270)));
        Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor1 annotation(Placement(transformation(
            origin={50,-30},
            extent={{-10,-10},{10,10}},
            rotation=270)));
        Modelica.Blocks.Math.Division division annotation(Placement(transformation(extent={{6,22},{-10,38}})));
        Modelica.Blocks.Math.Product product annotation(Placement(transformation(
            origin={30,8},
            extent={{8,-8},{-8,8}},
            rotation=270)));
        Modelica.Blocks.Math.Gain gain(k=-1) annotation(Placement(transformation(extent={{-20,22},{-36,38}})));
        Modelica.Electrical.Analog.Sensors.VoltageSensor primVolt annotation(Placement(transformation(
            origin={-80,0},
            extent={{-10,10},{10,-10}},
            rotation=270)));
        equation
            connect(currentSensor.p,signalCurrent.n) annotation(Line(points={{-50,-20},{-50,-15},{-50,15},{-50,20}}));

            connect(constantVoltage.n,currentSensor1.p) annotation(Line(points={{50,20},{50,15},{50,-15},{50,-20}}));

            connect(signalCurrent.p,p1) annotation(Line(points={{-50,40},{-50,45},{-50,50},{-95,50},{-100,50}}));

            connect(currentSensor.n,n1) annotation(Line(points={{-50,-40},{-50,-45},{-50,-50},{-95,-50},{-100,-50}}));

            connect(constantVoltage.p,p2) annotation(Line(points={{50,40},{50,45},{50,50},{95,50},{100,50}}));

            connect(currentSensor1.n,n2) annotation(Line(points={{50,-40},{50,-45},{50,-50},{95,-50},{100,-50}}));

            connect(primVolt.n,n1) annotation(Line(points={{-80,-10},{-80,-15},{-80,-50},{-95,-50},{-100,-50}}));

            connect(primVolt.p,p1) annotation(Line(points={{-80,10},{-80,15},{-80,50},{-95,50},{-100,50}}));

            connect(sekVolt.p,p2) annotation(Line(points={{80,10},{80,15},{80,50},{95,50},{100,50}}));

            connect(sekVolt.n,n2) annotation(Line(points={{80,-10},{80,-15},{80,-50},{95,-50},{100,-50}}));


            connect(gain.y,signalCurrent.i) annotation(Line(
                points={{-36.7,30},{-41.7,30},{-38,30},{-43,30}},
                color={0,0,127}));

            connect(division.y,gain.u) annotation(Line(
                points={{-10.7,30},{-15.7,30},{-13.3,30},{-18.3,30}},
                color={0,0,127}));

            connect(currentSensor1.i,product.u2) annotation(Line(
                points={{40,-30},{35,-30},{25.3,-30},{25.3,-6.7},{25.3,-1.7}},
                color={0,0,127}));

            connect(sekVolt.v,product.u1) annotation(Line(
                points={{70,0},{65,0},{65,-6.7},{34.7,-6.7},{34.7,-1.7}},
                color={0,0,127}));

            connect(product.y,division.u1) annotation(Line(
                points={{30,16.7},{30,21.7},{30,34.7},{12.7,34.7},{7.7,34.7}},
                color={0,0,127}));

            connect(primVolt.v,division.u2) annotation(Line(
                points={{-70,0},{-65,0},{12.7,0},{12.7,25.3},{7.7,25.3}},
                color={0,0,127}));
        annotation(
            Icon(
                coordinateSystem(preserveAspectRatio=false),
                graphics={
                    Rectangle(
                        lineColor={0,0,127},
                        fillColor={215,215,215},
                        fillPattern=FillPattern.Solid,
                        lineThickness=0.5,
                        extent={{-100,100},{100,-100}}),
                    Line(
                        points={{-100,100}}),
                    Line(
                        points={{-100,100},{-100,-100},{100,-100},{100,100},{-100,100}},
                        color={0,0,127},
                        thickness=0.5),
                    Line(
                        points={{-100,-100},{100,100}},
                        color={0,0,127},
                        thickness=0.5),
                    Text(
                        textString="DC",
                        lineThickness=0.5,
                        extent={{-60,80},{0,20}}),
                    Text(
                        textString="DC",
                        lineThickness=0.5,
                        extent={{0,-20},{60,-80}})}),
            Diagram(coordinateSystem(preserveAspectRatio=false)));
    end DCDC;
    DCDC dcdc(demandedVoltage=10) annotation(Placement(transformation(extent={{-30,30},{-10,50}})));
    Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(transformation(extent={{-85,-5},{-65,15}})));
    Modelica.Electrical.Analog.Basic.Resistor resistor1(R=2) annotation(Placement(transformation(
        origin={35,40},
        extent={{-10,-10},{10,10}},
        rotation=-90)));
    Modelica.Electrical.Analog.Basic.Ground ground2 annotation(Placement(transformation(extent={{0,-5},{20,15}})));
    Modelica.Electrical.Analog.Basic.Capacitor capacitor1(
        v(
            start=10,
            fixed=true),
        C=1) annotation(Placement(transformation(
        origin={-75,40},
        extent={{-10,-10},{10,10}},
        rotation=-90)));
    equation
        connect(resistor1.p,dcdc.p2) annotation(Line(
            points={{35,50},{35,55},{15,55},{15,45},{-5,45},{-10,
            45}},
            thickness=0.0625));
        connect(resistor1.n,dcdc.n2) annotation(Line(
            points={{35,30},{35,25},{15,25},{15,35},{-5,35},{-10,
            35}},
            thickness=0.0625));
        connect(ground2.p,dcdc.n2) annotation(Line(
            points={{10,15},{10,20},{10,35},{-5,35},{-10,35}},
            thickness=0.0625));
        connect(dcdc.p1,capacitor1.p) annotation(Line(
            points={{-30,45},{-35,45},{-35,55},{-75,55},{-75,50}},
            thickness=0.0625));
        connect(dcdc.n1,capacitor1.n) annotation(Line(
            points={{-30,35},{-35,35},{-35,25},{-75,25},{-75,30}},
            thickness=0.0625));
        connect(ground1.p,capacitor1.n) annotation(Line(
            points={{-75,15},{-75,20},{-75,25},{-75,30}},
            thickness=0.0625));
end TestDCDC;
于 2015-07-10T08:04:22.680 に答える