我对 Dymola 的使用还很陌生,目前正在致力于为机械臂创建机械模型。我正在使用“源 - 位置”块来施加关节的位置。我想引入摩擦力并打算使用表格对其进行建模(角速度:扭矩)。因此,我选择了“BearingFriction”组件。 我的问题是,对于某些输入位置值,我收到以下错误:
Error: Singular inconsistent scalar system for bearingFriction.sa = ((if bearingFriction.locked then 0 else (if bearingFriction.startForward then -1.34 else (if bearingFriction.startBackward then 1.34 else (if pre(bearingFriction.mode) == 1 then -1.34 else 1.34))))-der)/( -(if bearingFriction.locked then 0 else 1.0)) = 19.8524/-0
Fixed point iterating to handle problem.
我被这个问题困扰,例如我尝试更改求解器、公差和表格的插值方法,但没有结果。 我与您分享我的代码(带有我有错误的值的示例):
model Test
Modelica.Mechanics.Rotational.Components.Inertia inertia(J=2)
annotation (Placement(transformation(extent={{-40,14},{-20,34}})));
Modelica.Mechanics.Rotational.Components.BearingFriction bearingFriction(tau_pos=[0,1; 10,1.5; 20,
2.1; 40,2.6; 100,4.8; 150,5.1; 300,5.8; 600,6], peak=1.34)
annotation (Placement(transformation(extent={{-4,14},{16,34}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia1(J=3)
annotation (Placement(transformation(extent={{74,14},{94,34}})));
Modelica.Mechanics.Rotational.Components.IdealGear idealGear(ratio=20)
annotation (Placement(transformation(extent={{36,14},{56,34}})));
Modelica.Mechanics.Rotational.Sources.Position position(exact=true)
annotation (Placement(transformation(extent={{-82,14},{-62,34}})));
Modelica.Blocks.Sources.ContinuousClock continuousClock
annotation (Placement(transformation(extent={{-160,14},{-140,34}})));
Modelica.Blocks.Tables.CombiTable1Ds combiTable1Ds(
table=[0.0,70.2029; 0.00482,70.2029; 0.00964,70.2029; 0.01446,70.2014; 0.01928,70.197;
0.0241,70.1876; 0.02892,70.1663],
columns={2},
smoothness=Modelica.Blocks.Types.Smoothness.ModifiedContinuousDerivative)
annotation (Placement(transformation(extent={{-122,14},{-102,34}})));
equation
connect(inertia.flange_b, bearingFriction.flange_a)
annotation (Line(points={{-20,24},{-4,24}}, color={0,0,0}));
connect(bearingFriction.flange_b, idealGear.flange_a)
annotation (Line(points={{16,24},{36,24}}, color={0,0,0}));
connect(idealGear.flange_b, inertia1.flange_a)
annotation (Line(points={{56,24},{74,24}}, color={0,0,0}));
connect(position.flange, inertia.flange_a)
annotation (Line(points={{-62,24},{-40,24}}, color={0,0,0}));
connect(continuousClock.y, combiTable1Ds.u)
annotation (Line(points={{-139,24},{-124,24}}, color={0,0,127}));
connect(combiTable1Ds.y[1], position.phi_ref)
annotation (Line(points={{-101,24},{-84,24}}, color={0,0,127}));
annotation (
uses(Modelica(version="4.0.0")),
Diagram(coordinateSystem(extent={{-160,-100},{100,100}})),
Icon(coordinateSystem(extent={{-160,-100},{100,100}})));
end Test;
我很感激任何提示,谢谢!
如果忽略
idealGear
和 inertia1
,问题就会变得更清楚:
您的
inertia
具有刚性运动 - 并且您想要计算摩擦力,但摩擦力不能影响 inertia
的运动。
我能看到的解决方案是: