Robotsystem from Robot Group Leipzig: Invert3ChannelController Class Template Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# Invert3ChannelController Class Template Reference

`#include <invert3channelcontroller.h>`

Inheritance diagram for Invert3ChannelController:

[legend]
Collaboration diagram for Invert3ChannelController:

[legend]
List of all members.

## Detailed Description

### template<int NUMBER_CHANNELS, int BUFFER_SIZE = 2>
class Invert3ChannelController< NUMBER_CHANNELS, BUFFER_SIZE >

class for robot controller that use naglaa's direct matrix inversion for n channels (simple one layer networks)

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

Definition at line 16 of file invert3channelcontroller.h.

## Public Member Functions
virtual double | g (double z)
| neuron transfer function
virtual double | g_s (double z)
virtual double | squash (double z)
| squashing function, to protect against to large weight updates
| Invert3ChannelController ()
virtual void | step (const sensor *x_, int sensornumber, motor *y_, int motornumber)
| performs one step (includes learning). Calulates motor commands from sensor inputs.
virtual void | stepNoLearning (const sensor *x_, int sensornumber, motor *y_, int motornumber)
| performs one step without learning. Calulates motor commands from sensor inputs.
## Public Attributes
double | A [NUMBER_CHANNELS][NUMBER_CHANNELS]
| model matrix
double | C [NUMBER_CHANNELS][NUMBER_CHANNELS]
| controller matrix
double | h [NUMBER_CHANNELS]
| bias vector
double | x_buffer [BUFFER_SIZE][NUMBER_CHANNELS]
| buffer for input values, x[tbuffersize]=actual value, x[(t-1+buffersize)buffersize]=x(t-1)
double | y_buffer [BUFFER_SIZE][NUMBER_CHANNELS]
| buffer for output values, y[tbuffersize]=actual value(if already calculated!), y[(t-1+buffersize)buffersize]=y(t-1)
double | xsi4E [NUMBER_CHANNELS]
double | xsi4Model [NUMBER_CHANNELS]
int | t
| number of steps, needed for ringbuffer x_buffer
## Protected Member Functions
virtual void | inverseMatrix (double Q[NUMBER_CHANNELS][NUMBER_CHANNELS], double Q_1[NUMBER_CHANNELS][NUMBER_CHANNELS])
virtual double | calculateE (const double *x_, const double *x_delay, const double *y_delay)
virtual void | learn (const double *x_, const double *x_delay, const double *y_delay)
virtual void | learnModel (const double *x_actual, double *y_effective)
virtual void | calculateDelayedValues (double source[BUFFER_SIZE][NUMBER_CHANNELS], paramval number_steps_of_delay_, double *target)
| calculate delayed values
virtual void | calculateSmoothValues (double source[BUFFER_SIZE][NUMBER_CHANNELS], paramval number_steps_for_averaging_, double *target)
virtual void | calculateControllerValues (double *x_smooth, double *y)
| calculate controller ouptus
virtual void | putInBuffer (double buffer[BUFFER_SIZE][NUMBER_CHANNELS], const double *values)
virtual int | getInternalParamNames (paramkey *&keylist)
virtual int | getInternalParams (paramval *vallist, int length)

## Constructor & Destructor Documentation

Invert3ChannelController | ( |  | ) | `[inline]`

| Definition at line 101 of file invert3channelcontroller.h.

## Member Function Documentation

virtual void calculateControllerValues | ( | double * | x_smooth,
|  | double * | y
| ) | `[inline, protected, virtual]`

| calculate controller ouptus Definition at line 436 of file invert3channelcontroller.h.

virtual void calculateDelayedValues | ( | double | source[BUFFER_SIZE][NUMBER_CHANNELS],
|  | paramval | number_steps_of_delay_,
|  | double * | target
| ) | `[inline, protected, virtual]`

| calculate delayed values Definition at line 405 of file invert3channelcontroller.h.

virtual double calculateE | ( | const double * | x_,
|  | const double * | x_delay,
|  | const double * | y_delay
| ) | `[inline, protected, virtual]`

