Opened 6 years ago

Last modified 3 years ago

#5354 new enhancement

Allow to differentiate expressions w.r.t. state derivatives to compute analytic Jacobian for daeMode

Reported by: Francesco Casella Owned by: Willi Braun
Priority: high Milestone:
Component: Backend Version:
Keywords: Cc:

Description

Give a system F(x, x_dot, t) = 0, solvers such as IDA require to compute the Jacobians dF/dx and dF/dx_dot.

The latter task cannot currently be carried out by the backend, because the backend has variables for the states, but not for the derivatives. The backend should then be enhanced to allow this.

Change History (6)

comment:1 by Francesco Casella, 6 years ago

As a first step, we could start computing dF/dx analytically, and only use colored numerical jacobians for dF/dx_dot. After all, in most models the states are only a tiny fraction of the variables, so this could already give a substantial performance improvement.

comment:2 by Francesco Casella, 6 years ago

Another interim option is to add aliases for derivatives. The derivation of the jacobian for the equation der(x) = der_x is trivial, as it has two 1's in the corresponding columns, while all other partial derivatives would be carried out w.r.t. the algebraic variable der_x.

Of course this solution adds more unknowns to the DAE problem. However, as long as a sparse solver is used and the number of states is a small fraction of the total number of variables, this solution would add comparatively small an overhead.

comment:3 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:4 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:5 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:6 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.