-
Notifications
You must be signed in to change notification settings - Fork 32
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
Example of integrator of hybrid system on a Python project #2
Comments
Thanks for your interest, yours is the first comment! I'm happy to work with anybody who'd like to contribute something in this area. I've got a few ideas sketched out about how I can use SciPy to do this better, but this project is on the back burner at the moment while I get the robotics and vision toolboxes up to a good level of maturity. |
Dear Peter, great piece of software. We recently introduced a similar feature in python-control called interconnect that uses a slightly different approach that entails naming signals. Your approach has the nice attribute that the code appears very simple. We will be keeping an eye on this! I read with some interest your remark that python is still in need of an integrator for hybrid discrete-continuous systems; we are definitely in need of such a feature for python-control. Thanks @traversaro for the pointer. |
Hi @sawyerbfuller, thanks for contacting me. I think I looked at interconnect a while back, and I think there’s some interesting things we could do together. Quite complementary functionality.
Some students have been developing a GUI for me, see the attached. The model is saved in JSON and I can build a bdsim model from that, and run it. Still a work in progress quite useful I think.
I’ve added rudimentary hybrid system support which is ok for simple cases, but I’d like a stronger solution for that.
peter
… On 19 Aug 2021, at 7:11 am, sawyerbfuller ***@***.***> wrote:
Dear Peter, great piece of software. We recently introduced a similar feature in python-control called interconnect <https://python-control.readthedocs.io/en/0.9.0/generated/control.interconnect.html?highlight=interconnect> that uses a slightly different approach that entails naming signals. Your approach has the nice attribute that the code appears very simple. We will be keeping an eye on this!
I read with some interest your remark that python is still in need of an integrator for hybrid discrete-continuous systems; we are definitely in need of such a feature for python-control. Thanks @traversaro <https://github.com/traversaro> for the pointer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2BIURTD47O2BS4R4N53HDT5QOWJANCNFSM4UKY5TBQ>.
|
Hi @petercorke looks like maybe github stripped the attachment? You can email it directly to me if easier at minster@uw.edu . Very interested in your gui work, because not having a simulink-like gui -- and/or a hybrid integrator we can use with interconnect -- has been a main limitation for students using python-control vs matlab in the controls class I have been teaching. |
The Scipy solve_ivp integrator has event handling which might be usable. Would need to add a |
Looks like the docstrings in solve_ivp have been updated to clarify something that I had been confused by before: that setting t_eval seemed to have no effect on the points that were evaluated. Now it is clear that its purpose is only to specify which points are returned. That said, indeed it looks like events could be used to specify time points to make sure to evaluate. But, it seems like specifiying evenly-spaced events would go through a quite roundabout process in the integrator if I understand correctly. You would need to specify a function that has repeated zero-crossings - the obvious choice being perhaps a sinusoid that crossed zero at every |
Hi @petercorke,
thanks a lot for sharing such a tool, it seems to be quite interesting.
I saw that in the README it is written that:
Unfortunately I do not have a lot of time on working on this, but if anyone is interested in working on this, a good example of an integration of an advanced integrator that support for example hybrid system can be found in the FMPy project. In particular, the
fmpy.sundials.cvode
contains a Python interface to the Sundials' CVODE integrator. An example of use of such interface for integrating a hybrid system (bouncing ball) can be found in https://github.com/CATIA-Systems/FMPy/blob/e1927a128a9552f20304587c54c716750e73b05f/tests/test_cvode.py .The text was updated successfully, but these errors were encountered: