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

Inputs and States #71

Open Abdu-Hekal opened 1 year ago

Abdu-Hekal commented 1 year ago

When training, the number of inputs needs to be equal to the number of states. It seems to me that for n states, we should have n-1 inputs (last state doesn't have input). This also applies when running koopman where to output n states we should have an array teval of length n-1 instead of n.

Abdu-Hekal commented 1 year ago

@EthanJamesLew

EthanJamesLew commented 1 year ago

@Abdu-Hekal This is an interesting point. I agree for KIC with constant inputs you should not need that last state. However, there are formulations that would need the extra input, see Proctor, J. L., Brunton, S. L., & Kutz, J. N. (2018). Generalizing Koopman theory to allow for inputs and control. SIAM Journal on Applied Dynamical Systems, 17(1), 909-930, equation 3.7a. Because of this, I felt that the Trajectories object should allow the number of inputs to equal the number of states to allow users to treat them as states if they want.

EthanJamesLew commented 1 year ago

On the solve_ivp requiring one less input value, I agree entirely. I should change it

EthanJamesLew commented 1 year ago

@Abdu-Hekal is this issue still relevant? Has it been detrimental to your work?