Opened 7 years ago

Last modified 6 years ago

#4515 new discussion

Automatic inference of nominal attributes for scaling

Reported by: Francesco Casella Owned by: Per Östlund
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

As discussed in #4395 and #4510, scaling of variables by nominal values can be critical for the performance of nonlinear solvers.

A brute-force approach to this issue is to add nominal attributes on *all* potentially badly scaled variable declarations, either directly or by means of types with suitable default nominal attributes (e.g., Modelica.SIunits.AbsolutePressure).

This is rather cumbersome, but most importantly it strongly prevents reuse of models. Assume that I need to model a large industrial hydraulic press, where forces can be in excess of 1e6 N. The models of the hydraulic part, which are developed ad-hoc, will have a proper, domain-specific selection of nominal attributes on variables such as pressures and forces.

On the other hand, if I want to re-use the Modelica.Mechanics.Translation models for inertia, springs, etc., the force variables in there won't have any nominal attribute, leaving potentially dangerous holes in the problem scaling.

The first solution to this problem is to derive ad-hoc models for the mechanical components by inheritance from the MSL, adding the appropriate nominal values to all the potentially badly scaled variables. Another similar approach is to make a copy of the Modelica.Mechanics.Translational library and modify it along these lines. Both options are clearly far from ideal.

A better solution would be to have automatic inference of missing nominal values, so that the scaling values declared in the hydraulic part of the model get propagated to the mechanical part automatically and transparently, without any end-user or library-developer intervention.

In some cases, like x = y or x + y = 0, this is trivial (see #4511). Some other cases will be less trivial but easy to manage. For example, x = k*y, where k is a known parameter, allows to infer the nominal attribute of x from that of y, or vice versa.

As far as I know, this topic has never been discussed in the Modelica community. I think it definitely deserves to be addressed in a systematic way, and I also think this could lead to some interesting and non-trivial research.

If anybody else is interested, please contact me and I will be glad to explore this further, also by providing relevant examples and application cases.

Change History (1)

comment:1 by Francesco Casella, 6 years ago

Component: FrontendNew Instantiation
Owner: changed from somebody to Per Östlund
Note: See TracTickets for help on using tickets.