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

20 visualizaciones (últimos 30 días)
文德
文德 el 13 de Dic. de 2024 a las 13:22
Respondida: Sahas el 16 de Dic. de 2024 a las 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 comentarios
Sahas
Sahas el 16 de Dic. de 2024 a las 4:37
Hi @文德,
Can you share your Simulink model? It would help me assist you better.
文德
文德 el 16 de Dic. de 2024 a las 8:24
This is my simulation model. Could you please help me check what the issue is? thank you very much.

Iniciar sesión para comentar.

Respuestas (1)

Sahas
Sahas el 16 de Dic. de 2024 a las 13: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!

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by