# A Bacterial Chemotaxis-Inspired Coordination Strategy for Coverage and Aggregation of Swarm Robots
## 4 Proposed Method
### The BCCS for Coverage  
The robot motion can be modeled as a feedback system, shown in Figure 5. Logistic chaotic mapping is adopted for the chaotic preprocessing module. First, to get more reasonable initial positions of the robots to prevent interference among robots, chaotic preprocessing is needed. Chaotic preprocessing is a process, in which the elements in chaotic sequence \(z\) within [0, 1] are converted to that in a new chaotic sequence \(z^{*}\) within [a, b] using Equations (2)-(4). [a, b]\({}^{2}\) is the range of horizontal and vertical range of the environment. Moreover, \(n\) elements with great differences are extracted from \(z^{*}\) to form a new sequence \(x^{\prime}\) as the initial positions of the robots. \(x^{\prime}_{i}\in x^{\prime},x^{\prime}_{i}\big{(}x^{\prime}_{i,1},x^{\prime} _{i,2}\big{)}\) is the initial position of robot \(i\). Chaotic preprocessing is optional without considering the interference of the robots. The BCCS module is the core of the feedback system. In BCCS, each robot is like a bacterium. BCCS drives robots to generate future actions (running or rotating) and positions. Also, each robot calculates its fitness function. Each robot takes the fitness function value as feedback input. In this paper, we divided the environment into a large number of cells in the same size. The \(Cell\_Index=\{1,2,\,\dots,\,l\}\) is the set of cell index. \(c_{k}\) (\(k\in Cell\_Index\)) is the center of the cell \(k\). If \(1\mid c_{k}-x_{i}(t)\mid<Rs\), then the cell \(k\) is coved by robot \(i\) at time \(t\), as shown in the left part of Figure 6. Specially, the green cell is coved by robot \(i\), but the yellow cell is not. When the robot \(i\) senses the robot \(j\) (\(d_{ij}=1\mid x_{i}-x_{j}\mid 1\mid<Ri\)), overlapping cells are generated, such as the gray cells in the right part of Figure 6. We defined the number of cells only covered by robot \(i\) at time \(t\) as \(F_{i}(t)\), which also is the fitness function value of robot \(i\), that is:  
\[F_{i}(t)=|O_{i}(t)| \tag{5}\]  
where \(\mid\cdot\mid\) denotes cardinality of set \(O_{i}(t)\). \(O_{i}(t)\) is the set of cells coved only by robot \(i\) at time \(t\), and can be expressed by:  
\[O_{i}(t)=\bigg{\{}k\in Cell\_Index|\underset{j\in N_{i}(t)}{\cap}\big{(}\{||c_ {k}-x_{i}(t)||\leq Rs\}\cap\ \big{\{}||c_{k}-x_{j}(t)||>Rs\}\big{)}\bigg{\}} \tag{6}\]  
where \(N_{i}(t)\) is the neighbors of robot \(i\) at time \(t\). Figure 5: Feedback system architecture for robot motion based bacterial chemotaxis-inspired coordination strategy (BCCS). Based on the fitness function in Equation (5), we propose the coordinate strategy for coverage:  
\[g\Big{(}x_{i}(t),\big{[}x_{j}(t)\big{]}_{j\in N_{i}(t)}\Big{)}\triangleq\left\{ \begin{array}{cc}\left[\begin{array}{c}v(t)\\ 0\\ v(t)\\ \theta(t)\end{array}\right]&if\quad\zeta_{i}(t)\leq F_{i}(t),\\ \end{array} \right. \tag{7}\]  
where \(\zeta_{i}(t)=F_{i}(t-1)\) is the fitness function value of the robot \(i\) at time \(t-1\). Thus, \(\zeta_{i}(t)\leq F_{i}(t)\) denotes that the current fitness function value is higher than or equal the previous one. In this case, the robot \(i\) maintains the current direction and moves forward. This process is defined as running of robot, which is similar to the swimming of bacterium. In contrast, \(\zeta_{i}(t)>F_{i}(t)\) denotes that the current fitness function value is lower than the previous one. In this case, the robot \(i\) rotates \(\theta(t)\) radians, and moves forward. This process is defined as rotating of robot, which is similar to the tumbling of bacterium. \(\theta(t)\) is not fixed and is based on the positions of robot \(i\)'s neighbors at time \(t\). The rotation direction \(\theta(t)\) is calculated using the following equations:  
\[\theta(t)=arccos\Big{(}\frac{\mathbf{r}(t)\cdot\mathbf{v}(t)}{||\mathbf{r}(t)||\mathbf{v}(t)|| }\Big{)} \tag{8}\]  
\[\mathbf{r}(t)=\sum_{j\in N_{i}}\big{(}x_{i}(t)-x_{j}(t)\big{)} \tag{9}\]  
where \(||\cdot||\) is the norm of vector.