Search the Mindcreators site: 

4.1.6 Sensory Neuron

Update Alert!

I have now finished work on a much more advanced version of the insect simulator named AnimatLab. AnimatLab is a software tool that combines biomechanical simulation and biologically realistic neural networks. You can build the body of an animal, robot, or other machine and place it in a virtual world where the physics of its interaction with the environment are accurate and realistic. You can then design a nervous system that controls the behavior of the body in the environment. The software currently has support for simple firing rate neuron models and leaky integrate and fire spiking neural models. In addition, there a number of different synapse model types that can be used to connect the various neural models to produce your nervous system. On the biomechanics side there is support for a variety of different rigid body types, including custom meshes that can be made to match skeletal structures exactly. The biomechanics system also has hill-based muscle and muscle spindle models. These muscle models allow the nervous system to produce movements around joints. In addition, there are also motorized joints for those interested in controlling robots or other biomimetic machines. This allows the user to generate incredibly complicated artificial lifeforms that are based on real biological systems. Best of all AnimatLab is completely free and it includes free C++ source code!

1. Sensory Neuron Functionality

The purpose of sensory neurons is to take physical aspects of the world, such as leg rotation and energy level, and convert them into intrinsic currents that then cause neurons to alter their firing frequency. The main way that this is done is to use a mapping function that takes input data from some item of the insect and then maps that to a specific intrinsic current. An insect has a number of different variables that define its current state. Each insect contains a number of legs, and each leg contains certain variables related to its current rotation, torque, extension and so on. These are the types of variables that are used by the sensory neurons. Within the configuration file that defines an insect there is a sensory motor map section. Each item that can be used by a sensory or motor neuron is defined there and associated with a unique ID. The sensory neuron then keeps track of the SensoryMotorMapID and when the insect is loaded into memory it uses the information in the motor map to get a pointer to the correct data item that it is to use. Next, during each time step it takes the value from this variable and plugs it into a sensory mapping function for this neuron to calculate the current value of the intrinsic current.

2. Sensory Neuron Properties

  • Sensor ID: This drop down associates an item from the sensory motor map to this sensory neuron. It basically tells it which variable that this neuron is associated with. Looking at the item selected in the image it can be seen that this neuron would be using the rotation of the first leg.
  • Graph Type: This property determines which type of graph to use for the mapping of input data into intrinsic current. For a more detailed description see section 3
  • A: This property is one of the parameters for the sensory mapping function. For a more detailed description see section 3
  • B: This property is one of the parameters for the sensory mapping function. For a more detailed description see section 3
  • C: This property is one of the parameters for the sensory mapping function. For a more detailed description see section 3
  • D: This property is one of the parameters for the sensory mapping function. For a more detailed description see section 3
  • Sensory neuron Dialog
    Figure 1. This is a dialog for setting the properties for a sensory neuron.

    3. Sensory Mapping Function

    It would have been possible to simply allow the user to enter a general purpose equation and have a parser take that and evaluate it. However, speed was very important in this application and it was decided that it would be much faster if the user was simply able to select from a few of the most commonly used functions and supply some of the parameters. This allowed the program to use a simple switch statement to decide between a few functions. The basic types of graphs that can be used are shown in figure 2. This figure is also labeled with most of the properties that can be used to define the graph. Also, below is a list of the actual functions used for each graph type, with a description of what each parameter is used for.

    Graph Types
    Figure 2. These are the graph types that can be used to define a sensory mapping function.

  • Linear:
    Y = (B/A) * X + C
      A: This is the run portion of the slope. Where the slope of a line is the rise over the run.
      B: This is the rise portion of the slope.
      C: This is intercept of the line. It is the value of the equation when X is zero.
  • Bell:
    Y = B * e (-C * (X-A)2 ) + D
      A: This controls the horizontal offset for the center of the curve.
      B: This specifies the value for the peak of the curve.
      C: This controls the width of the bell curve.
      D: .This controls the vertical offset for the whole curve.
  • Sigmoid:
    Y =
              B          
    + D
     
    1 + e (C * (A-X) )
     
      A: This controls the horizontal offset for the center of the curve.
      B: This specifies the height that the curve will attain.
      C: This controls the amount of curvature in the sigmoid. Higher values of C will cause the curve to look more like a switch. And lower values of C will give a very smooth curve transitioning from the low value to the high value.
      D: .This controls the vertical offset for the whole curve.
  • Polynomial:
    Y = C * (X-A)B + D
      A: This controls the horizontal offset for the center of the curve.
      B: This specifies order of the polynomial. This is really a Xn function.
      C: This, along with B, controls how fast the curve goes up. Increasing C will decrease the width of the parabola.
      D: .This controls the vertical offset for the whole curve.
  • Inverse:
    Y =
              B          
    + D
     
    (X - A)C
     
      A: This controls the horizontal offset for the center of the curve. When X=A the value returned is zero.
      B: This value helps determine how fast the curve reaches its asymptote. A larger value of B will mean that it will take longer to reach its steady state value. 
      C: This value also controls how fast the curve falls. A larger value of C will mean a larger denominator value and a smaller overall value. 
      D: .This controls the vertical offset for the whole curve.
  • Lets work through a simple example now. Assume that we have a sensory neuron with the settings shown below and with a leg rotation of 2.0 radians. This would give an intrinsic current of Ih = (10 n / 3.141) * 2 + 5 n = 11.4 na.

    Sensor ID:Leg 0 Rotation
    Graph Type:Linear
    A:3.141
    B:10 n
    C:5 n

    4. Sensory Neuron Analysis

    Sensory Neuron Analysis
    Video 1. This graph shows how the rotation of the leg is related to the intrinsic current. The sensory neuron has the following properties and the mapping equation is shown.

    Video Size: 5.7 Mb
    Sensor ID:Leg 0 Rotation
    Graph Type:Sigmoid
    A:-300 m
    B:10 n
    C:500
    D:0

    Video 1 shows some typical output from a sensory neuron. The associated video clip shows the generation of that graph along with a video of the insect leg actually moving. There are a few important points to look at here. The first thing to notice is that as the leg torque goes positive it causes the leg rotation in a positive manner, and vice versa. By looking at the sensory mapping function it can be seen that when the rotation of the leg goes below -0.3 radians the intrinsic current goes up to 10 na, and above -0.3 radians the intrinsic current is 0 na. This can also be seen from video 1 and the video by comparing the leg rotation and the intrinsic current.

    5. Sensory Neuron Overview

    The basic thing that the sensory neuron does is that it takes data from some element of the insect and uses the sensory mapping function to associate the values of that data element with an intrinsic current. The basic properties of a regular neuron then determine whether, and how long, that neuron will fire. So the important thing to remember about sensory neurons is that they take data about the physical world and transform that into a firing pattern of the neuron.


    << Previous Contents Home Next >>

    MindCreators.Com is edited and maintained by David Cofer. If you have any questions, comments, or just want to discuss the contents of this website, then email me at: dcofer@MindCreators.com.

    Copyright © 2002 by David Cofer. All rights reserved.