René's URL Explorer Experiment


Title: Add support for continuous delay systems by MythasNauveili · Pull Request #1148 · python-control/python-control · GitHub

Open Graph Title: Add support for continuous delay systems by MythasNauveili · Pull Request #1148 · python-control/python-control

X Title: Add support for continuous delay systems by MythasNauveili · Pull Request #1148 · python-control/python-control

Description: This PR introduces initial support for linear time-invariant (LTI) systems with time delays in python-control, inspired by the capabilities of ControlSystems.jl package, and the InternalDelay.py script from Skogestad-Python. Key features Creation of delay sytems Systems with delays can now be intuitively constructed by multiplying a TransferFunction object with a delay(tau) object or an exp(-tau*s) expression: tf_delay = tf([1], [1,1]) * delay(2) # or s = tf("s") tf_delay = tf([1], [1,1]) * exp(-2*s) Underlying Representation: The approach utilizes Linear Fractional Transformations (LFT) with a PartitionedStateSpace representation (implemented in partitionedssp.py). The DelayLTI class (in delaylti.py) serves as the core object for these systems. Operations: Standard operations such as addition, multiplication, and feedback are supported for DelayLTI objects. Time and Frequency Responses: Time responses for delayed systems are computed by solving the underlying Delay Differential Equations (DDEs). Frequency responses are also supported. Retrocompatibility: Maintain retrocompatibility with existing functionalities. Implementation Details: DDE Solver: Time responses for delayed systems are computed by solving DDEs. After exploring alternatives, a custom DDE solver based on the Method of Steps, wrapping SciPy's solve_ivp, was implemented in dde.py. Accuracy Note: While this solver performs well for many cases, for stiff problems, it may require smaller step sizes for convergence compared to specialized DDE solvers (like those in ControlSystems.jl). In tested scenarios, the error typically remains at least three orders of magnitude below the system response with reasonable step sizes. (An error estimation algorithm could be a valuable future addition). Validation: A Julia script (control/julia/compute_tests.jl) using ControlSystems.jl has been added to generate reference results, which are exported to a JSON file. These results are used in the test suite (control/tests/delay_lti_test.py and control/tests/dde_test.py) to benchmark the accuracy of the DelayLTI implementation and DDE solver. Current Scope and Limitations: This implementation currently focuses on continuous-time delay systems. Discrete-time delay systems are not yet covered. The DDE solver may benefit from further enhancements for stiff problems or adaptive step sizing. Discussion Points: This PR represents the initial groundwork for this feature. I'm submitting this draft to share these first steps and would appreciate feedback on: The overall approach and class design (DelayLTI, PartitionedStateSpace). The DDE solver implementation and its current performance. Any potential integration issues or API considerations. I'm aware there is still work to be done for this feature to be ready for a full release, but I believe this provides a solid foundation.

Open Graph Description: This PR introduces initial support for linear time-invariant (LTI) systems with time delays in python-control, inspired by the capabilities of ControlSystems.jl package, and the InternalDelay.py s...

