How to solve the block error in the simulink model?
91 次查看(过去 30 天)
显示 更早的评论
Hi,
When I run my state space model, I get the following error message,
Derivative input 5 of 'statespacemodel_hvm/State-Space' at time 2.2297592983646024 is Inf or NaN. Stopping simulation. 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)
Usually, the simulation diagnostics viewer shows the region where the error has caused, but I can't find it.
Please drop your suggestions as why this error could have occurred.
5 个评论
Laddipeerla
2023-6-27
It showed me up like as follows…
Caused by: • Derivative of state '1' in block 'untitled/PV Array2/Diode Rsh/Transfer Fen' at time 0.0 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)
采纳的回答
Mischa Kim
2014-1-21
编辑:Mischa Kim
2014-1-21
There are a couple of things you might want to consider:
- Is the system unstable (by design)? Therefore, does it need to be controlled?
- If it is stable, there could be a "bug" in the code that makes the system unstable.
- Third, are you using the right solver and solver settings? Open Simulation > Model Configuration Parameters and check out the solver options. ode45 might be the best choice to get started. Try reducing the absolute and relative tolerances.
- Lastly, try the debugger .
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Configure and View Diagnostics 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!