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 and goals.
Unlike other derived data (such as data logging or simulation statistics), which is generated during simulation, model statistics is compile-time data that is generated before the model is simulated. When you generate model statistics, the model must be in a compilable state, that is, it must satisfy the requirements described in Model Validation.
Use model statistics as part of the iterative model building process. For example, after you make a change to the model, you can view model statistics to answer the following questions:
Did the change increase the number of variables?
Does the model have redundant constraints or have I resolved them?
How many potential zero-crossing signals does the model have?
Is the circuit high-index, and therefore hard to solve? Did my change have any effect on the index?
The Statistics Viewer analysis tool is available for 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 — This node represents aggregate statistics generated from all physical networks that are associated with blocks from Simscape, Simscape Driveline™, Simscape Fluids™, Simscape Electronics™, and Simscape Power Systems™ Simscape Components libraries.
3-D Multibody System — This node represents aggregate statistics generated from all physical networks that are associated with blocks from Simscape Multibody™ Second Generation library.
1-D/3-D Interface — This node lists the connections between the two types of physical networks. It appears only for models that connect blocks from Simscape Multibody Second Generation library to Simscape blocks, or blocks from other add-on products.
Each statistic is generated separately from each topologically distinct physical network of these blocks and then aggregated to appear as a single statistic in the Statistics Viewer.
The Sources section of the Statistics Viewer window lists variable sources for the selected statistic:
If you select a connection under the 1-D/3-D Interface statistic category, the Sources section lists the source and destination for this connection, with links to relevant blocks.
If you select a statistic with a nonzero value under the 1-D Physical System category, the Sources section lists all the variables that fall under this statistic.
For each variable, the Source column contains the full path to the variable, starting from the top-level model, with a link to the relevant block. If you click the link in the Source column, the corresponding block is highlighted in the block diagram. The Value column contains the name of the variable, as it would appear in the Variables tab of the block dialog box.