You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by fcasella on 8 Mar 2013 15:25 UTC
The Modelica.Blocks.Nonlinear.Limiter model contains the following code:
if initial() and not limitsAtInit then
y = u;
assert(u >= uMin - 0.01*abs(uMin) and
u <= uMax + 0.01*abs(uMax),
"Limiter: During initialization the limits have been ignored.\n"+
"However, the result is that the input u is not within the required limits:\n"+
" u = " + String(u) + ", uMin = " + String(uMin) + ", uMax = " + String(uMax));
else
y = smooth(0,if u > uMax then uMax else if u < uMin then uMin else u);
this helps the convergence of the nonlinear solver at initialization by not taking into account of the nonlinearities, if they are actually inactive at initialization; otherwise, a slightly messy situation ensues (-> when the simulation starts, the found initial solution is no longer a consistent solution of the dynamic problem).
A cleaner implementation in Modelica >= 3.2 would be:
y = homotopy(
actual = smooth(0,if u > uMax then uMax else if u < uMin then uMin else u),
simplified = y);
Similar arguments hold for VariableLimiter and DeadZone.
Comment by otter on 28 Mar 2013 11:19 UTC
This is a good idea. However, before introducing it in MSL, one or more concrete test cases are needed where this can be evaluated that it works as expected.
Changelog modified by otter on 11 Dec 2015 14:07 UTC
Numerics improved for the Nonlinear blocks Limiter, VariableLimiter, DeadZone by using the homotopy operator
Reported by fcasella on 8 Mar 2013 15:25 UTC
The Modelica.Blocks.Nonlinear.Limiter model contains the following code:
this helps the convergence of the nonlinear solver at initialization by not taking into account of the nonlinearities, if they are actually inactive at initialization; otherwise, a slightly messy situation ensues (-> when the simulation starts, the found initial solution is no longer a consistent solution of the dynamic problem).
A cleaner implementation in Modelica >= 3.2 would be:
Similar arguments hold for VariableLimiter and DeadZone.
Migrated-From: https://trac.modelica.org/Modelica/ticket/1012
The text was updated successfully, but these errors were encountered: