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 Simulink® Requirements™ 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 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 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 Simulink Requirements, 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 Simulink Requirements. 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'.

Requirements Traceability Diagram

Visualize traceability of requirements and how they are related using a traceability diagram. For more information, see Visualize Links with a Traceability Diagram (Simulink Requirements).

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.

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 (Simulink Requirements). To integrate the requirement links to the model, see Update Reference Requirement Links from Imported File.

Verify and Validate Requirements Using Test Harnesses on Components

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 Simulink Requirements, see Link to Test Cases from Requirements (Simulink Requirements).

Create a test harness for a System Composer component to validate simulation results and verify design. For more information, see Create a Test Harness (Simulink Test). The Interface Editor is accessible in System Composer test harness models to enable behavior testing and implementation-independent interface testing.


Test harnesses are not supported for Adapter blocks in architecture models or Component blocks that contain reference components 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 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).

See Also

Related Topics