Optimal Control Analytic Partial Derivatives Preparation

Description

Scope: Prototype and test framework for analytic Jacobians in Python. Prepare astrodynamic utilities in C++ (e.g., state representation Jacobians).

  • [KP] Write textual specification for Jacobians of state transformations.

    • Written, but tough to tell if some of the time ones are correct without exhaustive testing.

  • [NH] Revise existing Python prototypes of state transformation Jacobians so that corner cases are handled the same way they are in the state transformations themselves. (E.g., transforming to/from Keplerian elements in for a circular and/or equatorial orbit.)

    • Not actually done, but putting off for now to focus on more pressing concerns. Finite-differencing to be used for corner cases in the interim.

  • [NH] Write Python prototypes of boundary functions and their Jacobians, including for state transformations.

    • State partials exist for transformations between Cartesian, sphericalAzFpa, and classical Keplerian state representations.

    • Completed a smooth ephemeris to be able to implement time Jacobians (see comment).

    • Have functions and Jacobians for a C3 function and simple linkage. These work if the phases and functions have different state representations and/or origins. However, they have only been checked against finite differences so far, not AD. That's fine for these simple functions, but, for more complicated functions, want AD.

  • [NH] Test boundary function Jacobian prototypes against automatic differentiation.

    • State partials for transformations between Cartesian, sphericalAzFpa, and classical Keplerian state representations have been tested against AD.

    • I think the last step to be able to do this is to get rid of dependencies on spiceypy. I think the only one currently is for time transformations, and I will replace that with an analytical approximation. (Thanks, Steve!)

    • Still an issue because of how the AD package requires that assignment statements be done. (No x[i] = y.)

Environment

None

Activity

Noble Hatten April 12, 2019 at 8:02 PM

All tasks completed; closing ticket.

Noble Hatten March 28, 2019 at 2:47 PM

Status 2019/03/28 [NH]

On Monday, Steve, Wendy, Josh, and I walked through what has been prototyped so far, and Josh and Wendy are starting to work on converting the Python to C++.

Wendy Shoan March 21, 2019 at 3:02 PM

Status 2019.03.21 [WCS]

  • Should I restart the conversion of the Python prototypes?

Noble Hatten March 21, 2019 at 2:57 PM

2019/03/21 [NH]

Created TransformUtil and moved transformations that were being done locally in GMATFunction into TransformUtil. TransformUtil functions take inputs like origin, axes, etc., so it does not need to know about a "phase" or "function."

Noble Hatten March 7, 2019 at 5:33 PM
Edited

Status 209/03/07 [NH]

  • Working on a method of GMAT(OptimalControl)Function class that calculates unscaled Jacobian of function variables w.r.t. decision variables, given a phase point index.

    • So far, theoretically handles changes of orbit state representation and origin (as long as the origin is a celestial body).

    • Punting on axes for now. (Hooks for some of these derivatives already exist in GMAT, but not in my Python prototypes.)

    • Tested origin-change partials w.r.t. time and state against dirt-stupid finite differencing, and they seem to check out.

    • Scaling hooks already exist, but I haven't really tested them yet.

    • Next TO DO:

      • Mass partials.

      • Hook up to actual OC-relevant functions (currently just tested state-transformation Jacobians)

      • Keep working with Steve and Josh to nail down what it actually looks like to set a derivative in the code and implement that. (E.g., SETJAC())

      • Septuple check everything.

Fixed

Details

Assignee

Reporter

Participants

Noble Hatten
Wendy Shoan

Components

Priority

Created February 5, 2019 at 9:40 PM
Updated January 3, 2025 at 9:49 PM
Resolved April 12, 2019 at 8:02 PM