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

3 次查看(过去 30 天)
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,

回答(1 个)

Kothuri
Kothuri 2024-2-23
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”.

类别

Help CenterFile Exchange 中查找有关 Equations 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by