aboutsummaryrefslogtreecommitdiff
path: root/qolab/feedback
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/feedback')
-rw-r--r--qolab/feedback/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/qolab/feedback/__init__.py b/qolab/feedback/__init__.py
index c778b2a..de58d13 100644
--- a/qolab/feedback/__init__.py
+++ b/qolab/feedback/__init__.py
@@ -7,11 +7,14 @@ class PID:
self.Gd = Gd
self.sign = sign
+ self.reset()
+
+ def reset(self):
self.err_1dt_back = 0
self.err_2dt_back = 0
self.err_now = 0
self.last_update = time.time()
-
+
def feedback(self, err):
# PID feedback
# see https://en.wikipedia.org/wiki/PID_controller#Pseudocode