File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,9 @@ void PID::SetControllerDirection(int Direction)
225
225
******************************************************************************/
226
226
double PID::GetKp (){ return dispKp; }
227
227
double PID::GetKi (){ return dispKi;}
228
+ double PID::GetTi (){ return dispKp/dispKi;}
228
229
double PID::GetKd (){ return dispKd;}
230
+ double PID::GetTd (){ return dispKd/dispKp;}
229
231
int PID::GetMode (){ return inAuto ? AUTOMATIC : MANUAL;}
230
232
int PID::GetDirection (){ return controllerDirection;}
231
233
Original file line number Diff line number Diff line change @@ -52,13 +52,14 @@ class PID
52
52
// the PID calculation is performed. default is 100
53
53
54
54
55
-
56
55
// Display functions ****************************************************************
57
56
double GetKp (); // These functions query the pid for interal values.
58
57
double GetKi (); // they were created mainly for the pid front-end,
59
58
double GetKd (); // where it's important to know what is actually
60
59
int GetMode (); // inside the PID.
61
60
int GetDirection (); //
61
+ double GetTi ();
62
+ double GetTd ();
62
63
63
64
private:
64
65
void Initialize ();
@@ -70,7 +71,6 @@ class PID
70
71
double kp; // * (P)roportional Tuning Parameter
71
72
double ki; // * (I)ntegral Tuning Parameter
72
73
double kd; // * (D)erivative Tuning Parameter
73
-
74
74
int controllerDirection;
75
75
int pOn;
76
76
Original file line number Diff line number Diff line change @@ -18,8 +18,19 @@ The back calculation should prevent integral windup be dynamically limiting the
18
18
from exceeding the limits. Large errors far outside of the proportional range (error > MaxOutput/kP) will produce MaxOutput and
19
19
inhibit integral growth.
20
20
21
- See
21
+ Alternative libraries:
22
22
23
+ * PID -- Brett Beauregard's well documented original uses static limits on integral windup or PonM scheme
24
+ * QuickPID -- has several anti-windup forms
25
+ * PID_RT -- Has anti-windup but Proportional-on-measurement
26
+
27
+
28
+ See:
29
+ * https://en.wikipedia.org/wiki/PID_controller#Integral_windup -- overview of Integral Windup & common solutions
30
+ * https://en.wikipedia.org/wiki/Integral_windup -- overview of Integral Windup & common solutions
31
+ * https://www.cds.caltech.edu/~murray/courses/cds101/fa02/caltech/astrom-ch6.pdf -- Textbook chaper with windup and backcalculation
32
+ * https://controlguru.com/integral-reset-windup-jacketing-logic-and-the-velocity-pi-form/ -- good pics
33
+ * https://homepages.laas.fr/lzaccari/preprints/ZackEJC09.pdf -- A comprehensive paper on more complicated anti-windup schemes than backcalculation
23
34
* https://github.com/br3ttb/Arduino-PID-Library/pull/116 -- Pull request to the PID_v1 library
24
- * https://github.com/br3ttb/Arduino-PID-Library/issues/76#issuecomment-1445273655
35
+ * https://github.com/br3ttb/Arduino-PID-Library/issues/76
25
36
You can’t perform that action at this time.
0 commit comments