Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DerLinInvert Class Reference

class for robot controller is based on InvertMotorNStep More...

#include <derlininvert.h>

Inheritance diagram for DerLinInvert:
Collaboration diagram for DerLinInvert:

Public Member Functions

 DerLinInvert (const DerLinInvertConf &conf=getDefaultConf())
 
virtual void init (int sensornumber, int motornumber, RandGen *randg)
 initialisation of the controller with the given sensor/ motornumber Must be called before use. More...
 
virtual ~DerLinInvert ()
 
virtual int getSensorNumber () const
 returns the number of sensors the controller was initialised with or 0 if not initialised More...
 
virtual int getMotorNumber () const
 returns the mumber of motors the controller was initialised with or 0 if not initialised More...
 
virtual void step (const sensor *, int number_sensors, motor *, int number_motors)
 performs one step (includes learning). More...
 
virtual void stepNoLearning (const sensor *, int number_sensors, motor *, int number_motors)
 performs one step without learning. Calulates motor commands from sensor inputs. More...
 
virtual bool store (FILE *f) const
 stores the controller values to a given file. More...
 
virtual bool restore (FILE *f)
 loads the controller values from a given file. More...
 
virtual iparamkeylist getInternalParamNames () const
 The list of the names of all internal parameters given by getInternalParams(). More...
 
virtual iparamvallist getInternalParams () const
 
virtual ilayerlist getStructuralLayers () const
 Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important. More...
 
virtual iconnectionlist getStructuralConnections () const
 Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The orderning is not important. More...
 
virtual void setMotorTeachingSignal (const motor *teaching, int len)
 The given motor teaching signal is used for this timestep. More...
 
virtual void setSensorTeachingSignal (const sensor *teaching, int len)
 The given sensor teaching signal (distal learning) is used for this timestep. More...
 
void getLastMotors (motor *motors, int len)
 
virtual double calcMatrixNorm (const matrix::Matrix &m)
 calculates the city block distance (abs) norm of the matrix. (abs sum of absolutes / size of matrix) More...
 
- Public Member Functions inherited from InvertMotorController
 InvertMotorController (unsigned short buffersize, const std::string &name, const std::string &revision)
 
- Public Member Functions inherited from HomeokinBase
 HomeokinBase (unsigned short buffersize, const std::string &name, const std::string &revision)
 
- Public Member Functions inherited from AbstractController
 AbstractController (const std::string &name, const std::string &revision)
 contructor (hint: use $ID$ for revision) More...
 
virtual void motorBabblingStep (const sensor *, int number_sensors, const motor *, int number_motors)
 called in motor babbling phase. More...
 
virtual void sensorInfos (std::list< SensorMotorInfo > sensorInfos)
 the controller is notified about the information on sensor. More...
 
virtual void motorInfos (std::list< SensorMotorInfo > motorInfos)
 the controller is notified about the information on motors. More...
 
virtual int SIdx (const std::string &name)
 returns the index of the sensor with the given name (if not found then 0 and all sensor names are printed) More...
 
virtual int MIdx (const std::string &name)
 returns the index of the motor with the given name (if not found then 0 and all motor names are printed) More...
 
virtual SensorMotorInfo SInfo (int index)
 returns the Information for the sensor with given index More...
 
virtual SensorMotorInfo MInfo (int index)
 returns the Information for the motor with given index More...
 
- Public Member Functions inherited from Configurable
 Configurable ()
 
 Configurable (const std::string &name, const std::string &revision)
 intialise with name and revision (use "$ID$") More...
 
virtual ~Configurable ()
 
virtual void notifyOnChange (const paramkey &key)
 Is called when a parameter was changes via setParam(). More...
 
virtual void addParameter (const paramkey &key, paramval *val, paramval minBound, paramval maxBound, const paramdescr &descr=paramdescr())
 This is the new style for adding configurable parameters. More...
 
virtual void addParameter (const paramkey &key, paramval *val, const paramdescr &descr=paramdescr())
 See addParameter(const paramkey& key, paramval* val, paramval minBound, paramval maxBound, const paramdescr& descr) More...
 
virtual void addParameter (const paramkey &key, parambool *val, const paramdescr &descr=paramdescr())
 See addParameter(const paramkey& key, paramval* val) but for bool values. More...
 
