This example shows how to use the Model Advisor to check that a model complies with the IEC 61508 safety standard.
The IEC 61508 Model Advisor checks identify issues with a model that impede deployment in safety-related applications or limit traceability.
rtwdemo_iec61508 check whether the 1-norm distance between points
(y1,y2) is less than or equal to a given threshold
thr. For two points
(y1,y2), the 1-norm distance is given as:
Open and review the model.
To deploy the model in a safety-related software component that must comply with the IEC 61508 safety standard, check the model for issues that might impede deployment in such an environment or limit traceability between the model and generated source code.
To open the Model Advisor, in the Simulink editor, click the Modeling tab and select Model Advisor. A System Selector - Model Advisor dialog box opens. Select the model or system that you want to review and click OK. Or enter
modeladvisor('rtwdemo_IEC61508') at the MATLAB command line.
In the left pane of the Model Advisor, expand By Task > Modeling Standards for IEC 61508. If the By Task folder is not displayed in the Model Advisor window, open Settings > Preferences and select Show By Task Folder.
Select the checks that you want to include in your model analysis.
Click on the folder that contains the checks and, on the right pane of the Model Advisor, select Show report after run to automatically generate and display the report in HTML format.
Click Run Selected Checks to execute the analysis.
The Model Advisor processes the IEC 61508 checks and displays the results.
After the analysis is complete, review the aggregate results in the right pane of the Model Advisor. You can see the total number of checks that passed, failed, were flagged as warnings, and did not execute.
To review the results for a specific check, in the By Task > Modeling Standards for IEC 61508 folder, select a check. For more information about the check and how to resolve reported issues, click Help.
Address the reported issues and rerun the checks.
To review the generated HTML report of the results, select the By Task > Modeling Standards for IEC 61508 folder and click the link in the Report box.
Print the generated HTML report. You can use the report as evidence in the IEC 61508 compliance process.
If desired, click the Generate Code Using Embedded Coder button in the model to inspect the generated code and the traceability report.
For descriptions of the IEC 61508 checks, see IEC 61508, IEC 62304, ISO 26262, ISO 25119, and EN 50128/EN 50657 Checks (Simulink Check) in the Simulink Check documentation.
For more information on using Model Advisor, see Run Model Advisor Checks and Review Results in the Simulink documentation.
For more information on resolving issues, see Address Model Check Results in the Simulink documentation.