EthanJamesLew / AutoKoopman

AutoKoopman - automated Koopman operator methods for data-driven dynamical systems analysis and control.
GNU General Public License v3.0
53 stars 10 forks source link

ODEs with Constraints #19

Closed EthanJamesLew closed 2 years ago

EthanJamesLew commented 2 years ago

I have been going through the benchmarks from the original Arch competition, and some of them have constraints that are not implemented. For example: “Prde20” has a constraint that: x(t) + y(t) + z(t) = 10 for all t. Does Autokoopman currently have support for implementing these constraints for continuous systems? If not, could we add some support for constraints on dynamics?

EthanJamesLew commented 2 years ago

@Abdu-Hekal Our implementation of Prde20 should be valid if the initial conditions satisfy the equality $$x_0 + y_0 + z_0 = 10$$. This can be expressed as the DAE

$$ \begin{cases} \dot x = - \frac{x y}{x + 1} \ \dot y = \frac{x y}{x + 1} - \alpha y \ 10 = x + y + z \ \end{cases} $$

but it should be sufficient as is.

At any rate, I'm adding an implementation of DAEs, but this shouldn't be a blocker for the benchmarks.

Abdu-Hekal commented 2 years ago

@EthanJamesLew I believe for the prde20 benchmark, the condition must hold for all times t (shown in the image attached) and not only as an initial condition.

If we can express the DAE as you outlined: 10 = x + y + z, then we can capture this condition correctly.

prde20

Thank you!

EthanJamesLew commented 2 years ago

@Abdu-Hekal the evolution function should already enforce $$x(t) + y(t) + z(t) = c_0, \quad \forall t \in \mathbb R^+$$ where $$x_0 + y_0 + z_0 = c_0$$. The DAE complains about being overconstrained when having the 3 differential equations + 1 constraint. Can you find an initial condition where that's not the case?

Abdu-Hekal commented 2 years ago

@EthanJamesLew You are correct! I did not notice that the evolution function implicitly ensures that this condition is always satisfied. This also seems to be the case for the robe21 benchmark. It seems we don't need support for these constraints for the sake of these benchmarks after all. Thank you!