24 #ifndef __DERCONTROLLER_H
25 #define __DERCONTROLLER_H
57 virtual void init(
int sensornumber,
int motornumber,
RandGen* randGen = 0);
76 virtual bool store(FILE* f)
const;
158 virtual void calcXsi(
int delay);
paramval squashSize
size of the box, where the parameter updates are clipped to
Definition: homeokinbase.h:65
void getLastMotors(motor *motors, int len)
Definition: dercontroller.cpp:416
Matrix type.
Definition: matrix.h:65
virtual int getSensorNumber() const
returns the number of sensors the controller was initialised with or 0 if not initialised ...
Definition: dercontroller.h:62
matrix::Matrix AAT
Definition: dercontroller.h:122
double cInit
cInit size of the C matrix to initialised with.
Definition: dercontroller.h:37
matrix::Matrix B
Model Bias.
Definition: dercontroller.h:117
bool useFantasy
if true fantasising is enabled
Definition: dercontroller.h:42
virtual void updateCandHandA(const matrix::Matrix &C_update, const matrix::Matrix &H_update, const matrix::Matrix &A_update, double squashSize)
updates the matrices C, H and A
Definition: dercontroller.cpp:379
virtual void init(int sensornumber, int motornumber, RandGen *randGen=0)
initialisation of the controller with the given sensor/ motornumber Must be called before use...
Definition: dercontroller.cpp:59
bool someInternalParams
someInternalParams if true only some internal parameters are exported, all otherwise ...
Definition: dercontroller.h:40
matrix::Matrix S
additional Model Matrix (sensors to sensors)
Definition: dercontroller.h:112
matrix::Matrix x_intern
fantasy sensor values
Definition: dercontroller.h:140
bool useS
useS decides whether to use the S matrix in addition to the A matrix
Definition: dercontroller.h:39
virtual void setMotorTeachingSignal(const motor *teaching, int len)
Definition: dercontroller.cpp:519
NoiseGenerator * BNoiseGen
Noisegenerator for noisy bias.
Definition: dercontroller.h:118
int fantReset
number of fantasy control events before reseting internal state
Definition: dercontroller.h:143
matrix::Matrix R
C*A.
Definition: dercontroller.h:120
double pain
if the modelling error (xsi) is too high we have a pain signal
Definition: dercontroller.h:128
double cNonDiag
cNonDiag is the size of the nondiagonal elements in respect to the diagonal (cInit) ones ...
Definition: dercontroller.h:38
matrix::Matrix eta_smooth
Definition: dercontroller.h:135
matrix::Matrix SmallID
small identity matrix in the dimension of R
Definition: dercontroller.h:124
unsigned short number_motors
Definition: dercontroller.h:109
Definition: dercontroller.h:35
double sensor
Definition: types.h:29
double xsi_norm_avg
average norm of xsi (used to define whether Modell learns)
Definition: dercontroller.h:127
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
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 ...
Definition: dercontroller.cpp:366
virtual ~DerController()
Definition: dercontroller.cpp:48
virtual void stepNoLearning(const sensor *, int number_sensors, motor *, int number_motors)
performs one step without learning. Calulates motor commands from sensor inputs.
Definition: dercontroller.cpp:135
virtual bool getTeachingMode()
Definition: dercontroller.cpp:515
int fantControlLen
length of fantasy control
Definition: dercontroller.h:142
matrix::Matrix * y_buffer
Definition: dercontroller.h:130
struct DerControllerConf DerControllerConf
double sensor
Definition: abstractcontroller.h:48
matrix::Matrix A
Model Matrix (motors to sensors)
Definition: dercontroller.h:111
virtual void step(const sensor *, int number_sensors, motor *, int number_motors)
performs one step (includes learning).
Definition: dercontroller.cpp:117
Extended HomeokinBase class (still abstract) for robot controller work in motorspace and use possibly...
Definition: invertmotorcontroller.h:36
virtual std::list< ILayer > getStructuralLayers() const
Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering...
Definition: dercontroller.cpp:495
matrix::Matrix H
Controller Bias.
Definition: dercontroller.h:116
class for robot controller that uses the georg's matrixlib for direct matrix inversion for n channels...
Definition: dercontroller.h:52
unsigned short number_sensors
Definition: dercontroller.h:108
virtual void calcCandHandAUpdates(matrix::Matrix &C_update, matrix::Matrix &H_update, matrix::Matrix &A_update, int y_delay)
calculates the Update for C, H and A
Definition: dercontroller.cpp:270
virtual bool store(FILE *f) const
stores the object to the given file stream (ASCII preferred).
Definition: dercontroller.cpp:422
DerController(const DerControllerConf &conf=getDefaultConf())
Definition: dercontroller.cpp:32
virtual void learnController()
learn H,C with motors y and corresponding sensors x
Definition: dercontroller.cpp:228
bool useTeaching
if true, the controller honors the teaching signal
Definition: dercontroller.h:41
int fantControl
interval length for fantasising
Definition: dercontroller.h:141
matrix::Matrix xsi
current output error
Definition: dercontroller.h:125
virtual double calcMatrixNorm(const matrix::Matrix &m)
calculates the city block distance (abs) norm of the matrix. (abs sum of absolutes / size of matrix) ...
Definition: dercontroller.cpp:524
virtual matrix::Matrix calculateControllerValues(const matrix::Matrix &x_smooth)
calculate controller outputs
Definition: dercontroller.cpp:412
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 ...
Definition: dercontroller.cpp:142
virtual int getMotorNumber() const
returns the mumber of motors the controller was initialised with or 0 if not initialised ...
Definition: dercontroller.h:64
int buffersize
buffersize size of the time-buffer for x,y,eta
Definition: dercontroller.h:36
double motor
Definition: types.h:30
matrix::Matrix * x_buffer
Definition: dercontroller.h:129
matrix::Matrix Dinverse
Inverse Noise Matrix.
Definition: dercontroller.h:115
matrix::Matrix DD
Noise Matrix.
Definition: dercontroller.h:114
matrix::Matrix x_smooth
Definition: dercontroller.h:133
NoiseGenerator * YNoiseGen
Noisegenerator for noisy motor values.
Definition: dercontroller.h:119
matrix::Matrix zero_eta
Definition: dercontroller.h:132
matrix::Matrix * eta_buffer
Definition: dercontroller.h:131
matrix::Matrix RRT
Definition: dercontroller.h:121
double motor
Definition: abstractcontroller.h:49
virtual std::list< iparamval > getInternalParams() const
Definition: dercontroller.cpp:469
virtual std::list< iparamkey > getInternalParamNames() const
The list of the names of all internal parameters given by getInternalParams().
Definition: dercontroller.cpp:443
virtual void calcEtaAndBufferIt(int delay)
calculates the first shift into the motor space useing delayed motor values.
Definition: dercontroller.cpp:190
virtual void calcXsi(int delay)
calculates xsi for the current time step using the delayed y values
Definition: dercontroller.cpp:210
matrix::Matrix y_teaching
teaching motor signal
Definition: dercontroller.h:138
matrix::Matrix C
Controller Matrix.
Definition: dercontroller.h:113
virtual std::list< IConnection > getStructuralConnections() const
Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The...
Definition: dercontroller.cpp:503
DerControllerConf conf
Definition: dercontroller.h:145
static DerControllerConf getDefaultConf()
Definition: dercontroller.h:92
virtual bool restore(FILE *f)
loads the object from the given file stream (ASCII preferred).
Definition: dercontroller.cpp:432
int c
Definition: hexapod.cpp:56
virtual void setTeachingMode(bool onOff)
Definition: dercontroller.cpp:511
virtual matrix::Matrix model(const matrix::Matrix &x, const matrix::Matrix &y)
calculates the predicted sensor values
Definition: dercontroller.cpp:218
double xsi_norm
norm of matrix
Definition: dercontroller.h:126
Interface and basic class for noise generator.
Definition: noisegenerator.h:37