- Reduce the maximum time step to see if a smaller time step helps the simulation converge.
- Increase the consistency tolerance in the solver configuration block. The default is 1e-9 , try something like 1e-6.
- Refine the model Review the model for errors, inconsistencies, or incorrect assumptions. Simplify the model by removing unnecessary components or subsystems.
Transient initialization at time 54.39498355937668, solving for consistent states and modes, failed to converge. Nonlinear solver: failed to converge, residual norm too large.
20 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1664751/image.png)
Checking for algebraic loops:
I used information from https://uk.mathworks.com/help/simulink/slref/simulink.blockdiagram.getalgebraicloops.html to try find a solution.
>> 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
0 commentaires
Réponses (1)
Neelanshu
le 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:
You may refer to the following documentation to learn more about troubleshooting simulation errors & transient initialization :
Hope this helps.
0 commentaires
Voir également
Catégories
En savoir plus sur Foundation and Custom Domains dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!