A Neuro-Fuzzy Controller for Collaborative Applications in Robotics Using LabVIEW
A neuro-fuzzy controller was designed and implemented using LabVIEW over a mobile robotic platform. The controller is based on fuzzy clusters, neural networks, and search techniques. Also, wireless communication with Bluetooth protocol was used to communicate the robot with the controller running in LabVIEW, allowing a simple collaborative task that consisted in pick and place objects, through knowing the position of the robot and measuring the distance to the objects. The neuro-fuzzy controller was split in two parts: the position controller and the evasion controller against collisions.
Many problems that affect society can be solved using software and hardware that includes powerful tools from artificial intelligence. For example, determining the amount of money necessary in a specific bank according to the demand, having a database to know the most common sicknesses in Mexican children to have enough medicine and institutions to provide health care assistance, making decisions in small businesses, all this means the possibility to use technological resources to reach development and improvement of life’s quality among people in different countries .
For all the mentioned above, the generation of generic and global tools to develop algorithms and programs is a challenging area that deserves the attention of the academic community, as more trained professionals are needed in order to develop and use the tools to improve situations and to solve problems. This project is focused in using modern tools like fuzzy control, neural networks, computational search, wireless communication, and others, to generate material and ideas for implementing solutions. The results of it can be extrapolated beyond the task that was selected to develop the collaborative work, but can be done in any other field as examples described in [2, 3].
The main objective of this project includes implementing a collaborative task in a group of microrobots, implicating autonomous navigation in a determined area, through the use and development of algorithms. In order to achieve this, the work was divided in three goals: designing and implementing a neuro-fuzzy controller based on previous works [4, 5] to get the autonomous navigation inside a determined area and implementing the collaborative work.
Additionally, some specific objectives were stated: using LabVIEW  to design and implement the algorithms to evaluate their use, designing a collaborative task for the micro robots used in the project, and generating a new structural design, cheap and flexible, for future projects.
The first steps in the project implicated research about the theory that sustains this work, mainly about fuzzy controllers, neural networks, fuzzy clusters, and search techniques. Subsequently, the efforts were focused in designing the neuro-fuzzy controller , including a model of the system to validate the controller, and making the proper adjustments to the physical structure of the robots. Finally, implementation of intercommunication was achieved using Bluetooth technology, and the collaborative task was designed, followed by several tests and measurements to validate the work.
2. Prototype Description
Robots used in this project contemplate a cm design, with a plastic base, two differential modified servomotors, a simple wheel for support, and different boards including a microprocessor Basic Stamp 2, three Ping ultrasonic range sensors for navigation place them one in front and the other two at left and right sides, and an Embedded Bluetooth Transreceiver for wireless communication, on each robot. This system also includes a magnet for the collaborative task.
In order to control the avoidance of obstacles and the movement of the robot, a neuro-fuzzy controller was implemented to run over the LabVIEW platform , in communication with the robots through Bluetooth protocol, using a Belkin USB-Bluetooth adapter.
3. Neuro-Fuzzy Controller
A neuro-fuzzy controller is used in robots in order to obtain the desired movements on them, that is, reaching a final position getting from an initial position. Figure 1 is a block diagram of the neuro-fuzzy controller proposed. It is based on trigonometric series  and an interface to communicate the robot with the processing system. In fact, a collaborative work has to be in a real-time-based processing. Then, trigonometric artificial neural networks  are implemented because their training phase only requires one epoch. In addition, this controller allows obstacles avoidance and adaptation of parameters according to interactions between the robot and its environment.
The robot is a MIMO system in which we have to control the rotation of the two wheels via two digital pulses coming from the microcontroller. So, it can be divided in two neuro-fuzzy controllers to simplify the designing of the fuzzy controller part: one that avoids collision against obstacles, and one to control the position through the motion in the servos, considering a position as the set point.
3.1. Neural Networks
Based on the definition of a fuzzy controller and its parts, and referring to Sugeno approach in the inference mechanism , neural networks can be applied to the clusters obtained through the Fuzzy Cluster Means (FCM) method. Fuzzy inferences of the form if_then, and a neural network in the output, can be expressed like where, can be a group of trigonometric functions , considering that Fourier series can be used to model the input in a neural network, and this method is useful to obtain the coefficients of the weights .
Considering a Fourier series defined with (2) and similarities which describes neural networks as (3) it makes evident the possibility of its description, where, coefficients of (2) are the Fourier Coefficients:
The topology includes two layers of neurons, the first composed by neurons with a trigonometric activation function and a weight that depends directly on the frequency. The second layer adds the trigonometric functions, multiplied by their respective weights plus a constant, as Figure 2 shows . The coefficients or weights in the neural network can be calculated considering if the signal is even or odd. A minimum squares method is used to find the coefficients analytically, through (4) converted in a matrix :
3.2. Fuzzy Cluster Means
In the inputs, it has been proved that better results are obtained using the method called Fuzzy Cluster Means to adapt and tune membership functions according to the environment surrounding a robot. This method allows the minimization of the distance between the elements of each cluster and the maximization of the distances that separate the centroids in the clusters. This can be defined by the objective function in (5).
Neural networks based on trigonometric series can be applied after obtaining the clusters, to soften the shapes of the membership functions, and to approach them to trigonometric series : where is the membership value of the element in the fuzzy cluster ; is the centroid in each cluster; , with , is the group of data; is the fuzzyfication value; is the Euclidian distance between and ; is the number of samples in data; is the number of clusters .
3.3. Tabu Search Method
The Tabu search method is a heuristic way to find a best solution combining several strategies: descendent method, long and short terms memory, and diversification strategies. As the search is happening, some of all the possible solutions are named as “taboo” and included in a list through the memories, during a defined number of iterations. These solutions will not be visited in some points of the search; meanwhile better solutions are found to replace an initial proposed solution .
An algorithm to find a better set of fuzzy rules than the proposed ones was developed and programmed, and it is included in Figure 3.
3.4. Design of Each Controller
The final neuro-fuzzy controller can be explained as following.(i)Two neuro-fuzzy controllers run parallel: one for avoiding obstacles and one for correcting the position of robots.(ii)Each neuro-fuzzy controller has the structure of Figure 1, in which inputs are fuzzified by memberships obtained from a fuzzy clustering determined by the environment and trigonometric neural networks. Then, a set of optimal rules obtained by the Tabu search method are evaluated in order to obtain a desired fuzzy output. Finally, outputs are computed by trigonometric neural networks. As seen, membership functions and rules are changing depending on the environment, given to robots the characteristic of adaptation.(iii)Avoidance obstacles neuro-fuzzy controller uses the left, right, and center measured distances between the robot and the nearest obstacle. Outputs are the pulses for correcting the position of the robot generated by some obstacle.(iv)Position neuro-fuzzy controller uses the final position as inputs and outputs are the pulses for correcting the position of the robot.(v)Avoidance obstacle controller has the highest priority.
4. Collaborative Task
The general idea of the collaborative task selected implies the detection and collection of small objects through the use of basic sensors–ultrasonic and infrared sensors. After localizing and collecting the objects, the robots move to deposit them in a certain place, using intercommunication between the computer and the robots to control the movements.
Certain physical parameters have been stated for the collaborative task: a plane surface with m per side, 15 cm tall walls around the surface, five spherical objects with metallic incrustations, and half illuminated space. Other specific parameters are 10 cm minimum of separation between each object, with a predetermined distribution for the objects and also for the robots. This is illustrated in Figure 6.
The proposed algorithm for the scenario is shown in a schematic way in Figure 7. The initial position of each robot is called home, and it is the place where the objects will be deposited after the recollection. In particular, the algorithm was proved with two robots. Actually, scaling the number of robots is also possible with the implementation of this neuro-fuzzy controller.
5.1. Neuro-Fuzzy Controller
The main result is the generic neuro-fuzzy controller. It was designed based on a Sugeno approach for generic fuzzy controllers, and it was programmed on LabVIEW  as the frame to create a generic method that allows to create any kind of neuro-fuzzy controller only changing basic parameters like the number of membership functions. This generic controller allows the scalability on the number of robots in the collaborative task. The total controller implemented on LabVIEW is shown in Figure 8.
5.2. Position Controller
With all programs ready in LabVIEW , several tests were made to verify the position controller error in different trajectories and also to prove the right behavior of the evasion controller using the most common obstacle cases in the proposed scenario.
For the position controller, a linear desired position results in the trajectory shown in Figure 9, with an error of 5.46%. On the other hand, a diagonal desired position has the trajectory of Figure 10 and an error of 6.2%.
5.3. Mathematical Model of the Plant
In order to finish the design and adjustment of the position control, a mathematical model from the navigation behavior was needed. For this, the servomotors were characterized first, and then a model that predicts the position according to the real motion of the servos was developed.
This model describes the relation between the pulses applied to the servos and the displacement considering the direction of the turn. Characterization of servomotors was done. The result of the measures is shown in Figure 11, and this can be expressed as(6)
Define the input variable as the vector of machine times that are needed to move the wheels, and the output variable as the position vector in the 2D navigation plane, with direction angle extension respecting from a coordinated plane M in defined in the initial states.
In general, the action of the plan can be divided in two main blocks: the angular displacement model and the placement in the plane, as Figure 12 shows.
The angular displacement model considers an input variable , which contains the information about the activation time in the rotation of each wheel, is the activation time in the left wheel, and represents the activation time in the right wheel. The output variable in this block is the relative angular displacement of plane in , with its center in the origin , mapped referring to the robot itself. This block determines the relative angular displacement according to the previous location and the new position after the movement (Figure 11).
A series of criteria was determined to delimitate the angular displacement model. (a) The robot can move forward or backward and the vector has its elements with the same value. (b) The robot can turn to the left, and . (c) The robot can turn to the right, and . (d) The robot can remain static and the vector has 0 values. (e) A movement forward takes place if the vector is positive. (f) A movement backward takes place if the vector is negative.
The absolute displacement depends on the actual position in plane ; so a point is defined as the origin of Euclidian plane R (Figure 14). Point has the direction value measured in plane . Mathematically, is a position vector (7):
The coordinates in correspond to the new position in plane . The new angle of direction is (10):
The output vector is defined as , where the values of its element imply (11):
Twenty observations were taken to validate the proposed model.
5.4. Evasion Controller
Four different cases were tested to verify the evasion against obstacles, which are shown in Figure 15 together with the trajectory followed by the robot on each case. The evaluation of this controllerisacceptable.
5.5. Wireless Communication
In order to send and receive the numerical data from the microcontroller to the computer and back, a basic protocol was designed. This protocol sent characters such as “go” or “hi” as the control signal, and then the respective digits of the correction signal or the feedback.
To establish and implement the communication through Bluetooth, a routine was designed based on predetermined blocks including exploration to find the device, sending, and receiving.
5.6. Designing a New Robot
Searching for a more flexible and less expensive platform, a new structure was designed and implemented as shown in Figure 16, using plastics and polymers to substitute aluminum and other heavier materials. The saving was of 16% in costs and 10% in weight.
5.7. Collaborative Task
Several experiments were made to observe the performance of the proposed system during the collaborative task, and the results of the trajectories followed by the robots are shown in Figure 17, according to the algorithm proposed previously. The total time was 17 minutes and 20 seconds. According to the results, time might be enhanced by proving other communication protocols and removing the master station. In that way, robots have to have a better microcontroller that allows programming the entire neuro-fuzzy controller inanyone. On the other hand, Figure 18 shows how a robot is catching an object with the magneto at the front part in this collaborative task. However, the neuro-fuzzy controller has its main characteristic that can be used in other tasks different from that one, because of its inherent adaptation to the environment.
A neural fuzzy-controller topology was proposed to control the autonomous navigation of a robot, and it was implemented in LabVIEW  to be tested in a collaborative task. The controller acts as expected, collecting the objects and evading obstacles. The proposed blocks of algorithms allowed adjusting parameters as many times as it was necessary, and the whole methodology gave a possibility to extrapolate the results to other situations and tasks. The final prototype of the generic neuro-fuzzy controller was programming on LabVIEW, and it can be extended to other situations [2, 3].
L. A. García Fernández, “Usos y aplicaciones de la inteligencia artificial,” La Ciencia y el Hombre, vol. 17, no. 3, p. 1, 2004.View at: Google Scholar
P. P. Cruz et al., “A Novel Neuro-Fuzzy Controller Based on Both Trigonometric Series and Fuzzy Clusters,” Tecnológico de Monterrey, México, 2006.View at: Google Scholar
D. Méndez and F. D. Ramírez, “Sistema de Navegación Neuro-Difuso para Robots Móviles,” Instituto Tecnológico y de Estudios Superiores de Monterrey, Campus Ciudad de México, 2007.View at: Google Scholar
National Instruments. LabVIEW 8.5, Programming software. United States of America, 2007.
K. S. Rattan and G. S. Sandhu, “Design of a proportional plus derivative neuro fuzzy controller,” in Proceedings of 18th International Annual Conference of the North American Fuzzy Information Processing Society (NAFIPS '99), pp. 874–878, New York, NY, USA, 1999.View at: Google Scholar
H. Nguyen et al., A First Course in Fuzzy and Neural Control, Chapman & Hall, Boca Raton, Fla, USA, 1st edition, 2002.
P. P. Cruz and R. S. M. Suárez, “Neural Networks Based on Fourier Series,” Tecnológico de Monterrey, México, 2005.View at: Google Scholar
J. C. Bezdek and S. K. Pal, Fuzzy Models for Pattern Recognition, Institute of Electrical & Electronics Enginee, New York, NY, USA, 1992.
F. Glover and M. Laguna, Tabu Search, Kluwer Academic Publishers, Boston, Mass, USA, 1997.
N. Efimov, Formas cuadráticas y matrices, Mir Editions, Moscou, Russia, 1970.
Departamento de Arquitectura y Tecnología de Computadoras, “Matrices homogéneas,” Power Point presentation. Universidad de Sevilla, Spain.View at: Google Scholar