Main Content

Generate Fault Specification Reports

You can create a fault specification report that summarizes the faults and conditionals in your model. You can select the format of the report and details of the Simulink® Fault Analyzer™ artifacts that you want to include. You can generate the report interactively or programmatically.

Create a Report Interactively

To create a fault specification report interactively:

  1. Open a model that contains faults, conditionals, or a combination of both.

  2. Open Simulink Fault Analyzer. In the Apps tab, click Fault Analyzer.

  3. In the Review Results section, click Report Generator. The Create a Fault Specification Report window opens.

    The Create a Fault Specification Report window. The model selected is named myModel. The window includes several properties, including five check boxes and three text fields. The file format is selected as a pdf.

  4. In the window, specify these properties:

    PropertyDescription
    TitleSpecifies the title of the report. The default title is Fault Specification Report for 'model' where model is the name of the model. The title appears on the first page.
    AuthorSpecifies the author of the report. The author appears on the first page of the generated report. If you do not specify this property, the author is the username of the system running MATLAB®. To find this name, enter getenv("user") into the MATLAB Command Window.
    Fault DetailsWhether the report includes fault details. For more information on faults, see Define and Model Faults.
    Fault Behavior DetailsWhether the report includes fault behavior details. For more information on fault behaviors, see Define and Model Faults and Create Predefined and Custom Fault Behaviors.
    Conditional DetailsWhether the report includes conditional details. For more information on conditionals, see Create and Manage Conditionals.
    Traceability InformationWhether the report includes link details attached to faults and conditionals. Clicking on the linked artifact opens the corresponding artifact in Simulink. For more information on linking artifacts in Simulink Fault Analyzer, see Link Artifacts.
    Fault TableWhether the report includes a copy of the Fault Table pane. For more information on the Fault Table pane, see Enable, Modify, and Select Active Faults and Create Conditionals.
    File FormatExported report file type. You can select PDF, DOCX, or HTMX.
    File NameThe report file name. By default, the report name is faultSpecReport. If you do not specify a directory, Simulink Fault Analyzer saves the report in the working directory. To change the directory, click Browse.

  5. Click OK. By default, Simulink Fault Analyzer saves the report in the working folder with the name faultSpecReport and the selected extension.

For example, open the sldemo_fuelsys_fault_analyzer model set up in Run Fault Simulations and View Results. Generate a report with the default options and set the Author property to myName. Simulink Fault Analyzer saves the report in the working directory. The report generates this title page with the default title, author name myName, and the generation date:

Title page of the generated report for sldemo_fuelsys_fault_analyzer in the example topic. It includes the title, the author name myName, and the generation date, listed in order.

The report includes information on the five faults, their behaviors, and the conditional. Navigate to this information in the table of contents.

Table of contents of the report for sldemo_fuelsys_fault_analyzer in the example topic. It includes links to the information of each section.

Programmatically Generate a Report

To programmatically generate a fault specification report, use the Simulink.fault.report function. You can specify the same options that are available interactively. However, the function does not open the generated report by default.

See Also

Related Topics