Modelica.Blocks.Tables.CombiTable1Ds
我想将Combotable的输出连接到下面文件中的信号电流源,但这是不可能的,因为表的输出是数组,而电流源的输入是实的。很感谢有人帮助我Modelica.Blocks.Tables.CombiTable1Ds,modelica,lookup-tables,Modelica,Lookup Tables,我想将Combotable的输出连接到下面文件中的信号电流源,但这是不可能的,因为表的输出是数组,而电流源的输入是实的。很感谢有人帮助我 model TableTest Modelica.Blocks.Tables.CombiTable1Ds combiTable1Ds1(table = [0, 0; 1, 1; 2, 4; 4, 16]) annotation( Placement(visible = true, transformation(origin = {-4, 0},
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;
在您的例子中,
CombiTable1Ds
的向量中只有一个输出。只需使用以下设备将其连接到电流源:
connect(combiTable1Ds1.y[1], signalCurrent1.u);
如果使用Dymola,则在绘制连接时,选择y[1]
而不是默认的y[:]
致意
Rene Just Nielsen在您的例子中,
CombiTable1Ds
在其向量中只有一个输出。只需使用以下设备将其连接到电流源:
connect(combiTable1Ds1.y[1], signalCurrent1.u);
如果使用Dymola,则在绘制连接时,选择y[1]
而不是默认的y[:]
致意
Rene Just Nielsen顺便说一句,如果你坚持线性插值,并将时间作为独立的表变量,还有Modelica.Electrical.Analog.Sources.TableCurrent做类似的工作。顺便说一下,如果您坚持使用线性插值,并将时间作为独立的表变量,那么Modelica.Electrical.Analog.Sources.TableCurrent也会做类似的工作。