An Interactive Control Algorithm Used for Equilateral Triangle Formation with Robotic Sensors

This paper describes an interactive control algorithm, called Triangle Formation Algorithm (TFA), used for three neighboring robotic sensors which are distributed randomly to self-organize into and equilateral triangle (E) formation. The algorithm is proposed based on the triangular geometry and considering the actual sensors used in robotics. In particular, the stability of the TFA, which can be executed by robotic sensors independently and asynchronously for E formation, is analyzed in details based on Lyapunov stability theory. Computer simulations are carried out for verifying the effectiveness of the TFA. The analytical results and simulation studies indicate that three neighboring robots employing conventional sensors can self-organize into E formations successfully regardless of their initial distribution using the same TFAs.


Introduction
There is a growing research interest in formation control theories for multi agent systems. Multi-agent systems are typically applied to tasks that cannot be handled by individual agents [1]. The main inspiration of the research in this field stems from the collaborative behaviors commonly observed in social animals, for instance, flocks of birds, and schools of fishes [2]. However, there are only local interactive rules utilized behind these complex behaviors [3,4]. Formation control of a multi-agent

OPEN ACCESS
system has potential applications in many other domains other than the robotics such as sensor networks [5], surveillance missions [6], and search and rescue [7]. The pioneering formation model, flocking, was created successfully and applied for computer graphics by Reynold [8]. A main contribution of Reynold's work is that it demonstrates that a global behavior can emerge from local interactive rules used by the agents. Balch and Arkin [9] proposed a behavior-based control approach for a small group of mobile robots (up to four) to strive to maintain some specific geometric formations. Formation task of a robot is decomposed into some basic behaviors and the aim of motion control can be gained through synthesizing these basic behaviors. The robots are heterogeneous since each robot's position in the formation depends on an ID number. Subsequently, Balch and Hybinette [10,11] extended the behavior-based approach to large scale robot formations. The behavior-based approach doesn't benefit stability analysis of formation.
In this study, we are concerned with three homogeneous robots employing commonly available sensors to group into an equilateral traingle (E) formation based on triangular geometry. Reif and Wang [12] extended the potential field approach which is widely applied to navigation of single robots to control multiple robots in formations for the first time. In their work, local minima had to be treated and potential function value would tend to reach infinity when two robots are close enough, which isn't realizable in practice. Kim et al. [13] presented a set of analytical guidelines for designing potential functions to avoid local minima for a number of representative scenarios. An important issue that has to be addressed is the selection of proportional parameters representing the relative strength of attractive and repulsive forces in a complexity and uncertainty environment. For these potential field approaches, the regular even local formation is not taken into account in formation control. Spears et al. [14,15] proposed an artificial physics-based framework for controlling a group of robots using attractive/repulsive forces between them. The decision of each robot depends on the local information. However, this approach tends to make the robots cluster unpredictably and also requires that robots must be close enough to each other at the start. To circumvent these problems, inspired by physics, a decentralized control mechanism based on virtual spring mesh was developed by Shucker and Bennett [16,17] for the deployment of robotic macrosensors. Each robotic sensor in the macrosensor interacts with its neighbors by using the physics model of virtual spring mesh abstraction while the neighbors are required to satisfy the acute condition. Related model parameters have to be set carefully in practice. Chen and Fang [18,19] introduced a geometry-based control approach for multi-agent aggregations while collision avoidance between members still uses a potential function-based method. The value of a potential function exerting on an agent tends to reach infinity when it is close enough to its neighbors and regular formation isn't involved there. Lee at al. [20,21] described a geometric motion planning framework which is constructed upon a geometric method for a group of robots in formation. The assumption of three neighboring robots starting from an acute triangle configuration is their major weakness though local regular triangular formation is considered in their work. However, in our study a group of three robots with basic sensor units that are capable of detecting each other are desired to organize into a basic E formation starting from any arbitrary initial distribution.
The modeling and stability analysis of the basic system considered in our study can also be extended and considered as a large interconnected system. Recently, analysis and stabilization of multiple time-delay interconnected systems is also receiving increasing attention from the scientific community [22][23][24][25][26]. In practice, the interconnected systems include electric power systems, process control systems, different types of societal systems, and so on. Chen and Chiang [25] extended the T-S fuzzy control representation to the stability analysis for nonlinear interconnected systems with multiple time-delays using LMI theory and proposed a LMI-based stability criterion which can be solved numerically. In [26], a fuzzy robust control design which combines H infinity control performance with T-S fuzzy control for the control of delayed nonlinear structural systems under external excitations is presented by them. The modeling error is further considered for resolution in this work. The emphasis of the work of Chen and Chiang is on the stability and stabilization of complex interconnected systems which are usually modeled as a unified formula. In contrast to many systems considered in the literature, in our study we are concerned with local interactive rule design so that an effective global behavior emerges from these rules. By comparison, the time-delay and modeling error are not immensely significant in our study. Hence, they are not taken into account in the design and stability analysis of the TFA.
The remainder of this paper is organized as follows: Section 2 gives the problem statement including the state transition model and motion control equation of robotic sensors. The detailed design procedure of the interactive control algorithm, TFA, is presented in Section 3. In Section 4, we conduct the stability analysis of the TFA which can be executed by robotic sensors independently and asynchronously for E formation. Section 5 demonstrates E formation behavior and typical formation convergences of three neighboring robotic sensors through computer simulations. Finally, conclusions and future work are stated in Section 6.

