Main Content

Examine Model Verification Results by Using Simulation Data Inspector

This example shows how to use the Simulation Data Inspector to view the output from a model verification block in a system under test. If you have Simulink® Test™, model verification blocks return Pass, Fail, or Untested results at each time step. By examining the results of a model verification block, you can:

  • Determine the simulation time when a failure occurs.

  • Compare the verification results with other relevant signals.

  • Trace failures from the Simulation Data Inspector back to the model.

For more information, see Model Verification Blocks.

Verify Model Behavior With Assertion Block

In this example, the subsystem block Controller models the cruise control system in a car. This subsystem outputs the throttle value based on the difference between the actual and target speeds.

The verification subsystem Safety Properties uses an Assertion block to check that the system disengages when the brake is applied for three consecutive time steps.

Determine Simulation Time of Failure

Simulate the model and view the output of the Assertion block in the Simulation Data Inspector.

  1. In the Simulation tab, click Run.

  2. In the Simulation tab, under Review Results, select Data Inspector.

  3. In the Simulation Data Inspector navigation pane, select BrakeAssertion.

The results show that the assertion fails at 0.23 seconds.

Compare Verification Results with Other Signals

Examine the cause of the failure by plotting the values of the brake and throttle signals.

  1. Right-click the throt signal and select Log Selected Signals.

  2. Simulate the model.

  3. Configure the Simulation Data Inspector with two subplots.

  4. In the Simulation Data Inspector navigation pane, select the signals to plot. For the first subplot, select BrakeAssertion. For the second subplot, select Controller:1 (throttle) and Inputs:3 (brake).

The results show that pressing the brake at 0.2 seconds does not disengage the throttle.

Trace Failure Back to the Model

Find the block that produces a verification result by tracing the result from the Simulation Data Inspector back to the model. In the Simulation Data Inspector navigation pane, right-click BrakeAssertion and select Highlight in Model. The editor opens the verification subsystem and highlights the Assertion block.

See Also

| | (Simulink Design Verifier) | (Simulink Design Verifier)