Clear Filters
Clear Filters

Is there are way to see the final causalized equation (system) that is handed over to ODE Solver

3 views (last 30 days)
Hello,
I'm working at the moment with custom MATLAB Simscape components.
To debug the (self-written) code of the components it would be handy if the developer could have a look at the final causalized equation (system) that is handed over to the ODE Solver of a "testing" network to validate the correctness and debug the code.
Does somebody have an idea, if that is possible ?
Bests,

Answers (1)

Kothuri
Kothuri on 23 Feb 2024
I understand that you want to have a look at the final “causalized” equation that is handed over to the ODE solvers.
To view the equations generated by Simscape, you can use the ”simscape.logging.Node” functionality to access the simulation data, which includes the equations.
To access this information:
  • Enable Simscape logging by going to the Simscape model settings and checking the "Log simulation data" option.
  • Run the Simscape model.
  • After the simulation completes, use the “simscape.logging.Node” function to access the logged simulation data.
  • this gives you access to the simulation data and allows you to see the values of different variables and states over time.
If you want to extract the full system of equations in symbolic form, you might need to use “MATLAB's Symbolic Math Toolbox in conjunction with Simscape”.

Categories

Find more on Equations in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!