InvertNChannelController Class Reference

#include <invertnchannelcontroller.h>

Inheritance diagram for InvertNChannelController:

Inheritance graph
[legend]
Collaboration diagram for InvertNChannelController:

Collaboration graph
[legend]
List of all members.

Detailed Description

class for robot controller that uses the georg's matrixlib for direct matrix inversion for n channels (simple one layer networks)

Implements standart parameters: eps, rho, mu, stepnumber4avg, stepnumber4delay

Definition at line 42 of file invertnchannelcontroller.h.

Public Member Functions

 InvertNChannelController (int _buffersize, bool _update_only_1=false)
virtual void init (int sensornumber, int motornumber)
 initialisation of the controller with the given sensor/ motornumber Must be called before use.
virtual ~InvertNChannelController ()
virtual paramkey getName () const
 returns the name of the object (with version number)
virtual int getSensorNumber () const
 returns the number of sensors the controller was initialised with or 0 if not initialised
virtual int getMotorNumber () const
 returns the mumber of motors the controller was initialised with or 0 if not initialised
virtual void step (const sensor *, int number_sensors, motor *, int number_motors)
 performs one step (includes learning).
virtual void stepNoLearning (const sensor *, int number_sensors, motor *, int number_motors)
 performs one step without learning. Calulates motor commands from sensor inputs.
virtual bool store (const char *filename)
 stores the controller values to a given file.
virtual bool restore (const char *filename)
 loads the controller values from a given file.
virtual list< iparamkeygetInternalParamNames () const
 The list of the names of all internal parameters given by getInternalParams().
virtual list< iparamvalgetInternalParams () const
virtual list< ILayergetStructuralLayers () const
 Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important.
virtual list< IConnectiongetStructuralConnections () const
 Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The orderning is not important.

Protected Member Functions

virtual double calculateE (const Matrix &x_delay, const Matrix &y_delay)
virtual void learn (const Matrix &x_delay, const Matrix &y_delay)
 learn values h,C
virtual void learnmodel (const Matrix &y_delay)
virtual Matrix calculateDelayedValues (const Matrix *buffer, unsigned int number_steps_of_delay_)
 calculate delayed values
virtual Matrix calculateSmoothValues (const Matrix *buffer, unsigned int number_steps_for_averaging_)
Matrix calculateControllerValues (const Matrix &x_smooth)
 calculate controller outputs
void putInBuffer (Matrix *buffer, const Matrix &vec)

Static Protected Member Functions

static double g (double z)
 neuron transfer function
static double g_s (double z)
static double squash (double z)
 squashing function, to protect against to large weight updates

Protected Attributes

unsigned short number_channels
unsigned short buffersize
bool update_only_1
Matrix A
Matrix C
Matrix h
Matrix L
Matrixx_buffer
Matrixy_buffer
int t
paramkey name


Constructor & Destructor Documentation

InvertNChannelController int  _buffersize,
bool  _update_only_1 = false
 

Definition at line 28 of file invertnchannelcontroller.cpp.

virtual ~InvertNChannelController  )  [inline, virtual]
 

Definition at line 48 of file invertnchannelcontroller.h.


Member Function Documentation

Matrix calculateControllerValues const Matrix x_smooth  )  [protected]
 

calculate controller outputs

Parameters:
x_smooth Matrix(number_channels,1)

Definition at line 294 of file invertnchannelcontroller.cpp.

Matrix calculateDelayedValues const Matrix buffer,
unsigned int  number_steps_of_delay_
[protected, virtual]
 

calculate delayed values

Definition at line 271 of file invertnchannelcontroller.cpp.

double calculateE const Matrix x_delay,
const Matrix y_delay
[protected, virtual]
 

Definition at line 154 of file invertnchannelcontroller.cpp.

Matrix calculateSmoothValues const Matrix buffer,
unsigned int  number_steps_for_averaging_
[protected, virtual]
 

Definition at line 278 of file invertnchannelcontroller.cpp.

static double g double  z  )  [inline, static, protected]
 

neuron transfer function

Definition at line 117 of file invertnchannelcontroller.h.

static double g_s double  z  )  [inline, static, protected]
 

Definition at line 123 of file invertnchannelcontroller.h.

list< Inspectable::iparamkey > getInternalParamNames  )  const [virtual]
 

The list of the names of all internal parameters given by getInternalParams().

The naming convention is "v[i]" for vectors and "A[i][j]" for matrices, where i, j start at 0.

Returns:
: list of keys

Implements Inspectable.

