René's URL Explorer Experiment


Title: Fix inconsistencies in frequency response at poles by murrayrm · Pull Request #542 · python-control/python-control · GitHub

Open Graph Title: Fix inconsistencies in frequency response at poles by murrayrm · Pull Request #542 · python-control/python-control

X Title: Fix inconsistencies in frequency response at poles by murrayrm · Pull Request #542 · python-control/python-control

Description: This PR addresses issue #532 regarding inconsistencies in the return values for various frequency response functions. The changes fixes a number of previous inconsistencies, where state space and transfer function representations could return different values and evaluating the frequency response at the "origin" gave different values depending on whether you evaluated at 0 or 0j. The changes here only affect results when evaluating the system at a pole of the system. In this PR: State space systems and transfer functions return the same values when evaluated at poles (including poles at the origin): Evaluation at 0 with pole at the origin: returns (inf + nanj) Evaluation at non-origin pole with nonzero numerator: returns (inf + infj) Evaluation at pole with cancellation by a zero: returns (nan + nanj) State space systems and transfer functions interpret argument as a complex number, so that G(0) and G(0j) return the same value. Computing the DC gain is (exactly) the same as evaluating at 0 A few other small changes: Added a warn_infinity flag to all functions used to evaluate frequency response. By default this is set to True, in which case you get a divide by zero warning or singular matrix warning when evaluating at a pole. Setting it to False suppresses this warning. (Also, dcgain sets warn_infinity to False by default). Updated docstrings and unit tests

Open Graph Description: This PR addresses issue #532 regarding inconsistencies in the return values for various frequency response functions. The changes fixes a number of previous inconsistencies, where state space and ...

X Description: This PR addresses issue #532 regarding inconsistencies in the return values for various frequency response functions. The changes fixes a number of previous inconsistencies, where state space and ...

