Author's Accepted Manuscript
Efficient Distributed Algorithm of Dynamic Task Assignment for Swarm Robotics R.M. de Mendonça, N. Nedjah, L.M. Mourelle
www.elsevier.com/locate/neucom
PII: DOI: Reference:
S0925-2312(15)01051-6 http://dx.doi.org/10.1016/j.neucom.2015.05.117 NEUCOM15827
To appear in:
Neurocomputing
Received date: 24 November 2014 Revised date: 17 April 2015 Accepted date: 11 May 2015 Cite this article as: R.M. de Mendonça, N. Nedjah, L.M. Mourelle, Efficient Distributed Algorithm of Dynamic Task Assignment for Swarm Robotics, Neurocomputing, http://dx.doi.org/10.1016/j.neucom.2015.05.117 This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting galley proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
Efficient Distributed Algorithm of Dynamic Task Assignment for Swarm Robotics R. M. de Mendon¸caa , N. Nedjaha and L. M. Mourelleb a Department
of Electronics Engineering and Telecommunication of System Engineering and Computation, Engineering Faculty, State University of Rio de Janeiro Rio de Janeiro, Brazil b Department
Abstract Dynamic task allocation in a robotic swarm is a necessary process for proper management of the swarm. It allows the distribution of the identified tasks to be performed, among the swarm of robots, in such a way that a pre-defined proportion of execution of those tasks is achieved. In this context, there is no central figure to take care of the task allocation. So any algorithm proposal must be distributed, allowing every and each robot in the swarm to identify the task it must perform. This paper proposes 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, as shown in the presented results and comparison. The swarm robot used is Elisa-III. Key words: Dynamic task allocation, Swarm robotics, Swarm intelligence.
1
Introduction
Swarm intelligence was proposed in late 1980 after the observation of the social behavior of some species of insects and birds, as reported in [1]. These species perform collectively simple tasks in order to achieve complex goals, usually impossible to be carried out by only one individual of the swarm. The central idea of this collective behavior is to perform a complex task by dividing it into simpler tasks that are easily performed by members of the swarm. The approach of swarm robotics emerged from the application of the rules of swarm intelligence to groups of mobile robots with limited processing capacity. Preprint submitted to Elsevier
18 August 2015
Dynamic allocation of tasks to the robots is a necessary process for proper management of the swarm. This process allows the distribution of the tasks to be performed, among the swarm of robots, in such a way that a pre-defined proportion of execution of tasks is achieved. The ratio should be determined in order to permit the achievement of the overall objective of the swarm. Task allocation is a dynamic process because it needs to be continuously adjusted in response to changes in the environment and/or in terms of performance of the swarm. An immediate solution to solve this problem is based on the centralized approach. Nonetheless, a distributed allocation represents a better imitation of the behavior of the social species in natural swarms, where there is no centralized control mechanism. Therefore, task allocation in swarms of robots must arise as a result of a distributed process. This decentralization increases the complexity of the problem, because the robot does not have a complete view of the environment. Each robot must take local control decisions without full knowledge about what the other robots have been doing in the past, are doing in the present or will do in the future.
Several applications that are automatized using swarm robotics, require dynamic task allocation. For instance, in situations which pose some risk or not viable for human presence to perform a given task, the swarm of robots would be able to self-organize to form groups, where each group perform a specific task with a main goal of performing together significant and complex action. Wit the aid of dynamic task allocation, the swarm would gain greater flexibility and reliability.
In this paper, we propose a distributed algorithm that aims at fulfilling dynamic allocation of tasks in a swarm of robots. The algorithm is simple and decentralized, allowing efficient implementation on robots with limited storage and processing power. The algorithm is tested in a swarm of Elisa-III robots to demonstrate its effectiveness and efficiency. The results of the experiments are reported.
The remainder of this paper is organized into five sections. Initially, in Section 3, we introduce some related work. Subsequently, 4, we detail the main steps of the proposed algorithm to solve the problem at hand. Thereafter, in Section 5, we comment on some of the implementation issues on the used robots. Then, in Section 6, we discuss the results of the performed experiments. Last but not least, in Section 7, we draw some conclusion with respect to the proposed algorithm and point out some relevant directions for future work. 2
2
Dynamic Task Assignment
Generally, a swarm of robots needs to perform a complex task that is divided into other less complex tasks. Therefore, the assignment of these tasks to robots in the swarm is a requirement for many applications. To accomplish the task assignment, one first needs to correctly determine the distribution of the swarm in the environment and then allocate the tasks to the robots. There are several strategies for dynamic allocation of tasks. The allocation may be random, depending only on the robot’s ability to effectively perform the selected task allocation. It can be done sequentially, in parallel or some combination of the two, aiming at which achieving a balance between time spent in communication and execution. Dynamic Task Allocation (DTA) is the process that allows the assignment of tasks to robots organized as a swarm. Any allocation approach must consider the resources available, such as the communication resources, the characteristics to be optimized, such as effectiveness and efficiency, and individual capabilities of a possibly heterogeneous swarm of robots to perform required tasks [2]. In order to provide a formal description of the dynamic task assignment problem, let T = {t1 , t2 , . . . , tτ } be the set of τ tasks to be performed by the ρ robots of the swarm. Every robot in the swarm is associated with a distinct identifier. Let I = {id1 , id2 , . . . , idρ } be the set of identifiers of all the robots of the swarm. The tasks must be allocated to the robots in a way that a prescribed proportion P is always respected. Let P = {p1 , p2 , . . . , pτ }, such that p1 + p2 + . . . + pτ = 1 wherein 0 < pj ≤ 1. In order to satisfy the imposed task proportion, we must, for all task ti ∈ T, satisfy ci = pi × ρ, wherein 0 < ci ≤ ρ is the total number of robots assigned to task ti , and ci is called the counter of task ti . Note that, for a valid allocation, we always have c1 + c2 + . . . + cτ = ρ. Let C = {c1 , c2 , . . . , cτ } be the set of these counters. The swarm task assignment is represented by A = {a1 , a2 , . . . , aρ }, wherein aj identifies the task assigned to task robot identified by idj . Note that given a swarm task assignment, say A, it is possible to set of counters associated with it, which we denote as CA , as described in Eq. 1:
cj = CA [tj ] =
ρ r=1
φ(ar , tj ),
(1)
3
wherein function φ is defined as in Eq. 2: φ(a, t) =
⎧ ⎪ ⎨1
if a = t;
⎪ ⎩0
otherwise.
(2)
Thus, by the end of the construction, the counter set CA would reflect the distribution of the robots as assigned to each task and defined by assignment A. Solving the dynamic task allocation problem consists of finding the task assignment A∗ = {a∗1 , a∗2 , . . . , a∗ρ } that verifies Eq. 3: ∀ tj ∈ T and ∀ pj ∈ P, CA∗ [tj ] = pj × ρ.
(3)
The complexity of the task allocation process is defined by a decision making problem wherein one would like to find the allocation A∗ that solves the problem of DTA efficiently. This allocation is a member of the set of all feasible allocations denoted by Q. The number of feasible allocations in Q depends on the number of robots ρ of the swarm and that of tasks τ to be allocated according to the characteristics of the swarm. The problem DTA has a high computational complexity and is is classified as NP-complete [4]. The complexity of the task allocation process is directly influenced by the composition of the swarm [10]. A swarm can be homogeneous or heterogeneous. The homogeneous swarm consists of a single group of ρ robots that have the same characteristics and are therefore able to perform the same set of tasks T. The number of feasible allocations #Q for a homogeneous swarm is given by Equation 4: #Q = τ ρ .
(4)
For a heterogeneous swarm consisting of a total of ρ robots, differentiated in n groups, where each group i is composed of ρi robots, such that: n i=1
ρi = ρ.
(5)
Groups are formed from an overall assessment of Ti of tasks that the robots in group i are able to perform. The robots in distinct groups have different characteristics and are able to perform different sets of tasks. Moreover, for each group i, the ρi robots in this group have the same characteristics and are 4
τ τ τ τ
1017 1013
=2 =3 =4 =5
τ τ τ τ
109 107
109
105
105
103
=2 =3 =4 =5
101
101 0
5
10
15 ρ
20
25
0
(a) Homogeneous swarm
5
10
15 ρ
20
25
(b) Heterogeneous swarm
Fig. 1. Number of feasible assignments (#Q) for homogeneous and heterogeneous swarms
able to perform the same set of task Ti . The number of feasible allocations #Q in this case is given by Equation 6: #Q =
n ρi i=1
τi = τ1ρ1 × τ2ρ2 × . . . × τnρn ,
(6)
Figure 1(a) shows the relationship between the number of feasible allocations in Q for different numbers of tasks when the swarms of homogeneous composition. Figure 1(b) considers a swarm of heterogeneous composition formed by two different groups of different number of tasks. In both situations, the number of feasible allocations increases with to the number of required tasks. However, it is noticeable that the number of possible allocations is greater in the case of homogeneous swarms. Therefore, from the viewpoint of an optimization problem, the DTA for a homogeneous swarm is a more complex than that for a heterogeneous swarm, because in the former case the search space is larger.
3
Related work
The analysis of collective behavior in Multi-Robot Systems is a relatively new field of study that encompasses a variety of sciences such as Mathematics, Physics and Biology. The first relevant studies in this area with the expressive intention to decentralize control in the process of allocating tasks are presented in [14] and [15]. In these works, studies with mixed groups of robots are reported, wherein the swarm is divided into robots that possess some kind 5
of centralized communication and those, that draw decisions only on local observations. In [6], general properties of aggregation in multi-robot systems using macroscopic phenomenological models are studied. New formulations for building phenomenological models aimed at a collective behavior of groups of robots are developed in [8] and [9]. These new formulations are tested in simple collaborative experiments as in [7], wherein the stick-pulling experiment is evaluated with a group of reactive robots. Most of the approaches supra-cited are either implicitly or explicitly based on the theory of stochastic processes. The Microscopic Probabilistic model developed in [11], [12] and [5] is an example of the stochastic approach explored in the study of the collective behavior of a group of robots. The impact of several stochastic events imposed in parallel, for each robot of the swarm, enabled the drawing of some properties about the behavior of robots in MultiRobot Systems.
4
Proposed Algorithm – LDTA2
The proposed algorithm for dynamic task allocation is periodically executed by the η robots, active in the swarm. Note that the algorithm executions occur simultaneously, one in each robot as shown in Algorithm 1, wherein ti identifies the task currently allocated to robot i. Let a be the address of this robot and Ti represents the set of task identifiers, allocated to the other robots of the swarm, excluding robot i, as perceived by that robot. The robot may choose one of the τ available tasks. The proposed algorithm for dynamic task allocation allows the allocation of τ tasks to a swarm of ρ robots, the aimed proportion is P. Note that ti is the identifier of the task currently allocated to the robot idi and Ai is the task allocation from the local standpoint of this robot. Thus the algorithm is termed Local DTA Algorithm or simply LDTA2 . Initially, Ai is set to an initial allocation A0 (line 1). Initialization of first allocation may be performed randomly, i.e. a task to be allocated to a robot is selected randomly via a uniform distribution obtained from the valid tasks in T, or fixed, i.e. the robot starts always with a pre-defined task. At each iteration allocation Ai is updated (line 3), as explained later. Then, the algorithm checks whether the aimed allocation is satisfactory (line 4), comparing the aimed proportion P to the one perceived by the robot Pi . Note that Pi is obtained from the allocation Ai as explained (see Equation 1). If the aimed proportion has not been reached, the adjustment of the robot task ti (line 5) is performed. The procedure used to adjust the robot’s task is 6
Algorithm 1 LDTA2 for robot i Require: τ , ρ, P and A0 ; 1: Ai := A0 ; 2: while true do 3: Update(Ai ); 4: if P = Pi then 5: AdjustTask(Ai , ti ); 6: else 7: PerformTask(ti ) for some period of time; 8: end if 9: end while; explained later. If the desired proportion has been reached, the robot allocated task ti (line 7) is executed via PerformTask(ti ). The dynamics imposed in Algorithm 1 allows the robot to repeat the updating step and adjustment several times, with the aim of achieving a distribution of tasks according to the prescribed proportion P. Once this distribution of tasks has been attained, the robots of the swarm start performing the corresponding task until a new configuration of the problem is sensed. Recall that the configuration parameters are the total number of robots ρ, the total number of different tasks being performed τ and the desired proportion P. The updating step is implemented as shown in Algorithm 2. At this stage, the information exchange between the robots is done first and then actual updating of the robot’s knowledge about the allocated task to the other robots. Thus, each robot i sends a message composed by its identifier idi and the currently allocated task ti , to the remaining robots of the swarm in order to inform them about its current allocation. Algorithm 2 Update for robot i Require: τ , ρ, Ai and I; Ensure: Ai , Pi ; 1: msg ← idi , ti ; 2: Send msg the remaining ρ − 1 robot; 3: Receive msg of the remaining ρ − 1 robots; 4: for Each received message idj , tj do 5: A[I[j]] := tj ; 6: end for 7: for r := 1 → ρ do 8: CAi [Ai [r]] := CAi [Ai [r]] + 1; 9: end for 10: for t := 1 → τ do 11: Pi [t] := CAi [t]/ρ; 12: end for
7
Each robot has its own knowledge about the tasks currently allocated to other robots. Note that this knowledge can be different from one robot to another due to message loss during the information exchange. Thus, through the exchange of messages in which the robots inform their identifier and respective task, the robot is able to have knowledge, possibly partial, on the allocation of tasks of other robots of the swarm. Updating the allocation of tasks Ai depends on actually receiving the messages sent by other robots. Because of this, Ai varies continuously in time taking into account the specific distinct times at which the robots receive messages addressed to them. Furthermore, the robot receives messages from the other robots in the same format, being informed about the tasks allocated to them. Based on these received messages, a robot updates Ai using the received information about the tasks of other robots (line 5). Once allocation Ai is updated, the robot computes the new proportion of the cluster Pi . For this purpose, the number of robots assigned to each of the tasks is counted using the τ counters based on the new allocation Ai (lines 7–9). The set of counters is represented by CAi , where CAi = {c1 , c2 , . . . , cτ } and cj represents the number of robots currently associated with the task j. Then, Pi is updated by computing the equivalent proportions to each task in relation to the number of robots ρ (lines 10–12), as explained earlier. Algorithm 3 describes the proposed method for LDTA2 to implement the adjustment of the tasks allocated to the robots of the swarm so as to reach the goal proportion. This step is responsible for deciding whether the robot should change its allocated task, and if so, for which new task should it change. Recall that the robot i is associated with task ti and has Ai as current allocation. Initially, a comparison is made between the number of robots currently allocated to task ti , defined by CAi [ti ] and the number of robots that should be allocated to this task, which is C[ti ] so that the aimed proportion P[ti ] for that task would be achieved. In this comparison, three scenarios are possible: (1) CAi [ti ] > C[ti ], indicating that there is an excess of robots allocated to the task ti (line 1 of Algorithm 3); (2) CAi [ti ] = C[ti ], indicating that there is a balance between the desired number of robots and the actual number of robots that are allocated to the task ti ; (3) CAi [ti ] < C[ti ], indicating that there is a lack of robots allocated to the task ti . For the situation in which there is an excess of robots currently allocated to the task of the robot (ti ), the robot should probably change task. If so, the decision process has yet to determine which task the robot should change its allocation to. For the other two situations, the decision process is terminated 8
Algorithm 3 AdjustTask for robot i Require: τ , ρ, Ai , ti , I, C and CAi ; Ensure: ti ; 1: if CAi [ti ] > C[ti ] then 2: for t := 1 → τ do 3: if CAi [t] < C[t] then 4: δ[t] := C[t] − CAi [t]; 5: else 6: δ[t] := 0; 7: end if 8: end for 9: t := tk |δ[tk ] is the largest, k = 1 . . . τ ; 10: NR := 0; 11: for r := 1 → ρ do 12: if I[r] = idi then 13: tr := Ai [I[r]]; 14: if (Ai [r] = t ) and (CAi [tr ] > C[tr ]) and (I[r] < idi ) then 15: NR := NR + 1; 16: end if 17: end if 18: end for 19: if δ[t ] > NR then 20: ti := t 21: end if 22: end if and the robot keeps its current allocation task. Once the possibility of changing the task allocation is confirmed, then the process that seeks to define a new allocation of more appropriate task for the robot starts. For this, the tasks that have a shortage of robots associated with are identified as promising to be used during the selection of the new allocation of robot task. Note that these tasks are identified by a positive result on the difference δ[t] and the counter Ci , wherein t is the identifier of one of the tasks. The action of identifying promising tasks based on the commitment to reduce the difference between the counters C[t] and CAi [t], wherein t being the identifier of one of the tasks. Note that if all differences are zero, i.e., δ[u] = 0 for u = 1 . . . τ , then according to the perception of robot i, the desired proportion has already been achieved goal, since it is established that P = Pi . The tasks identified as promising to be used during the selection of the new task allocation for the robot are ordered in terms of their differences δ. Task t that presents the largest difference δ[t ] is selected (line 9). In the cases of ties between two or more differences occurs, the task with the largest identifier is 9
(a) Incorrect task allocation
(b) Aimed task allocation
(c) Incorrect task allocation Fig. 2. Illustration of the task allocation for a swarm of 12 robots
chosen as the task to be the possible new task for the robot. It is important to mention that when selecting a new task for a robot is not necessarily guaranteed that, by the end of the tuning process, the robot will change its current allocation to this new task. That is, if there is a need for change, the task thus selected will be the new robot task. In order to evaluate the confirmation of change in the allocation, the conditions of the other robots that are also weighting the possibility to alter their task allocation. Thus, before deciding to change the allocation, a prior evaluation is performed taking into account the decision of these other robots. This allows us to avoid that the same decisions, more than it is required, occur simultaneously within different robots, hence invalidating the convergence of the process. The maximum number of robots that may go for the same decision is estimated (lines 11–18). The situation is illustrated by an example in Fig. 2. Let us consider the case shown in Fig. 2. In this example, the swarm is composed of 12 robots, with 4 distinct tasks allowed: tA , tB , tC and tD . In Fig. 2, each task is represented by a different color: blue for task tA , yellow for task tB , 3 4 2 3 red for task tC and purple for task tD . Let P = { 12 , 12 , 12 , 12 }, as it is shown in Fig. 2(b), i.e., 3 robots assigned to task tA , 4 to task tB , 2 to task tC and 3 to 6 3 2 1 task tD (C = {3, 4, 2, 3}). Thus, for an actual proportion Pa = { 12 , 12 , 12 , 12 }, with CAa = {6, 3, 2, 1}, as illustrated in Fig. 2(a), there exists an excess of 3 robots allocated to task tA , which in accordance with the allocation adjustment, would be allocated to the remaining tasks. In this situation, task t as selected by the task adjustment process would be task tD , due to the fact that it yields the largest difference δ[tD ] = 2 all tasks considered, hence characterizing that that this task has highest shortage of allocated robots so as it reaches the balance situation (δ[tD ] = 0). Thus, the 6 robots currently assigned to task tA would choose as new possible task tD . This way, if there no priority to change between the robots that are 10
predisposed to to alter their allocation, then there exists high probability that more than 2 robots would change their allocation to task tD , which would make this task with an excess of allocated robots. In the proposed example, in the worst case, all the 6 robots currently assigned to task tA would change their assignment to task tD , as it is illustrated in Fig. 2(c), originating the 0 3 2 7 new proportion Pc = { 12 , 12 , 12 , 12 }, with CAc = {0, 3, 2, 7}. Consequently, An inverse situation would arise, wherein task tA would become the task with shortage of allocated robot and task tD with an excess. This situation is clearly an obstacle in the convergence process. To remedy to this behavior the highest priority to make the change is given to the robot with the lowest identifier value, among those predisposed robots to change allocation. Using this priority when it is necessary, robot idi first computes the number of robots predisposed to change their allocation and yet have and identifier that is smaller than idi . This is done based on the robot’s knowledge Ai of the current allocation of the swarm. This number of robots, (NR do Algoritmo 3) refers to the number of robots with higher priority than robot idi to change allocation. Thus, if the number of robots required so that the new allocation reaches equilibrium, i.e., NR is smaller than the difference δ[t ], then robot idi may confirm the change of its allocation as task t . Otherwise, it must keep its task ti unchanged.
5
Implementation Issues
LDTA2 was implemented in a swarm of robots Elisa-III [13], shown in Fig. 3(a). This robot is equipped with a centered RGB LED, that allows representing any color by combining the intensity of the colors Red, Green and Blue. The obtained color is intensified by a light diffuser located at the top of the robot. In this implementation, each task is represented by a distinct color in order to observe the progress of task adjustments done by the robots, visually. Thus, we used the colors Blue, Yellow, Pink, Purple and Green to represent the allowed five tasks. Fig. 4 1 displays the various embedded devices in the robot hardware. The operation of the devices is managed by a micro-controller ATmega2560 8 MHz [1] with of 8 KB RAM. The robot has two other kind of embedded memory: a Flash memory of 256 KB for storing the program to be executed and an EEPROM memory of 4 KB responsible for storing the set of instructions 1
This artwork were taken from the site http://www.gctronic.com/doc/index.php/ Elisa-3
11
(a) Robot Elisa-III
(b) Swarm robots of Elisa-III
Fig. 3. Swarms of Elisa-III
that are specifically for the robot operation. The RFID robot is stored in the EEPROM memory that can be accessed at any time of the execution of the embedded program.
(a) Top view
(b) Bottom view
Fig. 4. Embedded devices forming the hardware of the robot
Each robot is equipped with a transceiver module [13], suitable for wireless communication applications with ultra-low power consumption in the communication range of Radio Frequency (RF). The chip is designed to operate in the ISM radio band (Industrial, Scientific and Medical band basis) of 2.4 GHz. Thus, each robot communicates with each other using RF via a base station connected to a computer. The base station is connected to a PC via USB and transfer data to and from the robots via wireless communication. Likewise, a transceiver module, embedded in the robot, communicates via communication SPI (Serial Peripheral Interface) with the micro-controller of the robot and transfers data to and from the PC, also via wireless communication, as shown in Fig. 5. Recall that each robot is identified by a unique address in the swarm. this 12
Fig. 5. Communication from and to the robot via RF
address is stored in a specific memory address of the robot EEPROM. Every message coming from the base station has a destination address, which should coincide with one of the addresses of the robot in the swarm. Upon reception of a message, the robot compares the destination address of the received message with its own address to assess whether it is the intended by this message. If so, the message is saved and interpreted by the robot. The communication between the robots and the base station is controlled by the master PC that continuously polls the slave base station. The polling is performed once every millisecond, which is a restriction on the maximum speed of communication. To overcome this limitation, an optimized protocol was implemented wherein the packet sent from the PC to the base station contains commands to four robots simultaneously. The base station is responsible of separating the received packet into four individual packets of 16 bytes each, before sending them to the indicated destination address. The same procedure is used during the reception form the robots. In this case, the base station is responsible for receiving the packets of 4 robots, assembles them into a single message of 64 bytes, and send it to the computer. This procedure allows higher throughput communication, making it 4x faster. The packets generated by the robots to be transferred to the base station are composed of 16 bytes, as shown in Fig. 6(a). The first byte is used to identify the validity of the packet, the following two bytes represent the sender address of the robot, the fourth byte represents the message type. Up to 255 different types of messages may exist during the communication process, but in this implementation, this field is not used as only one message type is required. The remaining 12 bytes contain the payload of the message, which are the actual data to be sent. The structure of the message sent by the base station to a robot is shown in Fig. 6(b). It is similar to the structure of the message shown in Fig. 6(a), it also consists of 16 bytes. The first byte defines the validity, which validates the authenticity of the message sent by the base station when 13
it is received by the robot. Byte 14 defines the type of message, used when there are more than one type of messages, and the last two bytes contain the destination address of the robot. The remaining 12 bytes contain the payload of the message to be received by the robot. 1 VB 1 Byte
2
3
4
15
16
1
RFID
Payload
Type
VB
2 Bytes
12 Bytes
1 Byte
1 Byte
(a) From robot to RF base
2
13
14
16
15
Payload
Type
ID
12 Bytes
1 Byte
2 Bytes
(b) From RF base to robot
Fig. 6. Overall structure of the message sent by robot ID to the RF base station
Considering each packet received from the base station, the PC takes the four addresses and task groups and composes a new package of 16 bytes. The first byte of this package is the validity flag of the package to be verified by the robot upon reception, the 12 following bytes represent the address and task information received, the fourteenth byte is a sending signal enabler and the remaining two bytes contain the address of the target robot. This package is replicated four times using four distinct robot addresses to compose the message of 64 bytes to be sent to the base station to be transmitted the destination addresses. Thus, the same information (robot ID and task) is transmitted to four robots at a time until all the robots of the swarm are encompassed. The enabling signal generated and sent by the PC to robots of the swarm has the function of managing the process of packet transmission from the robots to the PC. This signal enables the transmission a group of four robots to transmit at a time. Note that the transmission time for a group of 4 robots depends on the total number of robots that compose the swarm. This synchronization trick is an alternative to reduce the packet traffic, thus decreasing the chances of packages being lost due to limited buffer size at the base station. In this algorithm, the payload of the message generated by the robot and sent to the base station consists solely of a byte that corresponds to the task currently allocated to this robot. In order to compose the necessary information (IN) to be sent to the remaining robots of the swarm, a robot includes its RFID. Thus, the information to be transferred to the robots has three bytes: two bytes to identify the robot and one byte to identify the allocated task. The packet composition during the communication between the robots for LDTA2 is shown in Figure 7. When the base station detects the existence of new messages in the buffer, the packet is formed of 64 bytes each, containing four messages. This packet is sent to a computer that interprets the message contents, identifying the payload of each of the composed messages. Then, the task informed in the payload of each of the four messages received and the two 14
bytes identifying the robot are extracted to form a new message to be sent away to the robots. Thus, the new generated message contains as a payload, the necessary information (IN) included in the four messages received by the base station. The content of the message thus composed is then replicated into four new messages, each one destined to a different target address. The four messages generated form a packet to be routed back to the base station by computer. Upon reception, the base station separates its content into four messages and sends them away to the identified robots. Robot Message Robot1
Message Robot2
Base Message Robot3
Message Robot4
Rx Base
VB
NI1
NI1
VB
NI2
NI3
NI4
ID
Message Robot1
Message 4
Message 3
Base
Message 2
Message 1
Tx Base Robot
Fig. 7. Packet format of the messages from and to the robots
6
Performance Results
In order to analyze the performance of LDTA2 with respect to both execution time and communication time, several tests were performed. We varied the swarm configuration in terms of number of robots as well as the number of distinct tasks that the swarm must perform respecting a prescribed task distribution. The number of robots in the swarm was chose between 4 and 25 robots, and the number of valid tasks, between 2 and 5 tasks. Thus, we handled a total of 10 tests performed for each swarm configuration. Thus, a total of 400 valid tests were taken into account. During the tests, the choice of ρ in each swarm was defined as multiples of 4 and 5 in the range from 4 to 25 robots. The choice of the number of robots as multiple of 4 allowed us to evaluate a potential impact on the communication protocol implemented in the results, since the communication protocol 15
optimizes the exchange of messages to four robots at once. In the tests, we defined the aimed proportion in each case as shown in Table 1. The tests were conducted initializing all robots swarm with the same Task 0. Table 1 Distribution od the aimed proportion between the tasks # Tasks
Proportion Task 0
Task 1
Task 2
Task 3
Task 4
2
60%
40%
–
–
–
3
20%
30%
50%
–
–
4
10%
15%
30%
45%
–
5
5%
10%
20%
30%
35%
The performed tests, regarding different swarm arrangements with respect to robots and tasks, provide cases of different complexity. Each case is defined by the arrangement of the swarm, being characterized by the pair (ρ, τ ). Table 2 shows the number of feasible allocations #Q for each fo the performed test. It is noted that the complexity increases exponentially with ρ and τ . Table 2 Number of feasible allocations regarding the performed tests #Q
τ =2
τ =3
τ =4
τ =5
ρ=4
16
81
256
625
ρ=5
32
243
1,024
3,125
ρ=8
256
6,561
655,36
390,625
ρ = 10
1,024
59,049
1,048,576
9,765,625
ρ = 12
4,096
531,441
16,777,216
244,140,625
ρ = 15
32,768
14,348,907
1,073,741,824
30,517,578,125
ρ = 16
65,536
43,046,721
4,294,967,296
1.52588 × 1011
ρ = 20
1,048,576
3,486,784,401
1.09951 × 1012
9.53674 × 1013
ρ = 24
16,777,216
2.8243 × 1011
2, 81475 × 1014
5.96046 × 1016
ρ = 25
33,554,432
8.47289 × 1011
1.1259 × 1015
2.98023 × 1017
From the obtained results, the aspects related to communication and convergence of the swarm during the task allocation among the robots were evaluated until the swarm reach the adequate allocation A∗ that respects the aimed task distribution P. Considering convergence, we analyzed whether LDTA2 achieved the main objective, i.e. to find A∗ , and if so the time, in milliseconds (ms), elapsed between the beginning and end of the allocation process. 16
Regarding communication, the number of messages exchanged between the robots during the allocation process was observed. As a way to reference the message exchange, we established that the messages from the base station sent to robots are termed as sent messages and the messages destined to the base station and generated by the robots are termed as it received messages. The obtained results are shown in Fig. 8(b), for the tests with τ = 2 and Fig. 9(b), for τ = 3, while Fig. 10(b), for the cases regarding τ = 4 and Fig. 11(b), for τ = 5. The graphs shown in Fig. 8 — Fig. 11 represent the results for 10 trials for each of the analyzed cases, varying the number of robots ρ. The graphs allow to evaluating locally the dispersion of the results in each case and globally, the trend of the results between the cases. Such data dispersion analysis is used to evaluate how the data are similar to each other, as well how the data are away from the central value. In this evaluation, the central value is represented by the arithmetic mean of all the results related to the case. Regarding the local evaluation, consider for instance the cases (4, 4) and (5, 4) in the graph that measures the convergence time in Fig. 10. In the case (4, 4), the results obtained show the smallest dispersion from the mean value, while the results of the case (5, 4), the results present greatest dispersion. For cases where the tests had results with high dispersion, new trials were done, aiming at comparing the results of these new tests with the previously obtained ones. With this comparison we tried to ascertain whether the dispersion is shown by the original results were caused by an external influence, such as a high loss of messages has occurred during the communication process. Thus, five new tests for these cases of interest have been performed so that the newly obtained results would be compared to the original results. The less scattered results from the mean value were kept. Regarding the global evaluation, the graphs shown in Fig. 8 — Fig. 11, in general, have a tendency to increase due to the increase in the number of robots of the swarm. This trend is best seen in the graphs of the cases performed for two tasks (τ = 2), shown in Fig. 8. In order to assess the communication impact, the results generally showed a similar distribution when comparing the graphs that represent the numbers of incoming and outgoing messages for each group of trials regarding the same number of tasks. For instance, the graphs of trials for τ = 2, shown in Fig. 8(b) and Fig. 8(c), it can be observe that the results obtained in different swam configurations are similar. This observation is confirmed by the structure of implemented message exchange. In Fig. 13, we show the mean values of the obtained results for the total number of received messages, as presented in Fig. 8 for τ = 2, Fig. 8 for τ = 3, 17
(a) Convergence time (ms)
(b) Received messages
(c) Sent messages Fig. 8. Achieved results by LDTA2 for the experiments with τ = 2
Fig. 10 for τ = 4 and Fig. 11for τ = 5. In Fig. 14, we present the mean values of the obtained results for the total number of sent messages, as shown in Fig. 8(c) for τ = 2, Fig. 9(c) for τ = 3, Fig. 10(c) for τ = 4 and Fig. 11(c) for τ = 5. The convergence time obtained by LDTA2 together with those yielded by existing algorithms, which are Card-dealer, Tree-recolor and Extreme-comm for 18
(a) Convergence time (ms)
(b) Received messages
(c) Sent messages Fig. 9. Achieved results by LDTA2 for the experiments with τ = 3
swarms of 4 to 25 robots performing 3 different tasks are shown in Fig. 15. It can be noted that in all algorithms convergence time increases with the swarm size. Observe that LDTA2 provides the lowest convergence time in swarms with fewer than 12 robots. For swarms more than 12 robots, a similar performance between LDTA2 and Extreme-comm is also observable. Nonetheless, for swarms of more than 12 robots, LDTA2 looses somehow the race for Extreme-comm. Furthermore, the performance achieved by LDTA2 is far 19
(a) Convergence time (ms)
(b) Received messages
(c) Sent messages Fig. 10. Achieved results by LDTA2 for the experiments with τ = 4
better than that of the other two compared algorithms i.e. Card-dealer and tree-recolor. 20
(a) Convergence time (ms)
(b) Received messages
(c) Sent messages Fig. 11. Achieved results by LDTA2 for the experiments with τ = 5
7
Conclusions
In this paper we propose a decentralized algorithm to implement the dynamic task assignment in robotic swarm in order to achieve and maintain some predefined proportion of task distribution. LDTA2 is effective and also an efficient solution for task assignment in a swarm of robots. The decision process is 21
ρ=4 ρ = 15
ρ=5 ρ = 16
ρ=8 ρ = 20
ρ = 10 ρ = 24
ρ = 12 ρ = 25
104 103 102 101 τ =2
τ =3
τ =4
τ =5
Fig. 12. Average convergence time (ms) achieved by LDTA2 ρ=4 ρ = 15
ρ=5 ρ = 16
ρ=8 ρ = 20
ρ = 10 ρ = 24
ρ = 12 ρ = 25
104 103 102 101 τ =2
τ =3
τ =4
τ =5
Fig. 13. Average numbers of received messages required by LDTA2
conducted independently by each robot using a simple and straightforward process, which is the main ingredient to the efficiency of the algorithm. The results of the tests show the execution time of LDTA2 as well as the statistics of the messages generated by the communications process. The convergence time of LDTA2 is compared to three existing solutions, showing a promising efficiency. In a future work, we intend to adjust LDTA2 to heterogeneous swarm, wherein the robots are not endowed with the same hardware and thus may or may not be able to execute the entire set of the required tasks. We would like to evaluate the impact of this compositional aspect on the convergence time. According to the complexity analysis presented in this paper, it is much easier to yield the adequate aimed allocation in this than in the case studied in this paper. However, different capabilities available on the robot hardware may have some 22
ρ=4 ρ = 15
ρ=5 ρ = 16
ρ=8 ρ = 20
ρ = 10 ρ = 24
ρ = 12 ρ = 25
104 103 102 101 τ =2
τ =3
τ =4
τ =5
Fig. 14. Average numbers of sent messages required by LDTA2
LDTA2 Tree-recolor
Card-dealer Extreme-comm
log(time)
105 104 103 102 100.6 100.7 100.8 100.9
101 101.1 101.2 101.3 101.4 log(ρ)
Fig. 15. Convergence time (ms) required by the compared algorithms
side effects.
Acknowledgments We are grateful to the Brazilian agencies CAPES, CNPq and FAPERJ, for their continuous financial support. 23
References [1] Atmel: ATmega2560, USA, http://www.atmel.com, 2012. [2] Baghaei, K.R. and Agah, A.: Task allocation methodologies for multi-robot systems, Technical report, Information and Telecommunication Technology Center, University of Kansas, Kansas, Missouri, 2002. [3] Bonabeau, E., Dorigo, M., Theraulaz, G. H.: Swarm Intelligence: From natural to artificial systems, Oxford University Press Inc., New York, 1999. [4] Gerkey, B.P. and Matari´c, M.J.: A formal analysis and taxonomy of task allocation in multi-robot systems, The International Journal of Robotics Research, vol. 23, no. 9, pp. 939–954, SAGE Publications, 2004. [5] Ijspeert, A.J. and Martinoli, A. and Billard, A. and Gambardella, L.M.: Collaboration through the exploitation of local interactions in autonomous collective robotics: The stick pulling experiment, Autonomous Robots, vol. 11, no. 2, pp. 149–171, Springer, 2001. [6] Kazadi, S. and Abdul-Khaliq, A. and Goodman, R.: On the convergence of puck clustering systems, Robotics and Autonomous Systems, vol. 38, no. 2, pp. 93–117, Elsevier, 2002. [7] Lerman, K. and Galstyan, A. and Martinoli, A. and Ijspeert, A.: A macroscopic analytical model of collaboration in distributed robotic systems, Artificial Life, vol. 7, no. 4, pp. 375–393, MIT Press, 2001. [8] Lerman, K. and Galstyan, A.: Collectives and design of complex systems. In: Two Paradigms for the Design of Artificial Collectives, K. Tumer and D. Wolpert (Eds.), pp. 231–256, Springer Verlag, 2004. [9] Lerman, K. and Martinoli, A. and Galstyan, A.: A review of probabilistic macroscopic models for swarm robotic systems, Swarm Robotics, pp. 143–152. Springer, 2005. [10] Lerman, K., Jones, C., Galstyan, A. and Matari I.C.: Analysis of dynamic task allocation in multi-robot systems, The International Journal of Robotics Research, vol. 25, no. 3, pp.225–241, SAGE Publications, 2006. [11] Martinoli, A.: Swarm intelligence in autonomous collective robotics: From tools to the analysis and synthesis of distributed control strategies, Ph. D. Thesis, 1999. [12] Martinoli, A. and Ijspeert, A. and Gambardella, L.: A probabilistic model for understanding and comparing collective aggregation mechanisms, Advances in Artificial Life, pp. 575–584, Springer, 1999. [13] Nordic Semiconductor, Technical report, nRF24L01+ Single Chip 2.4GHz Transceiver, http://www.nordicsemi.com/kor/Products/2.4GHz-RF/ nRF24L01P, 2014.
24
[14] Sugawara, K. and Sano, M.: Cooperative acceleration of task performance: Foraging behavior of interacting multi-robots system, Physica D: Nonlinear Phenomena, vol. 100, no. 3-4, pp. 343–354, Elsevier, 1997. [15] Sugawara, K. and Yoshihara, I. and Abe, K. and Sano, M.: Cooperative behavior of interacting robots, Artificial life and Robotics, vol. 2, no. 2, pp. 62–67, Springer, 1998.
25