What is the best Jacobian setting for my model?
4 次查看(过去 30 天)
显示 更早的评论
Hello,
I am running a PWM model in simulink with SimScape, this is my model where I have followed the tips of Vishal in that thread, to solve the problem there mentioned.
However, I would like to improve the speed in my simulation and looking into the outcome of Solver profiler, which is shown below
I see that the Jacobian is being updated almost every time, so I would like to choose the best setting for the Jacobian, currently it is set to Auto, but I was wondering whether a better setting can be used or not.
CAn anyone enlighten me a bit in this?
Thanks in advance,
Kind regards
0 个评论
回答(1 个)
Ankit Bhatnagar
2017-2-10
For implicit solvers such as ode23t, Simulink must compute the solver Jacobian, which is a submatrix of the Jacobian matrix associated with the continuous representation of a Simulink model.
In the full perturbation method Simulink solves the full set of perturbation equations and uses LAPACK for linear algebraic operations. This method is costly from a computational standpoint, but it remains the recommended method for establishing baseline results. The sparse perturbation method attempts to improve the run-time performance by taking mathematical advantage of the sparse Jacobian pattern.
The Sparse Perturbation Method and the Sparse Analytical Method may be able to take advantage of the sparsity pattern of the matrix to reduce the number of computations necessary and improve performance.
After running the profiler for all of these, Sparse pertubration method will give you the best performance. For more details refer the documentation link on choosing the solver:
If it supports your workflow, you can also try increasing the maximum step size of the solver as suggested in the screenshot you attached.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!