View Linked Requirements in Models and Blocks

Requirements Traceability in Simulink

If your Simulink® model has links to requirements in external documents, you can review these links. To identify which model objects satisfy certain design requirements, use the following requirements features available in Simulink software:

  • Highlighting objects in your model that have links to external requirements

  • Viewing information about a requirements link

  • Navigating from a model object to its associated requirement

  • Filtering requirements highlighting based on specified keywords

Having a Simulink Verification and Validation™ license enables you to perform the following additional tasks, using the Requirements Management Interface (RMI):

  • Adding new requirements

  • Changing existing requirements

  • Deleting existing requirements

  • Applying user tags to requirements

  • Creating reports about requirements links in your model

  • Checking the validity of the links between the model objects and the requirements documents

Highlight Requirements in a Model

You can highlight a model to identify which objects in the model have links to requirements in external documents. Both the Simulink Editor and the Model Explorer provide this capability.

    Note:   If your model contains a Model block whose referenced model contains requirements, those requirements are not highlighted. If you have Simulink Verification and Validation, you can view this information only in requirements reports. To generate requirements information for referenced models and then see highlighted snapshots of those requirements, follow the steps in Report for Requirements in Model Blocks.

Highlight a Model Using the Simulink Editor

If you are working in the Simulink Editor and want to see which model objects in the slvnvdemo_fuelsys_officereq model have requirements, follow these steps:

  1. Open the example model:

    slvnvdemo_fuelsys_officereqslvnvdemo_fuelsys_officereq
  2. Select Analysis > Requirements Traceability > Highlight Model.

    Two types of highlighting indicate model objects with requirements:

    • Yellow highlighting indicates objects that have requirements links for the object itself.

    • Orange outline indicates objects, such as subsystems, whose child objects have requirements links.

    Objects that do not have requirements are colored gray.

  3. To remove the highlighting from the model, select Analysis > Requirements Traceability > Unhighlight Model. Alternatively, you can right-click anywhere in the model, and select Remove Highlighting.

While a model is highlighted, you can still manage the model and its contents.

Highlight a Model Using the Model Explorer

If you are working in Model Explorer and want to see which model objects have requirements, follow these steps:

  1. Open the example model:

    slvnvdemo_fuelsys_officereqslvnvdemo_fuelsys_officereq
  2. Select View > Model Explorer.

  3. To highlight all model objects with requirements, click the Highlight items with requirements on model icon ( ).

    The Simulink Editor window opens, and all objects in the model with requirements are highlighted.

    Note:   If you are running a 64-bit version of MATLAB®, when you navigate to a requirement in a PDF file, the file opens at the top of the page, not at the bookmark location.

View Information About a Requirements Link

Using Simulink, you can view detailed information about a requirements link, such as identifying the location and type of document that contains the requirement.

    Note:   You can only modify the requirements information if you have a Simulink Verification and Validation license.

For example, to view information about the requirements link from the MAP Sensor block in the slvnvdemo_fuelsys_officereq example model, follow these steps:

  1. Open the example model:

    slvnvdemo_fuelsys_officereqslvnvdemo_fuelsys_officereq
  2. Right-click the MAP sensor block, and select Requirements > Edit/Add Links.

    The Requirements dialog box opens and displays the following information about the requirements link:

    • The description of the link (which is the actual text of the requirement).

    • The Microsoft® Excel® workbook named slvnvdemo_FuelSys_TestScenarios.xlsx, which contains the linked requirement.

    • The requirements text, which appears in the named cell Simulink_requirement_item_2 in the workbook.

    • The user tag test, which is associated with this requirement.

Navigate to Requirements from a Model

Navigate from the Model Object

You can navigate directly from a model object to that object's associated requirement. When you take these steps, the external requirements document opens in the application, with the requirements text highlighted.

  1. Open the example model:

    slvnvdemo_fuelsys_officereqslvnvdemo_fuelsys_officereq
  2. Open the fuel rate controller subsystem.

  3. To open the linked requirement, right-click the Airflow calculation subsystem and select Requirements Traceability > 1. "Mass airflow estimation".

    The Microsoft Word document slvnvdemo_FuelSys_DesignDescription.docx, opens with the section 2.1 Mass airflow estimation selected.

    Note:   If you are running a 64-bit version of MATLAB, when you navigate to a requirement in a PDF file, the file opens at the top of the page, not at the bookmark location.

