在Modelica中将逆变器与smpm连接时仿真结果错误

时间:2019-09-09 13:46:08

标签: modelica dymola systemmodeler

我正在使用Wolfram的SystemModeler研究连接到永磁同步电机的逆变器的系统行为。 不幸的是,尽管我只使用了Modelica标准库中的组件,但仿真结果还是错误的。

到目前为止,我在下面的模型中尝试了几种设置。

model InverterSMPM
  import Modelica.Constants.pi;
  parameter Integer m = 3 "Number of phases";
  parameter Modelica.SIunits.Frequency f = 1000 "Switching frequency";
  parameter Modelica.SIunits.Frequency f1 = 50 "Fundamental wave AC frequency";
  parameter Modelica.SIunits.Torque TLoad = 181.4 "Nominal load torque";
  parameter Modelica.SIunits.Inertia JLoad = 0.29 "Load's moment of inertia";
  Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage_n(V = 50) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-105, 4}), visible = true));
  Modelica.Electrical.PowerConverters.DCAC.MultiPhase2Level inverter(useHeatPort = false, m = m) annotation(Placement(transformation(extent = {{-50, 20}, {-30, 40}}, origin = {-35, -6}, rotation = 0), visible = true));
  Modelica.Electrical.Analog.Basic.Ground ground annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin = {-125, 34}), visible = true));
  Modelica.Electrical.PowerConverters.DCDC.Control.SignalPWM signalPWM[m](each useConstantDutyCycle = false, each f = f) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, origin = {-75, -26}, rotation = 0), visible = true));
  Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage_p(V = 50) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-105, 44}), visible = true));
  Modelica.Blocks.Sources.Sine sine[m](phase = -Modelica.Electrical.MultiPhase.Functions.symmetricOrientation(m), startTime = zeros(m), amplitude = fill(0.5, m), offset = fill(0.5, m), freqHz = fill(f1, m)) annotation(Placement(transformation(extent = {{-30, -64}, {-50, -44}}, origin = {-35, -6}, rotation = 0), visible = true));
  Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_PermanentMagnet smpm(Jr = 0.29, p = 8, fsNominal = f1, VsOpenCircuit = 100, TsOperational = 293.15, TrOperational = 293.15, Rs = 4.7, TsRef = 293.15, alpha20s = Modelica.Electrical.Machines.Thermal.Constants.alpha20Aluminium, Lssigma = 0.001, Lmd = 0.0133, Lmq = 0.0133, useDamperCage = false) annotation(Placement(visible = true, transformation(origin = {5, -15}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Machines.Utilities.TerminalBox terminalBox1(terminalConnection = "Y") annotation(Placement(visible = true, transformation(origin = {5, 2.209}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Components.Inertia inertia1(J = JLoad) annotation(Placement(visible = true, transformation(origin = {35, -15}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Sources.TorqueStep torqueStep1(stepTorque = -TLoad, offsetTorque = 0, startTime = 2, useSupport = false) annotation(Placement(visible = true, transformation(origin = {76.657, -15}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Sensors.SpeedSensor speedSensor1 annotation(Placement(visible = true, transformation(origin = {35, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(constantVoltage_p.n, constantVoltage_n.p) annotation(Line(points = {{-70, 40}, {-70, 20}}, color = {10, 90, 224}, visible = true, origin = {-35, -6}));
  connect(constantVoltage_p.p, inverter.dc_p) annotation(Line(points = {{-70, 60}, {-50, 60}, {-50, 40}}, color = {10, 90, 224}, visible = true, origin = {-35, -6}));
  connect(constantVoltage_n.n, inverter.dc_n) annotation(Line(points = {{-70, -0}, {-50, 0}, {-50, 20}}, color = {10, 90, 224}, visible = true, origin = {-35, -6}));
  connect(ground.p, constantVoltage_p.n) annotation(Line(points = {{-90, 30}, {-70, 30}, {-70, 40}}, color = {10, 90, 224}, visible = true, origin = {-35, -6}));
  connect(sine.y, signalPWM.dutyCycle) annotation(Line(points = {{-51, -54}, {-60, -54}, {-60, -20}, {-52, -20}}, color = {1, 37, 163}, visible = true, origin = {-35, -6}));
  connect(signalPWM.fire, inverter.fire_p) annotation(Line(points = {{-46, -9}, {-46, 18}}, color = {190, 52, 178}, visible = true, origin = {-35, -6}));
  connect(signalPWM.notFire, inverter.fire_n) annotation(Line(points = {{-34, -9}, {-34, 18}}, color = {190, 52, 178}, visible = true, origin = {-35, -6}));
  connect(terminalBox1.plug_sn, smpm.plug_sn) annotation(Line(visible = true, origin = {-1, -4.396}, points = {{0, 0.604}, {0, -0.604}}, color = {10, 90, 224}));
  connect(terminalBox1.plug_sp, smpm.plug_sp) annotation(Line(visible = true, origin = {11, -4.396}, points = {{0, 0.604}, {0, -0.604}}, color = {10, 90, 224}));
  connect(smpm.flange, inertia1.flange_a) annotation(Line(visible = true, origin = {20, -15}, points = {{-5, 0}, {5, 0}}, color = {64, 64, 64}));
  connect(inertia1.flange_b, torqueStep1.flange) annotation(Line(visible = true, origin = {55.828, -15}, points = {{-10.828, 0}, {10.828, 0}}, color = {64, 64, 64}));
  connect(speedSensor1.flange, smpm.flange) annotation(Line(visible = true, origin = {20, 2.5}, points = {{5, 17.5}, {0, 17.5}, {0, -17.5}, {-5, -17.5}}, color = {64, 64, 64}));
  connect(inverter.ac, terminalBox1.plugSupply) annotation(Line(visible = true, origin = {-18.333, 15.403}, points = {{-46.667, 8.597}, {23.333, 8.597}, {23.333, -17.194}}, color = {10, 90, 224}));
  annotation(experiment(StartTime = 0.00, StopTime = 5, NumberOfIntervals = 5000, __Wolfram_Algorithm = "dassl", Tolerance = 1e-6, __Wolfram_SynchronizeWithRealTime = false), Diagram(coordinateSystem(extent = {{-150, -90}, {150, 90}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})));
end InverterSMPM;
  • 一个设置是:JLoad = 0和TLoad = 0

    我希望电动机能以怠速自由运转。相反,速度传感器显示振幅为[-0.46; 0.46]

  • 的正弦波
  • 另一种设置:JLoad = 0.29和TLoad = -180

    当我施加转矩步长时,电动机的速度= 0,并从t = 2s开始减小并变为负值。

有人可以告诉我我的模型做错了什么,为什么模拟结果不对吗?

我还尝试了库中的一些示例,但它们从未将逆变器与电机一起使用。但是我想研究PWM,而不希望像示例中那样使用理想的正弦电压和电流...

谢谢您的帮助!

1 个答案:

答案 0 :(得分:3)

您要在模型中尝试做的是让同步电机从静止状态直接以额定电频率运行。这将使机器“失速”,这是机器无法按预期运行,而是以看似随机的方式振荡的原因。

尝试将sine[*].freqHz减小到fill(0.01*f1, m),您会发现它在经过一些振荡后将开始以其标称频率的百分之一运行。只是机器无法克服跳到标称频率的振荡。

有多种方法可以解决该问题:

  1. 正确初始化机器:可以通过至少将smpm.wMechancial.startsmpm.phiMechancial.start设置为正确的值来完成。另外,最好也正确地初始化相电流。这可能非常繁琐。但是,这样做的好处是您不必加快速度。
  2. 复制示例Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMPM_Inverter的一部分可能更容易,其中使用了电压频率控制器来启动机器。
  3. 实际上许多同步电机都受到控制(例如,通过磁场定向或直接转矩控制)。为此,可以从Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMPM_CurrentSourceModelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMPM_VoltageSource中获取一些线索。

另外,我建议首先尝试使您的示例与Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMPM_Inverter中的连续逆变器一起运行。如果可以正常工作,请继续进行切换。

对我来说有些可疑的东西:

  • smpm.Rs在4.7欧姆的情况下对我来说似乎很大,尤其是在考虑惯量smpm.Jr(具有0.29 kg.m2)和inertia1.J(具有0.29 kg.m2)的情况下。
  • 为了进行测试,请尝试将开关频率提高到1kHz以上。对于50Hz的基波频率,这有点低(尽管它应该可以工作)。