-
Notifications
You must be signed in to change notification settings - Fork 438
add summing junction + implicit signal interconnection #517
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
add summing junction + implicit signal interconnection #517
Conversation
Very cool! I particularly like that it appears possible with this to leave out the ‘name’ keyword for the constitutive systems for simple interconnections like this. Am I correct in that? Nice to have that option because thst keyword is somewhat redundant and prone to errors when code gets modified. If you give the sumblock more input names (eg 3 instead of 2), does it sum those three signals? |
Correct. The following works just fine (from #516):
(
Yup. Any number of inputs can be summed together. The Some possible tweaks:
|
Awesome. New name for summer sounds better. Hoping this will make creating simulink-like interconnected system simulations much easier. I will let you know how it goes once it’s been merged in. |
Very nice! (Now we will have users demanding a graphical editor next 😁. Implemented as jupyter notebook widget or the like.) |
I think the first step in that direction might be to add an option in
interconnect to draw a block diagram. This could be done using matplotlibs
pretty good capabilities for this.
…--
Sawyer Fuller
Assistant Professor of Mechanical Engineering
Adjunct, Paul G Allen School of Computer Science
University of Washington
http://faculty.washington.edu/~minster/
(Typed with my thumbs)
|
interconneciton map by connecting all signals with the same base names | ||
(ignoring the system name). Specifically, for each input signal name | ||
in the list of systems, if that signal name corresponds to the output | ||
signal in any of the systems, it will be connected to that input (with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that this summation effect is stated explicitly.
This PR addresses the enhancement describe in issue #516 where signals with the same name are automatically interconnected by the
interconnect
function. It also defines a new functionsummation_block
that addresses the request in issue #493. Together, these capabilities allow the following code to work for setting up a simple feedback system:Other minor changes:
iosys.feedback
function to accept a float_like for the feedback system (so thatfeedback(P * C, 1)
now works.