You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to fit an ODE of an electrical circuit with some random RLC values and I specifically want to use a Custom library because I need it in the next step (can you suggest a better Library covering the principle of the Custom Lib?).
I use the ConstrainedSR3 algorithm and I did define constraints for equation 1 where the coefficient for x1 is 1 and all the other coefficients are constraint to 0.
The ground truth model is:
x0' = 1 x1
x1' = -100000000.0 x0, -500000.0 x1, 1000000.0 u(t)
But after trying different things I still struggle to get reasonable coefficients from the fit. The output model generated is:
Although, x0' is correct the other equation for x1' has too many terms. And for some reason, the model score is "0.999843" pretty good despite the bad looking results when plotting them.
Any idea how to improve the situaiton? Code in the appendix. Thx in advance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to fit an ODE of an electrical circuit with some random RLC values and I specifically want to use a Custom library because I need it in the next step (can you suggest a better Library covering the principle of the Custom Lib?).
I use the ConstrainedSR3 algorithm and I did define constraints for equation 1 where the coefficient for x1 is 1 and all the other coefficients are constraint to 0.
The ground truth model is:
x0' = 1 x1
x1' = -100000000.0 x0, -500000.0 x1, 1000000.0 u(t)
But after trying different things I still struggle to get reasonable coefficients from the fit. The output model generated is:
----- SINDy, x0' all coeff. constr., single traj. ------
x0' = 1.000 x1
x1' = -112005227.714 x0 + -558655.326 x1 + 1122184.295 u(t) + 4.354 1/x0 + 3147.492 1/x1 + -3071.747 1/u(t) + -3020707.086 x0^1/x1 + -43506.426 x0^1/u(t) + -218.003 x1^1/u(t) + 73.770 x1^1/x0 + -152.177 u(t)^1/x0 + 30237.345 u(t)^1/x1 + -485198.805 x0^2/x1 + 2563315.526 x0^2/u(t) + -64.116 x1^2/u(t) + 5.808 x1^2/x0 + -23.234 u(t)^2/x0 + 48.346 u(t)^2/x1
Although, x0' is correct the other equation for x1' has too many terms. And for some reason, the model score is "0.999843" pretty good despite the bad looking results when plotting them.
Any idea how to improve the situaiton? Code in the appendix. Thx in advance.
5_RLC_sindy_Eq1_allCoeff_constr_customLib.txt
Beta Was this translation helpful? Give feedback.
All reactions