使用System Composer™创建机器人组的架构模型。定义端口上的接口和组件上的链接要求。一个万博1manbetx®需求™需要许可才能管理要求。完成步骤后,您将创建一个完整的模型。
打开由传感器,运动执行器和计划算法组成的机器人组的建筑模型。您可以使用系统作曲家查看界面并管理此模型的要求。
实现架构设计始于使用组件及其连接以视觉表示系统。创建一个体系结构模型,表示系统组件,并在它们之间绘制连接。
在matlab中®命令Window, type:
SystemComposer
Simu万博1manbetxlink启动页面将打开到系统作曲家。
点击体系结构模型。
一个新的空白体系结构模型帆布打开。您可以通过左下角的徽章和左侧的组件调色板识别架构模型。
双击架构模型标题并更改无标题
至机器人
。The name of the model generally reflects the system whose architecture you are building.
保存模型。
设计一个移动机器人臂,其中传感器感应位置和轨迹计划可以计算通往机器人需要使用运动需要达到的位置的路径。这种系统的架构模型可以由三个主要组件组成:传感器
,,,,轨迹计划
,,,,and运动
。您可以使用三个零件blocks.
点击and drag a零件从左侧调色板。
将组件重命名为传感器
。
添加轨迹计划
and运动
成分。
您可以通过描述功率,能源,数据或任何其他代表性信息来开始在组件之间创建连接性。在提供或消耗绑定两个组件端口的信息和连接器的组件上创建端口,以表示信息流。
您可以在任何一侧添加一个端口,并且端口可以具有输入方向或输出方向。要创建一个端口,请在组件侧暂停光标。单击并发布以查看端口选项。选择输入
,,,,输出
, 或者身体的
创建一个端口。使用代表流过该端口的信息的名称重命名端口。
在传感器组件的底部创建输出端口。重命名Sensordata
。
单击并从Sensordata
输出端口到运动
零件。当您看到在组件端创建的输入端口时,请释放鼠标按钮。默认情况下,此新端口的名称与源端口相同。
停在角落Sensordata
线直到看到分支图标。右键单击并将分支线拖到轨迹计划
零件。
Complete the connections as shown in this figure.
The root level of the architecture model can also have ports that describe the interaction of the system with its environment. In this example, the target position for the robot is provided by a computer external to the robot itself. Represent this relationship with an input port.
单击架构模型的左边缘并输入端口名称目标位置
。
通过从目标位置
input port to the轨迹计划
零件。与架构端口的连接或来自架构端口的连接显示为标签。
您可以定义数据接口以完全指定连接及其关联的端口。数据接口可以由具有各种维度,单位和数据类型的多个数据元素组成。要检查连接端口时的一致性,您还可以在组件设计期间将接口与未连接的端口相关联。
通过与属性配置数据接口,指定各个组件之间的信息流。数据接口可以像发送整数值一样简单,但是它也可以是一组数字,一组枚举,数字和字符串组合,或一包其他预定义的接口。
考虑数据接口传感器
和运动
成分。传感器数据包括:
来自两个电动机的位置数据
来自两个传感器的障碍物接近数据
捕获数据新鲜度的时间戳
数据具有这些规格。
姓名 | Data Type | 单元 |
---|---|---|
时间戳 | 双倍的 | 秒 |
置于电动机1的位置1 | 双倍的 | 学位 |
电动机2的位置2 | 双倍的 | 学位 |
传感器1的距离1 | 双倍的 | meters |
传感器1方向1 | 双倍的 | 学位 |
传感器2的距离2 | 双倍的 | meters |
方向2传感器2 | 双倍的 | 学位 |
导航造型>设计>Interface Editor打开接口编辑器。
点击button to add a data interface. Name the interfaceSensordata
。
数据接口被命名并与组件端口分开定义,然后分配给端口。
点击Sensordata
输出端口传感器
零件。在接口编辑器中,右键单击Sensordata
并选择分配选定的端口。
如果您单击Sensordata
再次,三个Sensordata
ports are highlighted, indicating the ports are associated with that interface.
将数据元素添加到选定的数据接口。点击按钮添加数据元素并命名时间戳
。
继续按单击“添加数据元素”按钮指定的数据界面添加数据元素。
编辑接口编辑器中数据元素的属性。单击与表中的数据元素相对应的单元格,并添加单位,如规范所示。
单击旁边的下拉下拉button to save the data interface to a data dictionary. A data dictionary allows you to collectively manage and share a set of interfaces among models. For instance, later in the design, if you choose to model the external computer as a separate architecture model, then this model and the机器人
模型可以共享相同的数据字典。在这里,词典被保存为机器人
。
每个组件可以具有自己的架构。双击组件将其分解为子组件。
双击轨迹计划
零件。The title or模型浏览器指示组件在模型层次结构中的位置。
该组件首先使用的电动位置数据是Sensordata
接口计算理想位置和速度命令。然后,它处理同一接口中的障碍距离信息,以根据某些安全规则调节该运动命令。
添加运动控制
and安全守则
components as part of the轨迹计划
建筑学。
拖动目标位置
端口到达运动控制
零件。添加一个命令
输出端口到运动控制
,然后将一条线拖到安全守则
零件。dragSensordata
端口到达运动控制
and安全守则
成分。
Requirements are integral to the systems engineering process. Some requirements relate to the functionality of the overall system, and some relate to aspects of performance such as power, size, and weight. Decomposing high-level requirements into low-level requirements and deriving additional requirements is crucial to defining the architecture of the overall system. For instance, the overall power consumption of the robot determines the requirement for the power consumption of the robot controller.
To allocate and trace requirements with system elements, System Composer fully integrates with万博1manbetxSimulink要求。To derive appropriate requirements, you must sometimes analyze and specify properties (such as power) for elements of the system including components, ports, or connectors. For example, if the total cost of the system is a concern, a单价
属性是必要的。
从系统作曲家的需求角度来管理需求万博1manbetxSimulink要求。导航应用>需求经理。
为了提高要求的可追溯性,将要求与建筑组件和端口联系起来。当您在需求角度单击组件时,突出显示了链接的要求。相反,当您单击一个要求时,显示链接的组件。要直接创建链接,请将需求拖到组件或端口上。