-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
PID controller tolerances sharp bits #371
Comments
Right! This is actually the reason that I'd be happy to take a PR adding to the documentation here, to help make clear the role of |
Sounds good! |
Either I think! (Assuming that "separate example" means an |
I am not sure what |
Ah, right! Yeah I definitely wouldn't add an example there -- we have a lot of those already so easy to get lost amongst them I think. As for the
for am admonition, or for
for an expandable admonition. Some examples of the latter are in the existing docstring for |
Thanks! I have submitted a PR. I added it under the choosing tolerances tip. Hopefully it's not too obtrusive |
Solution PR merged |
Hi,
I recently noticed that the default tolerances suggested for the PID controller can give erroneous results even for very simple systems.
Here is a minimum working example:
Lets start with a simple pendulum with a small angle kick:
Then we can specify an integration function:
Using this function we can compare a constant step size controller to PID with different tolerances:
And then we can plot the phase portraits by:
And the results make the variation very clear:
This may be obvious to someone with more experience with adaptive stepsize controllers but I failed to notice it when I was looking at less trivial time series and it may be helpful for someone else.
If there is something incorrect in my implementation please let me know.
If not I think having an example like this in the documentation could be useful.
Thanks for the great package!
The text was updated successfully, but these errors were encountered: