Research Article  Open Access
ARMCortex M3Based TwoWheel Robot for Assessing Grid Cell Model of Medial Entorhinal Cortex: Progress towards Building Robots with Biologically Inspired NavigationCognitive Maps
Abstract
This article presents the implementation and use of a twowheel autonomous robot and its effectiveness as a tool for studying the recently discovered use of grid cells as part of mammalian’s brains spacemapping circuitry (specifically the medial entorhinal cortex). A proposed discretetime algorithm that emulates the medial entorhinal cortex is programed into the robot. The robot freely explores a limited laboratory area in the manner of a rat or mouse and reports information to a PC, thus enabling research without the use of live individuals. Position coordinate neural maps are achieved as mathematically predicted although for a reduced number of implemented neurons (i.e., 200 neurons). However, this type of computational embedded system (robot’s microcontroller) is found to be insufficient for simulating huge numbers of neurons in real time (as in the medial entorhinal cortex). It is considered that the results of this work provide an insight into achieving an enhanced embedded systems design for emulating and understanding mathematical neural network models to be used as biologically inspired navigation system for robots.
1. Introduction
This article describes the design and use of an ARMCortex M3based board twowheel robot in which the neurons within the spacemapping system are named grid cells (GCs hereafter). The GCs were discovered in 2005 by M.B. Moser and E. I. Moser, who received the Nobel Prize for Medicine in 2014 [1]. The GCs have periodic triangular arrays and are hypothesized to function as the mammalian (e.g., rats and mice, possibly also humans) positioningmetric navigation system [2–4]. They are placemodulated neurons positioned on the medial entorhinal cortex (MEC hereafter). Multiple firing locations are found on these triangular arrays when an individual moves around a particular location. The firing information is then posted towards more structured neural networks to control movements (for instance, to place cells) [5]. In this respect, research about GCs is addressed using extracellular action potentials recorded from MEC neurons by means of an array of electrodes placed on freely moving rodents.
Neurobiologically based robot navigation has been the subject of research for a considerable time as noted in [6]. However, recent scientific interest has been focused on understanding the mechanisms by which these GCs create a cognitive map of the environment as this would enable the building of robots that mimic the mammalian biological navigation system.
Previous innovative studies are recognized with respect to this achievement. For example, [7, 8] show a new architecture for generating GCs that was implemented into a real robot. These GCs are based on various modulo operators applied on the path integration field. However, there are drawbacks with this approach as it has a path integration error problem and the robot has a width and height of 40 cm and 1 m, respectively (the robot is the Robulab 10 from Robosoft [9]). Another example: the study by [10] implemented a GC model based on a continuous attractor network of ratecoded cells, which encode the robot location and orientation (this robot is the Pioneer 2DXe mobile robot from Mobile Robots Inc. [11]).
In this work, we implement a novel discretetime differential equation GC neuron model [12] onto a 32bit ARMArduino Due based hardwaresoftware platform. This work contributes to assessing the mathematically tractable and programmable model proposed by [12] and a set of suitable parameters are obtained for use (interested readers can see in advance (3), (4), (5), and Table 1).

On the other hand, previous works use commercial robot platforms. Instead, in this work the robot has nongeneralizable design; that is, the GC mathematical model requirements and hardware features were taken into account to accomplish the best performance. This robot is not intended to be able to be adapted to other purposes other than an effective configurable tool for studying GCs and MEC models and their dynamics.
In developing the robot, the following was achieved: (i) a suitable algorithm was obtained for the discretetime model by using an Arduino hardwaresoftware platform; (ii) input signals from the environment were used as input for the GCs; and (iii) the firing patterns generated by the algorithms were determined while the robot is freely moving. However, clear drawbacks were determined at a hardware level while achieving the above, and it was determined that only a reduced number of GCs can be implemented. Although this issue needs to be addressed in future work to overcome this hardware limitation and achieve a huge GCs network, this study demonstrates the mathematically tractable GC model proposed in [12] is programmable on RISC microcontrollers. In addition, parameters’ values set was found for which the GCs worked as predicted.
This study therefore offers two benefits: (i) an assessment of an autonomous robot platform that mimics part of the mammalian biological navigation system (for this reason a PC is not used to simulate GCs, as the target is to develop robots using biologically inspired navigationcognitive maps); (ii) ensuring that the robot is an effective and configurable tool for studying and validating real biological navigation scenarios and that it enables experimental repeatability (in contrast to relying on the free and random moving of rodents). In other words, this robot is conceived to be a research tool for use by neuroscientists to study how the MEC of mammalians builds an environmental cognitiveneural map.
This paper is presented as follows: Section 2 describes the mathematical model of the GCs. Section 3 presents implementation of GCs within the robot; Section 4 describes the mathematical model translation to code by scaling the discretetime differential equations. Section 5 shows firing of the GCs which is achieved when the robot explores certain locations within the laboratory arena, and final conclusions are made in Section 6.
2. Grid Cell (GC) Neural Model
The GCs comprise the medial entorhinal cortex (MEC) of mammalian species. These cells provide the brain with a metric for the animal’s local space (or geometric reference) so that it knows its position in relation to its environment; that is, they work as a cognitive map with firing fields dispersed over the entire environment. For example, when a mouse moves in a given space, the GCs show shots in a hexagonal firing pattern with equidistant nodes, as shown in Figure 1.
As a model, this work uses (1), as proposed in [12, 13] and takes into account three dimensions of GC variation: scale, orientation, and phase. It is of note that the GCs model is too broad to be captured completely in this article, and thus only the base ideas are introduced to enable an understanding of how the GC and the robot work. th GC function is the sum of three twodimensional sinusoids and is characterized by its wave vector , with 0, 60, and 120 degrees of angular difference (see (1)). The index indicates the value variations of GC parameters that depend on the their position inside the MEC. The expression is given by (1); Figures 2 and 3 give examples of possible shapes, to provide an enhanced insight.where is the position vector, is a referential point, is a parameter, and is the number of nodes per unit distance related to the wave vector as . The wave vector in (1) is as follows:where for , for , and for and . It is used to express the GCs membrane potential as (3), (4), and (5).
(a)
(b)
In addition the function uses the following parameters (depending on the GC position inside the MEC):(i)(ii) value as , where is the number of GC neurons(iii) which is a random value normal distribution(iv)(v) angular phase shift that the environment produces on the grid(vi)(vii) (horizontal and vertical offset of the cell): factor 2 is used because the robot will be used in an 2 × 2 m testing areaThe fire timediscrete nonlinear differential equation is proposed in [14], which describes the GC membrane potential; it is also implemented. The assessed model of th GC is then expressed by (3), (4), and (5) with the following parameters: (i) is the membrane potential (unit mV) at the th timestep; (ii) is the recovering potential (unit mV) at the th timestep; (iii) is the th timestep value; that is, (discretetime value for numerical integration); (iv) is the synaptic excitation current model from at the th timestep; (v) is the shifting value to enable all positive values to be achieved (for easy digital implementation), (vi) is the maximum achievable membrane potential after firing, (vii) is the refractory membrane potential (unit mV), (viii) is the firing threshold (unit mV), (ix) is the lowest recovery membrane after firing (unit mV), and finally (x) , , , and are constants (interested readers can see in advance the model results obtained after the assessment in Table 1). After firing, the membrane potential (mV) and the recovering potential (unit mV) need to then be reset according to the following rule: if then and .
3. Implementation of Robot Hardware
The robot system block diagram (shown in Figure 4) features two microcontrollers interconnected by a tailored 32bit parallel wired communication using IO ports A and C. One of the microcontrollers updates is the robot position relative to the starting location over time (odometry) from information obtained from the wheels’ encoders. The position vector is sent to the other microcontroller, which solves discretetime equations (3), (4), and (5). Both the embedded systems are Arduino Due boards [15] based on the 32bit SAM3X8E ARM core CortexM3 architecture. Each board features a 84 MHz clock, 54 digital input/output pins, and 12 analog inputs and the robot’s wheels are driven by two 12 V DC motors with PWM Hbridge driver. The robot communicates to the outside using the PC, so that the GC spikes and the robot’s position can be read by the researchers. The robot constitutive parts are shown in Figures 5 and 6. The axles of its wheels have slotted disks to track rotation using optocouplers (the set diskoptocoupler is called the “encoder” and is used to estimate the wheel’s angular rotation). The robot estimates its displacement and trajectory from the departure point using the information provided by such encoders (odometry) as suggested in literature [16] (pp. 49–54). The position is estimated with an accuracy of cm, which is sufficient for this first GC model assessment. The tilt sensors are resistors whose values vary with deformation. They are used to detect the proximity of obstacles and avoid collisions. Figure 6 shows a collision.
(a)
(b)
(c)
The bumper has the same function but is connected to two lateral switches that have state change of ON/OFF which indicate possible frontal collisions with an object. The robot is powersupplied by an external unified DC voltage power supply of 12 V, 5 V, and 3.3 V. In addition the robot includes a camera OV5642 [17] for taking RGB photos, which will enable it in future research to identify different environments; however at this assessment level, the environment for the GC model is only provided in terms of the constant parameters as described. The robot also includes a Bluetooth HC05 communication module [18] for code debugging messages during the early development stages as discussed in Section 5. This module enables communication to be established with the PC to obtain real time GCs spikes.
4. Implementation of Robot Software
The Arduino IDE [15] was used as the programming environment as it provides libraries built in C++ and thus reduces the time required to obtain a code prototype. The programs in each microcontroller were implemented using RoundRobin scheduling with interruptions; this preemptive process scheduling algorithm was selected because of its ability to handle the multiple sensors signals. In addition, it has the computational requirements to obtain numerical solutions of the GCs. The scheduling pseudocode of the RoundRobin for the navigation system is shown in Listing 1 to clarify its operation. The robot’s motion occurs using a uniform random distribution function that generates random wheels motion (speed and direction for each wheel: both are updated independently periodically each 1 s). The motion simulates that of a rat exploring certain environments and while exploring the robot estimates its position relative to the starting point using the information provided by encoders (odometrybased model [16]). During this assessment stage, the error sources such as unequal wheel diameters, variation in the contact point of the wheels, and variable friction are neglected. A programing subroutine that we named RoutineAlert() was implemented using Arduino IDE libraries, which provide randomly generated values. The following two problems were then analyzed: (i) the need to determine limited speeds values achievable by each wheel gear to obtain bounded speed values and (ii) the need to radically reduce the total time consumed by the processor to perform the necessary tasks between consecutive RoutineAlert() calls. An important concept in dealing with the design is that the randomized values should not occur frequently (i.e., one RoutineAlert() calls inside the RoundRobin) as the robot speed would then tend to average the distribution and randomness would be lost.

4.1. Odometry and Robot WalkTime: Avoiding Position Errors of Significance
The odometry system performs tracking of the robot’s position using the rotational angle of the wheels. The model used was proposed in [16] and is widely used for twowheeled robots with differential traction. It uses the difference between wheel speeds to determine the direction of movement; as the wheels have a fixed axis, walking is achieved by imposing different speeds to each engine. The algorithm simply models the system and defines an axis of coordinates in the plane. The model is shown in Figure 7 and the equations used to update the robot position are described below:where is the ratio of the number of pulses to the distance traveled (meter per encoder pulse), and are the amount of measured pulses on the right and left wheel up to time , is the distance between the wheels’ centers, is the wheel radius, and is the encoder resolution (counts per turn). Cumulative errors occur when updating the robot’s position and the article [20] addresses the problem of measurements and correcting errors in systems such as this. According to these authors, among the multiple sources of error that could affect a system with two controlled wheels and odometry, two are more dominant than the others: (i) (systematic error) the radii of both wheels are not equal (wheels are coated with rubber to improve traction and it is very difficult to ensure that they are manufactured to be exactly the same); thus an encoder pulse can mean that different linear displacements occur with respect to each wheel and the assumed straight trajectory that should occur in the odometry model is thus actually curved; (ii) (random error) wheel slippage: this causes a change in the relation between the linear displacement of the wheel and the measured angle of rotation by the encoders. This source generates similar effects to those mentioned above but in rectilinear trajectories and such effects are mainly significant at angles of rotation. These sources of error modify the robot’s actual position in relation to that of its estimated position. Although positional compensation has not been implemented in this preliminary work to avoid errors, it has been empirically found to be possible to avoid such error compensation as suggested in [20] and that an assessment of GCs is sufficiently accurate if the robot’s walktime is less than min. Therefore, the odometry system has a limited useful life for each robot walk and for the surface in which it moves and the value of min is used in this considered experimental setup. Each robot walktime was thus only min (we also reiterate this value in the results section to explain results shown in Figure 8). The starting point is defined inside the arena prior to the robot walking. The updated position is then used to compute each of GCs’ states (i.e., to solve (3), (4), and (5)). In case of collision with obstacles, the robot randomly updates speed and rotates its wheels at different speeds to enable it to change course.
4.2. Scaling Equations
One of the main issues requiring attention in software implementation is the need to ensure that the computation of each state for each timestep is very short. In this respect, using the selected Cortex M3 it is possible to solve (3), (4), and (5) with a reduced number of clock cycles (i.e., a small timestep). Therefore, it is necessary to solve them using integer values, and to achieve this, the equations need to be scaled because the processor uses its hardware multiplier module. This module enables product operation in just a few clock cycles, thereby reducing the computational time, and also by scaling, the overall computation time thus is reduced per GC from μS to μS.
Scaling was performed ad hoc and according to the following reasoning (the function that describes the voltage membrane behavior is used here as an example); the variable was then multiplied by a factor in a way that was acceptable for truncation to integer values with respect to the error due to the floating point usage. A factor of 1000 achieves this condition (values 1000 times lower than the dimension on can be neglected). The scaled variables were then used for (3), (4), and (5) as shown in Table 1. This conclusion is extremely important for use as principle or rule in this class of bioinspired robot design. To give better insight, by scaling (3) it becomesThus, the scaled equation with new names of variables that the program into the microcontroller resolves is the following:
5. Results of Assessment
A testing stage was conducted to evaluate the platform performance and its effectiveness in assessing GCs models. This was achieved by computing a maximum of 200 GCs in a timestep of ms and reporting the spikes events to the PC using the mentioned Bluetooth module. The transmitted data frame format is shown in (9), in which each field is a byte. Data were processed using a Python written script and the GCs spikes and robot trajectories are plotted as shown in Figure 8.It was important to ensure that the number of GCs spikes sent to the PC for analysis is in (9): this number was empirically determined as the maximum number of GCs spikes and positions that could be sent every ms at BPS without errors. When the Arduino library is used to access a Bluetooth Serial port it may produce an overhead and the implemented RoundRobin software architecture with interruptions is then not able to properly handle the information at the required time. For example, data have been lost when . For the data obtained using a set of suitable parameters values for (3), (4), and (5) (please see Table 1) a map can be found of the firing distribution of each GC for every location within the explored area in addition to the appearance of firing frequency. With the model proposed in [12] ((3), (4), and (5)), a unified and mathematically tractable and programmable model was achieved (but still partially tested) and further research can now continue. To generate the case study shown in this work, several repetitions of the abovementioned procedure were conducted and files of the format given by (9) were obtained when the robot was placed in a laboratory arena, from a starting point chosen as and . The robot then began to move randomly, while simultaneously sending generated data to the PC. The procedure ended at min after it began and Figure 8 shows superposition of three experiments (each with a duration of min) for a given GC with two different values. Table 1 shows the suitable scaled variables and the suitable parameters values used for (3), (4), and (5).
6. Conclusion
This article shows the use of a twowheel autonomous robot and confirms its effectiveness as a configurable tool for studying GCs models. A computational maximum of 200 GCs was achieved with a timestep of ms; however this number of GCs is not yet representative of an actual mammalian MEC and thus more computational resources will be required in future developments. The main limitation of this study is related to data communication, and it will thus be necessary to use high speed wireless or wired communications, probably embedded systems with Ethernet communications, such as the wellknown Raspberry Pi board. The assessment shows that the GC model works as predicted and a mathematically tractable and programmable model with parameters set was obtained.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding publication of this paper.
References
 M.B. Moser and E. I. Moser, “The 2014 Nobel Prize in Physiology or Medicine,” https://www.nobelprize.org/nobel_prizes/medicine/laureates/2014/press.html. View at: Google Scholar
 E. I. Moser, Y. Roudi, M. P. Witter, C. Kentros, T. Bonhoeffer, and M.B. Moser, “Grid cells and cortical representation,” Nature Reviews Neuroscience, vol. 15, no. 7, pp. 466–481, 2014. View at: Publisher Site  Google Scholar
 K. M. Igarashi, “The entorhinal map of space,” Brain Research, vol. 1637, pp. 177–187, 2016. View at: Publisher Site  Google Scholar
 C. Barry and D. Bush, “From A to Z: a potential role for grid cells in spatial navigation,” Neural Systems & Circuits, vol. 2, no. 1, article 6, 2012. View at: Publisher Site  Google Scholar
 C. Palmer, “Electrical Oscillations Found to be Critical for Storing Spatial Memories in Brain,” Regents of the University of California, http://www.sciencenewsline.com/news/2011042913000039.html. View at: Google Scholar
 P. J. Zeno, S. Patel, and T. M. Sobh, “Review of neurobiologically based mobile robot navigation system research performed since 2000,” Journal of Robotics, vol. 2016, Article ID 8637251, 17 pages, 2016. View at: Publisher Site  Google Scholar
 A. Jauffret, N. Cuperlier, and P. Gaussier, “From grid cells and visual place cells to multimodal place cell: a new robotic architecture,” Frontiers in Neurorobotics, vol. 9, article 1, 2015. View at: Publisher Site  Google Scholar
 A. Jauffret, N. Cuperlier, P. Gaussier, and P. Tarroux, “Multimodal integration of visual place cells and grid cells for navigation tasks of a real robot,” in From Animals to Animats 12, vol. 7426 of Lecture Notes in Computer Science, pp. 136–145, Springer, Berlin, Germany, 2012. View at: Publisher Site  Google Scholar
 https://www.guliverdesign.com/robulab10.
 M. J. Milford, J. Wiles, and G. F. Wyeth, “Solving navigational uncertainty using grid cells on robots,” PLoS Computational Biology, vol. 6, no. 11, Article ID e1000995, 2010. View at: Publisher Site  Google Scholar  MathSciNet
 http://www.mobilerobots.com/ResearchRobots/PioneerP3DX.aspx.
 J. I. Cuneo, N. H. Quiroz, V. I. Weisz, and P. F. Argibay, “The computational influence of neurogenesis in the processing of spatial information in the dentate gyrus,” Scientific Reports, vol. 2, article 735, 2012. View at: Publisher Site  Google Scholar
 T. Solstad, E. I. Moser, and G. T. Einevoll, “From grid cells to place cells: a mathematical model,” Hippocampus, vol. 16, no. 12, pp. 1026–1031, 2006. View at: Publisher Site  Google Scholar
 E. M. Izhikevich, “Simple model of spiking neurons,” IEEE Transactions on Neural Networks, vol. 14, no. 6, pp. 1569–1572, 2003. View at: Publisher Site  Google Scholar
 https://www.arduino.cc/en/Main/arduinoBoardDue.
 H. R. Everett, Sensors for Mobile Robots: Theory and Application, A K Peters, Natick, Mass, USA, 1995.
 http://www.arducam.com/cameramodules/5mpov5642/.
 http://arduinoinfo.wikispaces.com/BlueToothHC05HC06ModulesHowTo.
 http://www.st.com/en/motordrivers/l298.html.
 J. Borenstein and L. Feng, “Measurement and correction of systematic odometry errors in mobile robots,” IEEE Transactions on Robotics and Automation, vol. 12, no. 6, pp. 869–880, 1996. View at: Publisher Site  Google Scholar
Copyright
Copyright © 2017 J. Cuneo et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.