InvertMotorSpace Class Reference

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

#include <invertmotorspace.h>

Inherits InvertMotorController.

Inheritance diagram for InvertMotorSpace:

Inheritance graph
[legend]
Collaboration diagram for InvertMotorSpace:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InvertMotorSpace (int buffersize, double cInit=0.1, bool someInternalParams=true)
virtual void init (int sensornumber, int motornumber, RandGen *randGen=0)
 initialisation of the controller with the given sensor/ motornumber Must be called before use.
virtual ~InvertMotorSpace ()
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 (FILE *f) const
 stores the controller values to a given file (binary).
virtual bool restore (FILE *f)
 loads the controller values from a given file (binary).
virtual std::list< ILayergetStructuralLayers () const
 Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important.
virtual std::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

void fillBuffersAndControl (const sensor *x_, int number_sensors, motor *y_, int number_motors)
 puts the sensors in the ringbuffer, generate controller values and put them in the
virtual void learnController (const matrix::Matrix &x, const matrix::Matrix &x_smooth, int delay)
 learn h,C, delayed motors y and corresponding sensors x
virtual void learnModel (const matrix::Matrix &x, const matrix::Matrix &y)
 learn A, using motors y and corresponding sensors x
virtual matrix::Matrix calculateControllerValues (const matrix::Matrix &x_smooth)
 returns controller output for given sensor values

Protected Attributes

unsigned short number_sensors
unsigned short number_motors
matrix::Matrix A
matrix::Matrix C
matrix::Matrix R
matrix::Matrix H
matrix::Matrix B
NoiseGeneratorBNoiseGen
matrix::Matrixx_buffer
matrix::Matrixy_buffer
matrix::Matrix x_smooth
bool someInternalParams
double cInit

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

Examples:

directconnect/directconnect.cpp, integration/main.cpp, and template_sphererobot/main.cpp.


Constructor & Destructor Documentation

InvertMotorSpace ( int  buffersize,
double  cInit = 0.1,
bool  someInternalParams = true 
)

~InvertMotorSpace (  )  [virtual]


Member Function Documentation

Matrix calculateControllerValues ( const matrix::Matrix x_smooth  )  [protected, virtual]

returns controller output for given sensor values

Parameters:
x_smooth smoothed sensors Matrix(number_channels,1)

void fillBuffersAndControl ( const sensor x_,
int  number_sensors,
motor y_,
int  number_motors 
) [protected]

puts the sensors in the ringbuffer, generate controller values and put them in the

virtual int getMotorNumber (  )  const [inline, virtual]

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

Implements AbstractController.

virtual int getSensorNumber (  )  const [inline, virtual]

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

Implements AbstractController.

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.

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.

void init ( int  sensornumber,
int  motornumber,
RandGen randGen = 0 
) [virtual]

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

The random generator is optional.

Implements AbstractController.

void learnController ( const matrix::Matrix x,
const matrix::Matrix x_smooth,
int  delay 
) [protected, virtual]

learn h,C, delayed motors y and corresponding sensors x

void learnModel ( const matrix::Matrix x,
const matrix::Matrix y 
) [protected, virtual]

learn A, using motors y and corresponding sensors x

bool restore ( FILE *  f  )  [virtual]

loads the controller values from a given file (binary).

Implements Storeable.

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

performs one step (includes learning).

Calulates motor commands from sensor inputs.

Implements AbstractController.

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

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

Implements AbstractController.

bool store ( FILE *  f  )  const [virtual]

stores the controller values to a given file (binary).

Implements Storeable.


Member Data Documentation

matrix::Matrix A [protected]

matrix::Matrix B [protected]

NoiseGenerator* BNoiseGen [protected]

matrix::Matrix C [protected]

double cInit [protected]

matrix::Matrix H [protected]

unsigned short number_motors [protected]

unsigned short number_sensors [protected]

matrix::Matrix R [protected]

bool someInternalParams [protected]

matrix::Matrix* x_buffer [protected]

matrix::Matrix x_smooth [protected]

matrix::Matrix* y_buffer [protected]


The documentation for this class was generated from the following files:
Generated on Fri Oct 30 16:29:02 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7