Problem Statement
We consider low cost homogeneous robots embodying simple and commonly available sensors. This means that the members cannot have strong capability, e.g., remote communication, and can only interact with neighbors or their environment. In fact, compared with single robotic sensors with complex structure and comprehensive function, there is less probability for a simple robotic sensor to be destroyed while performing tasks. In the following subsections, the state transition model and motion control equation of a robotic sensor, and definitions involved later are stated first.

State Transition Model
In our model, we assume that a real robotic sensor consists of four basic hardware components: (1) proximity sensor (such as infra-red sensor, sonar sensor, camera, etc.), to detect the distances between itself and neighbors; (2) digital compass, to detect the azimuths of neighbors within its local coordinate system; (3) central processor, to compute goal position using the designed interactive control algorithm based on the local information gained by (1) and (2); (4) actuator, to drive the robot and its sensor unit to move with the velocity calculated by motion control equation based on the goal position. The first two components together complete the collection of the local information.
To emphasize the development of a cooperative mechanism, the model abstract of a robotic sensor is assumed in following statement, where hardware composition and action characteristics of robotic sensors are taken into account: Assumption 1: A robotic sensor only has the ability of gaining local information and possesses three executable states: detecting, computing and moving. Transition happens between these three states subsequently and periodically when the robotic sensor runs, as shown in Figure 1, and there is no time-delay and disturbance during the transitions. In fact, execution of each state adds to the time cost and the transition between any two states also has a time-delay for robotic sensors. During the detection stage, a robotic sensor needs time to detect the distances from its neighbors and simultaneously determine the azimuths of corresponding neighbors, especially for the case that the robotic sensor which is equipped with only one infra-red sensor and has to perform 360 rotation to collect information. The calculation of goal position is based on the local information and it also adds to the time cost.
For the robotic sensor R i , the details of goal position calculation using detected distances and azimuths of its two neighbors is described in Figure 2. There are four robotic sensors which are distributed randomly in the plane, while only robotic sensors R i1 and R i2 are located within the detectable radius of the robotic sensor R i , and robotic sensor R i3 is not detectable by R i since R i3 is located outside the detectable radius of R i . and denote the distances of R i1 and R i2 from R i respectively, while and denote the local azimuths of R i1 and R i2 respectively within R i 's local coordinate system. Consequently, R i is able to calculate R i1 's local position according to Equation (1) based on the detected local information about R i1 . Similarly, the local position of R i2 can also be calculated. However, R i can't detect any position information about R i3 since R i3 is not detectable to R i : The condition for three robotic sensors to configure an E formation is that each robot-sensor unit has to be positioned within the detection ranges of the other two. For the rest of this paper, unless stated otherwise this condition is assumed to be satisfied when they are distributed at the start. Robotic sensor R i collects the local position information of its other two neighbors during the detection stage, then executes an interactive control algorithm, TFA, to calculate its goal position, and finally puts the goal position into a motion control equation to output the desired motion state. The motion state means goal velocity which has two properties of speed and direction. The actuator of R i will drive R i to move with the velocity.
Among three robotic sensors, any one robotic sensor and its position are denoted by R i and respectively, and the other two may be denoted by R i1 , R i2 and accordingly their positions by , . denotes the position set of R i 's neighbors. denotes the distance between and .
denotes the index set of the robotic sensors. Based on the definitions of G and E, E formation behavior of three neighboring robotic sensors may be stated as follows: Problem 1 (E formation behavior): Three neighboring robotic sensors self-organize into the desired E formation with side-length D through cooperation between each other starting from arbitrary initial G formation which depends on their initial distribution.

