Main Content

Manage Requirements

Requirements are a collection of statements describing the desired behavior and characteristics of a system. Requirements ensure system design integrity and are achievable, verifiable, unambiguous, and consistent with each other. Each level of design should have appropriate requirements.

A Requirements Toolbox™ license is required to link, trace, and manage requirements in System Composer™.

To enhance traceability of requirements, link system, functional, customer, performance, or design requirements to components and ports. Link requirements to each other to represent derived or allocated requirements. Manage requirements from the Requirements Manager on an architecture model or through custom views. Assign test cases to requirements using the Test Manager (Simulink Test) for verification and validation.

A Simulink® Test™ license is required to use the Test Manager and to create test harnesses for components in System Composer.

A requirement set is a collection of requirements. You can structure the requirements hierarchically and link them to components or ports.

Use the Requirements Editor (Requirements Toolbox) to edit and refine requirements in a requirement set. Requirement sets are stored in SLREQX files. You can create a new requirement set and author requirements using Requirements Toolbox, or import requirements from supported third-party tools.

A link is an object that relates two model-based design elements. A requirement link is a link where the destination is a requirement. You can link requirements to components or ports.

View links using the Requirements Perspective in System Composer. Select a requirement in the Requirements Browser to highlight the component or the port to which the requirement is assigned. Links are stored externally as SLMX files.

Mobile Robot Architecture Model

This example shows a mobile robot platform architecture.

Manage Requirements

Manage requirements and architecture together in the Requirements Manager from Requirements Toolbox. Navigate to Apps > Requirements Manager. You are now in the Requirements Perspective in System Composer.

The ex Mobile Robot model with the requirements manager below

Trace Requirements

When you click a component in the Requirements Perspective, linked requirements are highlighted. Conversely, when you click a requirement, the linked components are shown.

Selected component 'Command' and linked requirement shown below as 'Trajectory Planning'.

Use Requirements Traceability Diagram

Visualize traceability of requirements and how they are related using a traceability diagram.

Change the View option on the Requirements Manager from Requirements to Links. Right-click the Trajectory Planning requirement link and select View Traceability Diagram.

Traceability diagram for the trajectory planning requirement link.

According to this traceability diagram, the Command component implements the three requirements Trajectory Planning, Sensing, and Obstacle reaction.

Change the View option on the Requirements Manager from Links back to Requirements.

For more information, see Visualize Links with a Traceability Diagram (Requirements Toolbox).

Link Requirements

To directly create a link, drag a requirement onto a component or port.

Clicking and dragging 'Battery life' requirement to the 'Battery' component.

You can close the annotation that shows the link as necessary. This action does not delete the link.

You can exit the Requirements perspective by clicking the perspectives menu on the lower-right corner of the architecture model and selecting Exit perspective.

Exit perspective menu option from lower right hand corner.

For more information on managing requirements from external documents, see Manage Navigation Backlinks in External Requirements Documents (Requirements Toolbox). To integrate the requirement links to the model, see Update Reference Requirement Links from Imported File.

Verify and Validate Requirements Using Test Harnesses

A test harness is a model that isolates the component under test with inputs, outputs, and verification blocks configured for testing scenarios. You can create a test harness for a model component or for a full model. A test harness gives you a separate testing environment for a model or a model component.

For more information, see Create a Test Harness (Simulink Test).

Create a test harness for a System Composer component to validate simulation results and verify design. The Interface Editor is accessible in System Composer test harness models to enable behavior testing and implementation-independent interface testing.

Use Simulink Test to perform requirement-based testing workflows that include inputs, expected outputs, and acceptance criteria. For more information on using Simulink Test with Requirements Toolbox, see Link to Test Cases from Requirements (Requirements Toolbox).


Test harnesses are not supported for Adapter blocks in architecture models or Component blocks that contain a Reference Component in software architecture models.

This example uses the architecture model for an unmanned aerial vehicle (UAV) to create a test harness for a System Composer component. In the MATLAB® Command Window, enter this command.


To create a test harness for the Airframe component, right-click the component and select Test Harness > Create for 'Airframe'. In the Create Test Harness dialog box, specify the name of your test harness and click OK. Your test harness opens in a new window, and the Harness menu is available in the toolstrip.


If the model component is not fully wired and in an early step in the design process, you can select the Advanced Properties tab in the Create Test Harness dialog box and select Create without compiling the model.

Test harness example in the Small UAV architecture model.

Use the Test Manager (Simulink Test) with the test harness to create test files and test cases. For more information, see Test Harness and Model Relationship (Simulink Test) and Create Test Harnesses and Select Properties (Simulink Test).

Related Topics