Swarm robotics : Design and implementation

This project presents a swarming and herding behaviour using simple robots. The main goal is to demonstrate the applicability of artiﬁcial intelligence (AI) in simple robotics that can then be scaled to industrial and consumer markets to further the ability of automation. AI can be achieved in many different ways; this paper explores the possible platforms on which to build a simple AI robots from consumer grade microcontrollers. Emphasis on simplicity is the main focus of this paper. Cheap and 8 bit microcontrollers were used as the brain of each robot in a decentralized swarm environment were each robot is autonomous but still a part of the whole. These simple robots don’t communicate directly with each other. They will utilize simple IR sensors to sense each other and simple limit switches to sense other obstacles in their environment. Their main objective is to assemble at certain location after initial start from random locations, and after converging they would move as a single unit without collisions. Using readily available microcontrollers and simple circuit design, semi-consistent swarming behaviour was achieved. These robots don’t follow a set path but will react dynamically to different scenarios, guided by their simple AI algorithm.

INTRODUCTION Automation is an important part of most industries but on the other hand normal automation has some shortcomings. For examples, robot in manufacturing industry can only do what its code tells it to do, the cruise control on a car can only speed up or speed down the car, and equipment in hospitals can only monitor patients and alert the doctors in case of anomalies. In all previous examples the devices cannot make decisions or change their behaviour without the input of a human operator. Swarm robotics have been studied in the context of producing different collective behaviors to solve tasks such as: aggregation [1], pattern formation [2], self-assembly and morphogenesis [3], object clustering, assembling and construction [4], collective search and exploration [5,6], coordinated motion [7], collective transportation [8,9], self-deployment [10], foraging [11] and others.
The objective of this work is focused on how the field of artificial intelligence can be used to transfer automation into the next level of scientific advancements. Self driving cars, robots that can perform surgery, robots in customer service that can understand the intricacies of human speech and respond accordingly, these are all advancements that are happening currently. One of the most important applications that is implemented using artificial intelligence is what is known as swarm robotics. Swarm robotics is a field of robotics that deals with multi-robot systems where a large number of simple robots coordinate to display collective behaviour when interacting with each other or the environment. The field of swarm robotics puts emphasis on number, Ì ISSN: 2088-8708 simplicity and scalability of the robots. And another key component is the collective intelligence of the swarm where the individual is simple but the collective can display complex behaviour, that take inspiration from insects such as ants. The ability to communicate is paramount to achieve decentralization, and to insure constant feedback between individuals. This paper simply demonstrates how to build and program several robotics in order to obtain swarm robotics with the following functionality: sensing other robots in the vicinity and navigating an area with several other robots present. The suggested solution is to use un algorithm that induces swarming or herding behaviour consistently. These robots will interact with their environment using several external sensors, micro-switches, infrared sensors and other hardware pieces. These robot will react to these external devices depending on the algorithms used in their main control unit.
Many solutions have been suggested by researchers to achieve this goal. Micael S.Couceiro and his group [12] gave survey on multi-robot search inspired on swarm intelligence. Five state-of-the-art swarm robotic algorithms are described and compared. Simulated experiments of a mapping task are carried out to compare the five algorithms. The three best performing algorithms are deeply compared using 14 e-pucks on a source localization problem. The Robotic Darwinian Particle Swarm Optimization (RDPSO) algorithm depicts an improved convergence.
M. Rubenstein [13] and his team in their paper" A Low Cost Scalable Robot System for Collective Behaviors. " presented Kilobot, a low-cost robot designed to make testing collective algorithms on hundreds or thousands of robots accessible to robotics researchers. To enable the possibility of large Kilobot collectives where the number of robots is an order of magnitude larger than the largest that exist today, each robot is made with only $14 worth of parts and takes 5 minutes to assemble. Furthermore, the robot design allows a single user to easily operate a large Kilobot collective, such as programming, powering on, and charging all robots, which would be difficult or impossible to do with many existing robotic systems.
M. Rubenstein et al. [14] created a large swarm of programmed robots that can form collaborations using only local information. The robots could communicate only with nearby members, within about three times their diameter. They were able to assemble into complex preprogrammed shapes. If the robots formation hit snags when they bumped into one another or because of an outlier, additional algorithms guided them to rectify their collective movements.
M. Senanayake and his team [15] reviewed the seminal works that addressed this problem in the area of swarm robotics, which is the application of swarm intelligence principles to the control of multi-robot systems. Robustness, scalability and flexibility, as well as distributed sensing, make swarm robotic systems well suited for the problem of target search and tracking in real-world applications.They classify their work according to the variations and aspects of the search and tracking problems they addressed.
Micael S.Couceiro and his group [16] mentioned the extension of the Particle Swarm Optimization to multi-robot applications which has been previously proposed and denoted as Robotic Darwinian PSO (RDPSO). His work contributes with a further extension of the RDPSO, thus integrating two research aspects: (i) an autonomous, realistic and fault-tolerant initial deployment strategy denoted as Extended Spiral of Theodorus (EST), and (ii) a fault-tolerant distributed search to prevent communication network splits. The exploring agents, denoted as scouts, are autonomously deployed using supporting agents, denoted as rangers. Experimental results with 15 physical scouts and 3 physical rangers show that the algorithm converges to the optimal solution faster and more accurately using the EST approach over the random deployment strategy. Also, a more fault-tolerant strategy clearly influences the time needed to converge to the final solution, but is less susceptible to robot failures.
M. Kubo et al. [17] explained how to achieve a highly scalable target enclosure model about the number of target to enclose, they introduce swarm based task assignment capability to Takayama's enclosure model. The original model discussed only single target environment but it is well suited for applying to the environments with multiple targets.They show how the robots can enclose the targets without predefined position assignment by analytic discussion based on switched systems and a series of computer simulations. As a consequence of this property, the proposed robots can change their target according to the criterion about robot density while they enclose multiple targets.
B. Yang and his team [18] proposed a decentralized control algorithm of swarm robot for target search and trapping inspired by bacteria chemotaxis. First, a local coordinate system is established according to the initial positions of the robots in the target area. Then the target area is divided into Voronoi cells. After the initialization, swarm robots start performing target search and trapping missions driven by the proposed bacteria The hardware choices will favor simple and cheap parts for better scalability while sacrificing the ability of the individual robot of doing complex behavior. An 8-bit micro-controller from Atmel was chosen as the brains of each robot, this 8pin chip is simple to program and has enough computing power to achieve the desired design. A duel H-bridge motor driver chip from Texas Instruments is used to interface and control two DC motors for movement. A combination of and and not gate array chips will act as I/O extenders so as to free pin on the chip for other uses. A combination of several IR transmitter diodes, a single IR receiver diode and two limit switches are used for sensing and interacting with the environment. The flowchart is shown in Figure 1.  On first powered an initializing phase will commence, in this stage all the needed modules inside the microchip will be activated and in case of the ADC module, it will perform several reading that will be discarded. This is done to insure accurate and fast reading during operation. After the initialization phase the robot will start to operate. It starts by continuously turning in place and reading values from the IR sensor. This method is needed because of the IR array shape which leaves blind gaps that are eliminated by continuously turning the array. If a spike in the voltage reading is sensed this will indicate that another robot is in Ì ISSN: 2088-8708 line of site. This value is compared to known limits. If the value is below the lower limit it will be treated as noise and the robot will continue turning and searching for a valid value. If the value is above the higher limit it will be treated as an object that is close enough. If the value falls within the limit the robot will take this value, run it through the algorithm, then the outcome will translate into a timed interval of forward movement. The relationship between the algorithm output and distance between the robots is represented by a simple parabolic function, were the longest distance moved forward is when the object is believed to be in the middle of the known limits while the robot will not move a great deal if the other robots are too far or too close. This behavior is repeated indefinitely. After deciding how the robots will behave we examine the main control unit to decide how to achieve the wanted design using it. The ATtiny85 MCU with its five bidirectional ports is used to control outside peripherals such as motors and motor driver. Because of how it is designed the ATiny85 cannot supply enough current to run a motor directly, we use a motor driver to interface the MCU with the motors. The chosen driver is the DRV8833 on a prebuilt board from Pololu. This driver interfaces two bidirectional DC motors to the MCU as seen in figure 2. The scheme of control Unit is depicted in Figure 3.  Each robot needs a way to sense other robots around him and react to them. There are a couple of ways to achieve this, through ultrasonic sensors, limit switches or infrared sensors. For this project a combination of switches and infrared sensors was chosen. The ATtiny85 has an ADC module that can read changes in voltage on some of the I/O pins we will use this ability to read the voltage from an infrared receiver to determine the distance between two robots. Each robot will need to broadcast infrared signals in all directions so other robots can read these values and determine the distance. one receiver is enough for each robot but because these diodes are very directional each robot needs a number of transmitter diode so as to transmit in all directions. A simple solution is to create an array of diodes transmitting in a circle. Testing showed that such a solution will need an array of many diodes to mitigate the problem of signal directivity so as another solution is to have each robot turn in continuous manner so as to create a light house effect, where at some point a receiver will be in line of sight of a transmitter. For this project an array of eight diodes arranged in a hexagon was chosen, as seen in figure 4.

