Landau: A Language for Dynamical Systems with Automatic Differentiation
- PDF / 186,818 Bytes
- 9 Pages / 594 x 792 pts Page_size
- 36 Downloads / 188 Views
LANDAU: A LANGUAGE FOR DYNAMICAL SYSTEMS WITH AUTOMATIC DIFFERENTIATION I. Dolgakov∗ and D. Pavlov∗
UDC 519.682.6, 517.95, 521.3
Most numerical solvers used to determine the free variables of dynamical systems rely on firstorder derivatives of the state of the system with respect to the free variables. The number of free variables can be fairly large. One of the approaches to obtaining these derivatives is the integration of the derivatives simultaneously with the dynamical equations, which is best done with automatic differentiation techniques. Even though there exist many automatic differentiation tools, none has been found to be scalable and usable for practical purposes of modeling dynamical systems. Landau is a Turing incomplete statically typed domain-specific language aimed to fill this gap. The Turing incompleteness allows for a sophisticated source code analysis and, as a result, a highly optimized compiled code. Among other things, the language syntax supports functions, compile-time ranged for loops, if/else branching constructions, real variables and arrays, and allows for manually discarding calculations where the automatic derivative values are expected to be negligibly small. In spite of reasonable restrictions, the language is rich enough to express and differentiate any cumbersome equation with practically no effort. Bibliography: 11 titles.
1. Introduction In the modeling of dynamical systems, various systems from different application domains can be represented by an autonomous system of first-order ODEs: x˙ (t) = f (x(t), p),
(1)
where p = {pi }m i=1 is a vector of m fixed parameters. An instance of the model is determined by parameter values and also initial conditions: x(t0 ) = x0 .
(2)
For example, in the case of an N -body dynamical system, the parameters are masses, and the initial conditions are positions and velocities at a certain moment of time. In practice, e.g., in planetary ephemerides, the precise values of the initial conditions are unknown, while some approximate values are determined from observations. The task is to solve the initial value problem (IVP) (1), (2) for a range of t covering all the ti and to minimize the discrepancy between the observed and computed values. The IVP is most often solved numerically. (0) (n) Let P = (x0 , . . . , x0 , p1 , . . . , pm ) be the full set of free variables to be fit to observations by (as is usual with dynamical systems) the nonlinear least squares method. The first-order derivatives dx are required for the method. dP
One way to obtain
d x dP
is to include it into our system of ODEs, together with x itself.
x d d Accordingly, the initial conditions dx0 and the time derivative dt are needed to solve the dP dP IVP for the new system. While the initial conditions are trivial, the time derivative must be obtained by substituting (1): df (x, p) d dx = . (3) dt dP dP ∗
Institute of Applied Astronomy of the Russian Academy of Sciences, St.Petersburg, Russia, e-mail: [email protected], [email protected].
Published in
Data Loading...