Title: Elegant way to generate a transfer function matrix · Issue #325 · python-control/python-control · GitHub
Open Graph Title: Elegant way to generate a transfer function matrix · Issue #325 · python-control/python-control
X Title: Elegant way to generate a transfer function matrix · Issue #325 · python-control/python-control
Description: Hi everybody, I want to know if there is a more elegant way to generate a transfer-function-matrix for a hinf-controller. In matlab I just do: P11 = [0 0; W2G W2] P12 = [W1; W2G] P21 = [G 1] P22 = [G] P_ = [P11 P12; P21 P22] sys = ss(P_,...
Open Graph Description: Hi everybody, I want to know if there is a more elegant way to generate a transfer-function-matrix for a hinf-controller. In matlab I just do: P11 = [0 0; W2G W2] P12 = [W1; W2G] P21 = [G 1] P22 = ...
X Description: Hi everybody, I want to know if there is a more elegant way to generate a transfer-function-matrix for a hinf-controller. In matlab I just do: P11 = [0 0; W2G W2] P12 = [W1; W2G] P21 = [G 1] P22 = ...
Opengraph URL: https://github.com/python-control/python-control/issues/325
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Elegant way to generate a transfer function matrix","articleBody":"Hi everybody,\r\nI want to know if there is a more elegant way to generate a transfer-function-matrix for a hinf-controller.\r\n\r\nIn matlab I just do:\r\nP11 = [0 0; W2*G W2]\r\nP12 = [W1; W2*G]\r\nP21 = [G 1]\r\nP22 = [G]\r\nP_ = [P11 P12; P21 P22]\r\nsys = ss(P_, 'minimal');\r\n\r\nIn python with control, I habe to do:\r\nimport control\r\nfrom control import *\r\nGss = ss([[-1.0, -10.0], [1, 0]], [[10.0], [0]], [0, 1], [0])\r\nG = tf(Gss)\r\nW1 = tf([100], [0.1, 1])\r\nW2 = tf([100], [0.1, 1])\r\nW2G = W2*G\r\nnum = [ [ [0], [0], W1.num[0][0] ], [W2G.num[0][0], W2.num[0][0], G.num[0][0]], [G.num[0][0], [1], G.num[0][0] ] ] \r\nden = [ [ [1], [1], W1.den[0][0] ], [W2G.den[0][0], W2.den[0][0], G.den[0][0]], [G.den[0][0], [1], G.den[0][0] ] ] \r\nP = tf( num, den )\r\nprint(P)\r\n\r\nThe problem is that the return of the numerator and denominator is not directly the list.\r\n\r\nAnd I get a high order system. Should I use just the balanced trunction?\r\nPss = ss(P)\r\nPbr = balred(Pss, 4)\r\n\r\n________________________\r\nMatlab is using minreal with exist also in \"control\", but I have to find manually a suitable tolerance...","author":{"url":"https://github.com/iljastas","@type":"Person","name":"iljastas"},"datePublished":"2019-07-10T13:46:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/325/python-control/issues/325"}
| 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:86cf1ebb-8387-3268-622c-360f434c7f52 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AEEA:B73EF:629A8A:8AEA37:697A1CF5 |
| html-safe-nonce | 52cfc73782445fd845f1b8362d9f85e6d82682a48f1f6218ab4c260e7ba190af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUVBOkI3M0VGOjYyOUE4QTo4QUVBMzc6Njk3QTFDRjUiLCJ2aXNpdG9yX2lkIjoiODUxNjEyNTU1MDcyMzA3OTQxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a6c6e3ea3cdf3d6785f3be535516636095af1dea18ab2e68eb8eabe8f2e6291e |
| hovercard-subject-tag | issue:466319339 |
| 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/325/issue_layout |
| twitter:image | https://opengraph.githubassets.com/222eeda9aad027b13df08aa8beb4980670ec91168c908e31f9336dd05043dd61/python-control/python-control/issues/325 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/222eeda9aad027b13df08aa8beb4980670ec91168c908e31f9336dd05043dd61/python-control/python-control/issues/325 |
| og:image:alt | Hi everybody, I want to know if there is a more elegant way to generate a transfer-function-matrix for a hinf-controller. In matlab I just do: P11 = [0 0; W2G W2] P12 = [W1; W2G] P21 = [G 1] P22 = ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | iljastas |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24021c77440f544078f9cbe80d78a2fb16ccff65fca92deda9da3c51d1cdc5fc |
| 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 | 2841ead760bbcdca99003cf970f91348178160c3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width