Main Content

Analyze Models for Standards Compliance and Design Errors

Standards and Analysis Overview

During model development, check and analyze your model to increase confidence in its quality. Check your model against standards such as MAB style guidelines and high-integrity system design guidelines such as DO-178 and ISO 26262. Analyze your model for errors, dead logic, and conditions that violate required properties. Using the analysis results, update your model and document exceptions. Report the results using customizable templates.

Flowchart for analyzing a model for standards compliance and design errors

Check Model for Style Guideline Violations and Design Errors

This example shows how to use the Model Advisor to check a cruise control model for MathWorks® Advisory Board (MAB) style guideline violations and design errors. Select checks and run the analysis on the model. Iteratively debug issues using the Model Advisor and rerun checks to verify that it is in compliance. After passing your selected checks, report results.

Check Model for MAB Style Guideline Violations

Check that your model complies with MAB guidelines by using the Model Advisor.

  1. Open the example project. On the command line, enter

    openExample("shared_vnv/CruiseControlVerificationProjectExample");
    pr = openProject("SimulinkVerificationCruise");

  2. Open the simulinkCruiseErrorAndStandardsExample model.

    open_system simulinkCruiseErrorAndStandardsExample

  3. In the Modeling tab, select Model Advisor.

  4. Click OK to select simulinkCruiseErrorAndStandardsExample from the System Hierarchy.

  5. Check your model for MAB style guideline violations using Simulink® Check™.

    1. In the left pane, in the By Product > Simulink Check > Modeling Standards > MAB Checks folder, select:

      • Check Indexing Mode

      • Check model diagnostic parameters

    2. Right-click on the MAB Checks node and select Run Checks.

    3. To review the configuration parameter settings that violate MAB style guidelines, run the Check model diagnostic parameters check.

    4. The analysis results appear in the right pane on the Report tab. Report displays the violation details and the recommended action.

    5. Click the parameter hyperlinks, which opens the Configuration Parameters dialog box, and update the model diagnostic parameters. Save the model.

    6. To verify that your model passes, rerun the check. Repeat steps from c to e, if necessary, to reach compliance.

    7. To generate a results report of the Simulink Check checks, select the MAB Checks node, and then, from the toolstrip, click Report.

Check Model for Design Errors

While in the Model Advisor, you can also check your model for hidden design errors using Simulink Design Verifier™.

  1. In the left pane, in the By Products > Simulink Design Verifier folder, select Design Error Detection.

  2. If not already checked, click the box beside Design Error Detection. All checks in the folder are selected.

  3. From the tool strip, click Run Checks.

  4. After the Model Advisor analysis, from the tool strip, click Report. This generates a HTML report of the check analysis.

  5. In the generated report, click a Simulink Design Verifier Results Summary hyperlink. The dialog box provides tools to help you diagnose errors and warnings in your model.

    1. Review the analysis results on the model. Click the Compute target speed subsystem. The Simulink Design Verifier Results Inspector window provides derived ranges that can help you understand the source of an error by identifying the possible signal values.

    2. Review the harness model or create one if it does not already exist.

    3. View tests and export test cases.

    4. Review the analysis report. To see a detailed analysis report, click HTML or PDF.

Related Topics