Track Requirement Links with a Traceability Matrix

A traceability matrix allows you to easily view requirements and their links to blocks in your Simulink® model in a compact format. A traceability matrix summarizes requirements, links, and model or test entities, and allows you to navigate to link sources or destinations. For example, you can:

  • Identify missing or incorrect links.

  • Create missing links.

  • Fix incorrect links.

  • Display requirements that are linked to model elements.

  • Inspect links by navigating to their sources or destinations.

  • Filter by requirement type, link type, or model hierarchy.

  • Confirm model and requirement completeness.

For large models, you can focus on specific model elements and associated requirements by expanding or collapsing the content in the traceability matrix. Additionally, you can filter out specific parts of the matrix to see only what you need to see.

Generate a Traceability Matrix

To create a traceability matrix:

  1. In the Requirements tab, select Share > Open Requirements Traceability Matrix.

  2. Click Add to create a matrix.

The following artifacts can be used to create a traceability matrix:

  • Simulink requirements

  • Simulink model

  • Simulink test

  • Simulink data dictionary

  • MATLAB® files

For this matrix, the requirements are represented by the rows, while the blocks of the Simulink model are represented by the columns. Once you have selected your artifacts, click Generate Matrix. Your traceability matrix appears.

If you update your model or the requirements, click Update to refresh your traceability matrix.

Using the Traceability Matrix

The traceability matrix is a large grid with icons that show links. The arrow icon indicates that there is a linked requirement between the requirement row and the model column.

Expand and Collapse Links

Initially, some rows and columns in your matrix may be compressed. The expand icon indicates that a link exists in the row and column, but you need to expand the row or column to see the link.

When you click a link icon, you see information about the link.

When you click the expand icon, similar information appears.

When you click on the links in the information box, the corresponding information appears. For example, if you click on the requirement, the Requirements Editor window opens and displays the specified requirement.

Artifact Hierarchy

You can also choose to show the hierarchy of a specific artifact in your traceability matrix. Right click on the artifact whose hierarchy you want to display. Click Focus the display.

Your traceability chart now shows this level of the requirements or Simulink model. To show the entire hierarchy of the artifact, right click the artifact again and click Display Entire Hierarchy.

To expand the hierarchy of an artifact, right click on the artifact whose hierarchy you want to expand, and click Expand All. To collapse the hierarchy of an artifact, right click on the artifact whose hierarchy you want to collapse, and click Collapse All.

Applying Filters

To the left of the traceability matrix is the Filter Panel. Display specific artifacts by using the Filter Panel. For example, if you click Has No Links under Column, the traceability matrix shows columns without links. You can choose to filter your requirements, your Simulink model, or specific links.

When you add a filter to the traceability matrix, it appears at the top of the matrix.

Highlight Missing Links

To highlight cells in your traceability matrix that are missing links, click Missing Links. The artifacts in your traceability matrix without links are highlighted in yellow.

These artifacts appear highlighted even if you display a specific hierarchy that does not include the missing link. View the hierarchy for the entire traceability matrix, to see all missing links. See Artifact Hierarchy.

Add a New Link

Create a link by clicking on a cell, then click Create to create a link between the Simulink object and a requirement.

The Create Link window automatically populates the link source and destination. If necessary, you can reverse the link source and destination by clicking the reverse button .

Limitations

The traceability matrix does not support the following:

  • MATLAB Function blocks

  • MATLAB scripts

Additionally, invalid links are not displayed in traceability matrices.

Related Topics