Title: Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open] · Issue #399 · python-control/python-control · GitHub
Open Graph Title: Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open] · Issue #399 · python-control/python-control
X Title: Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open] · Issue #399 · python-control/python-control
Description: Hi, I found a bug in InterconnectedSystem when connecting two systems with different dt, one of which is None. I believe the correct semantic is for the new system to take the dt of the non-None system, but the way it is implemented, the...
Open Graph Description: Hi, I found a bug in InterconnectedSystem when connecting two systems with different dt, one of which is None. I believe the correct semantic is for the new system to take the dt of the non-None sy...
X Description: Hi, I found a bug in InterconnectedSystem when connecting two systems with different dt, one of which is None. I believe the correct semantic is for the new system to take the dt of the non-None sy...
Opengraph URL: https://github.com/python-control/python-control/issues/399
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open]","articleBody":"Hi, I found a bug in InterconnectedSystem when connecting two systems with different dt, one of which is None. I believe the correct semantic is for the new system to take the dt of the non-None system, but the way it is implemented, the order of the systems matters.\r\n\r\n```\r\nimport control as ct\r\nsys1 = ct.tf2io(ct.tf('s'))\r\nsys2 = ct.NonlinearIOSystem(lambda t,x,u: x, name='sys2', states=('x'), inputs=('u'))\r\nct.InterconnectedSystem((sys2,sys1))\r\n```\r\nThis code works, but changing the order of sys1 and sys2, as in `ct.InterconnectedSystem((sys1,sys2))` gives a bug:\r\n\r\n\u003e TypeError Traceback (most recent call last)\r\n\u003e \u003cipython-input-215-d3e121778200\u003e in \u003cmodule\u003e\r\n\u003e 2 sys1 = ct.tf2io(ct.tf('s'))\r\n\u003e 3 sys2 = ct.NonlinearIOSystem(lambda t,x,u: x, name='sys2', states=('x'), inputs=('u'))\r\n\u003e ----\u003e 4 ct.InterconnectedSystem((sys1,sys2))\r\n\u003e \r\n\u003e /usr/local/lib/python3.7/site-packages/control-0.8.3-py3.7.egg/control/iosys.py in __init__(self, syslist, connections, inplist, outlist, inputs, outputs, states, params, dt, name)\r\n\u003e 892 dt = sys.dt\r\n\u003e 893 elif dt != sys.dt:\r\n\u003e --\u003e 894 raise TypeError(\"System timebases are not compatible\")\r\n\u003e 895 \r\n\u003e 896 # Make sure number of inputs, outputs, states is given\r\n\u003e \r\n\u003e TypeError: System timebases are not compatible","author":{"url":"https://github.com/samlaf","@type":"Person","name":"samlaf"},"datePublished":"2020-05-14T02:15:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/399/python-control/issues/399"}
| 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:842383c1-7e16-ce66-62a9-0dab68c04dec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D70E:1B4CF3:543DEF:7516BB:6979ED6A |
| html-safe-nonce | 68f479394b2d6dd5852803ff1001ff7e3b7e501cf0281fd2d2fd60a3cef0aba8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzBFOjFCNENGMzo1NDNERUY6NzUxNkJCOjY5NzlFRDZBIiwidmlzaXRvcl9pZCI6IjQ2MTY1OTY1NDY1MDA4MTYyMzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 374e59ccd26395817ca9b37d9abeb06c78b39c4771d11fe3c6f94e1bafbfb834 |
| hovercard-subject-tag | issue:617871605 |
| 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/399/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d2b567c853755720fbccbe7af457b69e474762177097f2f3e1ab4de61e75d268/python-control/python-control/issues/399 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d2b567c853755720fbccbe7af457b69e474762177097f2f3e1ab4de61e75d268/python-control/python-control/issues/399 |
| og:image:alt | Hi, I found a bug in InterconnectedSystem when connecting two systems with different dt, one of which is None. I believe the correct semantic is for the new system to take the dt of the non-None sy... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | samlaf |
| hostname | github.com |
| expected-hostname | github.com |
| None | d518616844426fb176f4177c4776349f6e70ef1ce75f459c8c53bf9293bb6982 |
| 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 | 22c6ce7724007ae85d7487fce3308a1c7cea8be6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width