From 4b4e198d337216e1bcfffb07b6618d9c9ef0f9a7 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Tue, 14 Dec 2021 00:07:23 -0500 Subject: pid have reset now --- qolab/feedback/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qolab/feedback') 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 -- cgit v1.2.3