Opengraph URL: https://github.com/python-control/python-control/pull/542

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1010dfc7-9d52-3135-714e-66a613e8d93a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC7E2:33E81A:174FF0F:20A9094:697BA1B0
html-safe-nonced203f62c6f1e1d8d1e13de522ec12361d45486acc0c7f2dbf661fe9be7b6a147
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0UyOjMzRTgxQToxNzRGRjBGOjIwQTkwOTQ6Njk3QkExQjAiLCJ2aXNpdG9yX2lkIjoiNzU1NDc1MzgxMDc4NjkxODgzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace139c3a9ac7cfb6fa342148be4fabb239605de4054d44ca5b8567d65da7049b2
hovercard-subject-tagpull_request:571588765
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/542/files
twitter:imagehttps://avatars.githubusercontent.com/u/293362?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/293362?s=400&v=4
og:image:altThis PR addresses issue #532 regarding inconsistencies in the return values for various frequency response functions. The changes fixes a number of previous inconsistencies, where state space and ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7ba9ae7380317898f1b98f4cf41e78605ff2d68007cb4db4e46bdaf7e9423d2e
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released52dd9b71f0e5da9cfd694fb2faae78a81d8e46f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-control/python-control/pull/542/changes#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fpull%2F542%2Ffiles
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%2Fpull%2F542%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-control%2Fpython-control
Reloadhttps://github.com/python-control/python-control/pull/542/changes
Reloadhttps://github.com/python-control/python-control/pull/542/changes
Reloadhttps://github.com/python-control/python-control/pull/542/changes
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
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-control%2Fpython-control%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-control%2Fpython-control%2Fissues%2Fnew%2Fchoose
murrayrmhttps://github.com/murrayrm
python-control:masterhttps://github.com/python-control/python-control/tree/master
murrayrm:infinite_gainhttps://github.com/murrayrm/python-control/tree/infinite_gain
Conversation 2 https://github.com/python-control/python-control/pull/542
Commits 5 https://github.com/python-control/python-control/pull/542/commits
Checks 0 https://github.com/python-control/python-control/pull/542/checks
Files changed https://github.com/python-control/python-control/pull/542/files
Please reload this pagehttps://github.com/python-control/python-control/pull/542/changes
Fix inconsistencies in frequency response at poles https://github.com/python-control/python-control/pull/542/changes#top
Show all changes 5 commits https://github.com/python-control/python-control/pull/542/files
b67eb7d change infinite gain value to inf (from nan/inf) murrayrm Feb 6, 2021 https://github.com/python-control/python-control/pull/542/commits/b67eb7d3c80d345636249ecc1890e8045f73da38
96e44fe unit tests for infinite frequency response values, warnings murrayrm Feb 6, 2021 https://github.com/python-control/python-control/pull/542/commits/96e44fe425a0166749a30e7c49d8dcecd4c16f7d
8b44e87 update return values to match numpy inf/nan pattern murrayrm Feb 10, 2021 https://github.com/python-control/python-control/pull/542/commits/8b44e87f8a92dc585438b4117e0673b5269d140e
223d0c8 add logic for pole/zero inaccuracies on different systems murrayrm Feb 10, 2021 https://github.com/python-control/python-control/pull/542/commits/223d0c84c9aef2e3e42c37f81cadbd62e807d740
598058c docstring updates murrayrm Feb 11, 2021 https://github.com/python-control/python-control/pull/542/commits/598058cb3eb8203c8bdfbffca322ba81ec458b91
Clear filters https://github.com/python-control/python-control/pull/542/files
Please reload this pagehttps://github.com/python-control/python-control/pull/542/changes
Please reload this pagehttps://github.com/python-control/python-control/pull/542/changes
lti.py https://github.com/python-control/python-control/pull/542/changes#diff-9eb79d97f0ecfaf506be3bac9ab8573caf6301e9685c8bfa3e91632402fa4e5a
margins.py https://github.com/python-control/python-control/pull/542/changes#diff-f6d94f1ff38967f73b006c0d051f68e0a86db247c36c226c6035f9615ad80088
statesp.py https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
freqresp_test.py https://github.com/python-control/python-control/pull/542/changes#diff-2683aff019235f249bce1f807365cf2682e0917893484b2c4109bf580f157c77
input_element_int_test.py https://github.com/python-control/python-control/pull/542/changes#diff-ac6120e3daee7ec35bfcfcd1ccd4e5147dbede714008cd10d341d10d6acf6cc5
statesp_test.py https://github.com/python-control/python-control/pull/542/changes#diff-4c76080acbdea36493458693d93ec10e4e10b2e04ce01c56e8a81567cc1ea0d6
xferfcn_test.py https://github.com/python-control/python-control/pull/542/changes#diff-df824c2e70c14dd722d8f5b8d418f28180aa0d1a8dffa5e4b6271740d58cb2b2
xferfcn.py https://github.com/python-control/python-control/pull/542/changes#diff-0dd9424d3024fc1d5cc8fd67d13efe5703318c4c705526ab0ae216de69ce3de7
control/lti.pyhttps://github.com/python-control/python-control/pull/542/changes#diff-9eb79d97f0ecfaf506be3bac9ab8573caf6301e9685c8bfa3e91632402fa4e5a
View file https://github.com/murrayrm/python-control/blob/598058cb3eb8203c8bdfbffca322ba81ec458b91/control/lti.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/542/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/542/changes#diff-9eb79d97f0ecfaf506be3bac9ab8573caf6301e9685c8bfa3e91632402fa4e5a
https://github.com/python-control/python-control/pull/542/changes#diff-9eb79d97f0ecfaf506be3bac9ab8573caf6301e9685c8bfa3e91632402fa4e5a
control/margins.pyhttps://github.com/python-control/python-control/pull/542/changes#diff-f6d94f1ff38967f73b006c0d051f68e0a86db247c36c226c6035f9615ad80088
View file https://github.com/murrayrm/python-control/blob/598058cb3eb8203c8bdfbffca322ba81ec458b91/control/margins.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/542/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/542/changes#diff-f6d94f1ff38967f73b006c0d051f68e0a86db247c36c226c6035f9615ad80088
https://github.com/python-control/python-control/pull/542/changes#diff-f6d94f1ff38967f73b006c0d051f68e0a86db247c36c226c6035f9615ad80088
control/statesp.pyhttps://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
View file https://github.com/murrayrm/python-control/blob/598058cb3eb8203c8bdfbffca322ba81ec458b91/control/statesp.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/542/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
https://github.com/python-control/python-control/pull/542/changes#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
control/tests/freqresp_test.pyhttps://github.com/python-control/python-control/pull/542/changes#diff-2683aff019235f249bce1f807365cf2682e0917893484b2c4109bf580f157c77
View file https://github.com/murrayrm/python-control/blob/598058cb3eb8203c8bdfbffca322ba81ec458b91/control/tests/freqresp_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/542/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/542/changes#diff-2683aff019235f249bce1f807365cf2682e0917893484b2c4109bf580f157c77
control/tests/input_element_int_test.pyhttps://github.com/python-control/python-control/pull/542/changes#diff-ac6120e3daee7ec35bfcfcd1ccd4e5147dbede714008cd10d341d10d6acf6cc5
View file https://github.com/murrayrm/python-control/blob/598058cb3eb8203c8bdfbffca322ba81ec458b91/control/tests/input_element_int_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/542/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/542/changes#diff-ac6120e3daee7ec35bfcfcd1ccd4e5147dbede714008cd10d341d10d6acf6cc5
https://github.com/python-control/python-control/pull/542/changes#diff-ac6120e3daee7ec35bfcfcd1ccd4e5147dbede714008cd10d341d10d6acf6cc5
https://github.com/python-control/python-control/pull/542/changes#diff-ac6120e3daee7ec35bfcfcd1ccd4e5147dbede714008cd10d341d10d6acf6cc5
https://github.com/python-control/python-control/pull/542/changes#diff-ac6120e3daee7ec35bfcfcd1ccd4e5147dbede714008cd10d341d10d6acf6cc5
control/tests/statesp_test.pyhttps://github.com/python-control/python-control/pull/542/changes#diff-4c76080acbdea36493458693d93ec10e4e10b2e04ce01c56e8a81567cc1ea0d6
View file https://github.com/murrayrm/python-control/blob/598058cb3eb8203c8bdfbffca322ba81ec458b91/control/tests/statesp_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/542/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/542/changes#diff-4c76080acbdea36493458693d93ec10e4e10b2e04ce01c56e8a81567cc1ea0d6
https://github.com/python-control/python-control/pull/542/changes#diff-4c76080acbdea36493458693d93ec10e4e10b2e04ce01c56e8a81567cc1ea0d6
https://github.com/python-control/python-control/pull/542/changes#diff-4c76080acbdea36493458693d93ec10e4e10b2e04ce01c56e8a81567cc1ea0d6
https://github.com/python-control/python-control/pull/542/changes#diff-4c76080acbdea36493458693d93ec10e4e10b2e04ce01c56e8a81567cc1ea0d6
Please reload this pagehttps://github.com/python-control/python-control/pull/542/changes
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.