virtual void addParameter (const paramkey &key, paramint *val, paramint minBound, paramint maxBound, const paramdescr &descr=paramdescr())
 See addParameter(const paramkey& key, paramval* val) but for int values. More...
 
virtual void addParameter (const paramkey &key, paramint *val, const paramdescr &descr=paramdescr())
 
virtual void addParameterDef (const paramkey &key, paramval *val, paramval def, paramval minBound, paramval maxBound, const paramdescr &descr=paramdescr())
 This function is only provided for convenience. More...
 
virtual void addParameterDef (const paramkey &key, paramval *val, paramval def, const paramdescr &descr=paramdescr())
 
virtual void addParameterDef (const paramkey &key, parambool *val, parambool def, const paramdescr &descr=paramdescr())
 See addParameterDef(const paramkey&, paramval*, paramval) More...
 
virtual void addParameterDef (const paramkey &key, paramint *val, paramint def, paramint minBound, paramint maxBound, const paramdescr &descr=paramdescr())
 See addParameterDef(const paramkey&, paramval*, paramval) More...
 
virtual void addParameterDef (const paramkey &key, paramint *val, paramint def, const paramdescr &descr=paramdescr())
 
virtual void setParamDescr (const paramkey &key, const paramdescr &descr, bool traverseChildren=true)
 sets a description for the given parameter More...
 
int getId () const
 return the id of the configurable objects, which is created by random on initialisation More...
 
virtual paramkey getName () const
 return the name of the object More...
 
virtual paramkey getRevision () const
 returns the revision of the object More...
 
virtual void setName (const paramkey &name, bool callSetNameOfInspectable=true)
 Sets the name of the configurable. More...
 
virtual void setRevision (const paramkey &revision)
 sets the revision Hint: { return "$ID$"; } More...
 
virtual paramval getParam (const paramkey &key, bool traverseChildren=true) const
 returns the value of the requested parameter or 0 (+ error message to stderr) if unknown. More...
 
virtual bool hasParam (const paramkey &key, bool traverseChildren=true) const
 Returns if the requested parameter is part of the configurable or their children. More...
 
virtual bool setParam (const paramkey &key, paramval val, bool traverseChildren=true)
 sets the value of the given parameter or does nothing if unknown. More...
 
virtual void setParamBounds (const paramkey &key, paramval minBound, paramval maxBound, bool traverseChildren=true)
 Sets the bounds (minBound and maxBound) of the given parameter. More...
 
virtual void setParamBounds (const paramkey &key, paramint minBound, paramint maxBound, bool traverseChildren=true)
 
virtual void setParamBounds (const paramkey &key, paramvalBounds bounds, bool traverseChildren=true)
 
virtual void setParamBounds (const paramkey &key, paramintBounds bounds, bool traverseChildren=true)
 
virtual paramlist getParamList () const
 The list of all parameters with there value as allocated lists. More...
 
virtual std::list< paramkeygetAllParamNames (bool traverseChildren=true)
 returns all names that are configureable More...
 
virtual parammap getParamValMap () const
 
virtual paramintmap getParamIntMap () const
 
virtual paramboolmap getParamBoolMap () const
 
virtual paramdescr getParamDescr (const paramkey &key, bool traverseChildren=true) const
 returns the description for the given parameter More...
 
virtual paramvalBounds getParamvalBounds (const paramkey &key, bool traverseChildren=true) const
 
virtual paramintBounds getParamintBounds (const paramkey &key, bool traverseChildren=true) const
 
virtual bool hasParamDescr (const paramkey &key, bool traverseChildren=true) const
 
virtual bool hasParamvalBounds (const paramkey &key, bool traverseChildren=true) const
 
virtual bool hasParamintBounds (const paramkey &key, bool traverseChildren=true) const
 
virtual bool storeCfg (const char *filenamestem, const std::list< std::string > &comments=std::list< std::string >())
 stores the key values paires into the file : filenamestem.cfg including the comments given in the list More...
 
virtual bool restoreCfg (const char *filenamestem)
 restores the key values paires from the file : filenamestem.cfg More...
 
void print (FILE *f, const char *prefix, int columns=90, bool traverseChildren=true) const
 prints the keys, values and descriptions to the file. Each line is prefixed More...
 
