Ali*_*oom 1 lookup-tables modelica
我想将 Combotable 的输出连接到下面文件中的信号电流源,但这是不可能的,因为 table 的输出是数组但电流源的输入是真实的。感谢有人帮助我。
model TableTest
Modelica.Blocks.Tables.CombiTable1Ds combiTable1Ds1(table = [0, 0; 1, 1; 2, 4; 4, 16]) annotation(
Placement(visible = true, transformation(origin = {-4, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Constant const(k = -5) annotation(
Placement(visible = true, transformation(origin = {-46, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Electrical.Analog.Sources.SignalCurrent signalCurrent1 annotation(
Placement(visible = true, transformation(origin = {48, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
equation
connect(const.y, combiTable1Ds1.u) annotation(
Line(points = {{-35, 0}, {-17, 0}}, color = {0, 0, 127}));
annotation(
uses(Modelica(version = "3.2.3")));end TableTest;
Run Code Online (Sandbox Code Playgroud)
在您的情况下,CombiTable1Ds其向量中只有一个输出。只需使用以下命令将其连接到当前源:
connect(combiTable1Ds1.y[1], signalCurrent1.u);
Run Code Online (Sandbox Code Playgroud)
如果使用 Dymola,则在绘制连接时选择y[1]而不是默认y[:]
最好的问候 Rene Just Nielsen