Motion Control Equation
At each time step, robotic sensor R i uses collected local information to calculate its goal position. This goal position is considered invariable during the interval between two time steps. Therefore, we introduce following motion control equation for R i : (2) where and denote the current and goal positions of R i respectively; is a constant relying on the maximum speed and detecting radius of R i , which could be determined according to the following procedure. As Seen from Equation (2), during R i 's movement, holds at all time. For some , the maximum of the right term, , is . The left term, , is the speed of R i . As long as , a proper could always be found such that .
Therefore an acceptable should make Equation (4) satisfied: After selecting a proper value for , R i 's motion state at the next time step is dependent on goal position as demonstrated in Equation (2). The is calculated by R i using an interactive control algorithm, TFA, so the design of TFA is key for solving Problem 1.

Presentation of Interactive Control Algorithm (TFA)
During E formation configuration, each robotic sensor executes the same interactive control algorithm and their behaviors are independent and asynchronous. As a member of the group, actions of the member should be beneficial to achieving global task. According to this rule, the goal position for a given robotic sensor R i should be the position from which the distances to the rest of the two neighbors are equal. If this goal position can be calculated then there will be two possible solutions as shown in Figure 3a. This conflict is solved by choosing the one which is closer to R i and denoting it as .The side-length of desired E formation is denoted by D and should hold, otherwise the desired E formation will not be possible to achieve as neighbors are not detecting each other. In order to let all robotic sensors have specific goal positions at the same time, the below equation must be satisfied: (4) where represents the distance between and which are the positions of robotic sensors R j and R k respectively. Here, we divide the process of configuring the E formation of three robotic sensors into two stages: adjusting process (APr) and clustering process (CPr). For APr, Equation (4) holds while for CPr it does not. The corresponding algorithms executed on the robotic sensor are called adjusting algorithm (AA) and clustering algorithm (CA), respectively.

Adjusting Process (APr)
During the adjusting process, Equation (4) holds and at the same time each member of the three robotic sensors is able to calculate its specific goal position for the next step. The mathematical significance of for robotic sensor R i may be stated as Equations (5) and (6) where the sign of means Euler norm-2 which is used for distance solution between any pair of positions in two-dimensional space: The calculation method of goal position of robotic sensor R i under all typical distributions are illustrated within the local coordinate system of R i in Figure 3b-e. In these figures, a hollow circle indicates the goal position and a full circle indicates the robotic sensor position. The arrowhead pointing to from indicates expected motion direction of R i . The center of line segment is denoted by . The which has the same distance D from and locates on the line which is perpendicular to line and passes through . represents the line which passes through the origin and is also parallel to line . indicates the slope of line within R i 's local coordinate system. indicates the included angle between line and horizontal axis x. The pseudo code of basic AA algorithm with respect to adjusting process is described in Table 1.   (5) and (6)

