Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization-based tuning–PID controller with Delay #931

Closed
caxelrud opened this issue Aug 21, 2024 · 3 comments
Closed

Optimization-based tuning–PID controller with Delay #931

caxelrud opened this issue Aug 21, 2024 · 3 comments

Comments

@caxelrud
Copy link

I tried the example of optimized-based tuning PID from the documentation at:
https://docs.sciml.ai/ControlSystems/stable/examples/automatic_differentiation/
I modified the process transfer function to one that includes dead-time as: P = tf(1, [4, 1.0])*delay(1) .
I got the following error when try to execute: res = solve(prob, solver).
ERROR: The advanced interface to the function feedback (with connection keyword arguments) is currently not supported for LFT systems (such as nonlinear and time-delay systems)

From the documentation, at Properties of delay systems, I see examples of the feedback function with process with time-delay.
Let me know if it is a bug or a current limitation.
Thanks!

@baggepinnen
Copy link
Member

baggepinnen commented Aug 22, 2024

You can create feedback connections with delay systems, but not using the advanced version of the feedack function that is used inside the extended_gangoffour function, this is a current limitation. You could reformulate the problem to work on discrete-time systems instead, and discretize the delay exactly. To do this, call c2d on your system model before the optimization, pass the same sample time Ts to pid in the systemspid function. After that, all computations should be performed on a non-delayed discrete-time model with internal state representing the delay instead

@caxelrud
Copy link
Author

Thanks baggepinnen!
It worked with the instructions you recommended.

@baggepinnen
Copy link
Member

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants