Simulink Report Generator

Key Features

  • Automatic capture of simulation results and model specifications
  • Report formatting based on Word and HTML report templates
  • Interactive reports for viewing models, generated code, and analysis results in web browsers
  • Report designer for creating custom Word, HTML, PDF, RTF, and XML reports
  • Artifacts for DO-178, IEC 61508, and ISO 26262, including system design, model and code verification, and requirements documentation
  • API for forms-based Word and HTML report generation
  • Model differencing and merging with XML comparison tool
Sample formatted report of model simulations and design descriptions.
Sample formatted report of model simulations and design descriptions.

Creating Custom Reports

You can build highly customized reports for your models and simulation results using Simulink Report Generator. There are two ways to create and generate reports:

  • Interactively, using the Report Explorer app
  • Programmatically, using the DOM (Document Object Model) API

For reports with simple formatting requirements, the interactive approach is a good way to get started with creating reports without having to write code. Simulink Report Generator provides a set of components for content that commonly occurs in Simulink® based reports. Each component specifies an action to be taken in the report, such as evaluating MATLAB® code, creating a table of data variables, or capturing a figure window. You can drag and drop components and modify their attributes to create a report setup that works best for your application.

Using the report explorer to interactively combine report components.
Using the report explorer to interactively combine report components such as block and signal summary tables, snapshots, and annotations.

The programmatic approach is well suited for reports with sophisticated formatting requirements. Using the programmatic approach, you can integrate report generation into analysis and testing applications.

Automated Reporting of Simulink and Stateflow Models

Simulink Report Generator provides predefined, standard reports for capturing detailed information about a system design and its associated requirements. You can use the predefined report setup files as a starting point for creating your own custom reports. The output format can be Word, PDF, HTML, or RTF. Simulink Report Generator lets you automate the process of generating model artifacts and documenting aspects of the Simulink models that are relevant to your application.

System Design Description report.
System Design Description report, which extracts block diagram snapshots, comments, requirements, and block parameters in a comprehensive report.

With the System Design Description, you can:

  • Review summary or detailed information without having the model open
  • Archive the system design in a format independent of the modeling environment
  • Capture descriptions and documentation included in the model
  • Assess compliance with design requirements

Using the API, you can automate the generation of reports from the MATLAB command line.

Exporting Web Views

Simulink Report Generator lets you create web views of your Simulink models that look exactly the same as models viewed in the Simulink editor. A web view is an interactive rendition of a model that you can view in a web browser and share with your colleagues who do not have Simulink installed—royalty free. You can use the model hierarchy to quickly navigate to a specific subsystem and to view properties of blocks, signals, and scopes. You can zoom in and out, pan, and fit to view using the same keyboard shortcuts you use in Simulink. By saving web views of a model over time, you can create snapshots of the development process and review each stage.

Exploring Simulink models, block properties, requirements, and model coverage information in an HTML browser.
Exploring Simulink models, block properties, requirements, and model coverage information in an HTML browser.

You can also capture and display requirements and model coverage information in a web view. These web views use the requirements traceability and coverage information provided by Simulink Verification and Validation™. For example, if you export a web view of a model that has requirements associated with a set of blocks, you will be able to view the requirements associated with the blocks (highlighted in orange) in an informer panel below the model in the HTML browser.

Additionally, you can view the code generated from a model along with its web view within the MATLAB web browser. This report is accessible from within MATLAB; an Embedded Coder® license is required to view it.

To access web views, the browser needs to natively support SVG.

Formatting Reports Based on Microsoft Word and HTML Templates

You can use Microsoft Word and HTML templates to define the format and layout of reports that Simulink Report Generator produces. The templates specify regions of fixed text and generated content (blanks). Using a forms-based reporting approach, Simulink Report Generator can fill in the blanks with content generated from MATLAB and Simulink. By creating custom templates, you can tailor the report to meet specific formatting requirements, such as adding logos and footnotes, changing page orientation, or defining specific font types and sizes for table headings. Overall, you can achieve a high degree of control over the layout and formatting of the report, and specify exactly where you intend your simulation data, figures, MATLAB code, or other results to appear in the report.

Designing the layout and format of reports using templates for Microsoft Word or HTML.
Designing the layout and format of reports using templates for Microsoft Word or HTML. Simulink Report Generator can fill in the blanks with content generated from MATLAB and Simulink.

The template-driven approach to creating reports lets you create reports in several ways:

  • Interactively, using the Report Explorer app, which lets you use styles defined in external templates to format text, paragraph, tables, lists, and other document content
  • Programmatically, using the DOM API, which uses report objects, such as paragraph objects, to construct a report
  • In a custom report, using the standard System Design Description

When you create reports programmatically using report objects, the same code can work for HTML, Word, and PDF output. You do not need to add special-case code to handle different kinds of report output.

Comparing and Merging Simulink Models

Simulink Report Generator lets you compare and merge Simulink models by identifying differences between model elements, Stateflow® charts, and MATLAB Function blocks. The tool uses XML text file representations of the Simulink models for the analysis.

An interactive XML comparison report lets you explore the differences, view the changes highlighted in the original models, and merge differences. A filter mechanism enables you to display the changes you are interested in, providing options to disable or enable nonfunctional changes, block parameter defaults, and changes in line schematics. The tool also produces an HTML report you can use for peer reviews or archiving.

Compare and merge is a useful part of design and verification in Model-Based Design. Simulink Projects, an interactive tool in Simulink for managing your project files, uses the XML comparison feature of Simulink Report Generator to compare and merge content across file revisions.

Comparison Tool shows differences between the two XML files, colors indicate if items are modified (pink) or unmatched (green).
Comparison tool showing differences between two XML files. Colors indicate if items are modified (pink) or unmatched (green).

The XML comparison tool compares the XML text files using the Chawathe algorithm, as described in the paper:

Change Detection in Hierarchically Structured Information, Sudarshan Chawathe, Anand Rajaraman, and Jennifer Widom; SIGMOD Conference, Montreal, Canada, June 1996, pp. 493-504.

This conference paper is based upon work published in 1995.

Try Simulink Report Generator

Get trial software

Five Reports to Carry into Design Reviews

View webinar