Title: Scaling difference in impulse response size compared to scipy.signal · Issue #813 · python-control/python-control · GitHub
Open Graph Title: Scaling difference in impulse response size compared to scipy.signal · Issue #813 · python-control/python-control
X Title: Scaling difference in impulse response size compared to scipy.signal · Issue #813 · python-control/python-control
Description: Discussed in #747 Originally posted by fhchl June 29, 2022 I had some code that I wanted to port from using scipy.signal.StateSpace etc. to python-control. There seems to be some scaling difference between the two implementations. What a...
Open Graph Description: Discussed in #747 Originally posted by fhchl June 29, 2022 I had some code that I wanted to port from using scipy.signal.StateSpace etc. to python-control. There seems to be some scaling difference...
X Description: Discussed in #747 Originally posted by fhchl June 29, 2022 I had some code that I wanted to port from using scipy.signal.StateSpace etc. to python-control. There seems to be some scaling difference...
Opengraph URL: https://github.com/python-control/python-control/issues/813
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Scaling difference in impulse response size compared to scipy.signal","articleBody":"### Discussed in https://github.com/python-control/python-control/discussions/747\r\n\r\n\u003cdiv type='discussions-op-text'\u003e\r\n\r\n\u003csup\u003eOriginally posted by **fhchl** June 29, 2022\u003c/sup\u003e\r\nI had some code that I wanted to port from using `scipy.signal.StateSpace` etc. to `python-control`. There seems to be some scaling difference between the two implementations. What am I overlooking?\r\n\r\n```python\r\nimport numpy as np\r\nimport control\r\nimport scipy.signal\r\n\r\n# random state space matrices\r\nt= np.linspace(0, 10, dtype=float)\r\nss = control.drss(3, 2, 1)\r\nA, B, C, D = ss.A, ss.B, ss.C, ss.D\r\ndt = t[1]\r\n\r\n# compute impulse response with python-control\r\nss = control.ss(A, B, C, D, dt=dt)\r\nt_control, h_control = control.impulse_response(ss, T=t)\r\nplt.figure()\r\nplt.plot(t_control, h_control[0, 0])\r\nplt.plot(t_control, h_control[1, 0])\r\n\r\n# compute impulse response with scipy.signal\r\nss_scipy = scipy.signal.StateSpace(A, B, C, D, dt=dt)\r\nt_scipy, (h_scipy,) = scipy.signal.dimpulse(ss_scipy, t=t)\r\nplt.figure()\r\nplt.plot(t_scipy, h_scipy[:, 0])\r\nplt.plot(t_scipy, h_scipy[:, 1])\r\n\r\nplt.show()\r\n```\r\n\r\nCreates these two here.\r\n\r\n\r\n\r\n\u003c/div\u003e","author":{"url":"https://github.com/sawyerbfuller","@type":"Person","name":"sawyerbfuller"},"datePublished":"2022-12-10T10:39:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/813/python-control/issues/813"}
| 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:360d322a-3844-ccb0-491f-b5b9cd88b523 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A48A:366AD7:165D835:1D9E1D2:697C1F3B |
| html-safe-nonce | 371d01353337bb2c23723615ccaee1e5ad7cf1db8882adb888213b602eecd1d9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDhBOjM2NkFENzoxNjVEODM1OjFEOUUxRDI6Njk3QzFGM0IiLCJ2aXNpdG9yX2lkIjoiMjc2MzA1MjU0NDYxNDQ3MzUzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e50057575a5c35d44d73538dcda0f8b9730db4dc5e70346f1082b2235178715e |
| hovercard-subject-tag | issue:1488365343 |
| 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/813/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e327e941bc001aa3ddc4aae55c20da7c0b8ab65e37d04580f0f476894e49ccf3/python-control/python-control/issues/813 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e327e941bc001aa3ddc4aae55c20da7c0b8ab65e37d04580f0f476894e49ccf3/python-control/python-control/issues/813 |
| og:image:alt | Discussed in #747 Originally posted by fhchl June 29, 2022 I had some code that I wanted to port from using scipy.signal.StateSpace etc. to python-control. There seems to be some scaling difference... |
| 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 | da4f0ee56809799586f8ee546b27f94fe9b5893edfbf87732e82be45be013b52 |
| 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 | 787d8d274e314f52ce6d846c7581f9476d8dc736 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width