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:
Open a model that contains faults, conditionals, or a combination of both.
Open Simulink Fault Analyzer. In the Apps tab, click Fault Analyzer.
In the Review Results section, click Report Generator. The Create a Fault Specification Report window opens.
In the window, specify these properties:
Property Description Title Specifies the title of the report. The default title is Fault Specification Report for 'model'
wheremodel
is the name of the model. The title appears on the first page.Author Specifies 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 Details Whether the report includes fault details. For more information on faults, see Define and Model Faults. Fault Behavior Details Whether 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 Details Whether the report includes conditional details. For more information on conditionals, see Create and Manage Conditionals. Traceability Information Whether 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 Table Whether 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 Format Exported report file type. You can select PDF
,DOCX
, orHTMX
.File Name The 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.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:
The report includes information on the five faults, their behaviors, and the conditional. Navigate to this information in the table of contents.
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.