bool parse (FILE *f, const char *prefix=0, bool traverseChildren=true)
 parses the configuration from the given file More...
 
virtual void addConfigurable (Configurable *conf)
 Adds a configurable as a child object. More...
 
virtual void removeConfigurable (Configurable *conf)
 Removes a configurable as a child object. More...
 
virtual const configurableListgetConfigurables () const
 Returns the list containing all configurable children. More...
 
virtual void configurableChanged ()
 Indicates that the configurable itself or the configurable children attached to this configurable have changed. More...
 
- Public Member Functions inherited from BackCaller
 BackCaller ()
 
virtual ~BackCaller ()
 
virtual void addCallbackable (Callbackable *callbackableInstance, CallbackableType type=BackCaller::DEFAULT_CALLBACKABLE_TYPE)
 Adds a Callbackable instance to this caller instance. More...
 
virtual void removeCallbackable (Callbackable *callbackableInstance, CallbackableType type=BackCaller::DEFAULT_CALLBACKABLE_TYPE)
 Removes a Callbackable instance from this caller instance. More...
 
virtual void removeAllCallbackables (CallbackableType type)
 Removes all Callbackable instances from this caller instance. More...
 
virtual void callBack (CallbackableType type=BackCaller::DEFAULT_CALLBACKABLE_TYPE)
 Calls all registered callbackable classes of the determined type. More...
 
virtual void callBackQMP (CallbackableType type=BackCaller::DEFAULT_CALLBACKABLE_TYPE)
 Calls all registered callbackable classes of the determined type. More...
 
- Public Member Functions inherited from Inspectable
 Inspectable (const iparamkey &name="")
 TYPEDEFS END. More...
 
virtual ~Inspectable ()
 
virtual iparamvalptrlist getInternalParamsPtr () const
 be careful: matrices will be ignored More...
 
virtual void addInspectableValue (const iparamkey &key, iparamval const *val, const std::string &descr=std::string())
 This is the new style for adding inspectable values. More...
 
virtual void addInspectableMatrix (const iparamkey &key, const matrix::Matrix *m, bool only4x4AndDiag=true, const std::string &descr=std::string())
 This is the new style for adding inspectable values. More...
 
virtual void addInspectableDescription (const iparamkey &key, const std::string &descr)
 adds a description for the given parameter using info-lines The line will start (appart from the #I) with a D for description followed by the key end then followed by the string. More...
 
virtual void addInfoLine (std::string infoLine)
 Adds an info line to this inspectable instance. More...
 
virtual void addInfoLines (std::list< std::string > infoLineList)
 Adds a bunch of infolines with addInfoLine to this inspectable instance. More...
 
virtual void removeInfoLines ()
 Removes all infolines from this inspectable instance. More...
 
virtual const infoLinesListgetInfoLines () const
 Returns all infolines added to this inspectable instance. More...
 
virtual void addInspectable (Inspectable *insp)
 Adds an inspectable as a child object. More...
 
virtual void removeInspectable (Inspectable *insp)
 Removes an inspectable as a child object. More...
 
virtual void setNameOfInspectable (const iparamkey &name)
 set the name of the inspectable More...
 
virtual const iparamkey getNameOfInspectable () const
 return the name of the inspectable, getName() would conflict with Configurable::getName() too often More...
 
virtual const inspectableListgetInspectables () const
 Returns the list containing all inspectable children. More...
 
- Public Member Functions inherited from Storeable
virtual ~Storeable ()
 
bool storeToFile (const char *filename) const
 Provided for convenience. More...
 
bool restoreFromFile (const char *filename)
 Provided for convenience. More...
 

Static Public Member Functions

static DerLinInvertConf getDefaultConf ()
 

Protected Member Functions

virtual 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 More...
 
virtual void learnController (int delay)
 learn values H,C This is the implementation uses a better formula for g^-1 using Mittelwertsatz More...
 
virtual void learnModel (int delay)
 learn conf.model, (and S) using motors y and corresponding sensors x More...
 
virtual void management ()
 handles inhibition damping etc. More...
 
virtual matrix::Matrix calculateControllerValues (const matrix::Matrix &x_smooth)
 returns controller output for given sensor values More...
 
matrix::Matrix calcDerivatives (const matrix::Matrix *buffer, int delay)
 Calculates first and second derivative and returns both in on matrix (above). More...
 
- Protected Member Functions inherited from HomeokinBase
void putInBuffer (matrix::Matrix *buffer, const matrix::Matrix &vec, int delay=0)
 put new value in ring buffer More...
 
virtual matrix::Matrix calculateDelayedValues (const matrix::Matrix *buffer, int number_steps_of_delay_)
 calculate delayed values More...
 
virtual matrix::Matrix calculateSmoothValues (const matrix::Matrix *buffer, int number_steps_for_averaging_)
 calculate time-smoothed values More...
 
virtual double calcErrorFactor (const matrix::Matrix &e, bool loga, bool root)
 calculates the error_factor for either logarithmic (E=ln(e^T*e)) or square (E=sqrt(e^t*e)) error More...
 
- Protected Member Functions inherited from Configurable
void copyParameters (const Configurable &, bool traverseChildren=true)
 copies the internal params of the given configurable More...
 
void printdescr (FILE *f, const char *prefix, const paramkey &key, int columns, int indent) const
 

Protected Attributes

unsigned short number_sensors
 
unsigned short number_motors
 
matrix::Matrix A
 Model Matrix (motors to sensors) More...
 
matrix::Matrix A0
 
matrix::Matrix A_Hat
 Model Matrix (motors to sensors) with input shift. More...
 
matrix::Matrix S
 additional Model Matrix (sensors to sensors) More...
 
matrix::Matrix C
 Controller Matrix. More...
 
matrix::Matrix GSC
 G_Prime times Controller Matrix. More...
 
matrix::Matrix DD
 Noise Matrix. More...
 
matrix::Matrix Dinverse
 Inverse Noise Matrix. More...
 
matrix::Matrix H
 Controller Bias. More...
 
matrix::Matrix HY
 Controller Bias-Y. More...
 
matrix::Matrix B
 Model Bias. More...
 
NoiseGeneratorBNoiseGen
 Noisegenerator for noisy bias. More...
 
NoiseGeneratorYNoiseGen
 Noisegenerator for noisy motor values. More...
 
matrix::Matrix R
 C*A. More...
 
matrix::Matrix P
 A*G'*C. More...
 
matrix::Matrix RG
 Granger1. More...
 
matrix::Matrix Q
 Granger2. More...
 
matrix::Matrix Q1
 
matrix::Matrix RRT_inv
 
matrix::Matrix ATA_inv
 
matrix::Matrix Rm1
 R^-1. More...
 
matrix::Matrix ID
 identity matrix in the dimension of R More...
 
matrix::Matrix ID_Sensor
 identity matrix in the dimension of sensor space More...
 
matrix::Matrix CCT_inv
 
matrix::Matrix CST
 
matrix::Matrix DeltaC_Old
 
matrix::Matrix DeltaH_Old
 
matrix::Matrix DeltaHY_Old
 
matrix::Matrix xsi
 current output error More...
 
double xsi_norm
 norm of matrix More...
 
double xsi_norm_avg
 average norm of xsi (used to define whether Modell learns) More...
 
double pain
 if the modelling error (xsi) is too high we have a pain signal More...
 
double TLE
 
double grang1
 
double grang2
 
double causal
 
double causalfactor
 
double EE_mean
 
double EE_sqr
 
matrix::Matrixx_buffer
 
matrix::Matrixy_buffer
 
matrix::Matrixysat_buffer
 
matrix::Matrixchi_buffer
 
matrix::Matrixrho_buffer
 
matrix::Matrixeta_buffer
 
matrix::Matrix eta
 
matrix::Matrix v_smooth
 
matrix::Matrix zero_eta
 
matrix::Matrix x_smooth
 
matrix::Matrix y_smooth
 
matrix::Matrix y_sat
 
matrix::Matrix y_smooth_long
 
matrix::Matrix eta_smooth
 
matrix::Matrix x_smooth_long
 
matrix::Matrix y_forecast
 
matrix::Matrix y_integration
 
matrix::Matrix PID_deriv
 
matrix::Matrix vau1
 
matrix::Matrix mue1
 
MultiLayerFFNNsat
 satilite network, that learns and teaches More...
 
matrix::Matrix y_teaching
 teaching motor signal More...
 
bool useTeaching
 flag whether there is an actual teachning signal or not More...
 
matrix::Matrix x_intern
 fantasy sensor values More...
 
int fantControl
 interval length for fantasising More...
 
int fantControlLen
 length of fantasy control More...
 
int fantReset
 number of fantasy control events before reseting internal state More...
 
int t_rand
 initial random time to avoid syncronous management of all controllers More...
 
int t_delay
 
int managementInterval
 interval between subsequent management function calls More...
 
paramval dampS
 damping of S matrix More...
 
paramval dampC
 damping of C matrix More...
 
paramval dampH
 damping of H vector More...
 
paramval weighting
 general weighting factor between update concepts More...
 
paramval epsSat
 learning rate for satellite network More...
 
paramval satelliteTeaching
 teaching rate for sat teaching More...
 
paramval PIDint
 
paramval PIDdrv
 
paramval intstate
 
paramval gamma
 
DerLinInvertConf conf
 
- Protected Attributes inherited from InvertMotorController
paramval desens
 
paramval steps
 number of timesteps is used for controller learning More...
 
paramval zetaupdate
 
paramval dampA
 damping term for model (0: no damping, 0.1 high damping) More...
 
parambool relativeE
 if not 0: a relative error signal is used (xsi is normalised in respect to |y|) More...
 
paramval adaptRate
 adaptation rate for learning rate adaptation More...
 
paramval nomUpdate
 nominal update of controller in respect to matrix norm More...
 
paramval noiseB
 size of the additional noise for model bias B More...
 
paramval noiseY
 size of the additional noise for motor values More...
 
paramval teacher
 factor for teaching signal More...
 
- Protected Attributes inherited from HomeokinBase
paramval epsC
 learning rate factor for controller learning More...
 
paramval epsA
 learning rate factor for model learning More...
 
paramval factorB
 additional learning rate factor for model bias More...
 
paramint s4delay
 number of timesteps of delay in the SML More...
 
paramint s4avg
 number of timesteps used for smoothing the controller output values More...
 
paramint logaE
 logarithmic error is used for learning 1: controller 2: model 3: both More...
 
paramint rootE
 root error is used for learning 1: controller 2: model 3: both More...
 
paramval squashSize
 size of the box, where the parameter updates are clipped to More...
 
int t
 
unsigned short buffersize
 
bool initialised
 
- Protected Attributes inherited from AbstractController
std::map< std::string, int > sensorIndexMap
 
std::map< std::string, int > motorIndexMap
 
std::map< int, SensorMotorInfosensorInfoMap
 
std::map< int, SensorMotorInfomotorInfoMap
 
- Protected Attributes inherited from Inspectable
iparamkey name
 
iparampairlist mapOfValues
 
imatrixpairlist mapOfMatrices
 
infoLinesList infoLineStringList
 

Additional Inherited Members

- Public Types inherited from AbstractController
typedef double sensor
 
typedef double motor
 
- Public Types inherited from Configurable
typedef std::string paramkey
 
typedef std::string paramdescr
 
typedef double paramval
 
typedef std::list< std::pair
< paramkey, paramval > > 
paramlist
 
typedef std::map< paramkey,
paramval * > 
parammap
 
typedef bool parambool
 
typedef std::list< std::pair
< paramkey, parambool > > 
paramboollist
 
typedef std::map< paramkey,
parambool * > 
paramboolmap
 
typedef int paramint
 
typedef std::list< std::pair
< paramkey, paramint > > 
paramintlist
 
typedef std::map< paramkey,
paramint * > 
paramintmap
 
typedef std::map< paramkey,
paramdescr
paramdescrmap
 
typedef std::pair< paramval,
paramval
paramvalBounds
 
typedef std::map< paramkey,
paramvalBounds
paramvalBoundsMap
 
typedef std::pair< paramint,
paramint
paramintBounds
 
typedef std::map< paramkey,
paramintBounds
paramintBoundsMap
 
typedef std::pair< paramkey,
paramval * > 
paramvalpair
 
typedef std::pair< paramkey,
parambool * > 
paramboolpair
 
typedef std::pair< paramkey,
paramint * > 
paramintpair
 
typedef std::vector
< Configurable * > 
configurableList
 
- Public Types inherited from BackCaller
typedef unsigned long CallbackableType
 
- Public Types inherited from Inspectable
typedef std::string iparamkey
 
typedef double iparamval
 
typedef std::pair< iparamkey,
iparamval const * > 
iparampair
 
typedef std::pair< iparamkey,
std::pair< const
matrix::Matrix *, bool > > 
imatrixpair
 
typedef std::list< iparamkeyiparamkeylist
 
typedef std::list< std::string > infoLinesList
 
typedef std::list< iparamvaliparamvallist
 
typedef std::list< iparamval
const * > 
iparamvalptrlist
 
typedef std::list< iparampairiparampairlist
 
typedef std::list< imatrixpairimatrixpairlist
 
typedef struct Inspectable::ILayer ILayer
 
typedef struct
Inspectable::IConnection 
IConnection
 
typedef std::list< ILayerilayerlist
 
typedef std::list< IConnectioniconnectionlist
 
typedef std::list< const
Inspectable * > 
inspectableList
 
- Static Public Attributes inherited from Configurable
static const CallbackableType CALLBACK_CONFIGURABLE_CHANGED = 11
 
- Static Public Attributes inherited from BackCaller
static const CallbackableType DEFAULT_CALLBACKABLE_TYPE = 0
 This is the default Callbackable type. More...
 
- Static Protected Member Functions inherited from HomeokinBase
static double g (double z)
 neuron transfer function More...
 

Detailed Description

class for robot controller is based on InvertMotorNStep

  • direct inversion
  • motor space
  • multilayer,nonlinear model

Constructor & Destructor Documentation

~DerLinInvert ( )
virtual

Member Function Documentation

Matrix calcDerivatives ( const matrix::Matrix buffer,
int  delay 
)
protected

Calculates first and second derivative and returns both in on matrix (above).

We use simple discrete approximations:

\[ f'(x) = (f(x) - f(x-1)) / 2 \]

\[ f''(x) = f(x) - 2f(x-1) + f(x-2) \]

where we have to go into the past because we do not have f(x+1). The scaling can be neglegted.

double calcMatrixNorm ( const matrix::Matrix m)
virtual

calculates the city block distance (abs) norm of the matrix. (abs sum of absolutes / size of matrix)

Matrix calculateControllerValues ( const matrix::Matrix x_smooth)
protectedvirtual

returns controller output for given sensor values

calculate controller outputs

Parameters
x_smoothsmoothed sensors Matrix(number_channels,1)
void fillBuffersAndControl ( const sensor x_,
int  number_sensors,
motor y_,
int  number_motors 
)
protectedvirtual

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

static DerLinInvertConf getDefaultConf ( )
inlinestatic
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

Reimplemented from Inspectable.

list< Inspectable::iparamval > getInternalParams ( ) const
virtual
Returns
: list of values

Reimplemented from Inspectable.

void getLastMotors ( motor motors,
int  len 
)
virtual int getMotorNumber ( ) const
inlinevirtual

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

Implements AbstractController.

virtual int getSensorNumber ( ) const
inlinevirtual

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 
)
virtual

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

The random generator is optional.

Implements AbstractController.

void learnController ( int  delay)
protectedvirtual

learn values H,C This is the implementation uses a better formula for g^-1 using Mittelwertsatz

Parameters
delay0 for no delay and n>0 for n timesteps delay in the SML (s4delay)
void learnModel ( int  delay)
protectedvirtual

learn conf.model, (and S) using motors y and corresponding sensors x

void management ( )
protectedvirtual

handles inhibition damping etc.

bool restore ( FILE *  f)
virtual

loads the controller values from a given file.

Implements Storeable.

void setMotorTeachingSignal ( const motor teaching,
int  len 
)
virtual

The given motor teaching signal is used for this timestep.

It is used as a feed forward teaching signal for the controller. Please note, that the teaching signal has to be given each timestep for a continuous teaching process.

void setSensorTeachingSignal ( const sensor teaching,
int  len 
)
virtual

The given sensor teaching signal (distal learning) is used for this timestep.

First the belonging motor teachung signal is calculated by the inverse model. See setMotorTeachingSignal

void step ( const sensor x_,
int  number_sensors,
motor y_,
int  number_motors 
)
virtual

performs one step (includes learning).

performs one step (includes learning). Calculates motor commands from sensor inputs.

Calulates motor commands from sensor inputs.

Implements AbstractController.

void stepNoLearning ( const sensor x,
int  number_sensors,
motor y,
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.

Implements Storeable.

Member Data Documentation

matrix::Matrix A
protected

Model Matrix (motors to sensors)

matrix::Matrix A0
protected
matrix::Matrix A_Hat
protected

Model Matrix (motors to sensors) with input shift.

matrix::Matrix ATA_inv
protected
matrix::Matrix B
protected

Model Bias.

NoiseGenerator* BNoiseGen
protected

Noisegenerator for noisy bias.

matrix::Matrix C
protected

Controller Matrix.

double causal
protected
double causalfactor
protected
matrix::Matrix CCT_inv
protected
matrix::Matrix* chi_buffer
protected
DerLinInvertConf conf
protected
matrix::Matrix CST
protected
paramval dampC
protected

damping of C matrix

paramval dampH
protected

damping of H vector

paramval dampS
protected

damping of S matrix

matrix::Matrix DD
protected

Noise Matrix.

matrix::Matrix DeltaC_Old
protected
matrix::Matrix DeltaH_Old
protected
matrix::Matrix DeltaHY_Old
protected
matrix::Matrix Dinverse
protected

Inverse Noise Matrix.

double EE_mean
protected
double EE_sqr
protected
paramval epsSat
protected

learning rate for satellite network

matrix::Matrix eta
protected
matrix::Matrix* eta_buffer
protected
matrix::Matrix eta_smooth
protected
int fantControl
protected

interval length for fantasising

int fantControlLen
protected

length of fantasy control

int fantReset
protected

number of fantasy control events before reseting internal state

paramval gamma
protected
double grang1
protected
double grang2
protected
matrix::Matrix GSC
protected

G_Prime times Controller Matrix.

matrix::Matrix H
protected

Controller Bias.

matrix::Matrix HY
protected

Controller Bias-Y.

matrix::Matrix ID
protected

identity matrix in the dimension of R

matrix::Matrix ID_Sensor
protected

identity matrix in the dimension of sensor space

paramval intstate
protected
int managementInterval
protected

interval between subsequent management function calls

matrix::Matrix mue1
protected
unsigned short number_motors
protected
unsigned short number_sensors
protected
matrix::Matrix P
protected

A*G'*C.

double pain
protected

if the modelling error (xsi) is too high we have a pain signal

matrix::Matrix PID_deriv
protected
paramval PIDdrv
protected
paramval PIDint
protected
matrix::Matrix Q
protected

Granger2.

matrix::Matrix Q1
protected
matrix::Matrix R
protected

C*A.

matrix::Matrix RG
protected

Granger1.

matrix::Matrix* rho_buffer
protected
matrix::Matrix Rm1
protected

R^-1.

matrix::Matrix RRT_inv
protected
matrix::Matrix S
protected

additional Model Matrix (sensors to sensors)

MultiLayerFFNN* sat
protected

satilite network, that learns and teaches

paramval satelliteTeaching
protected

teaching rate for sat teaching

int t_delay
protected
int t_rand
protected

initial random time to avoid syncronous management of all controllers

double TLE
protected
bool useTeaching
protected

flag whether there is an actual teachning signal or not

matrix::Matrix v_smooth
protected
matrix::Matrix vau1
protected
paramval weighting
protected

general weighting factor between update concepts

matrix::Matrix* x_buffer
protected
matrix::Matrix x_intern
protected

fantasy sensor values

matrix::Matrix x_smooth
protected
matrix::Matrix x_smooth_long
protected
matrix::Matrix xsi
protected

current output error

double xsi_norm
protected

norm of matrix

double xsi_norm_avg
protected

average norm of xsi (used to define whether Modell learns)

matrix::Matrix* y_buffer
protected
matrix::Matrix y_forecast
protected
matrix::Matrix y_integration
protected
matrix::Matrix y_sat
protected
matrix::Matrix y_smooth
protected
matrix::Matrix y_smooth_long
protected
matrix::Matrix y_teaching
protected

teaching motor signal

NoiseGenerator* YNoiseGen
protected

Noisegenerator for noisy motor values.

matrix::Matrix* ysat_buffer
protected
matrix::Matrix zero_eta
protected

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