Error in Simulink - Derivative of state '1' in block at time 301.02267725 is not finite. The simulation will be stopped. There may be a singularity in the solution.

530 ビュー (過去 30 日間)
I get the following error -
An error occurred while running the simulation and the simulation was terminated
Caused by:
  • Derivative of state '1' in block 'gam_control1/PID Controller2/Integrator/Continuous/Integrator' at time 301.02267725611046 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 am using a manually created signal (using signal editor) as an input into a PID controller. I have tried to select ODE15 from the model configurations and also tried tightening the absolute error. Nothing works. The simulation stops at 300 s. I need it to run till 550 s. Please help.

回答 (3 件)

Salman Ahmed
Salman Ahmed 2021 年 10 月 14 日
Hi Riya,
This problem occurs oftenly. This is usually caused because of Inf or NaN output produced at a block. Set the diagnostic "Inf or NaN block output" to error in the configuration settings. If this is the issue, you will get the error as follows:
An error occurred while running the simulation and the simulation was terminated
Caused by:
  • Block 'BlockName' outputs 'NaN' for element x of output port x at major time step 0
where BlockName is the block in which error is thrown.
You can debug your model from there to bypass NaN or Inf values from reaching the integrator.

davood fateh
davood fateh 2022 年 7 月 13 日
hi
What is mean of "you candebug your model from there to bypass NaN or Inf values from reaching the integrator."?
Which part?
Thanks.

worod
worod 2023 年 11 月 19 日
derivative of state '1' in block 'FOPID/Fractional PID controller/Fractional derivative1/Transfer Fcn1' at time
0.01408153786115585 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) .
how can i solve this problem when using FOPID in simulink?
  1 件のコメント
Sam Chak
Sam Chak 2023 年 11 月 19 日
Please post a new question. Despite receiving the same error message, the issue with your FOPID system is different from @Riya Gujarathi's original PID system problem.

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

カテゴリ

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

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by