Title: new iosys.interconnect is great, but... · Issue #530 · python-control/python-control · GitHub
Open Graph Title: new iosys.interconnect is great, but... · Issue #530 · python-control/python-control
X Title: new iosys.interconnect is great, but... · Issue #530 · python-control/python-control
Description: The new naming functionality in iosys.interconnect function [1] has allowed me to create some very sophisticated systems much more easily than with append and connect. So far, no bugs that I have found. Very nice! a few remarks on usage:...
Open Graph Description: The new naming functionality in iosys.interconnect function [1] has allowed me to create some very sophisticated systems much more easily than with append and connect. So far, no bugs that I have f...
X Description: The new naming functionality in iosys.interconnect function [1] has allowed me to create some very sophisticated systems much more easily than with append and connect. So far, no bugs that I have f...
Opengraph URL: https://github.com/python-control/python-control/issues/530
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"new iosys.interconnect is great, but...","articleBody":"The new naming functionality in `iosys.interconnect` function [1] has allowed me to create some very sophisticated systems much more easily than with `append` and `connect`. So far, no bugs that I have found. Very nice! \r\n\r\na few remarks on usage: \r\n* the `inplist` and `outlist` arguments are confusing and tricky. When you are writing code, its easy to forget shortened argument names like this: was it `outplist` or `outlist`? Also, they seem to exist to serve as a means to provide new names to the overall inputs and outputs. Is that a necessary feature? (might have to do with how system was set up for explicit interconnection) Possible to remove them and force the overall system to have the same input names and output names as constituent systems, and instead just provide `inputs` and `outputs` kwargs for `interconnect`? (edit: this is what matlab seems to do: https://www.mathworks.com/help/control/ref/connect.html)\r\n* auto-summing and auto-splitting, as suggested here: https://github.com/python-control/python-control/blob/master/doc/iosys.rst#automatic-connections-using-signal-names doesn't seem to work. For example, when I try to send the same signal `u` to both `sys1` and `sys2` in the following code a `ValueError: signal u is not unique` is raised: \r\n```python\r\nsys1 = ct.tf(1, [10, 1])\r\nsys2 = ct.tf(1, [2, 1])\r\nsummer = ct.iosys.summing_junction(['y1', 'y2'], 'y')\r\nsys1 = ct.iosys.tf2io(sys1, inputs='u', outputs='y1')\r\nsys2 = ct.iosys.tf2io(sys2, inputs='u', outputs='y2')\r\nparallel = ct.interconnect((summer, sys1, sys2), inplist='u', outlist='y')\r\n```\r\n* similarly for auto-summing. the following raises `ValueError: signal y is not unique`:\r\n```python\r\nsplitter = ct.ss2io(ct.ss([], [], [], [[1],[1]]), inputs='u', outputs=('u1', 'u2'))\r\nsys1 = ct.iosys.tf2io(sys1, inputs='u1', outputs='y')\r\nsys2 = ct.iosys.tf2io(sys2, inputs='u2', outputs='y')\r\nparallel = ct.interconnect((splitter, sys1, sys2), inplist='u', outlist='y')\r\n```\r\n\r\nI don't know how hard these are to fix, it depends on how the underlying interconnection code works. One option would be to just modify the docs to remove mention of auto splitting and summing and add a helper splitter functoin: \r\n```python\r\ndef splitter(inputs, outputs):\r\n D = np.ones((len(outputs),1))\r\n C = np.zeros_like(D)\r\n return io.ss2io(ct.ss(0, 0, C, D), inputs=inputs, outputs=outputs)\r\n```\r\n\r\n\r\n[1] https://github.com/python-control/python-control/blob/73f65dfe1dbf3ca9431a815769da42c52feb6169/control/iosys.py#L1850","author":{"url":"https://github.com/sawyerbfuller","@type":"Person","name":"sawyerbfuller"},"datePublished":"2021-02-03T21:12:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/530/python-control/issues/530"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cb0f8c2c-e8c0-7997-34f5-db2018bebfe8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC08:1F1E44:163E684:1F11412:697BA1EE |
| html-safe-nonce | ff58f5b95024578228de2e2648917b7404cf03962d090e5ee08ebc05132a2397 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzA4OjFGMUU0NDoxNjNFNjg0OjFGMTE0MTI6Njk3QkExRUUiLCJ2aXNpdG9yX2lkIjoiNzQwMTE3MDEzOTY3Mzc2NDMzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a77cf8ceeea9b02d250f03a409dadbb1e2741e228c02ccd443dd6008cc4c82fb |
| hovercard-subject-tag | issue:800704529 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-control/python-control/530/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ce29379eee6ea7b636ab22a928c4fae5e89db894679f2d5dc875e90909253342/python-control/python-control/issues/530 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ce29379eee6ea7b636ab22a928c4fae5e89db894679f2d5dc875e90909253342/python-control/python-control/issues/530 |
| og:image:alt | The new naming functionality in iosys.interconnect function [1] has allowed me to create some very sophisticated systems much more easily than with append and connect. So far, no bugs that I have f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sawyerbfuller |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7ba9ae7380317898f1b98f4cf41e78605ff2d68007cb4db4e46bdaf7e9423d2e |
| turbo-cache-control | no-preview |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d52dd9b71f0e5da9cfd694fb2faae78a81d8e46f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width