Clustering Process (CPr)
At each time step, robotic sensor R i calculates the distance between the other two neighbors after detection. If this distance satisfies Equation (4), R i can calculate it's the specific which satisfies Equations (5) and (6) using the AA algorithm. If robotic sensor R i located at , could form an isosceles triangle together with its two neighbors and the waist lengths are equal to D. R i moving towards benefits E formation. However, it is not guaranteed that at the same time step the other two neighbors also have specific goal positions, which is completely dependent on their current distribution. A distribution of three robotic sensors, for instance, is shown in Figure 4, where , and the goal position of R i is (not ) because and is closer to than .
Since R i is located so far from R i1 that R i2 cannot calculate a specific goal position to make hold. After detected the distances and using proximity sensor and the azimuths and using digital compass, R i can calculate the distance between R i1 and R i2 according to Equation (7): If Equation (4) doesn't hold, at least one robotic sensor can't calculate a specific goal position because the goal position doesn't exist. They should first cluster together enough prior to the calculation of goal position. Therefore, we define following strategy: when R i found that Equation (4) doesn't hold, it will take the average position of three robotic sensors as its approximate goal position . According to this strategy, when Equation (4) doesn't hold, the three robotic sensors first cluster until Equation (4) is satisfied. After Equation (4) holds, each robotic sensor has its own specific goal position at the same time step and they will join the adjusting process. Adjusting process straightly goes to configure E formation, while clustering process only aims to make three robotic sensors cluster enough to ensure that they all can finally join adjusting process. The pseudo code of basic CA algorithm with respect to clustering process is described in Table 2. In fact the CA algorithm itself has no specific requirement for position distribution of three robotic sensors because the approximate goal position, i.e., the average position of them, is available at any given time step. If the three robotic sensors only execute the same basic CA algorithms, they will move towards a common position. The execution procedure of basic CA algorithm for R i is illustrated in Figure 5a.  Different from the CA algorithm, the AA algorithm has the requirement for position distribution of three robotic sensors. In other words, Equation (4) must hold, otherwise the specific goal position will not exist for at least one robotic sensor, which will cause severe problems. The three robotic sensors will go to configure an E formation directly by executing the same basic AA algorithms. The execution procedure of the basic AA algorithm for R i is illustrated in Figure 5b.

TFA Description
A robotic sensor's choice of which process from the clustering and adjusting processes to join is completely dependent on the current distribution of three robotic sensors. If one robotic sensor joins the adjusting process first, it will no longer join the clustering process and go into configuring an E formation directly. If a robotic sensor joins the clustering process first, it will have to join the adjusting process for configuring an E formation after the three robotic sensors cluster enough. The detailed analysis and results on these issues will be presented in the next section. Here, we name the proposed interactive control algorithm Triangle Formation Algorithm (TFA). The same TFA algorithm is executed on each robotic sensor independently and asynchronously while configuring an E formation. For the convenience of description, two definitions are given below for classifying the distributions of three robotic sensors:

Definition 3 (Clustering Formation, CF): CF is defined as the G formation which doesn't satisfy Equation (4).
Definition 4 (Adjusting Formation, AF): AF is defined as the G formation which satisfies Equation (4).
The G formation, configured by three robotic sensors, only belongs to one type of the CF or AF. The robotic sensor will execute the CA algorithm when it locates in CF, and the AA algorithm in AF. Three robotic sensors can cluster enough through executing the same CA algorithms so as to make Equation (4) hold. Equation (4) needs to be satisfied for the AA algorithm. However these algorithms as parts of the TFA algorithm have the common aim to achieve the E formation. To complete the global task, the AA algorithm is the part each robotic sensor has to execute at the end. For a robotic sensor, the part of the CA algorithm is not guaranteed to be executed. It depends on the current formation configured by the three robotic sensors. Therefore, the TFA algorithm used for three robotic sensors to configure an E formation is composed of the basic CA and AA algorithms. For a robotic sensor to choose which part of the TFA algorithm to execute depends on the type of current formation configured by the three robotic sensors. The pseudo code of the TFA algorithm is described in Table 3. The execution procedure of the TFA algorithm for R i is illustrated in Figure 6.  In practice when three robotic sensors locate along a line, it may happen that the two robotic sensors at the ends are unable to detect each other due to the robotic sensor located in the middle, but the middle robotic sensor is able to detect the other two neighbors on both sides. Figure 7 indicates this kind of position distribution. Here, despite the fact the three robotic sensors locate in a line, any one is still at the detectable range of the other two. In Figure 7, the shadowed block is a blocked area for R i1 which is caused by the middle robotic sensor, R i , while R i2 precisely locates at the blocked area, as a result, R i1 isn't able to detect R i2 . Similarly, R i2 isn't able to detect R i1 for the same reason. Therefore, we suggest a modifying sub-algorithm as illustrated in Figure 8 for robotic sensors in practice. During E formation configuration, once a robotic sensor detects only one neighbor, the robotic sensor should stop moving but still continue to detect and calculate processes. When a robotic sensor only detects two neighbors and further finds that it and its two neighbors are residing on a line, the robotic sensor can confirm that itself is in the middle. The robotic sensor will randomly choose one direction along the line which is perpendicular to the base line where the three robotic sensors locate and move towards that direction. Consequently, any one robotic sensor at the end will be able to detect the other at the end and begin to execute the CA or AA algorithms which are part of the TFA algorithm. Thus the deadlock situation of the three robotic sensors which locate on a line is broken.

