2. The Dynamicist's Workbench: I Automatic Preparation of Numerical Experiments
Harold H. Abelson, Gerald Jay Sussman · Society for Industrial and Applied Mathematics eBooks · 1989
Before computers, exploring the behavior of a dynamical system was tedious, often requiring great skill to make the computations tractable. In 1801 it took a Gauss to compute the orbits of Ceres and Pallas; with a computer, anyone can do it. But experimental dynamics is still tedious: An investigator repeatedly selects interesting values for parameters and initial conditions, sets up numerical computations, decides when each run is completed, and classifies the results, decomposing the system's parameter space into regions of qualitatively different behavior. Even with powerful numerical computers, experimental dynamics typically requires significant human effort to set up simulations and relies upon human judgment to choose parameter values that are “interesting,” to determine when each simulation run is “complete,” and to decide when two behaviors are “qualitatively different.” Much of this work, however, can be automated. Our goal is to produce a dynamicist's workbench—a, computer system that could, in principle, write many of the published papers that describe the behaviors of particular dynamical systems. Such a system must be able to set up and evolve numerical simulations. It must exploit algebraic and geometric constraints to determine when a simulation will produce no new interesting behavior, to classify trajectories and to recognize the bifurcations of critical sets. In this paper we describe a portion of our system that deals with the setting up and execution of numerical simulations. This part of the workbench includes a spectrum of computational tools—numerical methods, symbolic algebra, and semantic constraints (such as dimensions). These tools are designed so that combined methods, tailored to particular problems, can be constructed on the fly. One can use symbolic algebra to automatically generate numerical procedures, one can use domain-specific constraints to guide algebraic derivations and to avoid complexity, and one can use numerical methods to identify and verify qualitative properties of systems. We illustrate these ideas in the context of a few dynamical systems initially formulated as electrical networks. Section 1 presents a language for describing electrical networks. From these descriptions, the workbench generates the algebraic constraints and other information needed to support analysis. Section 2 illustrates how the workbench evolves the state of a dynamical system by automatically compiling a procedure to compute the system derivative, and combining this with an appropriate numerical integrator composed from primitive integrators and one of a number of strategies for adaptive step-size control. These system-derivative procedures generated by the workbench may incorporate iteration schemes when the state-variable derivatives cannot be expressed in closed form. Section 3 describes the automatic compilation of procedures that compute the frequency response of linear systems. This requires substantial symbolic manipulation, which is made tractable by using semantic markers to guide the algebra. In section 4 we demonstrate how one can explore the complex dynamics of the driven van der Pol oscillator. Here the workbench automatically compiles numerical procedures for finding periodic orbits and for tracking them as the system parameters vary.