Sundials Solver in MATLAB/Simulink

조회 수: 4 (최근 30일)
Jason Nicholson
Jason Nicholson 2016년 3월 30일
댓글: mona aljeagdaf 2018년 10월 10일
I noticed that the Sundials solver is implemented and and used someplaces in Simulink and MATLAB. I often run into problem formation that is Differential Algebraic Equations rather than Ordinary Differential Equations. I would like to experiment with the Sundials solvers however I can only find access to Sundials in SimBiology. Is there any chance that this solver will be available generally in Simulink and Matlab sometime in the future?
  댓글 수: 3
Arthur Goldsipe
Arthur Goldsipe 2017년 2월 23일
Hi Sam, please see the answer I just posted below.
Jason Nicholson
Jason Nicholson 2017년 2월 23일
편집: Jason Nicholson 2018년 3월 21일
Sam N. No I have not. I think the lack of answer is my answer: No, no support for Sundials in Simulink.
An old interface to Sundials has been written and is linked below. https://searchworks.stanford.edu/view/11143449
I don't plan on trying to connect into Sundials anytime soon. I think it is bit beyond my understanding. My key issues have to do with speed and complexity of models for large scale modeling. Large to me means building system on top of system on top of system. Where each level introduces 10-30 states of very stiff, often DAE, numerical ill-posed problems. My various states may be of the size 0.001 and then another state is 1e8 at the same time step. This state "size" combined with zero crossings, DAE's, absolute tolerances, inherent numerical stiffness, and non-smoothness seem to cause the simulations to be slow. I have work to better pose the problem. That is where I will focus rather than focusing on implementing an interface to Sundials.

댓글을 달려면 로그인하십시오.

채택된 답변

Jason Nicholson
Jason Nicholson 2018년 3월 21일
편집: Jason Nicholson 2018년 4월 9일
Support for Sundials is limited in SimBiology. There is no hint that this will be more broadly available anytime soon.
Hint and tips:
  • Use the Simscape modeling language to define DAE's of problems in a way that MATLAB/Simulink can better understand and reformulate the DAE for solving. For instance, SimMechanics is optimized to deal with Index 3 DAE's that arise in rigid motion of multiple bodies moving together. There is no need to algebraically remove the constraints.
  • If you must work in Simulink, then add states with known dynamics in places that have the algebraic states. For instance, replace an algebraic state with a first order transfer function with 10-1000 times faster dynamics than the rest of the model. This adds stiffness to the ODE system but the DAE already added stiffness in the first place. Choosing the dynamics so they are just faster than the rest of the system will allow the model to run reasonably while minimizing solver performance penalties because of added stiffness.

추가 답변 (2개)

Arthur Goldsipe
Arthur Goldsipe 2017년 2월 23일
If your goal is to solve differential algebraic equations, you can already do that using the ODE solvers provided with MATLAB. Here's an example.
  댓글 수: 1
Jason Nicholson
Jason Nicholson 2017년 2월 23일
편집: Jason Nicholson 2017년 2월 23일
I am aware of this. it does not answer my question.
Notes: You can solve explicit form index 1 DAE's in MATLAB/Simulink.

댓글을 달려면 로그인하십시오.


mona aljeagdaf
mona aljeagdaf 2018년 10월 7일
I have a problem choosing the type of solver in Simulink. Whenever I want to run the model does not work and ask me to change the type and variables of solver or ode and I have other frequently without reaching the solution please help
  댓글 수: 2
Jason Nicholson
Jason Nicholson 2018년 10월 8일
편집: Jason Nicholson 2018년 10월 8일
Mona, I would call Mathworks about your question. I think your post here off topic and resurrecting this without further information.
Thanks.
-Jason
mona aljeagdaf
mona aljeagdaf 2018년 10월 10일
I'm very sorry ... I thought it was possible for you to answer

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Model Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by