Int J Elec & Comp Eng
ISSN: 2088-8708 Ì 2177 Figure 4. IR array This IR pair system is only useful when sensing other robots it can't sense obstacles. For this project micro switches were used. By connecting a micro switch to a long whisker-like metal rod it can sense objects in front of the robot. Using two switches the robot can discern the location of the obstacle in relation to movement direction. A micro switch has three pins which are; common, connected and not connected. The pins flip when the switch is dispersed. This system need to work with only two pins. One pin will alert the MCU to an obstacle and the other pin will decide the location of the obstacle. The location mechanism is achieved by using a voltage divider, when a switch is pressed the value of the divider will change, this value is then read by the MCU and compared against a known value that will give which switch was pressed. The chosen design can be seen in Figure 5. In order to lessen the noise from digital part of the circuit we isolate the analog and digital lines to different sides of the MCU. In the real circuit decoupling capacitors were mounted for each individual IC to help with power supply stability. The final circuit was built in four independent PCB boards that are connected using headers to make the circuit more compact as seen in Figure 6. To power each robot two rechargeable 4.2V lithium-ions are used; one for the motor circuit and the other for the control circuit. The chassis for the robot is made from plexiglass in the shape of a non-uniform hexagon. This shape was chosen for its ease of manufacturing. Three robots prototype are shown in Figure 7.

