OpenMDAO / dymos

Open Source Optimization of Dynamic Multidisciplinary Systems
Apache License 2.0
204 stars 65 forks source link

Vandermonde control interpolation is incompatible with Birkhoff transcription. #1044

Closed robfalck closed 6 months ago

robfalck commented 7 months ago

Description

The birkhoff transcription uses a single, often high-order polynomial segment to represent the states.

Dymos often assumes this same polynomial basis represents the controls. For simulation and explicit shooting, dymos has used a Vandermonde interpolation scheme because it is easier to differentiate, and much of the differentiation can be performed at setup time.

However, the Vandermonde interpolation scheme begins to become inaccurate when the basis has something around 30-40 nodes. Rates of the controls are wildly inaccurate at even fewer nodes. While this works for segmented schemes like LGL and Radau pseudospectral methods, simulating the result of a Birkhoff pseudospectral method is problematic due to the inaccuracy in the interpolated controls.

Because of this, Dymos should switch to using a Barycentric Lagrange interpolation algorithm for explicit shooting and simulation. This will be somewhat less efficient computationally due to the complexity of computing the derivatives, but the accuracy will not be an issue like it is with the Vandermonde interpolation scheme.

Example

This behavior can be seen by solving problems such as the hypersensitive problem using a single-segment Birkhoff transcription with, say, 50 nodes. dymos will find the solution, but the simulated result will not match due to the error in the interpolated control value.

Dymos Version

1.10.1-dev

Relevant environment information

No response