Title: Implement a better algorithm for pole placement · Issue #117 · python-control/python-control · GitHub
Open Graph Title: Implement a better algorithm for pole placement · Issue #117 · python-control/python-control
X Title: Implement a better algorithm for pole placement · Issue #117 · python-control/python-control
Description: Hello! I've happened to compare pole placement with Matlab's, and found out that returned matrix doesn't make the poles fall in the chosen values. I made an example script just like python-control/examples/slicot-test.py for matlab and p...
Open Graph Description: Hello! I've happened to compare pole placement with Matlab's, and found out that returned matrix doesn't make the poles fall in the chosen values. I made an example script just like python-control/...
X Description: Hello! I've happened to compare pole placement with Matlab's, and found out that returned matrix doesn't make the poles fall in the chosen values. I made an example script just like pyt...
Opengraph URL: https://github.com/python-control/python-control/issues/117
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Implement a better algorithm for pole placement","articleBody":"Hello!\nI've happened to compare pole placement with Matlab's, and found out that returned matrix doesn't make the poles fall in the chosen values.\nI made an example script just like `python-control/examples/slicot-test.py` for matlab and python.\n\nMatlab script:\n\n```\nA = [\n[ 0, 0, 0, 1],\n[-42.7207306947135, 0, 0, 0],\n[ 0, 0, 0, 0],\n[ 47.0334901743703, 0, 0, 0]];\n\nC = [[ 1., 0., 0., 0.],\n [ 0., 1., 0., 0.],\n [ 0., 0., 1., 0.],\n [ 0., 0., 0., 1.]];\n\np = [-31., -21., -20., -30.];\n\nL = place(A',C',p)\neigs(A' - C'*L)\n\n% L= 31.0000 -42.7207 0 47.0335\n% 0 21.0000 0 0\n% 0 0 20.0000 0\n% 1.0000 0 0 30.0000\n% eigs = -20, -21, -30, -31\n```\n\nPython script:\n\n```\nimport numpy as np # Numerical library\nfrom scipy import * # Load the scipy functions\nfrom control.matlab import * # Load the controls systems library\n\nA = matrix([\n[ 0, 0, 0, 1],\n[-42.7207306947135, 0, 0, 0],\n[ 0, 0, 0, 0],\n[ 47.0334901743703, 0, 0, 0]])\n\nC = matrix([[ 1., 0., 0., 0.],\n [ 0., 1., 0., 0.],\n [ 0., 0., 1., 0.],\n [ 0., 0., 0., 1.]])\n\np = [-31., -21., -20., -30.]\nL = place(A.T, C.T, p)\nprint \"Pole place: L = \", L\nprint \"Pole place: eigs = \", np.linalg.eig(A.T - C.T * L)[0]\n\n#Pole place: L = [[ 0.73152698 -1.12180554 -0. 5.01688279]\n# [ -1.12180554 22.72030247 -0. -7.69345088]\n# [ -0. -0. 20. -0. ]\n# [ 5.01688279 -7.69345088 -0. 34.40626723]]\n#Pole place: eigs = [ -6.85809669 -30. -21. -20. ]\n# \u003e\u003e\u003e control.__version__\n# '0.7.0'\n```\n\nAm I using it wrong?\n","author":{"url":"https://github.com/vmatos","@type":"Person","name":"vmatos"},"datePublished":"2016-10-11T14:44:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/117/python-control/issues/117"}
| 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:0ac2bcfc-d80c-4f27-ca1e-cffb2fb37aaa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E37E:F8BD7:241386:31B9BD:697BBB4B |
| html-safe-nonce | 5709e5415cd5b37f1fe10f093dd43c3f8b707becf4c516d577eb6d550d9f3cb8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzdFOkY4QkQ3OjI0MTM4NjozMUI5QkQ6Njk3QkJCNEIiLCJ2aXNpdG9yX2lkIjoiNDMxNjEyNDkwMzY3MDI2NjY5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3644cdc51155cb21acf22f2393923847f0487413e07a228bf7e19c88d615b120 |
| hovercard-subject-tag | issue:182283479 |
| 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/117/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b5b67a90c32ffbf612afa41b4ccf593d9c94de6294dd2b223e7f8713fd8d2e12/python-control/python-control/issues/117 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b5b67a90c32ffbf612afa41b4ccf593d9c94de6294dd2b223e7f8713fd8d2e12/python-control/python-control/issues/117 |
| og:image:alt | Hello! I've happened to compare pole placement with Matlab's, and found out that returned matrix doesn't make the poles fall in the chosen values. I made an example script just like python-control/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vmatos |
| hostname | github.com |
| expected-hostname | github.com |
| None | ab413746e1b95376981dfec4a04b2384a611b96affe802ee3ee6d752200afbb1 |
| 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 | bea0e0f1995ab0bb7fa336572c353032cf897ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width