Check for Standards Compliance in Your Model

With Simulink® Check™, the Model Advisor can check for model conditions that cause generation of inefficient code or code unsuitable for safety-critical applications.

The Model Advisor produces a report that lists the suboptimal conditions or settings that it finds. The Model Advisor proposes better model configuration settings.

Detect and Fix Model Advisor Check Violations by Using Edit-Time Checking

In the Model Advisor, you can check that your model complies with certain guidelines while you edit.

  1. Open model sf_boiler.

  2. To use edit-time checking, go to Analysis > Model Advisor > Display Advisor Checks in Editor.

    The highlighted blocks and subsystems indicate a compliance issues. Place your cursor over the highlighted block and click the warning icon. A dialog box provides a description of the warning. For detailed documentation on the check that detected the issue, click the question mark. In this case, the warning indicates that the subsystem block name contains incorrect characters.

  3. Open the Bang-Bang Controller chart by double-clicking it. The Model Advisor highlights multiple states. Place your cursor over the warning of the Off state to review the issue.

  4. Select the warning. The Model Advisor indicates that there must be a new line after en: to comply with the MAAB guidelines. In your model, place your cursor after en: and press Enter. A new line is added and the warning is cleared.

Detect Model Advisor Check Violations Interactively

You can interactively check that your model complies with DO-178C/DO-331 guidelines by using the Model Advisor.

  1. Open model sf_boiler.

  2. In the model window, select Analysis > Model Advisor > Model Advisor.

  3. Select the top-level model sf_boiler from the System Hierarchy and click OK.

  4. In the left pane, in the By Product > Simulink Check > Modeling Standards >DO-178C/DO-331 Checks folder, select:

    • Check safety-related diagnostic settings for solvers

    • Check safety-related diagnostic settings for sample time

    • Check safety-related optimization settings for logic signals

  5. Right-click the DO-178C/DO-331 Checks node, and then select Run Selected Checks.

Update Model to Reach Compliance

  1. To review the configuration parameters that are not set to the recommended values, click Check safety-related optimization settings for logical signals.

  2. To update the optimization parameters to the recommended values, click the Modify Settings button in the Action section of the right pane. The Model Advisor updates the parameters to the recommended value and details the results.

  3. Repeat steps 1 and 2 for the other two checks: Check safety-related diagnostic settings for solvers and Check safety-related diagnostic settings for sample time.

  4. To verify that your model now passes, rerun the selected checks.

Display an HTML Report of Check Results

To generate a results report of the Simulink Check checks, select the DO-178C/DO-331 Checks node, and then, in the right pane click Generate Report.

Related Topics