| Definition at line 251 of file invert3channelcontroller.h.

virtual void calculateSmoothValues | ( | double | source[BUFFER_SIZE][NUMBER_CHANNELS],
|  | paramval | number_steps_for_averaging_,
|  | double * | target
| ) | `[inline, protected, virtual]`

| Definition at line 418 of file invert3channelcontroller.h.

virtual double g | ( | double | z | ) | `[inline, virtual]`

| neuron transfer function Definition at line 77 of file invert3channelcontroller.h.

virtual double g_s | ( | double | z | ) | `[inline, virtual]`

| Definition at line 85 of file invert3channelcontroller.h.

virtual int getInternalParamNames | ( | paramkey *& | keylist | ) | `[inline, protected, virtual]`

| Definition at line 462 of file invert3channelcontroller.h.

virtual int getInternalParams | ( | paramval * | vallist,
|  | int | length
| ) | `[inline, protected, virtual]`

| Definition at line 477 of file invert3channelcontroller.h.

virtual void inverseMatrix | ( | double | Q[NUMBER_CHANNELS][NUMBER_CHANNELS],
|  | double | Q_1[NUMBER_CHANNELS][NUMBER_CHANNELS]
| ) | `[inline, protected, virtual]`

| Definition at line 210 of file invert3channelcontroller.h.

virtual void learn | ( | const double * | x_,
|  | const double * | x_delay,
|  | const double * | y_delay
| ) | `[inline, protected, virtual]`

| Definition at line 338 of file invert3channelcontroller.h.

virtual void learnModel | ( | const double * | x_actual,
|  | double * | y_effective
| ) | `[inline, protected, virtual]`

| Definition at line 376 of file invert3channelcontroller.h.

virtual void putInBuffer | ( | double | buffer[BUFFER_SIZE][NUMBER_CHANNELS],
|  | const double * | values
| ) | `[inline, protected, virtual]`

| Definition at line 453 of file invert3channelcontroller.h.

virtual double squash | ( | double | z | ) | `[inline, virtual]`

| squashing function, to protect against to large weight updates Definition at line 93 of file invert3channelcontroller.h.

virtual void step | ( | const sensor * | x_,
|  | int | sensornumber,
|  | motor * | y_,
|  | int | motornumber
| ) | `[inline, virtual]`

| performs one step (includes learning). Calulates motor commands from sensor inputs. Reimplemented from AbstractController. Definition at line 143 of file invert3channelcontroller.h.

virtual void stepNoLearning | ( | const sensor * | x_,
|  | int | sensornumber,
|  | motor * | y_,
|  | int | motornumber
| ) | `[inline, virtual]`

| performs one step without learning. Calulates motor commands from sensor inputs. Reimplemented from AbstractController. Definition at line 183 of file invert3channelcontroller.h.

## Member Data Documentation

double A[NUMBER_CHANNELS][NUMBER_CHANNELS]

| model matrix Definition at line 36 of file invert3channelcontroller.h.

double C[NUMBER_CHANNELS][NUMBER_CHANNELS]

| controller matrix Definition at line 37 of file invert3channelcontroller.h.

double h[NUMBER_CHANNELS]

| bias vector Definition at line 38 of file invert3channelcontroller.h.

int t

| number of steps, needed for ringbuffer x_buffer Definition at line 46 of file invert3channelcontroller.h.

double x_buffer[BUFFER_SIZE][NUMBER_CHANNELS]

| buffer for input values, x[tbuffersize]=actual value, x[(t-1+buffersize)buffersize]=x(t-1) Definition at line 40 of file invert3channelcontroller.h.

double xsi4E[NUMBER_CHANNELS]

| Definition at line 43 of file invert3channelcontroller.h.

double xsi4Model[NUMBER_CHANNELS]

| Definition at line 44 of file invert3channelcontroller.h.

double y_buffer[BUFFER_SIZE][NUMBER_CHANNELS]

| buffer for output values, y[tbuffersize]=actual value(if already calculated!), y[(t-1+buffersize)buffersize]=y(t-1) Definition at line 41 of file invert3channelcontroller.h.