How can I optimize initial guess of a solution?

Hi, I solved a system of non linear ODEs with bvp4c. The system is a bit complicated, since it contains 17 equations with 17 variables. I realized that initial guess strongly influences the final solution, which is normal. I tried to enter optimal values of my variables as initial guess, giving them the order of magnitude I expect during simulation. In this way, the maximum residual has decreased a lot, however it seems still high.
I have the following warning: ... The maximum residual is 0.16, while requested accuracy is 0.001
How can I further decrease the residue? Is there available an optimizer of initial guess?
Thank you!

5 件のコメント

J. Alex Lee
J. Alex Lee 2021 年 5 月 13 日
Do you have your equations scaled such that order of magnitudes of variables are diverse? e.g., if one variable varies on the scale of 1e-3 versus another of the variables on the scale of 1e3? I get the same issue in one of my problems, and tentatively i'm tracing it back to that feature...
Elia Paini
Elia Paini 2021 年 5 月 13 日
Difference is not so high...the maximum difference between orders of magnitude is about 1e3. Moreover, I have also derivatives as variables, since the system contains some second order equations. I put - 1 as initial guess for the derivatives because I expect a decrease for the variables related to them
Elia Paini
Elia Paini 2021 年 5 月 18 日
What do you suggest me?
J. Alex Lee
J. Alex Lee 2021 年 5 月 18 日
sorry, i don't have any suggestions. I am starting to use bvp4c/5c for my work as well, and it seems very random how well a solution is achieved...there is no way to control how the solver internally decides its itertions as far as i know...i even tried continuation, but bizarrely sometimes a solution will be very messed up, but then the next step in the continuation will be fine. i don't think these are very mature or well-developed tools...
Elia Paini
Elia Paini 2021 年 5 月 19 日
Ok, thank you in all cases!

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

回答 (0 件)

カテゴリ

質問済み:

2021 年 5 月 13 日

コメント済み:

2021 年 5 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by