RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.18k stars 1.24k forks source link

Improve Drake support of SOS programming over Ideals #19840

Open AlexandreAmice opened 11 months ago

AlexandreAmice commented 11 months ago

Is your feature request related to a problem? Please describe. Many programs for dynamical system naturally have constraints of the form "f(x) is SOS for all g(x) = 0". For example, when searching for a Lyapunov function for pendulum dynamics, we require a Lyapunov function that is SOS for all s^2 + c^2 = 1.

Currently, the way users handle this is via the multiplier method which very quickly becomes intractable due to the bloat of the program. The correct way to handle these constraints is to operate on the coordinate ring of the variety associated to the equality constraint. In general, this is challenging but Drake should make it easier for us to do this for at least commonly encountered varieties.

Describe the solution you'd like The two known ways to operate on the coordinate ring is to either consider the Groebner basis of the associated variety or by sampling the coordinate ring. We should implement both approaches as sometimes a Groebner basis is easy to obtain, while sampling from the coordinate ring is hard, while in other instances sampling from the coordinate ring is easy, but a Groebner basis will take exponentially long to compute.

For both approaches, we should implement the class PolynomialIdeal

For the Groebner Basis approach:

For the Sampling approach:

To achieve these goals, we likely want to close out or make progress on #13803 and #13602

hongkai-dai commented 11 months ago

The plan sounds good. Who is the immediate user of these approaches? Do we have a project that would benefit from the SOS over Ideals implementation? Answering those would help decide the priority of the task.

AlexandreAmice commented 11 months ago

There have been various efforts in our lab thinking about doing SOS over equality constraints. See Lu's work, Shen's work, etc. I may be doing more in this direction soon. I believe the priority can remain low for now. I just wanted to put out some design ideas before starting slowly.