Derivative calculation was wrong all along #40
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "pid_hotfix"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Derivative should be (error - last_error), but because we're using input to calculate derivative to prevent kick, and the relationship between error and input is (error = target - input), using input for derivative caluculation means it should be calculated as (last_input-input).
The PID controller implementation was taken in verbatim from Ionpak. Maybe it might make sense to backport some fixes.
Yes, ionpak generally needs an overhaul regarding this and a long list of other problems. I'm planning to look into it at some point.