Stability Analysis for TFA
The design procedure of TFA has been stated in the last section with the description of related pseudo codes. The theoretic results of the TFA used for three neighboring robotic sensors to configure an E formation are presented in detail in this section. The same TFA algorithm is executed on each robotic sensor independently and asynchronously. A global coordinate system is assumed for analysis. . Lemma 1 has been proved.
Lemma 2: Three neighboring robotic sensors which execute basic CA algorithms can cluster into the neighborhood with radius around the center after spent time : , where may be any positive number and .
Proof: According to lemma 1, the average position of three neighboring robotic sensors executing the same CA algorithms satisfies . For any robotic sensor R i , , denote the error variable as , and the energy function as , after an operation of derivative is used for this function, we may have: .
To , when , always . From Lyapunov stability theory, robotic sensor R i can go into the neighborhood with around the center after spending enough time .
Since , the solution of this differential equation is . Here, when , R i is considered to have gone into the neighborhood of and is used to denote the time spent on going into the neighborhood. From the energy function, there is , and solving equation , the result is . Therefore, the shortest time which three neighboring robotic sensors have to spend to go into neighborhood of is: (during clustering process, ) Lemma 2 has been proved.
Lemma 3: Three neighboring robotic sensors can self-organize into AF from any CF successfully and in addition this is an irreversible process for the TFA algorithm.
Proof: According to Lemma 2, three neighboring robotic sensors which execute CA algorithms can cluster enough such that , let then Equation (4) holds. Thus, the former part of Lemma 3 is proved.
If AF is transformed into CA, a critical formation as shown in Figure 9 must be experienced at this time step where . Without the loss of generality, we only need to consider the case where robotic sensor R i locates in the area formed by the two circles and the line formed by R i1 R i2 . It should be noted that the length of line segment R i1 R i2 is equal to and the circles shown are only used for analysis, they are not the maximum detectable boundaries of robotic sensors. Obviously, if the transformation from AF into CF happens, deviation movement between R i1 and R i2 must first happen at this time step. Considering the symmetry, here we only discuss R i1 , as a similar analysis is suitable for R i2 as well. During the deviation movement, the motion direction of R i1 must be upward line . The line is vertical to line R i1 R i2 . That means the goal position of R i1 must be in the area above line . As a result, the distance from to R i2 must be larger than 2D. However, robotic sensor R i1 is still in AF and executing the AA algorithm of its adjusting process. Seen from the adjusting process, the distance from to R i2 must be less than 2D, which causes a contradiction, so the assumption of at the above of doesn't hold. Similar analysis for R i2 can deduct that cannot be below . Therefore, the deviation movement between R i1 and R i2 can't happen since they are in AF. The latter part of Lemma 3 is proved.
Combining above, Lemma 3 has been proved.
Lemma 4: Three neighboring robotic sensors which execute basic AA algorithms can directly self-organize into an E formation starting from any AF.  .
That is to say, the distances of any robotic sensor R i to its other two neighbors are equal to D. Therefore, the AF configured by the three robotic sensors finally transformed into an E formation. Lemma 4 has been proved.
Theorem 1: Three neighboring robotic sensors which execute the TFA algorithms can self-organize into an E formation starting from any initial distribution, i.e., the TFA algorithm can solve Problem 1.
Proof: If the initial distribution of three neighboring robotic sensors is a CF formation, they will join the clustering process and execute CA algorithms. According to Lemma 3, the CF formation will transform into an AF formation and a reversible process never happens. According to Lemma 4 the AF formation will transform into an E formation. However, if the initial distribution of three neighboring robotic sensors is an AF formation, according to Lemma 4, the AF formation will directly transform into an E formation. The combination of the above indicates that the three neighboring robotic sensors can self-organize into an E formation regardless of their initial distribution. The theorem has thus been proved.

