Using the IEC 61508 Modeling Standard Checks
This demonstration uses Model Advisor checks for the IEC 61508 standard to facilitate developing a model and code that comply
with that standard.
The IEC 61508 checks quickly 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 (x1,x2) and (y1,y2) is less than or equal to a given threshold thr. For two points (x1,x2) and (y1,y2), the 1-norm distance is given as:
The rtwdemo_iec61508 model implements the preceding requirement. We will explore the model in this demo.
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
To identify possible compliance issues with the model, you can:
- Start the Model Advisor by selecting Tools > Model Advisor or by entering modeladvisor('rtwdemo_IEC61508') at the MATLAB command line.
- In the Task Hierarchy, expand By Product > Simulink Verification and Validation > Modeling Standards > IEC 61508 Checks or By Task > Modeling Standards for IEC 61508.
- Select all 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, you can:
- Review the Summary in the Report section of the right pane.
- Select a check that did not pass in the Task Hierarchy. You can review the results that appear in the right pane for that check. You can find more information on the check and
on how to resolve reported issues with the check selected by clicking on Help.
- Click the Generate Code Using Real Time Workshop 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 demonstration process.
You can find more information on the following topics:
- For descriptions of the IEC 61508 checks, see the IEC 61508 Checks section in the Simulink Verification and Validation documentation.