Title: Scaling for control.impulse_response discrete time is not correct · Issue #974 · python-control/python-control · GitHub
Open Graph Title: Scaling for control.impulse_response discrete time is not correct · Issue #974 · python-control/python-control
X Title: Scaling for control.impulse_response discrete time is not correct · Issue #974 · python-control/python-control
Description: Tested on control 0.9.2 and again on 0.9.4 The resulting impulse response (unit sample response) for the following transfer function (accumulator scaled by 0.1) is not properly scaled: $$H(z) = \frac{Tz}{z-1}$$ With the sample duration s...
Open Graph Description: Tested on control 0.9.2 and again on 0.9.4 The resulting impulse response (unit sample response) for the following transfer function (accumulator scaled by 0.1) is not properly scaled: $$H(z) = \fr...
X Description: Tested on control 0.9.2 and again on 0.9.4 The resulting impulse response (unit sample response) for the following transfer function (accumulator scaled by 0.1) is not properly scaled: $$H(z) = \fr...
Opengraph URL: https://github.com/python-control/python-control/issues/974
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Scaling for control.impulse_response discrete time is not correct","articleBody":"Tested on control 0.9.2 and again on 0.9.4\r\n\r\nThe resulting impulse response (unit sample response) for the following transfer function (accumulator scaled by 0.1) is not properly scaled:\r\n\r\n$$H(z) = \\frac{Tz}{z-1}$$ \r\n\r\nWith the sample duration set to $T=0.1$ is being scaled again by $1/T$ such that the result is a step with every output sample set to 1. This is not correct as the result should be 0.1 for every output sample.\r\n\r\nTo further clarify below is the implementation diagram:\r\n\r\n\r\n\r\nIf we pass a unit sample into this, it would scale by $T$ to be $0.1$ per the transfer function and block diagram shown and then the output would go to $0.1$ and then repeat for every subsequent sample. I confirmed with Octave that the result is as I expect. Further if I use `con.step_response` on the same transfer function, the result is also what I expect for that case (the output increments by 0.1). \r\n\r\nCode to repeat problem:\r\n\r\n import control as con\r\n dt=0.1\r\n accum = con.tf([dt, 0], [1, -1], dt)\r\n t1, y1 = con.impulse_response(accum) # doesn't scale properly\r\n t2, y2 = con.step_response(accum) # scales properly\r\n\r\nI do see in the docs \"For continuous time systems, the initial condition is altered to account for the initial impulse. For discrete-time systems, the impulse is sized so that it has unit area\", but would argue that it should not be rescaled especially if Octave and MATLAB are not doing that (I haven't confirmed MATLAB) and should represent the output of the discrete time system described by $H(z)$ alone without modification when a unit sample is applied to the input.","author":{"url":"https://github.com/cdboschen","@type":"Person","name":"cdboschen"},"datePublished":"2024-03-02T16:03:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/974/python-control/issues/974"}
| 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:a4d342d5-7775-cd32-6255-64d3f96f5a88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E958:16F557:E9326E:EC0584:697A8123 |
| html-safe-nonce | 2b3e462ddff80309d4dc781dc52772eb32158b06728164d0aab6091b1025b82a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTU4OjE2RjU1NzpFOTMyNkU6RUMwNTg0OjY5N0E4MTIzIiwidmlzaXRvcl9pZCI6Ijg3NzQyNjA3MzAyNTQ0OTE5MzkiLCJyZWdpb25fZWRnZSI6InNlYSIsInJlZ2lvbl9yZW5kZXIiOiJzZWEifQ== |
| visitor-hmac | beec43bcc330449487788889fc5c136651ed25cb981d0ae7c4d12b52b4b9211d |
| hovercard-subject-tag | issue:2164869977 |
| 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/974/issue_layout |
| twitter:image | https://opengraph.githubassets.com/29610bd3b7d1ff72ce2b754a5e1a50c41919f15c09b8f10afaeedf59184bc5e9/python-control/python-control/issues/974 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/29610bd3b7d1ff72ce2b754a5e1a50c41919f15c09b8f10afaeedf59184bc5e9/python-control/python-control/issues/974 |
| og:image:alt | Tested on control 0.9.2 and again on 0.9.4 The resulting impulse response (unit sample response) for the following transfer function (accumulator scaled by 0.1) is not properly scaled: $$H(z) = \fr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cdboschen |
| hostname | github.com |
| expected-hostname | github.com |
| None | f6192227ebb08ae3d66e887f7363efea6f1ba29abe280990e1f6ad2d2962b6c8 |
| 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 | 7f58967b50cdccb4b617fbacac94376e17eef59e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width