Jacobian matrix in ode15s

7 ビュー (過去 30 日間)
Tony Cheng
Tony Cheng 2024 年 7 月 22 日
コメント済み: Walter Roberson 2024 年 7 月 28 日
Hi everyone,
I am using ode15s to solve a set of stiff odes and the final model is developed in the form of
where M(t,y) is the mass matrix, and y is the generalised coordinate vector. According to the syntax of ode15s, it is crucial to provide its Jacobian matrix to raise the accuracy.
I do not know too much numerical calculation of stiff odes, and here I want to know, is the Jacobian matrix JJ calculated in this manner:
If not, how to arrive at a correct one?
Many thanks!
  5 件のコメント
Tony Cheng
Tony Cheng 2024 年 7 月 28 日
Hey Torsten,
After the Jacobian matrix is obtained, should I use matlabFunction or odeFunction to arrive at the function handle, which can be casted in odeset? Many thanks!
Torsten
Torsten 2024 年 7 月 28 日
Yes.

サインインしてコメントする。

採用された回答

Dheeraj
Dheeraj 2024 年 7 月 22 日
Hi Tony chegg,
I understand you want to know how to calculate jacobian matrix in order to increase the accuracy of your model.
When solving stiff differential equations with "ODE15s", you are typically dealing with equations of the form:
where is the mass matrix, and represents the nonlinear term.
To use "ODE15s" effectively, you need to provide the Jacobian matrix of the function with respect to y, which is used to handle the stiffness in the system. This Jacobian matrix is denoted as "J" and is defined as:
You can easily calculate Jacobian matrix if you have an explicit expression for, you can compute the Jacobian matrix analytically. This involves differentiating with respect to each component of y.
Or You could use "jacobian" fucntion part of Symbolic Math Toolbox to do the same.
You could refer to the below MATLAB's documentation to know more about "jacobian" fucntion and it's usage:
Thank You.
  3 件のコメント
Tony Cheng
Tony Cheng 2024 年 7 月 28 日
Hey Dheeraj,
After the Jacobian matrix is obtained, should I use matlabFunction or odeFunction to arrive at the function handle, which can be casted in odeset? Many thanks!
Walter Roberson
Walter Roberson 2024 年 7 月 28 日
You should use odeFunction

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by