René's URL Explorer Experiment


Title: hinfsyn in python-control is returning different results as compared to hinfsyn in MATLAB's robust control toolbox · Issue #367 · python-control/python-control · GitHub

Open Graph Title: hinfsyn in python-control is returning different results as compared to hinfsyn in MATLAB's robust control toolbox · Issue #367 · python-control/python-control

X Title: hinfsyn in python-control is returning different results as compared to hinfsyn in MATLAB's robust control toolbox · Issue #367 · python-control/python-control

Description: Hi, I am very new to control systems, and coding in general. I am currently exploring the H-infinity robust control method and tried implementing the hinfsyn function on a simple spring mass damper system. The following is the code I'm t...

Open Graph Description: Hi, I am very new to control systems, and coding in general. I am currently exploring the H-infinity robust control method and tried implementing the hinfsyn function on a simple spring mass damper...

X Description: Hi, I am very new to control systems, and coding in general. I am currently exploring the H-infinity robust control method and tried implementing the hinfsyn function on a simple spring mass damper...

Opengraph URL: https://github.com/python-control/python-control/issues/367

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"hinfsyn in python-control is returning different results as compared to hinfsyn in MATLAB's robust control toolbox","articleBody":"Hi, \r\n\r\nI am very new to control systems, and coding in general. I am currently exploring the H-infinity robust control method and tried implementing the hinfsyn function on a simple spring mass damper system.\r\n\r\nThe following is the code I'm trying to implement:\r\n\r\n```\r\nimport` control\r\nimport numpy\r\n\r\n\r\n# spring mass damper system\r\nm = 1  # 1 kg\r\nb = 12 # 12 N-s/m\r\nk = 20 # 20 N/m\r\n\r\n\r\nnum = [[[-1], [-1]],[[0], [1]], [[-1], [-1]]]\r\nden = [[[1,1], [m, b, k]], [[1], [1]], [[1,1], [m, b, k]]]\r\nPlant = control.tf2ss(num, den)\r\n#print(Plant)\r\n\r\n\r\nnmeas = 1\r\nncont = 1\r\nK, CL, gamma, rcond = control.hinfsyn(Plant, nmeas, ncont)\r\nprint(K)\r\nprint(gamma)\r\nKtf = control.ss2tf(K);\r\nprint(Ktf);`\r\n```\r\n\r\nThe code returns \"A stabilizing controller cannot be found\"\r\n\r\nHowever, a similar code returns a controller on MATLAB. I have checked and the state space variable \"Plant\" returned by python-control.tf2ss and MATLAB's tf2ss is almost the same (I'm not sure why such a difference arises but I'm assuming MATLAB scales the matrices A, B, C, D).\r\n\r\nCould someone help me out, I'm not sure what I'm doing wrong with my python code. Also let me know if this the wrong forum for posting such a query. I wasn't sure where else to go.\r\n\r\nFor reference:\r\n\r\nI was implementing the model described in Robust Control Design with MATLAB by D.-W. Gu, P. Hr. Petkov and M. M. Konstantinov (Pages 36, 37)\r\n\r\nThe following was my corresponding code in MATLAB: \r\n\r\n```\r\n% spring mass damper system\r\nm = 1;  % 1 kg\r\nb = 12; % 12 N-s/m\r\nk = 20; % 20 N/m\r\n\r\n% plant transfer function \r\nGnom = [-tf(1,[1,1]) -tf(1,[m, b, k]);tf(0,1) tf(1,1); -tf(1,[1,1]) -tf(1,[m, b, k])]; \r\n\r\n% state space model of the plant method\r\nP=ss(Gnom); \r\n\r\n% applying hinfinity\r\nnmeas = 1;\r\nncont = 1;\r\n[K, CL, gamma] = hinfsyn(P, nmeas, ncont);\r\ndisp(gamma);\r\n\r\n% displaying the state space model properties of the controller\r\ndisp('K is');\r\ndisp(K);\r\ndisp(K.A);\r\ndisp(K.B);\r\ndisp(K.C);\r\ndisp(K.D);\r\ndisp(size(K));\r\n\r\n%retrieving transfer function of controller method\r\n\r\n[numk, denk] = ss2tf(K.A, K.B, K.C, K.D); \r\nKtf = tf(numk, denk);\r\ndisp('Ktf is');\r\ndisp(Ktf);\r\ndisp(size(Ktf));\r\n```","author":{"url":"https://github.com/Mar-tian","@type":"Person","name":"Mar-tian"},"datePublished":"2020-01-07T08:40:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/367/python-control/issues/367"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6e937d6c-1943-8d24-d08d-d9702f132789
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC2B6:4C179:164DC0E:1E6FA80:697A93DE
html-safe-nonce953216f9864d4ba0563c625f1cdee919364df59f7b0c3f5ea934051850f70be1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkI2OjRDMTc5OjE2NERDMEU6MUU2RkE4MDo2OTdBOTNERSIsInZpc2l0b3JfaWQiOiI4MDA0NjMyODk2MTAwNTM3MzEwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf22db3774ae2cb3a5c72bd24c8a64cef73334aa409e83685c2c15558decaf7a5
hovercard-subject-tagissue:546152816
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-control/python-control/367/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5e1421558bf3439e9a48e964b7cd46b07cc8fa229aeb110f36eee10e8b8599cd/python-control/python-control/issues/367
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5e1421558bf3439e9a48e964b7cd46b07cc8fa229aeb110f36eee10e8b8599cd/python-control/python-control/issues/367
og:image:altHi, I am very new to control systems, and coding in general. I am currently exploring the H-infinity robust control method and tried implementing the hinfsyn function on a simple spring mass damper...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMar-tian
hostnamegithub.com
expected-hostnamegithub.com
None0912f2a9aa0160e08239520d461a4b4c4ce1caa972a8370b7442b94a38a194c5
turbo-cache-controlno-preview
go-importgithub.com/python-control/python-control git https://github.com/python-control/python-control.git
octolytics-dimension-user_id2285872
octolytics-dimension-user_loginpython-control
octolytics-dimension-repository_id22791752
octolytics-dimension-repository_nwopython-control/python-control
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id22791752
octolytics-dimension-repository_network_root_nwopython-control/python-control
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef8f5270c10a913bfa56f2dad4b864f1cda383754
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-control/python-control/issues/367#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fissues%2F367
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fissues%2F367
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-control%2Fpython-control
Reloadhttps://github.com/python-control/python-control/issues/367
Reloadhttps://github.com/python-control/python-control/issues/367
Reloadhttps://github.com/python-control/python-control/issues/367
python-control https://github.com/python-control
python-controlhttps://github.com/python-control/python-control
Notifications https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Fork 447 https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Star 2k https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Code https://github.com/python-control/python-control
Issues 87 https://github.com/python-control/python-control/issues
Pull requests 8 https://github.com/python-control/python-control/pulls
Discussions https://github.com/python-control/python-control/discussions
Actions https://github.com/python-control/python-control/actions
Projects 0 https://github.com/python-control/python-control/projects
Wiki https://github.com/python-control/python-control/wiki
Security 0 https://github.com/python-control/python-control/security
Insights https://github.com/python-control/python-control/pulse
Code https://github.com/python-control/python-control
Issues https://github.com/python-control/python-control/issues
Pull requests https://github.com/python-control/python-control/pulls
Discussions https://github.com/python-control/python-control/discussions
Actions https://github.com/python-control/python-control/actions
Projects https://github.com/python-control/python-control/projects
Wiki https://github.com/python-control/python-control/wiki
Security https://github.com/python-control/python-control/security
Insights https://github.com/python-control/python-control/pulse
New issuehttps://github.com/login?return_to=https://github.com/python-control/python-control/issues/367
New issuehttps://github.com/login?return_to=https://github.com/python-control/python-control/issues/367
hinfsyn in python-control is returning different results as compared to hinfsyn in MATLAB's robust control toolboxhttps://github.com/python-control/python-control/issues/367#top
https://github.com/Mar-tian
https://github.com/Mar-tian
Mar-tianhttps://github.com/Mar-tian
on Jan 7, 2020https://github.com/python-control/python-control/issues/367#issue-546152816
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.