Exclude and Justify Objectives for Design Error Detection
This example shows how to exclude a model object from Simulink® Design Verifier™ analysis by using a coverage filter file. After performing analysis, you can justify objectives by using Analysis Filter viewer, update the filter file, you can justify objectives by using Analysis Filter explorer, update the filter file, you can justify objectives by using Simulink® Design Verifier™ Filter Explorer, update the filter file, and review the analysis results.
Step 1: Open the Model
The example model sldvexControllerFilterObjectives
is a controller model that operates according to the controller algorithm.
open_system('sldvexControllerFilterObjectives');
Step 2: Exclude a Model Object from Analysis
The model is preconfigured with the Ignore objectives based on filter option set to On
and a coverage filter file specified by sldvexControllerFilterObjectives_filter.cvf
. The coverage filter file consists of a rule that excludes the Abs block from the analysis. For more information on coverage filter file, see Creating and Using Coverage Filters (Simulink Coverage).
On the Apps tab, under Model Verification, Validation, and Test, click Design Verifier. Then, click Detect Design Errors. After the analysis completes, the Results Summary window reports that 5
objectives were processed, out of which, 3
were valid and 2
were falsified. The summary shows that 1
objective was excluded from analysis.
Step 3: Open the Analysis Filter Viewer
On the Results Summary window, click Open filter viewer. The Analysis Filter viewer opens that displays the name, type, and rationale for the excluded
Step 3: Open the Analysis Filter Explorer
On the Results Summary window, click Open filter explorer. The Analysis Filter explorer opens that displays the name, type, and rationale for the excluded
Step 3: Open the Simulink Design Verifier Filter Explorer
On the Results Summary window, click Open filter explorer. The Filter Explorer opens.
Click on the applied filter's node to view the names, type, and rationale for the excluded objectives specified in the coverage filter file.
Step 4: Justify Objectives
(a) Close the Filter Explorer.
(b) On the Results Summary window, click Highlight analysis results on model. The model is highlighted with the analysis results. The excluded model objects are highlighted in steel blue and the model objects that result in errors are highlighted in red.
(b) To view the excluded objectives, click Abs block and click View. The Analysis Filter viewer opens. The Analysis Filter explorer opens. The Filter Explorer opens and displays the relevant filter rule.
(c) Click the Divide block. The Results Inspector window displays a summary of the objectives.
(d) To justify the division by zero objective, click Justify. The Analysis Filter viewer is updated with a rule that justifies this objective. Optionally, you can update the Mode or Rationale for the objectives. (d) To justify the division by zero objective, click Justify. The Analysis Filter explorer is updated with a rule that justifies this objective. Optionally, you can update the Mode or Rationale for the objectives. (d) To justify the division by zero objective, click on the Applied filters node in Filter Explorer and click Justify in the Results Inspector window. The Filter Explorer opens and queries about where to add the justification rule. You may choose to add it to the existing filter file or create a new filter file. Create a new file.
Step 5: Apply the Filter File and View Results
On the Analysis Filter viewer, click Apply. The model is highlighted with the updated filter. The Divide block is highlighted in green because all the objectives of the block are valid.
To save the updated filter file, in the Analysis Filter explorer, click Save Filter, enter the name of file, and click OK. On the Filter Explorer, click Apply. You will be prompted to provide a file name for the new filter. Enter the desired name and click Save. The model is highlighted with the applied filters. The Divide block is highlighted in green because all the objectives of the block are valid or justified.
Note: After applying the filter, the highlighting of the model objects is as follows:
If all the objectives of a block are excluded or justified, it is highlighted in steel blue.
If a block has valid and excluded or justified objectives, it is highlighted in green.
If a block has falsified and excluded or justified objectives, it is highlighted in red.
For a detailed analysis report, in the Results Summary window, click HTML or PDF. The Design Error Detection Objectives Status chapter reports the excluded and justified objectives along with the valid and falsified objectives.