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

20 Ansichten (letzte 30 Tage)
文德
文德 am 13 Dez. 2024 um 13:22
Beantwortet: Sahas am 16 Dez. 2024 um 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 Kommentare
Sahas
Sahas am 16 Dez. 2024 um 4:37
Hi @文德,
Can you share your Simulink model? It would help me assist you better.
文德
文德 vor etwa 7 Stunden
This is my simulation model. Could you please help me check what the issue is? thank you very much.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sahas
Sahas vor etwa 2 Stunden
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!

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by