Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-6734

Optimal Control Analytic Partial Derivatives Preparation

    Details

    • Type: Task
    • Status: Resolved (View Workflow)
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CSALT
    • Labels:
    • Sprint:
      Active Development

      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.)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            nhatten Noble Hatten added a comment - - 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.
            Show
            nhatten Noble Hatten added a comment - - 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.
            Hide
            nhatten Noble Hatten added a comment -

            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."

            Show
            nhatten Noble Hatten added a comment - 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."
            Hide
            gmat_wcs Wendy Shoan added a comment -

            Status 2019.03.21 [WCS]

            • Should I restart the conversion of the Python prototypes?
            Show
            gmat_wcs Wendy Shoan added a comment - Status 2019.03.21 [WCS] Should I restart the conversion of the Python prototypes?
            Hide
            nhatten Noble Hatten added a comment -

            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++.

            Show
            nhatten Noble Hatten added a comment - 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++.
            Hide
            nhatten Noble Hatten added a comment -

            All tasks completed; closing ticket.

            Show
            nhatten Noble Hatten added a comment - All tasks completed; closing ticket.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: