Jacobians using Simscape (numerical or symbolic)
2 次查看(过去 30 天)
显示 更早的评论
I'm working with a Simscape model and I'm trying to get a numerical or possibly analytical form Jacobian for my system (given specific frames).
Actually I'm using multibody, but problem could be of general interest. Better if using geometrical approach. I know that some toolbox already perform same operation and give it using geometrical approch.
I tought using a numerical differentiation would be an answer, but is by far too complex, heavy and clumsy to carrry out for my purpose, thus I was looking for an alternative method to be used in one single run.
4 个评论
回答(1 个)
Yifeng Tang
2024-8-20
The Jacobian of the system of equations is formulated by the solver, but I don't think it's available explicitly in any form. In Model Settings -> Solver, if you select an implicit solver (daessc, ode23t, etc.), you'll see an option for Jacobian method, where you can choose between analytical and numerical (perturbation) ways of storing the Jacobian. The Jacobian is needed for the nonlinear iteration in implicit solvers, but no it's not visible.
The solver profiler tool can tell you how many times the solver decided to recompute the Jacobian during the simulation, but still, the Jacobian itself isn't available in any form outside the simulation. At least I don't know of a way.
5 个评论
Yifeng Tang
2024-8-24
Oh, I wasn't talking about another way to get the jacobian. I'm wondering what is the purpose of obtaining the Jacobian. Are you trying to improve the numerical performance of the model? Choose the best solver? I'm trying to see if there are other suggestions I can provide since the actual Jacobian isn't available.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Trimming and Linearization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!