Filter löschen
Filter löschen

Transient initialization at time 54.39498355937668, solving for consistent states and modes, failed to converge. Nonlinear solver: failed to converge, residual norm too large.

16 Ansichten (letzte 30 Tage)
I've been using the HEV model from https://uk.mathworks.com/help/sps/ug/hybrid-electric-vehicle-model.html to simulate an F1 car around a track, as I made changes there has been this persistent issue and I've tried a lot of things such as changes in the solver configuation or looking for algebraic loops but I'm left clueless on what the solution is. I've attached all things I've tried so far and my project files.
Diagnostics viewer:
Error:An error occurred while running the simulation and the simulation was terminated
Caused by:
['PowerSplitHEV_system_model/Solver Configuration/Solver Configuration']: Transient initialization at time 54.39498355937668, solving for consistent states and modes, failed to converge.
Nonlinear solver: failed to converge, residual norm too large.
Here is the set of components with unconverged equations:
'PowerSplitHEV_system_model/DC-DC Converter/DC-DC Converter'
Equation location is:
'C:\Program Files\MATLAB\R2023b\toolbox\physmod\elec\library\m\+ee\+semiconductors\+converters\dc_dc_converter_base.sscp'(no line number info)
Equation location is:
'C:\Program Files\MATLAB\R2023b\toolbox\physmod\elec\library\m\+ee\+semiconductors\+converters\dc_dc_converter_base.sscp'(no line number info)
Equation location is:
'C:\Program Files\MATLAB\R2023b\toolbox\physmod\simscape\library\m\+simscape\+function\blend.ssc'(no line number info)
Solver configuration parameters:
I've changed the Min step size, relative and absolute tolerance, number of consecutiv steps, solver selection, solver, initial step size, and algorithm but nothing seemed to work.
Checking for algebraic loops:
>> mdl = "PowerSplitHEV_system_model.mdl";
>> set_param(mdl,"AlgebraicLoopMsg","none");
'PowerSplitHEV_system_model.mdl' is not a valid model name because it is not a
valid MATLAB function name.
>> Simulink.BlockDiagram.getAlgebraicLoops('PowerSplitHEV_system_model.mdl')
Error using getBDAlgebraicLoopsImpl
The argument to command must be a block diagram.
Error in slprivate
Error in Simulink.BlockDiagram.getAlgebraicLoops - Show complete stack trace
Caused by:
Error using getBDAlgebraicLoopsImpl
'PowerSplitHEV_system_model.mdl' is not a valid model name because it is not a
valid MATLAB function name. - Show complete stack trace
Displaying stack trace:
Error using getBDAlgebraicLoopsImpl
In getBDAlgebraicLoopsImpl
In slprivate
In Simulink.BlockDiagram.getAlgebraicLoops

Antworten (1)

Neelanshu
Neelanshu am 10 Mai 2024
Hi Boniface,
Kindly provide the complete model & subsystem files associated with this error. The error, Nonlinear solver: failed to converge, residual norm too large, is often encountered when a model is too ideal and exhibits sudden transitions, hence, the solver fails to converge. In such cases, the solver performs transient initialization.
I recommend the following changes to help resolve the error:
  1. Reduce the maximum time step to see if a smaller time step helps the simulation converge.
  2. Increase the consistency tolerance in the solver configuration block. The default is 1e-9 , try something like 1e-6.
  3. Refine the model Review the model for errors, inconsistencies, or incorrect assumptions. Simplify the model by removing unnecessary components or subsystems.
You may refer to the following documentation to learn more about troubleshooting simulation errors & transient initialization :
Hope this helps.

Kategorien

Mehr zu Foundation and Custom Domains 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