FeedbackWiring Class Reference

Implements essentionally a one to one wiring with feedback connections. More...

#include <feedbackwiring.h>

Inherits AbstractWiring.

Inheritance diagram for FeedbackWiring:

Inheritance graph
[legend]
Collaboration diagram for FeedbackWiring:

Collaboration graph
[legend]
List of all members.

Public Types

 Motor = 1
 Context = 2
 All = 3
enum  Mode { Motor = 1, Context = 2, All = 3 }

Public Member Functions

 FeedbackWiring (NoiseGenerator *noise, Mode mode=Context, double feedbackratio=0.9)
 constructor
virtual ~FeedbackWiring ()
virtual std::list< iparamkeygetInternalParamNames () const
 The list of the names of all internal parameters given by getInternalParams().
virtual std::list< iparamvalgetInternalParams () const
virtual matrix::Matrix getFeedbackRatio () const
 return the feedback ratio vector
virtual void setFeedbackRatio (const matrix::Matrix &)
 sets the feedback ratio vector.

Protected Member Functions

virtual bool initIntern (int robotsensornumber, int robotmotornumber, RandGen *randGen=0)
 to be overloaded by subclasses
virtual bool wireSensorsIntern (const sensor *rsensors, int rsensornumber, sensor *csensors, int csensornumber, double noise)
 to be overloaded by subclasses
virtual bool wireMotorsIntern (motor *rmotors, int rmotornumber, const motor *cmotors, int cmotornumber)
 to be overloaded by subclasses

Protected Attributes

Mode mode
double defaultfeedbackratio
matrix::Matrix feedbackratio
motormotors
 array that stored the values of the motors
int vmotornumber

Detailed Description

Implements essentionally a one to one wiring with feedback connections.

The feedback connections from output to input are parameterised with a feedback strength. It is possible to generate virtual motors for context sensors.

In order to change the feedback strength after initialisation use the following code

    matrix::Matrix rs = wiring->getFeedbackRatio();
    double c=ratio;
    rs.toMapP(&c,constant);
    wiring->setFeedbackRatio(rs);


Member Enumeration Documentation

enum Mode

Enumerator:
Motor 
Context 
All 


Constructor & Destructor Documentation

FeedbackWiring ( NoiseGenerator noise,
Mode  mode = Context,
double  feedbackratio = 0.9 
)

constructor

Parameters:
noise NoiseGenerator that is used for adding noise to sensor values
mode Motor|Context|All: Motor: motor outputs send feedback; Context: virtual motor outputs for each context sensor with feedback
feedbackratio default ratio used to feed back the output to the input, meaning

\[ x_t = 0.1*x_t + 0.9*y_{t-1} \]

~FeedbackWiring (  )  [virtual]


Member Function Documentation

matrix::Matrix getFeedbackRatio (  )  const [virtual]

return the feedback ratio vector

Inspectable::iparamkeylist 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.

Inspectable::iparamvallist getInternalParams (  )  const [virtual]

Returns:
: list of values

Reimplemented from Inspectable.

bool initIntern ( int  robotsensornumber,
int  robotmotornumber,
RandGen randGen = 0 
) [protected, virtual]

to be overloaded by subclasses

See also:
init()

Implements AbstractWiring.

void setFeedbackRatio ( const matrix::Matrix  )  [virtual]

sets the feedback ratio vector.

The size of the vector must be at least as large as getFeedbackRatio()

bool wireMotorsIntern ( motor rmotors,
int  rmotornumber,
const motor cmotors,
int  cmotornumber 
) [protected, virtual]

to be overloaded by subclasses

See also:
wireMotors()

Implements AbstractWiring.

bool wireSensorsIntern ( const sensor rsensors,
int  rsensornumber,
sensor csensors,
int  csensornumber,
double  noise 
) [protected, virtual]

to be overloaded by subclasses

See also:
wireSensors()

Implements AbstractWiring.


Member Data Documentation

double defaultfeedbackratio [protected]

matrix::Matrix feedbackratio [protected]

Mode mode [protected]

motor* motors [protected]

array that stored the values of the motors

int vmotornumber [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