Main Content

Analyze Models for Standards Compliance and Design Errors

During model development, you can check and analyze your model against standards such as MAB style guidelines and high-integrity system design guidelines such as DO-178 and ISO 26262. When you analyze your model, you identify errors, dead logic, and conditions that violate required properties. You can then use the analysis results to update your model and document exceptions and report the results using customizable templates.

Flowchart for analyzing a model for standards compliance 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. You select checks and run the analysis on the model and iteratively debug issues using the Model Advisor and rerun checks to verify that it is in compliance. When the model passes the selected checks, you report the 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.

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

  2. Open the simulinkCruiseErrorAndStandardsExample model.

    open_system("simulinkCruiseErrorAndStandardsExample");

  3. In the Modeling tab, select Model Advisor.

  4. From the System Selector dialog, select simulinkCruiseErrorAndStandardsExample and click OK.

  5. Check your model for MAB style guideline violations by 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 the MAB Checks node and select Run Checks.

    3. In the left pane, select Check model diagnostic parameters. The analysis results appear in the right pane, on the Report tab. The report displays the violation details and the recommended action.

    4. To open the Configuration Parameters dialog box, click the parameter hyperlinks, update the model diagnostic parameters, and save the model.

    5. To verify that your model passes, rerun the check. Repeat steps from c to e, if necessary, until both checks pass.

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

Check Model for Design Errors

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

  1. In the left pane, in the By Products > Simulink Design Verifier folder, click the check box for Design Error Detection. All checks in the folder are selected.

  2. From the toolstrip, click Run Checks.

  3. When the analysis is complete, generate an HTML report of the analysis. In the toolstrip, click Report.

  4. In the generated report, click a Simulink Design Verifier Results Summary hyperlink. The dialog box helps you diagnose errors and warnings in your model. You can:

    1. Review the analysis results for 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