Block 'untitled/单边磁拉力模块/Math Function1' outputs 'Inf' for element 1 of output port 1 at major time step 0.0009

20 ビュー (過去 30 日間)
文德
文德 2024 年 12 月 13 日 13:22
回答済み: Sahas 2024 年 12 月 16 日 13:16
Hello! I have built a motor simulation circuit, and I encounter an error when running it, as shown in the image. I have been unable to find a solution. Could you please help me identify the problem and suggest how to resolve it? Thank you!
  2 件のコメント
Sahas
Sahas 約8時間 前
Hi @文德,
Can you share your Simulink model? It would help me assist you better.
文德
文德 約4時間 前
This is my simulation model. Could you please help me check what the issue is? thank you very much.

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

回答 (1 件)

Sahas
Sahas 約16時間 前
Hi @文德,
I was able to reproduce the error and as per my understanding, it is coming due to some numerical unstability or overflow. The solver cannot perform the computation because the value is either extremely large or extremely small. You can debug the model by setting a different step size and "Step Forward" the simulation to see the Port Values.
You can also try out the possible workarounds given below:
  • Try out different Solver settings by opening the pressing "Ctrl+E" and opening the "Model Settings" pane. Select a more "stiff solver" such as ode15s, ode23s; reduce the relative error tolerance; reduce the maximum and minimum step size. Altenatively, you can also set all the parameters to "auto".
  • Break your model into different parts and debug each part individually to see where the numerics go out of bounds.
  • Resolve the Warnings first as the "Derivative" block could generate inf values.
Hope this helps you out!

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by