Azzera filtri
Azzera filtri

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

3 visualizzazioni (ultimi 30 giorni)
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,

Risposte (1)

Kothuri
Kothuri il 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”.

Categorie

Scopri di più su Equations in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by