Main Content

Link to Requirements Modeled in Simulink

This example shows how to link between verification subsystems and models. You can use verification subsystems to model functional requirements and verify them in simulation. Traceability between the verification and implementation models allow you to summarize analysis and test results in the Requirements Editor.

Open Example Models

Open the slvnvdemo_powerwindow_vs model.


The verification model specifies properties and requirements for slvnvdemo_powerwindowController. The verification subsystems include logic that verifies system behavior when an obstacle is detected:

  • Obstacle Response: When an obstacle is detected, the controller shall give the down command for 1 second.

The requirement is modeled in Verification Subsystem2.

open_system("slvnvdemo_powerwindow_vs/Verification Subsystem2")

In the design model, the obstacle response is implemented in the emergencyDown state:

Link from Verification to Design Model

Create a link from Verification Subsystem2 to the emergencyDown state:

  1. In the slvnvdemo_powerwindow_vs model, double-click on the slvnvdemo_powerwindowController model reference block.

  2. Open the control chart by double-clicking it.

  3. In the control chart, right-click the emergencyDown state and select Requirements > Select for Linking with Simulink.

  4. In the slvnvdemo_powerwindow_vs model, right-click the Verification Subsystem2 block and select Requirements > Add Link to Selected Object.

  5. In the slvnvdemo_powerwindow_vs model, open the Requirements Manager app. In the Requirements pane, set View to Links.

  6. In the Requirement links pane, select the link. In the Property Inspector, under Properties, set the lnk type to Verifies.