Navigate from a System Requirements Block

Sometimes you want to see all the requirements links at a given level of the model hierarchy. In such cases, you can insert a System Requirements block to collect all requirements links in a model or subsystem. The System Requirements block lists requirements links for the model or subsystem in which it resides; it does not list requirements links for model objects inside that model or subsystem, because those are at a different level of the model hierarchy.

In the following example, you insert a System Requirements block at the top level of the slvnvdemo_fuelsys_officereq model, and navigate to the requirements using the links inside the block.

  1. Open the example model:

    slvnvdemo_fuelsys_officereqslvnvdemo_fuelsys_officereq
  2. In the Simulink Editor, select Analysis > Requirements Traceability > Highlight Model.

  3. Open the fuel rate controller subsystem.

    The Airflow calculation subsystem has a requirements link.

  4. Open the Airflow calculation subsystem.

  5. In the Simulink Editor, select View > Library Browser.

  6. On the Libraries pane, select Simulink Verification and Validation.

    This library contains only one block—the System Requirements block.

  7. Drag a System Requirements block into the Airflow calculation subsystem.

    The RMI software collects and displays any requirements links for that subsystem in the System Requirements block.

  8. In the System Requirements block, double-click 1. "Mass airflow subsystem".

    The Microsoft Word document, slvnvdemo_FuelSys_DesignDescription.docx, opens, with the section 2.1 Mass airflow estimation selected.

Filter Requirements in a Model

Filtering Requirements Highlighting by User Tag

Some requirements links in your model can have one or more associated user tags. User tags are keywords that you create to categorize a requirement, for example, design or test.

For example, in the slvnvdemo_fuelsys_officereq model, the requirements link from the MAP sensor block has the user tag test.

To highlight only all the blocks that have a requirement with the user tag test:

  1. Open the example model:

    slvnvdemo_fuelsys_officereqslvnvdemo_fuelsys_officereq
  2. In the Simulink Editor, select Analysis > Requirements > Settings.

    The Requirements Settings dialog box opens. If you do not have a Simulink Verification and Validation license, the Filters tab is the only option available.

    By default, your model has no requirements filtering enabled.

  3. Select Filter links by user tags when highlighting and reporting requirements.

  4. In the Include links with any of these tags text box, delete design, and enter test.

  5. Press Enter.

  6. Highlight the slvnvdemo_fuelsys_officereq model for requirements. Select Analysis > Requirements > Highlight Model.

    In the top-level model, only the MAP sensor block and the Test inputs block are highlighted.

  7. To disable the filtering by user tag, select Analysis > Requirements > Settings, and clear Filter links by user tags when highlighting and reporting requirements.

    The model highlighting updates immediately.

Filtering Options for Highlighting Requirements

On the Filters tab, you select options that designate which objects with requirements are highlighted. The following table describes these settings, which apply to all requirements in your model for the duration of your MATLAB session.

OptionDescription
Filter links by user tags when highlighting and reporting requirementsEnables filtering for highlighting and reporting, based on specified user tags.
Include links with any of these tagsHighlights all objects whose requirements match at least one of the specified user tags. The tag names must match exactly. Separate multiple user tags with commas or spaces.
Exclude links with any of these tagsExcludes from the highlighting all objects whose requirements match at least one of the specified user tags. The tag names must match exactly. Separate multiple user tags with commas or spaces.
Apply same filters in context menusDisables navigation links in context menus for all objects whose requirements do not match at least one of the specified user tags.
Under Link type filters, Disable DOORS surrogate item links in context menus

Disables links to IBM® Rational® DOORS® surrogate items from the context menus when you right-click a model object. This option does not depend on current user tag filters.

Was this topic helpful?