"Initial conditions solve failed to converge" Error

조회 수: 16 (최근 30일)
Tuan
Tuan 2023년 4월 19일
답변: Shivam Lahoti 2025년 1월 9일
Hi guys, I tried to used simscape to solve a simple electrical circuit, but i got a trouble that i couldnt deal with. Can someone help me with this.
Here are the circuit and error:
An error occurred while running the simulation and the simulation was terminated
Caused by:
Thanks for your help!

답변 (1개)

Shivam Lahoti
Shivam Lahoti 2025년 1월 9일
Hi Tuan,
The error message indicates that Simscape is unable to solve your system, which can happen for several reasons. Often, it's due to abrupt transitions within your model. Here are some steps to help you resolve the issue:
1) Examine Sudden Changes: Look for abrupt changes or unexpected events, like a sudden pressure drop, that coincide with the error. This MATLAB Answers post might offer further insights.
2) Adjust Solver Settings: Consider changing your solver and increasing tolerances. For instance, if using 'Variable Step Auto', try switching to 'ode23t', and adjust tolerances from 1e-5 to 1e-3.For more information on solver selection visit the following documentation page.
3) Utilize the Solver Profiler: Use the Solver Profiler to analyze solver behavior just before the error. In the step size tab, you may notice a graph with a step size spike near the error time. Zooming in can reveal more details, like zero crossings. The following link contains more information on the Solver Profiler:
I hope this would help resolve the query.
Regards,
Shivam.

카테고리

Help CenterFile Exchange에서 Simulation Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by