Main Content

Design Architectural Models

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.

  2. Hardware architecture describes the physical hardware or platform needed for the robot.

  3. Logical architecture describes data exchange.

To access the models and supporting files used in this example, see Simulate Mobile Robot with System Composer Workflow.

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 enter this command in the MATLAB® Command Window.

% Open the functional architecture model for the mobile robot

The mobile robot example functional architecture model.

Hardware Architecture Model for Mobile Robot

The hardware architecture model describes the hardware components — the sensor, actuators, and embedded processor — and their connections. The colors and icons indicate the stereotypes used for each element. To open the hardware architecture model, double-click the file or enter this command in the MATLAB Command Window.

% Open the hardware architecture model for the mobile robot

The mobile robot example hardware architecture model.

Logical Architecture Model for Mobile Robot

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

% Open the logical architecture model for the mobile robot

The mobile robot example logical architecture model.

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 Self Localization Sensor Fusion component in the functional architecture model implements the Localization requirement, SYSTEM-REQ-05. To show or hide linked requirements, click the requirement icon on the top-right corner of a component.

The Requirements perspective on a component.

You can view the requirements linked to the hardware architecture model in the Requirements Browser. After selecting SYSTEM-REQ-10, only requirements related to Sensor Life are shown.

The sensor life hardware architecture system requirement.

For more information on linking requirements, see Link and Trace Requirements.

Allocate Functional Components to Hardware Components

You can allocate functional components to hardware components using model-to-model allocations in the Allocation Editor. To open the Allocation Editor, navigate to Modeling > Views > Allocation Editor, or enter this command in the MATLAB Command Window.

% Open the Allocation Editor

% Load the allocation set
allocSet = systemcomposer.allocation.load('scAllocationFunctionalHardware');

Click on Scenario 1. Select Component in the Row Filter and Column Filter sections. The Allocation Editor 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.

A model-to-model allocation matrix between the functional architecture model and the hardware architecture model.

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 Path Follower, Wheel Kinematics, and Scan Matching Algorithms are allocated to the Target Machine component in the hardware architecture model. You can also add allocations for ports and connectors. For more information, see Allocate Architectures in Tire Pressure Monitoring System.

See Also

| | |

Related Topics