Software
The code for the robot was written in AVR assembly using Atmel Studio. The code was broken down into small subroutines then they were connected together after testing each one. The algorithm was decided upon after testing how the values read from the infrared receiver correlate with distance as seen in the hardware section. The equation is a simple second order polynomial; this equation will make the robots get closer to each other. Once they are sufficiently close, the algorithm will prevent them from straying too far from each other. This effect can be seen in Figure 8. The x-axis in graph above represents the voltage being read from the infrared sensor. The MCU will convert the voltage into a 10 bit digital value using the following equation: where V in is the value of voltage on pin and V cc is the voltage supply to MCU. The lowest and highest limits represent the distance robot will respond to respectively. The y-axis represents the output of the algorithm which is the following equation: The output will be represented as an 8 bit value ranging from 0 to 101, which will be subsequently converted into movement time ranging from 0 to 1.65478 seconds. The motor speed is around 15cm/s making the maximum movement range 24.82 cm.

RESULTS, DISCUSSION AND COMPARISON
Swarming and herding behaviour using AI robotics was successfully implemented and developed with simple and accessible hardware and software tools. The possibilities of utilizing small and simple robots to achieve complex collective behaviour was demonstrated as well. Four robots were built according to the specifications chosen, and software was developed to achieve the desired behaviour. Testing this swarm robot has shown that the hardware and software behaves as expected in controlled cases, the swarm succeeded in attacking and reaching the desired goal. A brief comparison of previous works is introduced in the following: (a) Rafael Mathiasde and his team [24] proposed a simple yet efficient distributed control algorithm to implement dynamic task allocation in a robotic swarm. In this algorithm, each robot that integrates the swarm runs the algorithm whenever it senses a change in the environment. The algorithm was implemented and extensively tested in different size swarms of robots. The corresponding performance and effectiveness are promising. The swarm robot used is Elisa-III. (b) Luneque Silva Juniora and Nadia Nedjah [25] presented the Wave Swarm as a general strategy to manage the sequence of subtasks that compose the collective navigation, which is an important task in swarm robotics. The proposed strategy is based mainly on the execution of wave algorithms. The swarm is viewed as a distributed system, wherein the communication is achieved by message passing among robot's neighborhood. Message propagation delimits the start and end of each subtask. Simulations are performed to demonstrate that controlled navigation of robot swarms/clusters is achieved with three subtasks, which are recruitment, alignment and movement. (c) Iñaki Navarro and Fernando Matía [26] gave an overview of swarm robotics, describing its main properties and characteristics and comparing it to general multi-robotic systems. A review of different research works and experimental results, together with a discussion of the future swarm robotics in real world applications have been explained in details. (d) M.Bakhshipoura, M.Jabbari Ghadib and F.Namdaria [27] proposed a novel heuristic algorithm to solve continuous non-linear optimization problems. The presented algorithm is a collective global search inspired by the swarm artificial intelligent of coordinated robots. Cooperative recognition and sensing by a swarm of mobile robots have been fundamental inspirations for development of Swarm Robotics Search and Rescue (SRSR). Swarm robotics is an approach with the aim of coordinating multi-robot systems which consist of numbers of mostly uniform simple physical robots. The ultimate aim is to emerge an eligible cooperative behavior either from interactions of autonomous robots with the environment or their mutual interactions between each other. In this algorithm, robots which represent initial solutions in SRSR terminology have a sense of environment to detect victim in a search and rescue mission at a disaster site. (e) Seeja G and his team [28] studied the progress in the research of nature inspired swarm robotics. In this work an artificial intelligence aided coordination approach is used for the self-organization and decentralization of multiple robots. Being a promising centralized approach with fault tolerance, redundancy and scalability potentials, they can even work when it is technically infeasible to set up the infrastructure required to control the robots in a centralized way. But the design of individual robot level practice to achieve a desired collective behavior is really difficult as it is hard to predict the simultaneous interactions between large numbers of individual robots. In order to explore the possibilities to make a better progress in this technology, the existing modelling, analysis methods and the challenges has to be studied first. Followed by this, a study on swarm communication and the hardware units including sensors and actuators was done. (f) Amrit Saggu, Pallavi Yadav, Monika Roopak [29] said that the inherent intelligence of swarms has inspired many social and political philosophers, in that the collective movements of an aggregate often derive from independent decision making on the part of a single individual.

ACKNOWLEDGEMENT
This work has been done at the Applied Science Private University, Amman, JORDAN, Faculty of Engineering, department of Electrical Engineering. The author would like to thank this university for their strong support to this work .