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

deadband
bool entered_small_deadband
last_demand
std::deque< T > last_errors

Detailed Description

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

Definition at line 50 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 59 of file sr_deadband.hpp.

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

Definition at line 64 of file sr_deadband.hpp.


Member Function Documentation

template<class T >
bool sr_deadband::HysteresisDeadband< T >::is_in_deadband ( demand,
error,
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 81 of file sr_deadband.hpp.


Member Data Documentation

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

Definition at line 127 of file sr_deadband.hpp.

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

Definition at line 133 of file sr_deadband.hpp.

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

Definition at line 131 of file sr_deadband.hpp.

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

Definition at line 132 of file sr_deadband.hpp.


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


sr_utilities
Author(s): Ugo Cupcic
autogenerated on Mon Oct 6 2014 07:42:15