Jacobian Logging and Analysis
The Solver Profiler supports Jacobian logging and analysis for implicit solvers. Implicit solvers are common for models that include physical components and systems modeled using Simscape™.
Open the model PneumaticActuationCircuit
.
openExample("simscape/PneumaticActuationCircuitExample")
In the Simulink® Toolstrip, on the Debug tab, in the Performance section, click the Performance button arrow, then select Solver Profiler.
To log updates to the Jacobian matrix that occur during the profiling simulation, in the Solver Profiler, select Model Jacobian. To run the profiling simulation, click Run. When the profiling simulation completes, the Jacobian logging results are available in the Jacobian Analysis tab. By analyzing the results in the Jacobian Analysis tab, you can identify states in the model that likely contribute to slow simulation.
To view the logged Jacobian data in the step size plot, in the View section, select Jacobian Update. The Solver Profiler annotates the step size plot with a black dot for each Jacobian update that occurred in the profiling simulation.
The results in the Jacobian Analysis tab shows 448 Jacobian updates in total. To highlight the block that corresponds to a limiting state reported in the Jacobian logging results, select the row for the limiting state in the Jacobian Analysis tab. Then, in the Solver Profiler Toolstrip, click Highlight Block.
See Also
Tools
- Solver Profiler | State Explorer | Zero Crossing Explorer | Simscape Results Explorer (Simscape)