在 Modelica 中将逆变器与 smpm 连接时的错误仿真结果
Wrong simulation results when connecting an inverter with a smpm in Modelica
我正在使用 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,不想像示例中那样使用理想的正弦电压和电流...
感谢您的帮助!!
您在模型中尝试做的是,让同步电机直接从静止状态以标称电频率运行。这将使机器"fall out of step",这就是机器没有像你预期的那样运行的原因,而是以一种看似随机的方式振荡。
尝试将 sine[*].freqHz
降低到 fill(0.01*f1, m)
,您会看到它会在那里 - 在一些振荡之后 - 开始以其标称频率的百分之一运行。只是机器无法克服跳动到标称频率的振荡。
有多种方法可以解决该问题:
- 正确初始化机器:这可以通过至少将
smpm.wMechancial.start
和 smpm.phiMechancial.start
设置为正确的值来完成。此外,最好也正确初始化相电流。这可能非常乏味。但优点是您不必加快速度。
- 复制示例
Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMPM_Inverter
的部分内容可能更容易,其中电压频率控制器用于启动机器。
- 许多同步电机实际上是受控的(例如通过磁场定向或直接转矩控制)。为此,可以从
Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMPM_CurrentSource
和 Modelica.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 的基波频率来说有点低(虽然它应该可以工作)。
我正在使用 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,不想像示例中那样使用理想的正弦电压和电流...
感谢您的帮助!!
您在模型中尝试做的是,让同步电机直接从静止状态以标称电频率运行。这将使机器"fall out of step",这就是机器没有像你预期的那样运行的原因,而是以一种看似随机的方式振荡。
尝试将 sine[*].freqHz
降低到 fill(0.01*f1, m)
,您会看到它会在那里 - 在一些振荡之后 - 开始以其标称频率的百分之一运行。只是机器无法克服跳动到标称频率的振荡。
有多种方法可以解决该问题:
- 正确初始化机器:这可以通过至少将
smpm.wMechancial.start
和smpm.phiMechancial.start
设置为正确的值来完成。此外,最好也正确初始化相电流。这可能非常乏味。但优点是您不必加快速度。 - 复制示例
Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMPM_Inverter
的部分内容可能更容易,其中电压频率控制器用于启动机器。 - 许多同步电机实际上是受控的(例如通过磁场定向或直接转矩控制)。为此,可以从
Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMPM_CurrentSource
和Modelica.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 的基波频率来说有点低(虽然它应该可以工作)。