René's URL Explorer Experiment


Title: Unexpected Phase Jumps in Bode Plot of Third-Order Systems with Zeros and Poles · Issue #1179 · python-control/python-control · GitHub

Open Graph Title: Unexpected Phase Jumps in Bode Plot of Third-Order Systems with Zeros and Poles · Issue #1179 · python-control/python-control

X Title: Unexpected Phase Jumps in Bode Plot of Third-Order Systems with Zeros and Poles · Issue #1179 · python-control/python-control

Description: Version of the control package: 0.10.1 I would like to plot a Bode plot of two third-order systems. One system has three poles and no zeros. The other system also has three poles and two zeros. The phase response is step-like due to the ...

Open Graph Description: Version of the control package: 0.10.1 I would like to plot a Bode plot of two third-order systems. One system has three poles and no zeros. The other system also has three poles and two zeros. The...

X Description: Version of the control package: 0.10.1 I would like to plot a Bode plot of two third-order systems. One system has three poles and no zeros. The other system also has three poles and two zeros. The...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected Phase Jumps in Bode Plot of Third-Order Systems with Zeros and Poles","articleBody":"_**Version of the control package: 0.10.1**_\n\nI would like to plot a Bode plot of two third-order systems.\nOne system has three poles and no zeros. The other system also has three poles and two zeros.\nThe phase response is step-like due to the lack of damping.\nI would have expected the following phase response and verified it with Matlab:\nSystem 1:\nStarts at -90° due to the pole at 0. Constant response up to the resonance frequency, then jumps to -270°. I also get this response with the control package.\n\nSystem 2:\nStarts at -90° due to the pole at 0. Constant response up to the frequency of the double zero, then jumps to +90°. Constant curve up to the double pole position and jump to -90°. However, with the control package, I get jumps to -270° and then -450°. The -270° is equivalent to the +90°, but the “direction of rotation,” i.e., how you get there, is not correct. \nThe code documenting the transfer functions and the rest of the code can be found below. Is it possible to achieve the expected behavior?\n\n**Matlab output:**\n\u003cimg width=\"863\" height=\"633\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/670320a6-9e5b-4dea-aabe-82e8b6e27ba5\" /\u003e\n\n**Python control output:**\n\u003cimg width=\"630\" height=\"475\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9542e5fb-619f-496f-b153-f81a34c722e0\" /\u003e\n\n```python\nimport numpy as np\nfrom scipy import signal\nimport plotly.graph_objects as go\nimport sympy as sp\nfrom plotly.subplots import make_subplots\nimport matplotlib.pyplot as plt\nimport control\n\n# Parameters\nLafe_val = 3.1e-3\nLg_val = 2e-3\nCf_val = 3.3e-6\n\n# Symbolic Definition\ns = sp.symbols('s')\nLafe, Lg, Cf = sp.symbols('Lafe Lg Cf')\nG_g = 1 / (Lafe * Lg * Cf * s**3 + (Lafe + Lg) * s)\nG_c = (1 + Lg * Cf * s**2) / (Lafe * Lg * Cf * s**3 + (Lafe + Lg) * s)\n\n# Display symbolic transfer functions\nprint(\"Symbolic transfer function Gg(s):\")\nsp.pprint(G_g)\nprint(\"Symbolic transfer function Gc(s):\")\nsp.pprint(G_c)\n\n## Transfer Function 1\n\n# Calculate poles and zeros\n# Extract numerator and denominator\nnum_g_sym, den_g_sym = sp.fraction(G_g)\n\nzeros_g = sp.solve(num_g_sym, s)\npoles_g = sp.solve(den_g_sym, s)\n\n# Substitute parameter values\nG_g_num = G_g.subs({Lafe: Lafe_val, Lg: Lg_val, Cf: Cf_val})\nzeros_g_num = [z.subs({Lafe: Lafe_val, Lg: Lg_val, Cf: Cf_val}) for z in zeros_g]\npoles_g_num = [p.subs({Lafe: Lafe_val, Lg: Lg_val, Cf: Cf_val}) for p in poles_g]\n\n# Display zeros\nprint(\"\\nZeros of the numerator:\")\nif zeros_g:\n    for z_sym, z_num in zip(zeros_g, zeros_g_num):\n        print(f\"  s = {z_sym}   ≈ {sp.N(z_num, 4)}\")\nelse:\n    print(\"  No zeros (numerator is constant).\")\n\n# Display poles\nprint(\"\\nPoles of the denominator:\")\nif poles_g:\n    for p_sym, p_num in zip(poles_g, poles_g_num):\n        print(f\"  s = {p_sym}   ≈ {sp.N(p_num, 4)}\")\nelse:\n    print(\"  No poles (denominator is constant).\")\n\n# Extract numerator and denominator\nnum_g, den_g = sp.fraction(G_g_num)\n\n# Calculate coefficients\nnum_coeffs_g = sp.Poly(num_g, s).all_coeffs()\nden_coeffs_g = sp.Poly(den_g, s).all_coeffs()\n\n# Convert to float \nnum_coeffs_g = [float(c) for c in num_coeffs_g]\nden_coeffs_g = [float(c) for c in den_coeffs_g]\n\n# Transfer function\nsystem_g = control.TransferFunction(num_coeffs_g, den_coeffs_g)\n\n## Transfer Function 2\n\n# Calculate poles and zeros\n# Extract numerator and denominator\nnum_c_sym, den_c_sym = sp.fraction(G_c)\n\nzeros_c = sp.solve(num_c_sym, s)\npoles_c = sp.solve(den_c_sym, s)\n\n# Substitute parameter values\nG_c_num = G_c.subs({Lafe: Lafe_val, Lg: Lg_val, Cf: Cf_val})\nzeros_c_num = [z.subs({Lafe: Lafe_val, Lg: Lg_val, Cf: Cf_val}) for z in zeros_c]\npoles_c_num = [p.subs({Lafe: Lafe_val, Lg: Lg_val, Cf: Cf_val}) for p in poles_c]\n\n# Display zeros\nprint(\"\\nZeros of the numerator:\")\nif zeros_c:\n    for z_sym, z_num in zip(zeros_c, zeros_c_num):\n        print(f\"  s = {z_sym}   ≈ {sp.N(z_num, 4)}\")\nelse:\n    print(\"  No zeros (numerator is constant).\")\n\n# Display poles\nprint(\"\\nPoles of the denominator:\")\nif poles_c:\n    for p_sym, p_num in zip(poles_c, poles_c_num):\n        print(f\"  s = {p_sym}   ≈ {sp.N(p_num, 4)}\")\nelse:\n    print(\"  No poles (denominator is constant).\")\n\n# Extract numerator and denominator\nnum_c, den_c = sp.fraction(G_c_num)\n\n# Calculate coefficients\nnum_coeffs_c = sp.Poly(num_c, s).all_coeffs()\nden_coeffs_c = sp.Poly(den_c, s).all_coeffs()\n\n# Convert to float \nnum_coeffs_c = [float(c) for c in num_coeffs_c]\nden_coeffs_c = [float(c) for c in den_coeffs_c]\n\n# Transfer function\nsystem_c = control.TransferFunction(num_coeffs_c, den_coeffs_c)\n\n# Frequency range\nfrequencies_rad_s = np.logspace(2, 5, num=500)\nfrequencies_pole = np.linspace(0.99 * float(sp.Abs(poles_c_num[1])), 1.01 * float(sp.Abs(poles_c_num[1])), 100)\nfrequencies_zero = np.linspace(0.99 * float(sp.Abs(zeros_c_num[1])), 1.01 * float(sp.Abs(zeros_c_num[1])), 100)\ncombined_frequencies = np.sort(np.unique(np.concatenate((\n    frequencies_rad_s,\n    frequencies_pole,\n    frequencies_zero,\n    [float(sp.Abs(poles_c_num[1]))],\n    [float(sp.Abs(zeros_c_num[1]))]\n))))\n\n# Plot Bode diagram\ncontrol.bode_plot([system_g, system_c], combined_frequencies, dB=True, Hz=False, deg=True)\nplt.show()\n\n``` \n","author":{"url":"https://github.com/Kreste-111","@type":"Person","name":"Kreste-111"},"datePublished":"2025-08-05T07:54:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1179/python-control/issues/1179"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9ffb38d2-0f03-3229-73d5-274c0ae7045c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD8EA:2DF2F1:3694598:4CBA8E3:69792CED
html-safe-noncec6109041d531aee1178b2829ca0705f5743758ffc7271fc227b94416d2137adc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEVBOjJERjJGMTozNjk0NTk4OjRDQkE4RTM6Njk3OTJDRUQiLCJ2aXNpdG9yX2lkIjoiMzg4MjUwNDYzMTgwMzc4NDQzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac585bf8f4920b26444459d2da1f29c99e53468d02beab9ac28a98e4b93e43f296
hovercard-subject-tagissue:3292019836
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/1179/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1d01cb4d611c00bfeac9c1f2d97361c62a0401659adc7746b62657d4e2a00532/python-control/python-control/issues/1179
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1d01cb4d611c00bfeac9c1f2d97361c62a0401659adc7746b62657d4e2a00532/python-control/python-control/issues/1179
og:image:altVersion of the control package: 0.10.1 I would like to plot a Bode plot of two third-order systems. One system has three poles and no zeros. The other system also has three poles and two zeros. The...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameKreste-111
hostnamegithub.com
expected-hostnamegithub.com
None15417fb272585d09f7c894f2a869ba34cc4c7ded898af9dccaa85542b9adb711
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
release535f4866a7b2e3d762bd599bffe50a3cfb0702b2
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-control/python-control/issues/1179#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fissues%2F1179
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%2F1179
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/1179
Reloadhttps://github.com/python-control/python-control/issues/1179
Reloadhttps://github.com/python-control/python-control/issues/1179
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/1179
New issuehttps://github.com/login?return_to=https://github.com/python-control/python-control/issues/1179
Unexpected Phase Jumps in Bode Plot of Third-Order Systems with Zeros and Poleshttps://github.com/python-control/python-control/issues/1179#top
https://github.com/Kreste-111
https://github.com/Kreste-111
Kreste-111https://github.com/Kreste-111
on Aug 5, 2025https://github.com/python-control/python-control/issues/1179#issue-3292019836
https://private-user-images.githubusercontent.com/224735610/474380163-670320a6-9e5b-4dea-aabe-82e8b6e27ba5.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk1NDkzMzgsIm5iZiI6MTc2OTU0OTAzOCwicGF0aCI6Ii8yMjQ3MzU2MTAvNDc0MzgwMTYzLTY3MDMyMGE2LTllNWItNGRlYS1hYWJlLTgyZThiNmUyN2JhNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyN1QyMTIzNThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMjhjYzAzODc1OTU4YWYzYjdlNWQ1OWMyNzQwYjNkNTFiNTU0MTFlYjRmNzkyOTM4YmI4Mjk2MDZlMmY0YTFjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.dtR4vt6deZGRNHDL6_DFXNDfICioWJegu553ZY9zqaE
https://private-user-images.githubusercontent.com/224735610/474381534-9542e5fb-619f-496f-b153-f81a34c722e0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk1NDkzMzgsIm5iZiI6MTc2OTU0OTAzOCwicGF0aCI6Ii8yMjQ3MzU2MTAvNDc0MzgxNTM0LTk1NDJlNWZiLTYxOWYtNDk2Zi1iMTUzLWY4MWEzNGM3MjJlMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyN1QyMTIzNThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iZjM0NmE0ZDliNWI4MTc5ZTNiNDdkMWQ3ZTQxMzI1YzlmMWU4MGVmMzU4NGI5NmI5Mjc4MDMyZWIwMDEyM2UxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.IbD4Y3uwQezMFeVZyvc7XcQ_nusFyY_wwuQICn6-QHQ
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.