diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-14 00:07:23 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-14 00:07:23 -0500 |
commit | 4b4e198d337216e1bcfffb07b6618d9c9ef0f9a7 (patch) | |
tree | 36712bd62aef4a9f338cf79ac8a44355b9f819c1 /qolab/feedback/__init__.py | |
parent | 0446659d3d6eb95b41c609a8adf1adeef1e3756b (diff) | |
download | qolab-4b4e198d337216e1bcfffb07b6618d9c9ef0f9a7.tar.gz qolab-4b4e198d337216e1bcfffb07b6618d9c9ef0f9a7.zip |
pid have reset now
Diffstat (limited to 'qolab/feedback/__init__.py')
-rw-r--r-- | qolab/feedback/__init__.py | 5 |
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 |