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
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:3fd284af-5dfc-4101-3895-8000f14f7fee |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | DB58:34CC4F:CEA674:11DFE63:697A79CD |
| html-safe-nonce | b58221f1601792f4780ba81a21a4ac11ddb3d58486c9a3a89b7c3f575e20201b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjU4OjM0Q0M0RjpDRUE2NzQ6MTFERkU2Mzo2OTdBNzlDRCIsInZpc2l0b3JfaWQiOiIyOTQyMjUyNjIwNDUxNTc2MjY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9974c5733f6d4e6e09a96e86e7ca8bb044a83b2eeb8a695c74b6806adbca9eb7 |
| hovercard-subject-tag | pull_request:2511964911 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/1148/checks |
| twitter:image | https://avatars.githubusercontent.com/u/123153936?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/123153936?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a9d1eabfb8cf0cb510bcf598032681675ad29b7ee4cb3bfb9a0a088a12803628 |
| turbo-cache-control | no-cache |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 31bacebc3305d80609c1b175449c3d314bd1a855 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width