lobot::PID< T > Class Template Reference

Simple implementation of a PID controller. More...

#include <Robots/LoBot/misc/LoPID.H>

Collaboration diagram for lobot::PID< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

cmd (const T &error)
void reset ()
 ~PID ()
 Clean-up.

void p_gain (const T &g)
 Re/setting the gains.
void i_gain (const T &g)
void d_gain (const T &g)
void gains (const T &p, const T &i, const T &d)
void gains (const triple< T, T, T > &g)

p_gain () const
 Retrieving the current gains.
i_gain () const
d_gain () const
triple< T, T, T > gains () const

 PID (const T &p_gain=T(0), const T &i_gain=T(0), const T &d_gain=T(0))
 Initialization. Clients should supply the gains to be used.
 PID (const triple< T, T, T > &gains)

Detailed Description

template<typename T>
class lobot::PID< T >

Simple implementation of a PID controller.

This class implements a generic PID controller that doesn't really know anything about the control variable. Rather, it simply computes a command given the current error by keeping track of the P, I and D components of a PID controller.

This class is defined as a template. However, it is really meant to be used only with numeric types.

Definition at line 71 of file LoPID.H.


Constructor & Destructor Documentation

template<typename T>
PID< T >::PID ( const T &  p_gain = T(0),
const T &  i_gain = T(0),
const T &  d_gain = T(0) 
) [inline]

Initialization. Clients should supply the gains to be used.

Definition at line 136 of file LoPID.H.

template<typename T >
PID< T >::~PID (  )  [inline]

Clean-up.

Definition at line 166 of file LoPID.H.


Member Function Documentation

template<typename T>
T PID< T >::cmd ( const T &  error  )  [inline]

This method returns the command to be applied given the current error.

Definition at line 152 of file LoPID.H.

template<typename T>
T lobot::PID< T >::p_gain (  )  const [inline]

Retrieving the current gains.

Definition at line 107 of file LoPID.H.

template<typename T>
void lobot::PID< T >::p_gain ( const T &  g  )  [inline]

Re/setting the gains.

Definition at line 94 of file LoPID.H.

template<typename T>
void lobot::PID< T >::reset (  )  [inline]

Sometimes, clients may find it necessary to reset the controller and start over again.

Definition at line 127 of file LoPID.H.


The documentation for this class was generated from the following file:
Generated on Sun May 8 08:30:45 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3