首页 文章

如何使用OpenModelica创建一个pnuematic舞者模型?

提问于
浏览
0

我很难 Build 如下模型 . 我想创建一个模型,以模拟绕线机的气动舞者的行为 . 有一个主轴可以转动并卷绕一定量的纸幅 . 舞者的行为根据纸网的要求而变化 . 我有一个表格,其中包含基于主轴旋转角度的请求数据 .
我给出了所有时间参数) . 我没有旋转角度 . 在我的模型主轴's angle of rotation is named 1829464 and it'中,第一列是combiTable . enter image description here

第一个问题是:在第一步中我是否选择了正确的块来启动我的模型? CombiTable输出是基于第二步中构建的纸质网页的请求 . 我连接了这三个块,我开始模拟,但是我遇到了翻译错误 . 请参见下图 . 第二个问题是:为什么会出现这个错误?我该如何解决? enter image description here

非常感谢你 .

1 回答

  • 0

    1)这部分对我来说不太清楚,但让我试着回答 . 你想生成主轴的旋转角度,我想你的意思是主轴的角度位置 . 为此,你所做的是有效的 . 只是为了给您提供更好的见解,您也可以通过编写以下行来做到这一点:

    Modelica.SIunits.Angular Velocity angular_speed          "speed of the spindle";
      Modelica.SIunits.Angle angular_position                  "angular position of the spindle";
      parameter Modelica.SIunits.Angle initial_position        "starting angle of the spindle";
    
    initial equation
      angular_position = initial_position;
    
    equation
      angular_speed = trapezoid1.y;
      der(angular_position) = angular_speed;
    

    2)在模型中使用变量之前,需要定义变量“angolo” . 你可以添加类似的东西 . 或者您可以为变量选择具有正确SI单位的类型 .

    Real angolo "This is where you define your variable";
    
    equation
      angolo = CombiTable1D1.y[1];
    

    一般来说,我的理解是你已经将主轴的角度位置作为数据数组,并且你想将它导入到Modelica中以便以后使用 . 我不明白为什么当你已经拥有你想要达到的目标时,你试图整合Modelica中生成的速度信号 .

    我想你可以从Michael Tiller的书Modelica by Example中受益匪浅 . In this example,您可以查看类似的初始化 .

相关问题