-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracting dynamics and faster simulation #538
Comments
Thanks for your suggestion! We'd love anything that speeds up SINDy. I've got a few clarification questions
Is this because of the integrator used, or the the function evaluation?
What is this? |
The
I compared pySINDY's
This is a nonlinear system dynamics model class from the aforementioned Python Control Systems Library. It encodes the "dynamics" function and is used extensively by controls engineers. It's not really that important that pySINDy be able to return such a model because that can be easily constructed from the "dynamics" function. What my "parser" function |
Is your feature request related to a problem? Please describe.
This feature request attempts to solve two issues with pySINDy:
scipy.integrate
orcontrol.NonlinearIOSystem
.pysindy.pysindy.SINDy.simulate()
method.Describe the solution you'd like
I'd like there to be a method in
pysindy.pysindy.SINDy
that returns the dynamics as an evaluable function, either in the form used byscipy.integrate
orcontrol.NonlinearIOSystem
(an option for either would be nice). This could also be used in the slowpysindy.pysindy.SINDy.simulate()
method to significantly improve performance. The current technique has very slow integration performance.Describe alternatives you've considered
I've written my own parser:
It returns a function in the form used by
control.NonlinearIOSystem
, but could be easily adapted forscipy.integrate
as well. I think the most fragile part is this:Perhaps there is a better way. For a system constructed from Lorenz system data and , I compared the performance to the built-in
simulate()
method and got:Clearly, the performance of the extracted dynamics simulation are far superior.
The state trajectories were similar but not identical:
I don't know which one is more correct, actually. Perhaps someone can help with that.
I could do a PR, but I figured it would be best to discuss and work out a good approach first.
The text was updated successfully, but these errors were encountered: