Can anyone help to see what is wrong with this function to solve a DAE problem

1 回表示 (過去 30 日間)
haohaoxuexi1
haohaoxuexi1 2022 年 1 月 19 日
コメント済み: haohaoxuexi1 2022 年 7 月 10 日
dx(1)=x(2);
dx(2)=k1*(x(3)-x(1))-(knl_1*x(1)+knl_3*x(1)^3);
dx(3)=x(4);
dx(4)=(-c*x(4)-k1*(x(3)-x(1))+kAmp*cos(w*t)+theta_p*x(5))/m;
dx(5)=(-theta_p*(ks/(kp+ks))*(x(4)-x(2))*R_s-x(5))/R_s/C_p;
The mass matrix
M=diag([1 0 1 1 1]);
options = odeset('mass', M, 'RelTol',1.e-6);
I am trying to solve the equations below. The y values and V values are unknown and the rest of them are constant.
But, it gave out the error
"This DAE appears to be of index greater than 1."
Can anyone help to solve the problem?
Thank you very much.
  2 件のコメント
Zoé Cord'homme
Zoé Cord'homme 2022 年 7 月 8 日
Hello ! I currently have a similar issue, did you find a way ?
haohaoxuexi1
haohaoxuexi1 2022 年 7 月 10 日
I think ode15 works in some situations.
But for faster calculation, ode45 is better.

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

回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by