Skip to content

new examples for Simulink-like interconnection of digital and nonlinear systems #882

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

Merged
merged 5 commits into from
Apr 11, 2023

Conversation

sawyerbfuller
Copy link
Contributor

@sawyerbfuller sawyerbfuller commented Apr 7, 2023

The goal of this PR is to provide examples of how to use interconnect to create sophisticated interconnections of systems of different types in a manner that is reminiscent of Simulink. In particular, simulating_sampled_data_systems.ipynbsimulating_discrete_nonlinear.ipynb provides a few helper functions to accurately simulate interconnections of discrete-time controllers, a nonlinear plant, and time delays.

Since Python does not have a great numerical integration system for delay differential equations, the approach that is used is to discretize all of the components with a short time interval, including the discrete-time controller.

A future PR will incorporate some of these helper functions into the library, particularly sampled_data_controller().

@coveralls
Copy link

coveralls commented Apr 7, 2023

Coverage Status

Coverage: 94.535%. Remained the same when pulling c703650 on sawyerbfuller:interconnect-examples into 999189c on python-control:main.

@@ -44,10 +44,12 @@ using running examples in FBS2e.

cruise
describing_functions
interconnect_tutorial
Copy link
Member

@murrayrm murrayrm Apr 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably update the introductory text at the top of this section since the Jupyter notebooks in this section are no longer using running examples in FBS2e (true before this change, but I noticed it now). How about something like:

These notebooks demonstrate the use of modeling, anaylsis, and design tools
using examples from textbooks (FBS2e, OBC), courses, and other sources.

(links would have to be done differently, but using GitHub markup here to show where the links go).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. INcorporated the suggested rewording.

Also improved the name on one of the examples and switched to lists for specifying set of interconnected systems according to upcoming changes in interconnect.

@murrayrm
Copy link
Member

The new notebook name is really long (56 characters!). Perhaps worth a bit of discussion about file naming conditions in this folder. I have been trying to use shorter names (eg, 'mhe-pvtol' and 'stochresp'), but there are a few longer ones (e.g. 'check-controllability-and-observability.py').

Do we care?

@sawyerbfuller
Copy link
Contributor Author

@murrayrm I think that filename was a bit long. Took a stab at shortening it.

In any case, the title of the notebook is what appears in the readthedocs page, not its filename:

image

@murrayrm murrayrm merged commit 1e1c8eb into python-control:main Apr 11, 2023
@murrayrm murrayrm added this to the 0.9.4 milestone Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants