Title: Bug: Incorrect ValueError: incompatible timebases · Issue #754 · python-control/python-control · GitHub
Open Graph Title: Bug: Incorrect ValueError: incompatible timebases · Issue #754 · python-control/python-control
X Title: Bug: Incorrect ValueError: incompatible timebases · Issue #754 · python-control/python-control
Description: Using control.series to connect several discrete state-space systems, all with dt=0.05, is resulting in "ValueError:Systems have incompatible timebases" from "common_timebase" in namedio.py line 340 in release 0.9.2. File "/usr/local/ana...
Open Graph Description: Using control.series to connect several discrete state-space systems, all with dt=0.05, is resulting in "ValueError:Systems have incompatible timebases" from "common_timebase" in namedio.py line 34...
X Description: Using control.series to connect several discrete state-space systems, all with dt=0.05, is resulting in "ValueError:Systems have incompatible timebases" from "common_timebase" i...
Opengraph URL: https://github.com/python-control/python-control/issues/754
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: Incorrect ValueError: incompatible timebases","articleBody":"Using control.series to connect several discrete state-space systems, all with dt=0.05, is resulting in \"ValueError:Systems have incompatible timebases\" from \"common_timebase\" in namedio.py line 340 in release 0.9.2. \r\n\r\n\u003e File \"/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/bdalg.py\", line 108, in series return reduce(lambda x, y:y*x, sysn, sys1)\r\n\u003e \r\n\u003e File \"/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/bdalg.py\", line 108, in \u003clambda\u003e return reduce(lambda x, y:y*x, sysn, sys1)\r\n\u003e \r\n\u003e File \"/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/iosys.py\", line 184, in __mul__ newsys = InterconnectedSystem(\r\n\u003e \r\n\u003e File \"/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/iosys.py\", line 895, in __init__ dt = common_timebase(dt, sys.dt)\r\n\u003e \r\n\u003e File \"/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/namedio.py\", line 340, in common_timebase raise ValueError(\"Systems have incompatible timebases\")\r\n\u003e \r\n\u003e ValueError: Systems have incompatible timebases\r\n\r\nIn my case, the calling function __init__ in iosys.py, line 895 is initializing \"dt\" as 0 from the global default then passing this as the first arg to common_timebase, while the second arg is the sys.dt from the first system in the list of systems being combined. This results in the ValueError. All systems in syslist have dt = 0.05 and pass common_timebase with each other when passed as args manually while stopped in debugger.\r\n\r\nIt seems like the intent for the object __init__ functions in this module is probably that dt should be initialized as the dt of the first system in the syslist, but that is not what the code is doing.\r\n\r\nAs a work-around, running the same script with release 0.9.1 works.","author":{"url":"https://github.com/dc5048","@type":"Person","name":"dc5048"},"datePublished":"2022-08-02T23:08:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/754/python-control/issues/754"}
| 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:e8a88802-7b1f-50e5-5c02-570f1d566573 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0CA:2B276C:2309599:2F6972C:6979A0FB |
| html-safe-nonce | c47397801ce1084d0fd297fbcd3fbed4a0c219472a97a70f2b2588c1e1f574b3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMENBOjJCMjc2QzoyMzA5NTk5OjJGNjk3MkM6Njk3OUEwRkIiLCJ2aXNpdG9yX2lkIjoiNjU0MDkwNTQ4MTgyMzE2NjcxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 51499c28c0613a1577c9644adac4c775d0d05a56fc1484c157150b16b18d8ddd |
| hovercard-subject-tag | issue:1326489268 |
| 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/754/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b832e1883490e232a15c6df4060ad8be6ad71f048e2473eeb0cafd3a341ec3d0/python-control/python-control/issues/754 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b832e1883490e232a15c6df4060ad8be6ad71f048e2473eeb0cafd3a341ec3d0/python-control/python-control/issues/754 |
| og:image:alt | Using control.series to connect several discrete state-space systems, all with dt=0.05, is resulting in "ValueError:Systems have incompatible timebases" from "common_timebase" in namedio.py line 34... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dc5048 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c049b65ec7e54cbf2521f5a560b6527714c612b0bd169188e2ea6e16f83bd5f4 |
| 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 | 87b137883e35e2766c3d0f6a257c4044f6390b83 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width