Public Member Functions | |
| wPID () | |
| Constructor. More... | |
| double | pidloop (double currentvalue) |
| it compute a loop of PID algorithm More... | |
| void | reset () |
| Resets the PID status. More... | |
Public Attributes | |
| double | acc_ff |
| 'A' acceleration feed forward More... | |
| double | accel_r |
| 'R' acceleration rate More... | |
| double | bias |
| 'B' bias More... | |
| double | d_gain |
| 'D' derivative gain More... | |
| double | fri_ff |
| 'F' friction feed forward More... | |
| double | i_gain |
| 'I' integral gain More... | |
| double | max |
| 'M' maximum output value More... | |
| double | min |
| 'N' minimum output value More... | |
| double | p_gain |
| 'P' proportional gain More... | |
| double | setpt |
| 'S' set point More... | |
| double | slew |
| 'W' maximum slew rate More... | |
| double | vel_ff |
| 'V' velocity feed forward More... | |
Detailed Description
wPID class
- Motivation
- this class provide an implementation of PID algorithm.
- Note
- this is a C++ adaptation of pidloop example at http://jk-technology.com/C_Unleashed/code_list.html
Definition at line 38 of file motorcontrollers.h.
Constructor & Destructor Documentation
| wPID | ( | ) |
Constructor.
Definition at line 32 of file motorcontrollers.cpp.
References wPID::acc_ff, wPID::accel_r, wPID::bias, wPID::d_gain, wPID::fri_ff, wPID::i_gain, wPID::max, wPID::min, wPID::p_gain, wPID::setpt, wPID::slew, and wPID::vel_ff.
Member Function Documentation
| double pidloop | ( | double | currentvalue | ) |
it compute a loop of PID algorithm
- Parameters
-
currentvalue is the current value of variable under the control of PID
Definition at line 52 of file motorcontrollers.cpp.
References wPID::acc_ff, wPID::accel_r, wPID::bias, wPID::d_gain, wPID::fri_ff, wPID::i_gain, wPID::max, wPID::min, wPID::p_gain, wPID::setpt, wPID::slew, and wPID::vel_ff.
| void reset | ( | ) |
Resets the PID status.
Definition at line 125 of file motorcontrollers.cpp.
Member Data Documentation
| double acc_ff |
'A' acceleration feed forward
Definition at line 56 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double accel_r |
'R' acceleration rate
Definition at line 64 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double bias |
'B' bias
Definition at line 62 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double d_gain |
'D' derivative gain
Definition at line 54 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double fri_ff |
'F' friction feed forward
Definition at line 58 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double i_gain |
'I' integral gain
Definition at line 52 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double max |
'M' maximum output value
Definition at line 70 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double min |
'N' minimum output value
Definition at line 68 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double p_gain |
'P' proportional gain
Definition at line 50 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double setpt |
'S' set point
Definition at line 66 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double slew |
'W' maximum slew rate
Definition at line 72 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
| double vel_ff |
'V' velocity feed forward
Definition at line 60 of file motorcontrollers.h.
Referenced by wPID::pidloop(), and wPID::wPID().
The documentation for this class was generated from the following files:
- worldsim/include/motorcontrollers.h
- worldsim/src/motorcontrollers.cpp