I am getting an error in running the following model
6 次查看(过去 30 天)
显示 更早的评论
I tried building a motor controller using simulink and tried running but got the error as shown in figure below

0 个评论
回答(1 个)
Akshat Dalal
2025-3-21,5:50
Hi Varun,
This error mostly occurs due to an unrealised divide by zero in the modelling logic. You can try the following steps to debug this further:
In the Configuration Parameters, set the diagnostic "Inf or NaN block output" to 'error', adter which you will get the following erro if you have an Inf or NaN:
An error occurred while running the simulation and the simulation was terminated
It will also list the block which is causing the error.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!