View Simscape model configuration and complexity statistics
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 Interface — PS-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
the array size is NxM, the tool numbers the components as
Update the statistics for the associated model. If you updated the model and do not update the statistics, the icon displays a caution symbol.
Updating the model statistics does not run the simulation.
||Restore Layout||Restore the default layout of the tabs in a given component.|
||Show All||Display all of the available statistics, including empty statistics that do not apply to the associated model.|
||Highlight Block||Focus 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||Open the source file for a given equation and highlight the equation. This button is available for blocks that show source code.|
||Filter Variables||Filter 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||For a 1-D/3-D interface, highlight the source block on the model canvas.|
||Destination||For a 1-D/3-D interface, highlight the destination block on the model canvas.|
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.
Analyze a 1-D Physical System
Do these steps to analyze a 1-D physical system.
Open the Permanent Magnet DC Motor example.
From the model window, open the Statistics Viewer tool.
The Update Model button displays a caution symbol to indicate that you need to update the model statistics.
Press the Update Model button.
The Model Summary selection shows there are
52variables. To see the types of model variables the solver uses, click Variables. Of the total number,
47of the variables are Continuous Variables (eliminated).
Introduced in R2016a