René's URL Explorer Experiment


Title: td04ad (convert tf to ss) returns incorrect poles · Issue #222 · python-control/Slycot · GitHub

Open Graph Title: td04ad (convert tf to ss) returns incorrect poles · Issue #222 · python-control/Slycot

X Title: td04ad (convert tf to ss) returns incorrect poles · Issue #222 · python-control/Slycot

Description: A bug was reported in python-control issue #935 in which tf2ss returns the incorrect poles. It looks like the underlying problem is in td04ad. The following code illustrates the bug: from numpy import array, roots, sort from numpy.linalg...

Open Graph Description: A bug was reported in python-control issue #935 in which tf2ss returns the incorrect poles. It looks like the underlying problem is in td04ad. The following code illustrates the bug: from numpy imp...

X Description: A bug was reported in python-control issue #935 in which tf2ss returns the incorrect poles. It looks like the underlying problem is in td04ad. The following code illustrates the bug: from numpy imp...

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

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"td04ad (convert tf to ss) returns incorrect poles","articleBody":"A bug was reported in python-control issue [#935](https://github.com/python-control/python-control/issues/935) in which `tf2ss` returns the incorrect poles.\r\n\r\nIt looks like the underlying problem is in `td04ad`.  The following code illustrates the bug:\r\n```\r\nfrom numpy import array, roots, sort\r\nfrom numpy.linalg import eig\r\nfrom numpy.testing import assert_allclose\r\nfrom slycot import td04ad\r\nfrom scipy.signal import tf2ss\r\n\r\n# Test case #1 (works)\r\n\r\nnum = array([[[1, 1, 1, 1, 1]]])\r\nden = array([[1, 2, 1, 2, 1]])\r\ndenorder = np.array([den.size - 1])\r\n\r\nssout = td04ad('C', 1, 1, denorder, den, num, tol=0)\r\n\r\ntf_poles = sort(roots(den[0]))\r\nss_poles = sort(eig(ssout[1])[0])\r\nassert_allclose(tf_poles, ss_poles)\r\n\r\n# Test case #2 (doesn't work)\r\n\r\nnum = array([[[1.05351324e-02, 2.83623596e-01, 2.44891698e+00, 1.22011448e+01,\r\n               5.34846570e+01, 1.42092310e+02, 2.24627039e+02, 2.54305034e+02,\r\n               2.18224432e+02, 1.24102950e+02, 4.99448809e+01, 1.26651596e+01,\r\n               2.02239050e+00, 1.06681479e-01, 1.56212741e-03, 8.90622718e-06,\r\n               1.77205330e-08]]])\r\nden = array([[1.00000000e+00, 6.41551095e+02, 8.40213016e+03, 5.55121354e+04,\r\n              1.93428590e+05, 1.31800818e+05, 9.20183802e+04, 2.90211403e+04,\r\n              4.54824418e+03, 4.08636727e+02, 1.72367976e+01, 8.91452881e-02,\r\n              1.04426479e-04, 4.32051569e-08, 5.88752872e-12, 3.24913608e-16,\r\n              6.34764375e-21]])\r\ndenorder = np.array([den.size - 1])\r\n\r\n# Try scipy\r\nA, B, C, D = tf2ss(num[0, 0], den[0])\r\ntf_poles = sort(roots(den[0]))\r\nss_poles = sort(eig(A)[0])\r\nassert_allclose(tf_poles, ss_poles)\r\n\r\n# Now try slycot\r\nssout = td04ad('C', 1, 1, denorder, den, num, tol=0)\r\nss_poles = sort(eig(ssout[1])[0])\r\nassert_allclose(tf_poles, ss_poles)\r\n```\r\nFor the second system, the scipy-generated poles match, but some of the the slycot-generated poles are not the same (and one of them is unstable).\r\n\r\nIt's possible this is a numerical issue (the coefficients span 21 orders of magnitude!), but odd the SciPy gets it right and slycot doesn't.  (SciPy uses an observable canonical form-based realization.)","author":{"url":"https://github.com/murrayrm","@type":"Person","name":"murrayrm"},"datePublished":"2023-10-22T20:09:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/222/Slycot/issues/222"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2d9769ff-0afe-4d5f-d9ae-ba05d942ea3b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC618:CCED3:1A78766:23AF5C7:697AA4A9
html-safe-nonce58b2af974b839ab7df2219dc8b9e2db03ba5eb7b05798c5f1fb0fe737a5ab753
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjE4OkNDRUQzOjFBNzg3NjY6MjNBRjVDNzo2OTdBQTRBOSIsInZpc2l0b3JfaWQiOiI2MTU5NjI4NjE2MzQzMzk3NTQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace3846c3b35f80567c2e4ae9b11a575abd765516494f6a445fb829f54ff9bb750
hovercard-subject-tagissue:1956039142
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/Slycot/222/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f4172a8fc149ad86caac24dfc1a04b1eb7f27b1e432841d1fcc8b9623a693b19/python-control/Slycot/issues/222
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f4172a8fc149ad86caac24dfc1a04b1eb7f27b1e432841d1fcc8b9623a693b19/python-control/Slycot/issues/222
og:image:altA bug was reported in python-control issue #935 in which tf2ss returns the incorrect poles. It looks like the underlying problem is in td04ad. The following code illustrates the bug: from numpy imp...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemurrayrm
hostnamegithub.com
expected-hostnamegithub.com
None4d375b6c612de26fd037e0638eaf57e32cf9b16daf53ab68c25c04cd3b058113
turbo-cache-controlno-preview
go-importgithub.com/python-control/Slycot git https://github.com/python-control/Slycot.git
octolytics-dimension-user_id2285872
octolytics-dimension-user_loginpython-control
octolytics-dimension-repository_id66001480
octolytics-dimension-repository_nwopython-control/Slycot
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id66001480
octolytics-dimension-repository_network_root_nwopython-control/Slycot
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
release9af1d97e0cdcced8d2b1d10d909b84c76e62924a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python-control/Slycot/issues/222#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2FSlycot%2Fissues%2F222
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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2FSlycot%2Fissues%2F222
Sign up https://patch-diff.githubusercontent.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%2FSlycot
Reloadhttps://patch-diff.githubusercontent.com/python-control/Slycot/issues/222
Reloadhttps://patch-diff.githubusercontent.com/python-control/Slycot/issues/222
Reloadhttps://patch-diff.githubusercontent.com/python-control/Slycot/issues/222
python-control https://patch-diff.githubusercontent.com/python-control
Slycothttps://patch-diff.githubusercontent.com/python-control/Slycot
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-control%2FSlycot
Fork 45 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-control%2FSlycot
Star 148 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-control%2FSlycot
Code https://patch-diff.githubusercontent.com/python-control/Slycot
Issues 13 https://patch-diff.githubusercontent.com/python-control/Slycot/issues
Pull requests 2 https://patch-diff.githubusercontent.com/python-control/Slycot/pulls
Actions https://patch-diff.githubusercontent.com/python-control/Slycot/actions
Projects 0 https://patch-diff.githubusercontent.com/python-control/Slycot/projects
Wiki https://patch-diff.githubusercontent.com/python-control/Slycot/wiki
Security 0 https://patch-diff.githubusercontent.com/python-control/Slycot/security
Insights https://patch-diff.githubusercontent.com/python-control/Slycot/pulse
Code https://patch-diff.githubusercontent.com/python-control/Slycot
Issues https://patch-diff.githubusercontent.com/python-control/Slycot/issues
Pull requests https://patch-diff.githubusercontent.com/python-control/Slycot/pulls
Actions https://patch-diff.githubusercontent.com/python-control/Slycot/actions
Projects https://patch-diff.githubusercontent.com/python-control/Slycot/projects
Wiki https://patch-diff.githubusercontent.com/python-control/Slycot/wiki
Security https://patch-diff.githubusercontent.com/python-control/Slycot/security
Insights https://patch-diff.githubusercontent.com/python-control/Slycot/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-control/Slycot/issues/222
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-control/Slycot/issues/222
td04ad (convert tf to ss) returns incorrect poleshttps://patch-diff.githubusercontent.com/python-control/Slycot/issues/222#top
https://github.com/murrayrm
https://github.com/murrayrm
murrayrmhttps://github.com/murrayrm
on Oct 22, 2023https://github.com/python-control/Slycot/issues/222#issue-1956039142
#935https://github.com/python-control/python-control/issues/935
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.