Error in Integrator is not finite

38 ビュー (過去 30 日間)
Mostafa Sallam
Mostafa Sallam 2018 年 9 月 9 日
コメント済み: Walter Roberson 2023 年 3 月 26 日
I received the following error:
Derivative of state '1' in block 'PSO_PFL/Crane Model/Integrator1' at time 4.0 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
I try all previous answers but without positive result

回答 (2 件)

Titus Edelhofer
Titus Edelhofer 2018 年 9 月 9 日
Hi Mostafa,
interesting that the error happens at time 4.0. This could indicate, that indeed something happens in your model at t=4.0. Take a closer look at blocks which change their behavior at t=4.0.
I understand you tried the suggestions? Are you using variable or fixed step solver?
Titus
  2 件のコメント
Dawit Kefale
Dawit Kefale 2023 年 3 月 26 日
I have also faced similar problems, but it can not be fixed
Walter Roberson
Walter Roberson 2023 年 3 月 26 日
I am not clear as to which situation you have:
  1. The model mathematics are right, but with the initial conditions you use, you get a singularity, but a different reasonable initial condition works?
  2. The model mathematics are right, but under the initial conditions you need to use, you get a singularity -- such as you need to travel through an instability, and you need to switch to a different model that can handle the situation?
  3. The model mathematics are right, but under the initial conditions you need to use, you get a singularity -- such as you need to travel through an instability, and there is no known model that can handle the situation?
  4. The model mathematics are right, but you made a mistake in implementing the model, and need to debug the situation?
  5. The model mathematics are wrong and you need to go back to reference works and figure out the correct mathematics ?
  6. There is a bug in Simulink that you need to isolate and report to Mathworks ?

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


Robert
Robert 2018 年 12 月 14 日
Hi Mostafa,
use a relational operator block along with an assertion block to check that your integrator input is always finite. If not so, try to trace it back and fix it there to always be finite.
If the input is finite, there is the possibility you ran into a simulink bug that causes a completely wrong error message. I had a table lookup where the lookup data contained a nan-value. Whenever it had to use this value for interpolation, i got above error message for an integrator far away from the table lookup, even when i made sure a nan-output from the lut is never used by passing the output through a switch controlled by an isnan relational operator, replacing nan by a 1 in case. i corrected the lut data and the problem was solved.
Best regs,
Robert

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by