Derivative calculation was wrong all along #40

Merged
sb10q merged 1 commits from pid_hotfix into master 2020-12-29 17:09:04 +08:00

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).

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).
sb10q merged commit e94601f54f into master 2020-12-29 17:09:04 +08:00
topquark12 deleted branch pid_hotfix 2020-12-29 17:30:29 +08:00

The PID controller implementation was taken in verbatim from Ionpak. Maybe it might make sense to backport some fixes.

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.

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.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/thermostat#40
There is no content yet.