Definition at line 330 of file invertnchannelcontroller.cpp.

list< Inspectable::iparamval > getInternalParams  )  const [virtual]
 

Returns:
: list of values

Implements Inspectable.

Definition at line 339 of file invertnchannelcontroller.cpp.

virtual int getMotorNumber  )  const [inline, virtual]
 

returns the mumber of motors the controller was initialised with or 0 if not initialised

Reimplemented from AbstractController.

Definition at line 55 of file invertnchannelcontroller.h.

virtual paramkey getName  )  const [inline, virtual]
 

returns the name of the object (with version number)

Reimplemented from Configurable.

Definition at line 51 of file invertnchannelcontroller.h.

virtual int getSensorNumber  )  const [inline, virtual]
 

returns the number of sensors the controller was initialised with or 0 if not initialised

Reimplemented from AbstractController.

Definition at line 53 of file invertnchannelcontroller.h.

list< Inspectable::IConnection > getStructuralConnections  )  const [virtual]
 

Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The orderning is not important.

Returns:
: list of layer names with dimension

Reimplemented from Inspectable.

Definition at line 355 of file invertnchannelcontroller.cpp.

list< Inspectable::ILayer > getStructuralLayers  )  const [virtual]
 

Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important.

The first entry is the input layer and so on.

Returns:
: list of layer names with dimension

Reimplemented from Inspectable.

Definition at line 347 of file invertnchannelcontroller.cpp.

void init int  sensornumber,
int  motornumber
[virtual]
 

initialisation of the controller with the given sensor/ motornumber Must be called before use.

Reimplemented from AbstractController.

Definition at line 38 of file invertnchannelcontroller.cpp.

void learn const Matrix x_delay,
const Matrix y_delay
[protected, virtual]
 

learn values h,C

Definition at line 224 of file invertnchannelcontroller.cpp.

void learnmodel const Matrix y_delay  )  [protected, virtual]
 

Definition at line 265 of file invertnchannelcontroller.cpp.

void putInBuffer Matrix buffer,
const Matrix vec
[protected]
 

Definition at line 300 of file invertnchannelcontroller.cpp.

bool restore const char *  filename  )  [virtual]
 

loads the controller values from a given file.

Reimplemented from AbstractController.

Definition at line 317 of file invertnchannelcontroller.cpp.

static double squash double  z  )  [inline, static, protected]
 

squashing function, to protect against to large weight updates

Definition at line 133 of file invertnchannelcontroller.h.

void step const sensor ,
int  number_sensors,
motor ,
int  number_motors
[virtual]
 

performs one step (includes learning).

Calulates motor commands from sensor inputs.

Reimplemented from AbstractController.

Reimplemented in InvertNChannelController_Gnu.

Definition at line 58 of file invertnchannelcontroller.cpp.

void stepNoLearning const sensor ,
int  number_sensors,
motor ,
int  number_motors
[virtual]
 

performs one step without learning. Calulates motor commands from sensor inputs.

Reimplemented from AbstractController.

Reimplemented in InvertNChannelController_Gnu.

Definition at line 77 of file invertnchannelcontroller.cpp.

bool store const char *  filename  )  [virtual]
 

stores the controller values to a given file.

Reimplemented from AbstractController.

Definition at line 305 of file invertnchannelcontroller.cpp.


Member Data Documentation

Matrix A [protected]
 

Definition at line 84 of file invertnchannelcontroller.h.

unsigned short buffersize [protected]
 

Definition at line 81 of file invertnchannelcontroller.h.

Matrix C [protected]
 

Definition at line 85 of file invertnchannelcontroller.h.

Matrix h [protected]
 

Definition at line 86 of file invertnchannelcontroller.h.

Matrix L [protected]
 

Definition at line 87 of file invertnchannelcontroller.h.

paramkey name [protected]
 

Definition at line 91 of file invertnchannelcontroller.h.

unsigned short number_channels [protected]
 

Definition at line 80 of file invertnchannelcontroller.h.

int t [protected]
 

Definition at line 90 of file invertnchannelcontroller.h.

bool update_only_1 [protected]
 

Definition at line 82 of file invertnchannelcontroller.h.

Matrix* x_buffer [protected]
 

Definition at line 88 of file invertnchannelcontroller.h.

Matrix* y_buffer [protected]
 

Definition at line 89 of file invertnchannelcontroller.h.


Generated on Tue Apr 4 19:05:05 2006 for Robotsystem from Robot Group Leipzig by  doxygen 1.4.5