Main Content

Statistics Viewer

View Simscape model configuration and complexity statistics

Description

The Statistics Viewer tool displays Simscape™ model statistics for a given solver configuration.

Viewing Simscape model statistics is a good way to evaluate the model prior to simulation. Model statistics provide feedback on the model complexity, so that you can make informed choices about whether you want to simulate the model in its current configuration or make changes to it. This approach helps you achieve the desired simulation performance. You can use the Statistics Viewer tool to analyze models containing Simscape blocks and blocks from add-on products. Depending on the types of blocks in the model, the analysis can produce any or all of the following statistics categories:

  • 1-D Physical System — Aggregate statistics generated from all physical networks that are associated with blocks from Simscape, Simscape Driveline™, Simscape Fluids™, and Simscape Electrical™ (except the Specialized Power Systems) libraries.

  • 3-D Multibody System — Aggregate statistics generated from all physical networks that are associated with blocks from the Simscape Multibody™ library.

  • 1-D/3-D Interface — Connections between 1-D physical systems and 3-D Simscape Multibody networks. It appears only for models that connect blocks from the Simscape Multibody library to Simscape blocks, or blocks from other add-on products.

  • Simulink/Simscape InterfacePS-Simulink Converter and Simulink-PS Converter blocks in the model. Omitting these blocks may aid in converting to fixed-step, fixed-cost simulation.

The tool generates model statistics at compile-time before simulation. When you generate model statistics, the model must satisfy the requirements in Model Validation.

For variables that belong to the array members, the full path to the variable contains the numbered name of the array member. If the component array size is 1xN, the tool numbers the components as comp(1),..,comp(N). If the array size is NxM, the tool numbers the components as comp(1,1), comp(1,2), …, comp(NxM).

ButtonNameDescription

Update Model button

Update Model

Update the statistics for the associated model. If you updated the model and do not update the statistics, the icon displays a caution symbol.

Note

Updating the model statistics does not run the simulation.

Restore Layout button

Restore LayoutRestore the default layout of the tabs in a given component.

Show All button

Show AllDisplay all of the available statistics, including empty statistics that do not apply to the associated model.

Highlight Block button

Highlight BlockFocus the model canvas on the selected block and highlight the block. When you select a type of variable in the Categories tab, the Variables tab displays the blocks associated with that type of variable. Use the Highlight Block button to find these blocks on the model canvas.

View Source button

View SourceOpen the source file for a given equation and highlight the equation. This button is available for blocks that show source code.

Filter Variables button

Filter VariablesFilter variables according to their path. For example, you can specify a block name in the model canvas to filter for all of the variables associated with that block.

Source button

SourceFor a 1-D/3-D interface, highlight the source block on the model canvas.

Destination button

DestinationFor a 1-D/3-D interface, highlight the destination block on the model canvas.
Statistics Viewer window

Open the Statistics Viewer

To open the Statistics Viewer tool, follow these steps:

  • From a Simscape model window, click the Debug tab.

  • In the subsection labeled Diagnostics, click the Simscape button.

  • Choose the Statistics Viewer option.

Examples

Analyze a 1-D Physical System

Do these steps to analyze a 1-D physical system.

  1. Open the Permanent Magnet DC Motor example.

  2. From the model window, open the Statistics Viewer tool.

  3. The Update Model button displays a caution symbol to indicate that you need to update the model statistics.

    Update Model button

    Press the Update Model button.

  4. The Model Summary selection shows there are 52 variables. To see the types of model variables the solver uses, click Variables. Of the total number, 47 of the variables are Continuous Variables (eliminated).

Version History

Introduced in R2016a