X Description: This PR introduces initial support for linear time-invariant (LTI) systems with time delays in python-control, inspired by the capabilities of ControlSystems.jl package, and the InternalDelay.py s...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7ee608db-de6f-a765-445e-b489d6abeee2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8248:10442F:1A44924:2537655:697A4AC6
html-safe-noncefae5773799a4b5d8fe8182a8d1ebdc3aa232eeaf0d420b5d6f67f94f3826db08
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjQ4OjEwNDQyRjoxQTQ0OTI0OjI1Mzc2NTU6Njk3QTRBQzYiLCJ2aXNpdG9yX2lkIjoiNDIyNTMzNjEwMTMwMjYyNzI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac5075b3d58c0e51fa14f44a89d9a4867ada0c0476d0774453527ccf9da4dcb59c
hovercard-subject-tagpull_request:2511964911
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/1148/files
twitter:imagehttps://avatars.githubusercontent.com/u/123153936?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/123153936?s=400&v=4
og:image:altThis PR introduces initial support for linear time-invariant (LTI) systems with time delays in python-control, inspired by the capabilities of ControlSystems.jl package, and the InternalDelay.py s...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None553d32486a978372da5772d723ffbf66cac04403ab1794b7225c035f1d23252c
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
release8d7fdc30d680a0be278b8d9916215e64c987f09a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-control/python-control/pull/1148/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fpull%2F1148%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%2F1148%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/1148/files
Reloadhttps://github.com/python-control/python-control/pull/1148/files
Reloadhttps://github.com/python-control/python-control/pull/1148/files
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
MythasNauveilihttps://github.com/MythasNauveili
python-control:mainhttps://github.com/python-control/python-control/tree/main
MythasNauveili:dev-delayhttps://github.com/MythasNauveili/python-control/tree/dev-delay
Conversation 30 https://github.com/python-control/python-control/pull/1148
Commits 19 https://github.com/python-control/python-control/pull/1148/commits
Checks 14 https://github.com/python-control/python-control/pull/1148/checks
Files changed https://github.com/python-control/python-control/pull/1148/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1148/files
Add support for continuous delay systems https://github.com/python-control/python-control/pull/1148/files#top
Show all changes 19 commits https://github.com/python-control/python-control/pull/1148/files
de5a61f implement delayLTI and PartionedStateSpace classes and first algorith… MythasNauveili Mar 26, 2025 https://github.com/python-control/python-control/pull/1148/commits/de5a61fbd7e9b49d0c994a00f0ead356cb02c475
848d763 Merge branch 'python-control:main' into dev-delay MythasNauveili Mar 26, 2025 https://github.com/python-control/python-control/pull/1148/commits/848d763fb5c16843f25b8d24da9206300407a5dd
2c74ca1 ongoing tests with julia notebooks, feedback bug solved MythasNauveili Mar 26, 2025 https://github.com/python-control/python-control/pull/1148/commits/2c74ca110edf0a83d8a6ddcee64b34509e28859a
b6c0cde mimo building of delay systems MythasNauveili Mar 28, 2025 https://github.com/python-control/python-control/pull/1148/commits/b6c0cdeaa69405a1590383bb4b6ef2644dc5d982
8dcab54 implementation of working frequency response for delayed siso system MythasNauveili Mar 29, 2025 https://github.com/python-control/python-control/pull/1148/commits/8dcab549ec36bda02d411ee12942b4a8086ec714
9b7b062 __call__ implementation to use lti frequency response function MythasNauveili Mar 30, 2025 https://github.com/python-control/python-control/pull/1148/commits/9b7b0624192862e93ce5b7eb97518fb5fa40b187
e8a197b delay systems handle freq plots (julia comparison ok). Time to work o… MythasNauveili Mar 30, 2025 https://github.com/python-control/python-control/pull/1148/commits/e8a197bd03649448f74dfe68fa5c8fa1b3ecb1a7
29081b5 add dde.py file to improve readibility in timeresp.py MythasNauveili Mar 31, 2025 https://github.com/python-control/python-control/pull/1148/commits/29081b598155750cf16215d5e272656560e122d5
8f43ab9 add tests and docstrings, tests are all passing. ToDo: refine tests, … MythasNauveili Mar 31, 2025 https://github.com/python-control/python-control/pull/1148/commits/8f43ab9cb693e2d225d67b5dd8657481681a3997
30c05b9 improve tests by scripting julia code to mimic python tests, and seri… MythasNauveili Apr 3, 2025 https://github.com/python-control/python-control/pull/1148/commits/30c05b93e957442ac85f3a26a9207bf12bfe7690
53641f4 methods of steps implemented, 1E-5 accuracy against julia for first t… MythasNauveili May 1, 2025 https://github.com/python-control/python-control/pull/1148/commits/53641f4d5b1968cd79eeeec67c3f27dbceb8932e
b0f2cd3 Merge branch 'python-control:main' into dev-delay MythasNauveili May 3, 2025 https://github.com/python-control/python-control/pull/1148/commits/b0f2cd38d450681640d73c71e1ace355d32ecf65
4172ce8 cleaning old dde methods MythasNauveili May 3, 2025 https://github.com/python-control/python-control/pull/1148/commits/4172ce86f59c86d426d36fb7bf81b94e5dfa3c3d
a460513 mimo forced response passed. TODO: clean MythasNauveili May 9, 2025 https://github.com/python-control/python-control/pull/1148/commits/a4605137c07976e5721c28be0c941a25f709a709
f56e5de docstrings, ruff check and format MythasNauveili May 9, 2025 https://github.com/python-control/python-control/pull/1148/commits/f56e5de3b9abd9786362ea6636fcbb6db3dcf472
36ad284 improve formatting, underscore internal functions, add file description MythasNauveili May 12, 2025 https://github.com/python-control/python-control/pull/1148/commits/36ad284840875bba529e4a7afb569a883cd5555a
4870463 implement delay case in input_output_response, move and test issiso f… MythasNauveili May 12, 2025 https://github.com/python-control/python-control/pull/1148/commits/4870463ba2d6e128ce5baa6b847e7c084be49a63
1150646 remove forgotten debug print in timeresp, and unused imports in delay… MythasNauveili May 13, 2025 https://github.com/python-control/python-control/pull/1148/commits/115064642a3e8ac649981afeae8aa733c4d776c2
e9cf123 Merge branch 'python-control:main' into dev-delay MythasNauveili Aug 25, 2025 https://github.com/python-control/python-control/pull/1148/commits/e9cf123f6d29c8e4641fced343f2ff6096184386
Clear filters https://github.com/python-control/python-control/pull/1148/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1148/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1148/files
.gitignore https://github.com/python-control/python-control/pull/1148/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
dde.py https://github.com/python-control/python-control/pull/1148/files#diff-77ca515ad7e926f65cd67546764085067158f6a49572846e9f27291d08e58702
delaylti.py https://github.com/python-control/python-control/pull/1148/files#diff-2c60badfad3a68ee54032dc887d62668f767ce20ccbe36a23a3cd6f6ca29ef8d
freqplot.py https://github.com/python-control/python-control/pull/1148/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
iosys.py https://github.com/python-control/python-control/pull/1148/files#diff-12b378d96d36c9d59a9fbc5afbc7cc158d153ff7591b4769f8312772e1d74ed1
README.md https://github.com/python-control/python-control/pull/1148/files#diff-e266d0373774421e6f02bb0f02b200f6a5ef04b528ea2223b11ce3201d1adcd7
compute_tests.jl https://github.com/python-control/python-control/pull/1148/files#diff-75d59342ab70a0bb6c25740127d3446381109e044934dff69876181c4b626dfc
julia_results.json https://github.com/python-control/python-control/pull/1148/files#diff-6d385511bf5017ce6375c8bcc530da704d6f7b54309dc7882b743a8afae582d5
test.ipynb https://github.com/python-control/python-control/pull/1148/files#diff-0907b04e1945ee3683ec8eb4605f1048a46192a4f43d5e8f70e2ae1a46f78e50
utils.py https://github.com/python-control/python-control/pull/1148/files#diff-8516ceb57f29d58b0fbf20c512a0b7d0ff5c7f44879e63868e408c023261fc63
nlsys.py https://github.com/python-control/python-control/pull/1148/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
partitionedssp.py https://github.com/python-control/python-control/pull/1148/files#diff-000d72d3479ef213e973079172c3d02d50fafd957b1602da01f81cfff16aa16e
statesp.py https://github.com/python-control/python-control/pull/1148/files#diff-b5aac033a6dd07653e82d9f5a40afaa775010c2d2d5af8beeb159487b566df72
dde_test.py https://github.com/python-control/python-control/pull/1148/files#diff-b5dec576afa97fdd0cda7dbd5eadd7936dd84178375fd0629f52db4108ba0f2a
delay_lti_test.py https://github.com/python-control/python-control/pull/1148/files#diff-63fde603ffc536f29ac3c346be9a4c49571de0781bb886b935c570c389e64576
delay_test.py https://github.com/python-control/python-control/pull/1148/files#diff-8d4385b3f51fa12375083152e3da6a15fab020e622b506ff746c07a9e588f3f4
partionedssp_test.py https://github.com/python-control/python-control/pull/1148/files#diff-2de1bb3a1b695186f2d732be68394d025e3cc7d8252e4623077e45efdc1a1c05
timeresp.py https://github.com/python-control/python-control/pull/1148/files#diff-3200453f1cf62f183f04dbf39d1129d91245c53a9f74675cee6bd384351c45b4
.gitignorehttps://github.com/python-control/python-control/pull/1148/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
View file https://github.com/python-control/python-control/blob/e9cf123f6d29c8e4641fced343f2ff6096184386/.gitignore
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/1148/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/1148/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
Please reload this pagehttps://github.com/python-control/python-control/pull/1148/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1148/files
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.