Main Content

Design Architectures and Activity Diagram for Mobile Robot

Architecture models in System Composer™ describe a system at different levels of abstraction. This mobile robot example presents three architectures:

  1. Functional architecture — Describes high-level functions and the relationships between those functions

  2. Logical architecture — Describes data exchange between electronic hardware and software components in each subsystem

  3. Physical architecture — Describes the physical hardware or platform needed for the robot

In addition to these architecture models, you can generate an activity diagram that represents functional flow behavior. To describe the element-to-element directed relationship from one architecture to another or from an activity diagram to an architecture, use the Allocation Editor.

Note

This example uses Simscape™ blocks. If you do not have a Simscape license, you can open and simulate the model but can only make basic changes, such as modifying block parameters.

Design, Specify, and Allocate Architecture Models

This mobile robot project includes architecture models where you can link requirements to components and define allocations. The project also includes an activity diagram to elaborate on the functional design and explore alternative options.

Launch the project.

openProject("scMobileRobotExample");

Functional Architecture Model for Mobile Robot

The functional architecture model describes functional dependencies: controlling a mobile robot autonomously, localization, path-planning, and path-following. To open the functional architecture model, double-click the file or run this command.

systemcomposer.openModel("RobotFunctionalArchitecture");

Mobile robot functional architectural diagram.

Functional Flow Activity Diagram for Mobile Robot

The functional flow activity diagram describes an operational scenario with a random start point and random end point between which the mobile robot moves. The algorithm plans the path. If the path is too long and the robot does not have enough battery life, the process ends early. If the path is feasible, the robot begins at a set angular orientation, traverses in the x-direction, traverses in the y-direction, and then sets its final angular orientation.

systemcomposer.openModel("RobotActivity");

Robot activity diagram showing an operational scenario.

Logical Architecture Model for Mobile Robot

The logical architecture model describes the behavior of the mobile robot system for simulation: trajectory generator, trajectory follower, motor controller, sensor algorithm, and robot and environment. The connections represent the interactions in the system. To open the logical architecture model, double-click the file or run this command.

systemcomposer.openModel("scMobileRobotLogicalArchitecture");

Mobile robot logical architecture.

Physical Architecture Model for Mobile Robot

The physical architecture model describes the hardware components and their connections: the sensor, actuators, and embedded processor. The colors and icons indicate the stereotypes used for each element. To open the physical architecture model, double-click the file or run this command.

systemcomposer.openModel("scMobileRobotHardwareArchitecture");

Mobile robot physical architecture.

Link Requirements to Components

Requirement traceability involves linking technical requirements to components and ports in architecture models, thereby allowing the connection between an early requirements phase and system-level design. You can easily track whether a requirement is met by connecting components back to stakeholder needs. You can add requirement links by dragging requirements to a component.

To view requirements, open the Requirements Manager by navigating to Apps > Requirements Manager.

The Identify Target Position component in the functional architecture model implements the Autonomous Charging requirement STAKEHOLDER-05. To show or hide linked requirements, click the requirement icon on the top-right corner of a component.

Requirement link on a component in the Requirements Perspective in System Composer canvas.

You can view the requirements linked to the hardware architecture model in the Requirements Browser. After selecting STAKEHOLDER-04, only components related to the Transportation requirement are shown.

Requirements Perspective showing Property Inspector, Requirements Editor tab, and links on the System Composer canvas.

Allocate Architectures and Diagrams

You can allocate functional components to physical components using model-to-model allocations. To open the Allocation Editor, navigate to Modeling > Allocation Editor, or run this command.

systemcomposer.allocation.editor

Load the allocation sets.

allocSetFunc = systemcomposer.allocation.load("FunctionalToLogicalAllocation");
allocSetPhys = systemcomposer.allocation.load("LogicalToPhysicalAllocation");
allocSetAct = systemcomposer.allocation.load("DiagramToModel");

Allocate Functional to Logical Architectures

Under the FunctionalToLogicalAllocation allocation set, select Scenario 1.

Select the Component in the Row Filter and Column Filter sections. The Allocation Editor tool allows you to link components between different architecture models to establish traceability for your project. Double-click the boxes in the allocation matrix to allocate or deallocate two elements.

Mobile robot functional to logical architecture allocation matrix.

In the functional architecture, the trajectory generator requires components Identify Target Position, User Input, and Compute Self Position, so these components are allocated to the Trajectory Generator component in the logical architecture.

Allocate Functional Activity Diagram to Logical Architecture

Under the DiagramToModel allocation set, select Scenario 1.

Mobile robot functional activity diagram to logical architecture model allocation matrix.

From the activity diagram, allocate the action nodes Initialize Path Follower, Apply Path Limits, Select Target Position, and Error out to the Alignment Algorithm component on the logical architecture model to indicate that these actions are controlled by the contents of that logical component.

Allocate Logical to Physical Architectures

Under the LogicalToPhysicalAllocation allocation set, select Scenario 1.

Mobile robot logical to hardware architecture allocation matrix.

The autonomy of a vehicle is mostly handled by a target machine, which is an embedded computer responsible for processing sensor readings to calculate control inputs. Therefore, many functional components like Robot Body, Sensor Fusion, and Trajectory Generator are allocated to the Target Machine component in the physical architecture model.

References

[1] Rahman, Mohd Azizi Abdul, Katsuhiro Mayama, Takahiro Takasu, Akira Yasuda, and Makoto Mizukawa. “Model-Driven Development of Intelligent Mobile Robot Using Systems Modeling Language (SysML).” In Mobile Robots: Control Architectures, Bio-Interfacing, Navigation, Multi Robot Motion Planning and Operator Training, edited by Janusz Będkowski. InTech Open, 2011. https://doi.org/10.5772/26906.

See Also

| | |

Related Topics