This example shows how to use Model Advisor checks for the IEC 61508 standard to facilitate developing a model and code that comply with that standard.
The IEC 61508 checks identify issues with a model that impede deployment in safety-related applications or limit traceability.
Understanding the Model to be Checked
According to the functional requirements, a model shall be created that checks 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:
Applying the IEC 61508 Modeling Standard Checks
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 identify possible compliance issues with the model:
In the Task Hierarchy, expand By Product > Simulink Verification and Validation > Modeling Standards > IEC 61508 Checks and ISO 26262 Checks or By Task > Modeling Standards for IEC 61508.
Select the checks within the group.
Select Show report after run to generate an HTML report that shows the check results.
Click Run Selected Checks. Model Advisor processes the IEC 61508 checks and displays the results.
To review the check results and make changes:
Review the Summary in the Report section of the right pane.
In the Task Hierarchy, select a check that did not pass. Review the results that appear in the right pane for that check. For more information on the check and on how to resolve reported issues, with the check selected, click Help.
Click the Generate Code Using Embedded Coder button in the model to inspect the generated code and the traceability report.
Resolve the reported issues and rerun the checks.
Review the generated HTML report of the check results by clicking the link in the Report box.
Print the generated HTML report. You can use the report as evidence in the IEC 61508 compliance example process.
For more information on IEC 61508 compliance, see Developing Models and Code That Comply with the IEC 61508 StandardDeveloping Models and Code That Comply with the IEC 61508 Standard in the Embedded Coder documentation.