Architecture models in System Composer™ describe a system at different levels of abstraction. This mobile robot example presents three architectures:
Functional architecture describes high-level functions.
Hardware architecture describes the physical hardware or platform needed for the robot.
Logical architecture describes data exchange.
To access the models and supporting files used in this example, see Simulate Mobile Robot with System Composer Workflow.
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 systemcomposer.openModel('scMobileRobotFunctionalArchitecture');
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 systemcomposer.openModel('scMobileRobotHardwareArchitecture');
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 systemcomposer.openModel('scMobileRobotLogicalArchitecture');
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.
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.
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.
For more information on linking requirements, see Link and Trace Requirements.
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 systemcomposer.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.
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
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.