#include <sr_deadband.hpp>
template<class T>
class sr_deadband::HysteresisDeadband< T >
Definition at line 51 of file sr_deadband.hpp.
Hysteresis deadband: we average the last N errors. If this average is less than a small deadband, we "enter the deadband zone" and send only a command of zero to the motor. We leave the deadband zone if the average of the error is getting bigger than x*deadband, or if we receive a new command.
Definition at line 60 of file sr_deadband.hpp.
template<class T >
bool sr_deadband::HysteresisDeadband< T >::is_in_deadband |
( |
T |
demand, |
|
|
T |
error, |
|
|
T |
deadband, |
|
|
double |
deadband_multiplicator = 5.0 , |
|
|
unsigned int |
nb_errors_for_avg = 50 |
|
) |
| |
|
inline |
Are we in the hysteresis deadband? If we are in it, then we're just sending a force demand of 0.
- Parameters
-
demand | The demand |
error | The error (demand - actual value) |
deadband | the deadband value |
deadband_multiplicator | the value by which we multiply the deadband to have the bigger deadband against which we check for leaving the deadband zone |
nb_errors_for_avg | the nb of errors we keep for averaging |
- Returns
- true if the demand is in the deadband.
Definition at line 83 of file sr_deadband.hpp.
The documentation for this class was generated from the following file: