Public Member Functions | Private Attributes
sr_deadband::HysteresisDeadband< T > Class Template Reference

#include <sr_deadband.hpp>

List of all members.

Public Member Functions

 HysteresisDeadband ()
bool is_in_deadband (T demand, T error, T deadband, double deadband_multiplicator=5.0, unsigned int nb_errors_for_avg=50)
 ~HysteresisDeadband ()

Private Attributes

T deadband
bool entered_small_deadband
T last_demand
std::deque< Tlast_errors

Detailed Description

template<class T>
class sr_deadband::HysteresisDeadband< T >

Definition at line 51 of file sr_deadband.hpp.


Constructor & Destructor Documentation

template<class T >
sr_deadband::HysteresisDeadband< T >::HysteresisDeadband ( ) [inline]

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 >
sr_deadband::HysteresisDeadband< T >::~HysteresisDeadband ( ) [inline]

Definition at line 65 of file sr_deadband.hpp.


Member Function Documentation

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:
demandThe demand
errorThe error (demand - actual value)
deadbandthe deadband value
deadband_multiplicatorthe value by which we multiply the deadband to have the bigger deadband against which we check for leaving the deadband zone
nb_errors_for_avgthe nb of errors we keep for averaging
Returns:
true if the demand is in the deadband.

Definition at line 82 of file sr_deadband.hpp.


Member Data Documentation

template<class T >
T sr_deadband::HysteresisDeadband< T >::deadband [private]

Definition at line 128 of file sr_deadband.hpp.

template<class T >
bool sr_deadband::HysteresisDeadband< T >::entered_small_deadband [private]

Definition at line 134 of file sr_deadband.hpp.

template<class T >
T sr_deadband::HysteresisDeadband< T >::last_demand [private]

Definition at line 132 of file sr_deadband.hpp.

template<class T >
std::deque<T> sr_deadband::HysteresisDeadband< T >::last_errors [private]

Definition at line 133 of file sr_deadband.hpp.


The documentation for this class was generated from the following file:


sr_utilities
Author(s): Ugo Cupcic
autogenerated on Fri Aug 21 2015 12:24:47