Nonlinear solver: failed to converge, residual norm too large.... Here is the set of components with unconverged equations

33 次查看(过去 30 天)
Hi!
I've disinged a simscape componet which represents an electrical componet that reproduce the folloving beahviour , where v is the voltage i the current and k a constant with units . I develop the following .ssc document
component ducComp
nodes
p = foundation.electrical.electrical; % +:left
n = foundation.electrical.electrical; % -:right
end
variables
i = { 0, 'A' }; % Current
v = { 0, 'V' }; % Voltage
end
parameters
K = { 1, 'V/(A^2)' }; % k value
end
branches
i : p.i -> n.i;
end
equations
assert(K>=0);
v == ((i^2)*K);
v == p.v - n.v;
end
end
So, the problem is that when I increase the value of my K, the simulation give the following error:
  • Nonlinear solver: failed to converge, residual norm too large.
  • Here is the set of components with unconverged equations
I tried to reduce my time step and to increase the Consistency tolerance but the problem persists... I do not know what could be the problem, so if anyone can help me I will be very grateful.
Thanks for you time
Pd: Using matlab 2018b

回答(1 个)

Karanjot
Karanjot 2023-9-29
Hi Pablo,
I understand that want to debug the following error in your Simulink model:
Nonlinear solver: failed to converge, residual norm too large.
Please provide the complete model & files associated with this error. This error 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.
  3. Consider adjusting component parameters such as ‘Open resistance’ or ‘Closed Conductance’ that make the model more realistic and less ideal.
  4. Refine the model Review the model for errors, inconsistencies, or incorrect assumptions. Simplify the model by removing unnecessary components or subsystems.
To learn more about troubleshooting simulation errors & transient initialization, please refer to the below documentation:
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Power and Energy Systems 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by