Simulation Studies
In the last two sections, we first designed the interactive control algorithm, TFA, and then stated the related theoretic results which indicate that three neighboring robotic sensors can self-organize into an E formation regardless of their initial distribution. In this section we aim to conduct simulation experiments on a computer so as to test the effectiveness of the TFA. All simulation programs were written in Steve based on the Breve platform [27]. Breve is a 3D simulation environment for the simulation of decentralized systems and artificial life, using the object oriented language, Steve, as programming language. Breve also contains a commonly used class library which assists with fast model simulation and algorithm test. The interested reader is referred to our earlier work [28] for the detailed simulation programs in Steve used in this section.
Parameter settings for simulation experiments are as following: side-length of the desired E formation, (units); detection radius of a robotic sensor, (units); maximal speed of robotic sensor, (units/s); control constant of Equation (2), , which satisfies Equation (3); at the beginning of simulations, robotic sensors are randomly distributed in the circle area whose radius is , which ensures any one robotic sensor can detect all the other ones; robot sensor R i is instructed to stop running when where means instant speed of R i , in other words, stop condition is specified for the simulation of E formation behavior. In fact, the limited of R i reflects the deviation degree between and , which can be seen from Equation (2). To be convenient to evaluate the change of the close degree between the current formation and the desired E formation over time, we defined average side-length error, , as formula: (8) in Equation (8), represents the number of elements in set .
We simulated an E formation behavior for three robotic sensors extensively based on typical initial distributions. These distributions are: (1) 27.00), all three side-length values are larger than ; (4) AF (11.60, 15.69, 11.61), all three side-length values are less than 2D, i.e., Equation (4) holds. The simulations of E formation behavior demonstrate that three neighboring robotic sensors can self-organize into an E formation starting from these typical initial distributions using TFA. For instance, Figure 10 shows the trajectories of three robotic sensors during an E formation configuration starting from distribution CF-2. Figure 10. The E formation behavior of three robotic sensors starting from CF-2 distribution.
The changes of average side-length errors over the time under these typical distributions are illustrated in Figure 11. The error curves indicate that those typical initial formations configured by three robotic sensors can always transform into the desired E formation with side-length D. In short, since these typical distributions summarize all the possible initial distributions, computer simulations show us that three neighboring sensors can self-organize into an E formation through executing the same TFA algorithm starting from any initial distribution. Figure 11. The changes of average side-length error over time under typical initial distributions.

Conclusions and Future Work
In this paper, first, we established the state transition model for real robotic sensors. Then, the design procedure of the TFA algorithm is presented in detail. The same TFA algorithm is executed by each robotic sensor independently and asynchronously during E formation configuration. Finally, we conducted stability analysis and simulation verification for the TFA algorithm. Theoretical analysis and computation simulations both indicate that the proposed TFA algorithm can ensure that three neighboring robotic sensors self-organize into an E formation regardless of their initial distributions. However, the TFA algorithm is not our ultimate goal. In our future work, we are interested in extending it to controlling large scale robotic sensors to configure a uniform sensor network which has a specific local formation.