Introduction

Motivated by the attractive properties of multi-robot systems, such as adaptability, scalability, flexibility, robustness, and cost efficiency, the design of self-organized strategies has seen increased activity in recent decades. A wide range of real-world application studies have been reported in the areas of search and rescue [1, 2], area monitoring [3, 4], formation flying [5], terrain/space exploration and mapping [6], collective transportation, and construction [7, 8].

Recent advances in robotics make it possible to build and operate a large number of inexpensive robots for various tasks beyond the scope of single robots. Swarm robotic systems (SRSs) are a new branch of multi-robotics to study the design of physical bodies and controlling behaviors of large numbers of relatively simple robots. SRSs are usually stochastic and nonlinear, so building mathematical models for validation is challenging [9, 10]. One of the most remarkable characteristics of SRSs is that strongly adaptive swarm behaviors can be achieved through very simple decentralized collaboration strategies. Therefore, the study of collaboration strategies is a key issue for swarm robotic systems.

Designing controlling strategies for specific tasks is a common approach. For example, the uniform diffusion problem, i.e., the dispersion of autonomous mobile robots and make them uniformly distributed in a region [11,12,13,14] provide solutions in the case of obstacles, faulty robots, respectively, but current solutions to this problem rarely study the case where robots have very low computational power and large number sizes. Assuming that the capabilities of individual robots are quite limited, some pioneering approaches have been investigated, including probabilistic finite state automata algorithms [15] inspired by cockroach aggregation behavior [16, 17], artificial evolution-based algorithms [18, 19], immune-inspired methods [20], etc. Vardy [21] embedded an additional odometry capability into swarm robotic systems for aggregation. Pattern formation and maintenance is also an active topic when designing controlling strategies for SRSs. Pattern-formation algorithms inspired from morphogen dispersion [22, 23], reaction dispersion [24, 25], response threshold models [26, 27], gene regular networks [28,29,30,31,32], and chemotaxis [33,34,35] have been proposed to achieve pattern formation and maintenance.

Swarm organisms in nature, such as bird flocks [36, 37], fish schools [16, 38,39,40], and marching locusts [18, 41] exhibit amazing adaptability, and the study of these behaviors has inspired the research of bio-inspired optimization algorithms, as well as the research of bio-inspired swarm robots. For bio-inspired optimization algorithms, they are powerful tools when the optimization problem is highly uncertain, no mathematical model is available, and gradient information is poor. For example, [42,43,44] uses different bio-inspired optimization algorithms to solve the optimization problem of multiple parameters in a set of six-DOF parallel robot platform controllers. Recently, an important issue has been to improve the accuracy and speed of these algorithms, as suggested in [45], so that they can be applied to more practical problems.

For bio-inspired swarm robots, a large number of works have shown that modeling robot cooperation strategies based on animal behavior is also an important research perspective. Scholars have observed the cooperative movement of different social animals [16, 18, 36,37,38,39,40,41], and designed the controller of the group robot by imitating the biological interaction mechanism that can complete specific tasks [46]. In addition to the artificial modeling of swarm motion, much work has been done to analyze and formulate the behaviors of animals.

Thanks to the development of image processing, tracking, and big data techniques in the last decade, the behaviors of animals can be quantitatively analyzed to some extent [47, 48]. This boots the studies about inferring the collaboration strategies of animals [17, 36, 40, 49]. One of the studies on algae shows that the differentially functioning flow fields produced by marine algae through periodic circular motions and occasional random migratory motions ultimately lead to a disordered hyperuniform distribution and prevent local nutrient depletion [49].

In this work, inspired by the emergence of complex and ordered modes in algal systems through simple movements, we propose bio-inspired dispersion of two-wheeled mobile robots with binary-state sensory information. This paper makes three major contributions as follows:

  • We propose a controlling strategy for self-organized uniform dispersion by using two types of periodic circular motion based on binary-state sensory information to model the flow field of algal motion. The controller for dispersion is proved that a robot will always move away from the robot cluster to a certain distance within the upper limit. The effectiveness and scalability of the proposed controlling strategies are verified by both large-scale robot simulations and physical experiments. The good robustness of the controller is demonstrated by adding different intensity of noise to the sensing and action sessions.

  • The proposed controlling strategy only uses binary-state sensory information, meaning no further measurement, communication, or memory is required. This reduces the need for robot computing power and sensors to a minimum. Many common sensors, such as IR, laser line, rangefinders, and vision-based cameras, are suitable. In this work, the onboard camera is used to perceive whether another robot is in the field of view.

  • From the perspective of real-world application, we keep our sights on the controlling strategy for two-wheeled mobile robots which cannot rotate on a spot. These two-wheeled swarm robotic systems in which the robot’s movement is subject to a minimum turning radius can be widely seen in real-world robots or vehicles, e.g., aircraft, cars, ships, and underwater vehicles.

The remainder of this paper is organized as follows. “Methods” presents the biological phenomena, the modeling, and the description and proof of the proposed dispersion controller. In “Simulation results”, the effectiveness, robustness, and scalability of the controller are analyzed by robot simulation. In “Physical experiments”, physical experiments are carried out to demonstrate the proposed controller. Conclusions are drawn in “Conclusions”.

Methods

In this section, we first introduce the biological phenomena of the algae system and its mathematical model, and introduce the motion model of the robot targeted by our controller, then show the structure of our proposed controller and give a mathematical proof that a robot executing the diffusion controller is always far away from another robot or a static cluster. We also deduce that there is an upper limit on the time between two robots or one robot and another static robot group to implement the diffusion controller. Finally, to analyze the diffusion process, we propose the dispersion metric and the uniformity metric.

Biological phenomena and modeling

Recently, Huang et al. [49] studied a marine algae named Effrenium voratum and found that the algae system can generate a disordered hyperuniform state through simple motion. The marine algae is spherical in shape, about 10 \(\upmu \)m, with longitudinal flagella at the back of the body and transverse flagella at the waist.

Driven by two flagella, algae can make circular motions in the liquid to generate a long-distance repulsive flow field, and the strength of the flow field attenuates as the distance increases. At the same time, the algae will occasionally migrate long distances randomly, and generate a certain flow field, affecting other algae individuals. Under the competition of two long-range flow fields generated by periodic circling motion and occasional random migration, the spatial distribution of marine algae system finally presents a disordered hyperuniform distribution at the gas–liquid interface.

Using the average displacement of the periodic cycling motions of the algae as an entry point to establish the model of motion evolution, Huang et al. [49] numerically reconstructs the hyperuniform state of the algae distribution. The model is represented as follows:

$$\begin{aligned}{} & {} {\overline{{\textbf {r}}} ^{(i)}}((n + 1)\tau ) = {\overline{{\textbf {r}}} ^{(i)}}(n\tau )\nonumber \\{} & {} \quad + \sum \limits _{j \ne i} {\overline{{\textbf {V}}} } \left( {{{\overline{{\textbf {r}}} }^{(i)}}(n\tau ) - {{\overline{{\textbf {r}}} }^{(j)}}(n\tau );v_{\textrm{c}}^{(j)}} \right) \tau \nonumber \\{} & {} \quad + {\varvec{\eta }}\left( {{D^{(i)}}} \right) \delta \left( {\,\bmod \,(n,p),{s^{(i)}}} \right) . \end{aligned}$$
(1)

The superscript i in the equation indicates the identification number of the algae, the subscript n indicates the moment in time when \(\tau \) is the time interval, \({\overline{{\textbf {V}}} }({{\overline{{\textbf {r}}} }^{(i)}}(n\tau ) - {{\overline{{\textbf {r}}} }^{(j)}}(n\tau );v_{\textrm{c}}^{(j)})\) represents the effect on the velocity of algae i of the mean flow field generated by the cycling particle motion of algae j at the moment n,  and \(\eta \) indicates the displacement due to the noncycling particle motion of the algae i. As shown in Fig. 1A, the motion of algae in the water can generate a repulsive flow field and can also be subject to repulsive forces from the flow field generated by the motion of other algae [49].

Fig. 1
figure 1

A Mean in-plane flow field generated by cycling particle motion of algae, regularized Stokeslet model, arrows show local flow direction [49]. B Periodic circular motion is based on binary-state sensory information. The solid red circle represents the robot, and the blue line represents its perceptual direction and ranges \(\delta \)

Since marine algae are in the water, they can obtain the repulsive flow field generated by other individuals in all directions, but this omnidirectional perception ability puts high demands on the cost control and computing power of the robot. We consider that although the two-wheeled mobile robot cannot rotate on a spot, it can easily complete the circular movement by setting the two wheels at different speeds. Therefore, we combine binary perception information with periodic circular motion to simulate the omnidirectional perception ability of algae, and complete the away behavior by switching between two circular motions with different turning radii, and finally complete the repulsive flow generated by algae motion. The process is shown in Fig. 1B.

Robot model

In this paper, each robot only needs one sensor with binary-state sensory information, which can be simplified to two possible sensor readings, \(I = 0\) and \(I = 1.\) The sensor is given a reading of \(I = 1\) if another robot is in the view of the sensor and a reading of \(I = 0\) otherwise.

The robot model of this paper is a two-wheeled mobile robot, which cannot complete rotation at one point. These two-wheeled swarm robotic systems in which the robot’s movement is subject to a minimum turning radius can be widely seen in real-world robots or vehicles, e.g., aircraft, cars, ships, and underwater vehicles.

Since the two-wheeled robot cannot complete the rotation at a certain point, \({\mathbf {\nu }}\) and \({\mathbf {\omega }}\) should meet the following requirements:

$$\begin{aligned} \left\{ \begin{array}{ll} \Vert {\mathbf {\omega }}\Vert>0, &{}\quad \Vert {\mathbf {\nu }}\Vert >0\\ \Vert {\mathbf {\omega }}\Vert =0, &{}\quad \Vert {\mathbf {\nu }}\Vert =0 \end{array} \right. \end{aligned}$$
(2)

and the \(\nu ,\) \(\omega ,\) and minimum turning radius r can be obtained as follows:

$$\begin{aligned}{} & {} {\nu } = \frac{{v_{r}}+{v_{l}}}{2}, \end{aligned}$$
(3)
$$\begin{aligned}{} & {} {\omega } = \frac{{v_{r}}-{v_{l}}}{d}, \end{aligned}$$
(4)
$$\begin{aligned}{} & {} r=\frac{\upsilon }{\omega } = \frac{d}{2}\frac{{v_{r}}+{v_{l}}}{{v_{r}}-{v_{l}}}, \end{aligned}$$
(5)

where d represents the distance between the two wheels, \({v_{r}}\) and \({v_{l}}\) are the right wheel speed and left wheel speed, respectively.

Controller strategy

Since the robot is memoryless and equipped with only one binary sensor, the behavior of any controller can be reduced to a mapping read from each of the two possible sensors, \(I = 0\) and \(I = 1,\) corresponding to a fixed set of angular velocity and linear velocity. The controller can be written as a quadruplet:

$$\begin{aligned} p=({\mathbf {\nu }}_{0},{\mathbf {\omega }}_{0},{\mathbf {\nu }}_{1},{\mathbf {\omega }}_{1}), \end{aligned}$$
(6)

where variables \({\mathbf {\nu }}_{0}\) and \({\mathbf {\omega }}_{0}\) refer to the linear velocity and angular velocity, respectively, of a robot when \(I=0;\) \({\mathbf {\nu }}_{1}\) and \({\mathbf {\omega }}_{1}\) refer to the velocity of the robot when \(I=1.\) The complete running process of the algorithm can be expressed by the If-Then-End structure, as shown in the Algorithm 1:

Algorithm 1
figure a

Controller Strategy

The pointing direction of the robot sensor is positive, and the control model is shown in Eq. (6), where \({\mathbf {\nu }}_{0},\) \({\mathbf {\omega }}_{0},\) \({\mathbf {\nu }}_{1},\) and \({\mathbf {\omega }}_{1}\) satisfy the relationship shown in Fig. 2. Specifically, the robot moves along clockwise circles with radii R \((I=0)\) and \(r_z\) \((I=1).\)

Fig. 2
figure 2

The robot self-organizing dispersion strategy. When \(I=0\) or \(I=1,\) the robots face horizontally to the right and rotate clockwise along a circular trajectory

Figure 2 shows the robot self-organizing dispersion strategy. When \(I=0\) or \(I=1,\) the robots face horizontally to the right and rotate clockwise along a circular trajectory. In both sensor states, the positions of the robot and the circular trajectory motion must satisfy the relationship shown in Fig. 2. If \(I=0,\) the radius of the circular motion trajectory of the robot is R. If \(I=1,\) the radius of the circular motion trajectory of the robot is \(r_{z}.\) \(R>r_{z}\) is an important condition for achieving dispersion.

Controller structure analysis

It is possible to analyze the same controller used by each robot. At In the beginning, the robots are in an aggregated state at a certain distance from each other. When each robot starts to move, the movement shown in Fig. 3, the outermost layer of robots move first and begin to disperse.

Theorem 1

One moving robot will always move away from another static robotic cluster or moving robot.

Fig. 3
figure 3

A schematic diagram of the swarm robot self-organizing dispersion, a mobile robot i (a solid red line of small circles), and a static robot group (a solid black line of small circles). The robot rotates clockwise along a circular path centered on \(c_{i}\) (the solid red line) until robot i sees group robot j. The robot then turns clockwise along a circular path centered on \(o_{i}\) (green circle) until robot i does not see group robot j;  as a result of the movement of the robot, robot i has just started around the center of the circle of rotation from \(c_{i}\) to \(c_{i}^{\prime }\)

Proof

As shown in Fig. 3, we establish the coordinate system shown in Fig. 3, with x-axis \(o_{i}\) and point \(c_{i}^{\prime },\) The y-axis crossing point \(p_{j}\) is perpendicular to the x-axis. Let \(c_{i}=[\beta ^{\prime },\alpha -\alpha ^{\prime }],\) \(c^{\prime }_{i}=[\beta ,0],\) \(p_{j}=[0,\alpha ]\) and \(p_{i}^{\prime }=[\varphi ,0].\) In Fig. 3 the radius \(\Vert p_{i}-o_{i}\Vert \) of the green circle is less than the radius \(\Vert p_{i}-c_{i}\Vert \) of the red circle, we can obtain:

$$\begin{aligned} \left\{ \begin{array}{l} \alpha =\Vert c_{i}-o_{i}\Vert *\sin \theta +\alpha ^{\prime } \\ \beta =\varphi +\Vert p^{\prime }_{i}-o_{i}\Vert +\Vert c^{\prime }_{i}-o_{i}\Vert \\ \beta ^{\prime }=\varphi +\Vert p^{\prime }_{i}-o_{i}\Vert +\Vert c_{i}-o_{i}\Vert *\cos \theta , \end{array} \right. \end{aligned}$$

where \(\theta \in (0,\pi /2),\) \(\Vert c^{\prime }_{i}-o_{i}\Vert =\Vert c_{i}-o_{i}\Vert ,\) which leads to the following:

$$\begin{aligned} \left\{ \begin{array}{l} \alpha -\alpha ^{\prime }>0\\ \beta -\beta ^{\prime }>0. \end{array} \right. \end{aligned}$$

As shown in Fig. 3, we can obtain:

$$\begin{aligned}&d^2 = \Vert c_{i}-p_{j}\Vert ^{2}=\alpha ^{\prime 2}+\beta ^{\prime 2}, \nonumber \\&d^{\prime 2} =\Vert c^{\prime }_{i}-p_{j}\Vert ^{2}= \alpha ^2+\beta ^2, \nonumber \\&\because d^2-d^{\prime 2} =\alpha ^{\prime 2}-\alpha ^2+\beta ^{\prime 2}-\beta ^2<0,\nonumber \\&\therefore d^2<d^{\prime 2}. \end{aligned}$$
(7)

When the left robot is moving, the right robot is static. It can be shown that the outermost robot will be slightly farther from the mother group after each cycle time. Since the sensor is limited in distance, it is not possible for the robot to be far away from the cluster, and eventually, the robot will maintain a certain distance from the cluster.

When both robots move, we can regard the right circle centered on \(p_{j}\) as robot j moving trajectory. From Eq. (7), we know that the distance between them will become constantly larger. So, we can conclude that the robot is also gradually moving away.

Theorem 2

A moving robot will be far away from another robot until the distance between them is larger than the sensing range,  i.e.,  the sensor state is always \(I=0,\) and the time for the whole dispersion process is bounded by \(\frac{2\pi n}{w_{0}}s,\)

$$\begin{aligned} n=\frac{d_{\textrm{max}}^{2}-d_{0}^{2}}{k}, \end{aligned}$$
(8)

where \(d_{0}\) is the initial value of \(\Vert p_{j}-c_{i}\Vert \) and \(d_{\textrm{max}}\) is the maximum value of the \(\Vert p_{j}-c_{i}\Vert .\) The square root of k means the positional change of the circular motion of the robot in each movement cycle. Next, we will prove the above formula and calculate the value of k.

Fig. 4
figure 4

A schematic diagram of the swarm robot self-organizing dispersion, a mobile robot i (a solid red line of small circles), and a static robot group (a solid black line of small circles). The robot rotates clockwise along a circular path centered on \(c_{i}\) (the solid red line) until robot i sees group robot j. The robot then turns clockwise along a circular path centered on \(o_{i}\) (green circle) until robot i does not see group robot j;  as a result of the movement of the robot, robot i has just started around the center of the circle of rotation from \(c_{i}\) to \(c_{i}^{\prime }.\) (At the beginning, the robot’s sensor i is directed to the right, in the horizontal direction, and the robot’s orientation represents the robot’s positive direction)

Proof

As shown in Fig. 4, let \(c_{i}=[0,0].\) Then, we can calculate \(d^{\prime }=\Vert p_{j}-c_{i}^{\prime }\Vert .\) In the beginning, the sensor of robot i is directed to the right in the horizontal direction and can see robot group j. Where \(\theta =\theta ^{\prime }.\) So we can obtain the following:

$$\begin{aligned} P_{j}= & {} \left[ \sqrt{d^{2}-(R-r_{j})^{2}},R-r_{j}\right] , \end{aligned}$$
(9)
$$\begin{aligned} d^{2}= & {} \delta _{t}^{2}+(R-r_{j})^{2},\quad \delta _{t}<\delta , \end{aligned}$$
(10)

where \(\delta _{t}\) is the distance between the sensor of robot i and another robot group j that was just discovered. \(\delta \) is the distance from the robot’s sensor to the discovered robot group j. The coordinates of \(c_{i}\) can be deduced from the geometry of Fig. 4:

$$\begin{aligned} c_{i}^{\prime }=[-(R-r_{z})\sin \theta ,R-r_{z}-(R-r_{z})\cos \theta ], \end{aligned}$$
(11)

where \(\theta \in (0,\pi /2).\) Let \(x=r_{z}\tan (\frac{\theta }{2}).\) Then, we can obtain the following:

$$\begin{aligned}&\frac{r_{j}}{\delta _{t}-x}=\tan \left( \frac{\theta }{2}\right) ,\\&r_{z}\tan ^{2}\frac{\theta }{2}-\delta _{t}\tan \frac{\theta }{2}+r_{j}=0,\\&\because \Delta =\delta _{t}^{2}-4r_{z}r_{j},\delta _{t}>(r_{z}+r_{j}),\\&\therefore \tan \left( \frac{\theta }{2}\right) =\frac{\delta _{t}\pm \sqrt{\delta _{t}^{2}-4r_{z}r_{j}}}{2r_{z}},\\&\because \tan \frac{\theta }{2}<1, \end{aligned}$$
$$\begin{aligned} \therefore \tan \left( \frac{\theta }{2}\right) = \frac{\delta _{t}-\sqrt{\delta _{t}^{2}-4r_{z}r_{j}}}{2r_{z}}, \end{aligned}$$
(12)

we can draw a conclusion from Eq. (12) that \(\theta \) and \(\delta _{t}\) are negatively related. Meanwhile, we can obtain through computing:

$$\begin{aligned} \sin \theta= & {} \frac{4r_{z}\left( \delta _{t}-\sqrt{\delta _{t}^{2}-4r_{z}r_{j}}\right) }{4r_{z}^{2} +\left( \delta _{t}-\sqrt{\delta _{t}^{2}-4r_{z}r_{j}}\right) ^{2}}, \end{aligned}$$
(13)
$$\begin{aligned} \cos \theta= & {} \frac{4r_{z}^{2}-\left( \delta _{t}-\sqrt{\delta _{t}^{2}-4r_{z}r_{j}}\right) ^{2}}{4r_{z}^{2} +\left( \delta _{t}-\sqrt{\delta _{t}^{2}-4r_{z}r_{j}}\right) ^{2}}. \end{aligned}$$
(14)

The result is brought into \(d^{\prime }=\Vert p_{j}-c_{i}^{\prime }\Vert ,\) and the following expression can be obtained:

$$\begin{aligned} d^{\prime 2}=((R-r_{z})\sin \theta +\delta _{t})^{2}+(r_{z}-r_{j}-(R-r_{z})\cos \theta )^{2}.\nonumber \\ \end{aligned}$$
(15)

Finally, by substituting Eqs. (10) and (15) into \(k=d^{\prime 2}-d^{2}\) and simplifying the resulting expression, we obtain:

$$\begin{aligned}{} & {} k=\nonumber \\{} & {} \quad \frac{-16Rr_{z}^{3}+16r_{z}^{4}+8R\delta _{t}r_{z}^{2}\beta -8\delta _{t}r_{z}^{2} \beta -16r_{j}r_{z}^{3}+16Rr_{j}r_{z}^{2}}{4r_{z}^{2}+\beta ^{2}},\nonumber \\ \end{aligned}$$
(16)

where \(\beta =\delta _{t}-\sqrt{\delta _{t}^{2}-4r_{z}r_{j}}.\) The value of k varies with the robot’s position, and k is minimum when \(\delta _{t}=\delta .\) \(\delta \) is the maximum value of \(\delta _{t},\) let \(\delta _{t}=\delta ,\) we can obtain the following equation:

$$\begin{aligned} d_{n+1}^2 \ge d_{n}^{2}+k. \end{aligned}$$
(17)

We obtain the following expression:

$$\begin{aligned} d_{n}^2\ge d_{0}^{2}+nk. \end{aligned}$$
(18)

So we can obtain the maximum value of n, which is given:

$$\begin{aligned} n=\frac{d_{\textrm{max}}^{2}-d_{0}^{2}}{k}. \end{aligned}$$
(19)

The above equation is based on one moving robot and one static robot. When two robots move, they spend less time in the dispersion process. Given n,  we can compute the upper bound of the time used by robot i and robot j.

Performance metrics

The problem that this paper focuses on is how to realize the uniform diffusion behavior of swarm robots in a two-dimensional unbounded environment. Therefore, it is necessary to pay attention to the two characteristics of the dispersion and the uniform distribution of the robot group in the diffusion process. For this reason, we propose two indicators, the dispersion metric and the uniformity metric, respectively.

Dispersion metric

We propose a dispersion metric to measure how dispersed a robot swarm is, which is measured by counting the distance of the entire robot swarm from the swarm center. When this metric is larger, it means that the distance between the individuals in the group and the center of the spatial distribution of the group is greater, specifically, the spatial distribution of the robot group tends to be more dispersed. The second moment of the robot’s expression is as follows:

$$\begin{aligned} U^{(t)}=\frac{1}{2nr}\sum ^{n}_{i=1}\Vert p^{(t)}_{i}-\bar{p}^{(t)}\Vert , \end{aligned}$$
(20)

where \(p^{(t)}_{i}\) represents the position of robot i at moment t\(\bar{p}_{i}=\dfrac{1}{n}\sum p_{i}\) represents the centroid of the positions of the robots, \(\Vert p_{j}-p_{i}\Vert \ge 2r,\) r represents the radius of the robot group, and the U can be normalized by 2nr.

The uniformity metric

As for the uniformity of the spatial distribution of a robot group during diffusion, we propose a uniformity metric, which is measured by computing the variance of the distance between each individual in the group and its nearest neighbor. When this metric is smaller, it means that the distance fluctuation between individual robots and their nearest neighbors in the group is smaller, specifically, the spatial distribution among robot groups tends to be more uniform. The metric of uniformity can be formally given below:

$$\begin{aligned} S^{(t)} = \frac{1}{4{\text {nr}}^2}\sum \limits _{i = 1}^n \Vert d^{(t)}_{{\textrm{nearest}},i}- {\overline{d}}^{(t)}\Vert ^2, \end{aligned}$$
(21)

where \(d_{{\textrm{nearest}},i}\) denotes the distance between robot i and its nearest neighbor, \(\bar{d}=\frac{1}{n}\sum _{i=1}^{n}d_{{\textrm{nearest}},i}.\) As with the dispersion metric, the S can be normalized by \(4n{r}^2.\)

Simulation results

We first used simulated e-puck robots to test the proposed dispersion controlling strategy’s effectiveness, efficiency, and scalability in two-dimensional space. We let each robot’s linear and angular velocity meet the requirement described in “Methods”. The robustness of the controller was tested by adding noise to the sensing and action sessions for environmental uncertainty and internal system uncertainty, respectively, and finally the scalability of the controller was tested through experiments with different numbers of robots.

Simulation platform

In particular, we used the ENKI simulator,Footnote 1 which is recommended by the official e-puck website as a fast 2D robot simulator. The ENKI simulator supports modeling the kinematics and dynamics of rigid objects. With the ASEBA modular architecture [50],Footnote 2 the ENKI simulator can quickly complete the simulation of hundreds of e-puck robots (Fig. 5).

Fig. 5
figure 5

256 e-puck robots in the ENKI simulator

The e-puck robot’s diameter and mass are approximately 7.0 cm and 150 g, respectively. The robot’s inter-wheel distance is 5.1 cm. The speed of each wheel could be set independently, and the maximal backward or forward speed is 12.8 cm/s along the ground. The line-of-sight sensor is simulated by casting a ray from the e-puck’s front and checking the first item with which it intersected (if any). The simulation step size is set to 0.05 s.

Since the controlling strategy was designed for any two-wheeled mobile robot, the controlling parameters are linear velocity \(\upsilon \) and angular velocity \(\omega .\) However, in the ENKI simulator, the controlling inputs of an e-puck should be velocities provided by left \((\upsilon _{l})\) and right \((\upsilon _{r})\) wheels, respectively. To apply our controlling strategies to simulated e-puck robots, we transfer \(\upsilon _{l}\) and \(\upsilon _{r}\) to \(\upsilon \) and \(\omega \) according to “Robot model”, as follows.

$$\begin{aligned} \upsilon _{r}= & {} \frac{2\upsilon +5.1\omega }{2}, \end{aligned}$$
(22)
$$\begin{aligned} \upsilon _{l}= & {} \frac{2\upsilon -5.1\omega }{2}, \end{aligned}$$
(23)
$$\begin{aligned} R= & {} 2.55\left( \frac{\upsilon _{r}+\upsilon _{l}}{\upsilon _{r}-\upsilon _{l}}\right) . \end{aligned}$$
(24)

Dispersion analysis

In this section, we conducted experiments to validate the effectiveness of the proposed controlling strategy for dispersion in “Controller strategy”. The parameters involved in this set of experiments can be given in terms of two-wheeled mobile robots and transferred to two-wheeled robot, as shown in Table 1.

In this experiments, 100 simulated e-puck robots are set in a \(7\,\text {m}\times 7\,\text {m}\) scene to test and analyze the proposed strategy, and a single simulation is set to 15,000 (simulation time is 750 s). 100 e-puck robots with a 35 cm sensing range are simulated here.

Table 1 Parameter settings for dispersion simulations

Figure 6 shows six snapshots of a particular simulation. It can be seen that the 100 e-puck robots successfully dispersed and an approximate uniform mesh (if each robot is seen as a vertex) is finally formed. The supplementary files can find the whole simulation video (sim_dispersion.mp4) playing at \(5\times \) normal speed.

Fig. 6
figure 6

A group of 100 e-puck robots, each executing the dispersion model, disperse into a uniform mesh and dynamically stable state. We used the ENKI simulator with a \(7\times 7\)-m simulation scene

Considering the fact that the dispersion metric should gradually increase during the dispersion process, Fig. 7 is given to demonstrate the dispersion dynamics from the perspective of the dispersion metric. The blue curve represents the variation of the dispersion metric as the robots disperse. As can be seen, the robot gradually disperses, eventually approaches the upper limit (red line), and remains at a relatively constant distance level.

Fig. 7
figure 7

The averaged dispersion dynamics of 10 independent simulations for dispersion, in each of which 100 robots are used. The horizontal axis represents the time t,  and the vertical axis represents the dispersion metric. The blue curves show the mean metric value, the red line is the upper bound of the dispersion metric, and the yellow line is the lower bound of the dispersion metric

From the uniformity perspective, Fig. 8 is given to analyze the uniformity of the robot distribution. It can be seen that the uniformity metric increase (indicates a worse uniform distribution) and decrease rapidly in the initial phase. The fluctuation is induced by the motion interference of the robots when the distances among them are not large enough. After that, when the distance becomes large enough such that no motion interference occurs, the robots’ distribution keeps stable at a low level.

Fig. 8
figure 8

The dispersion dynamics with \(n = 100\) robots. The horizontal and vertical axis represent the time t and the values of the uniformity metric, respectively. The blue curves show the mean measure across simulations; the red line is a fitted curve

The effect of the sensing range

In this subsection, we investigate the effect of different sensor ranges on the diffusion of robots. By setting different perception thresholds in the camera mounted on e-puck, we can set different sensing ranges for the robot.

Fig. 9
figure 9

The dispersion variation with the sensing range \(\delta \) increasing. The horizontal axis represents the sensing range \(\delta \) in both plots. The vertical axis represents the maximum dispersion metric of the robots in the certainty sensing range \(\delta .\) Each maximum dispersion is the average result that we selected from 10 simulation results with equal sensing range \(\delta \)

As shown in Fig. 9, the robot’s maximum diffusion metric increases with the sensor range’s increase. As mentioned in Theorem 2, the time spent on dispersion is bounded according to the sensing range. Thus, in the following experiments, we verified the sensing range of the robots to analyze the dispersion time. As shown in Fig. 10, the time used to form stable dispersion increases as the sensing range enlarges.

Fig. 10
figure 10

The time variation with the sensing range \(\delta \) increasing. The horizontal axis represents the sensing range \(\delta \) in both plots. The vertical axis represents the time to be stably uniform with certainty sensing range \(\delta .\) Each time, we selected the average result from 10 simulation results with equal sensing range \(\delta \)

The effect of the sensing noise

In this subsection, facing the effect of uncertainty from the environment, the performance of the controller proposed in this paper may be affected by environment constraints, obstacles, sensing noise, etc., and since the sensing noise is the main factor among them, we will analyze the effect of noise disturbing the sensory process of robots on the self-organized diffusion of robot group.

Since the proposed controller only requires each robot to be equipped with a binarization sensor, the whole process has only two states, \(I = 1\) and \(I = 0,\) where \(I = 0\) indicates that there are no other robots in the sensor range, which is not easy to be disturbed by the noise due to no change in the sensing information; while \(I = 1\) indicates that there are other robots in the sensor range, which is easy to receive noise interference due to change in the sensing information of the sensors. Therefore, we choose to add a kind of noise in the process of switching from \(I = 0\) to \(I = 1\) that will cause the robot to be unable to perceive other robots in front of its sensor.

In this experiment, we conducted 8 independent sets of experiments by adding \(\text {noise} \in \{0, P(0.1), P(0.2), \ldots , P(0.7)\}\) to the robot’s transition from \(I=0\) to \(I=1,\) where different values represent the probability that the robot’s transition from \(I=0\) to \(I=1\) is disturbed, e.g., when \( \text {noise} = P(0.3) \) is added, it indicates that there is a 30% probability that the robot misses the sensor other robots within range, specifically, the robot senses other robots with a 30% probability of not being able to transition from \(I = 0\) to \(I = 1.\)

10 independent runs were performed in each set of experiments, in which the parameters of the controllers were consistent with the “Dispersion analysis”, as described in Table 1. The results of the experiment are shown in Figs. 11 and 12.

Fig. 11
figure 11

Results on the dispersion metric from 8 sets of independent experiments at different noise interference intensities, where each curve is the average of 10 independently repeated experiments using 100 robots per simulation. The horizontal axis of the graph represents time t and the vertical axis represents the dispersion metric

Figures 11 and 12 represent that 100 robots executing the diffusion controller ultimately succeeded in achieving self-organized diffusion in varying time’s even though their sensors were subjected to different intensities of noise. As can be seen from Fig. 11, the time required for the robot to complete self-organized diffusion increases gradually and slowly as the intensity of the noise to which its sensors are exposed increases when \( P(\text {noise}) \le 0.5 .\) For \( P(\text {noise}) > 0.5 ,\) the time increases dramatically with the intensity of the noise to which the sensor is exposed. However, the dispersion metric of their final diffusion remains relatively stable.

From Fig. 12, it can be seen that as the noise intensity of the robot sensor increases, the uniformity of the robot’s final diffusion to the steady state can be maintained at a relatively stable result when \( P(\text {noise}) \le 0.5 ,\) but when \( P(\text {noise}) > 0.5 ,\) the uniformity metric of the robot swarm is difficult to converge to a stable and low value, which is gradually unsatisfactory.

Fig. 12
figure 12

The results on the uniformity measure from 8 sets of independent experiments under different noise interference intensities. Each curve is the result of averaging 10 independent repetitions of the experiments. In both plots, the horizontal axis represents the time t and the vertical axis represents the values of the uniformity metric

The effect of the action noise

In this subsection, facing the effect of uncertainty from within the system, the performance of the diffusion controller is mainly affected by the noise of the actuators. Since the proposed controller is oriented toward a two-wheeled mobile robot model, in this section we choose to add Gaussian noise in controlling the rotational speed of both wheels of the robot.

In this experiment, we conducted eight sets of independent experiments by adding \(\text {noise} \in \{0, N(0,0.8), N(0,1.2), N(0,1.6),\ldots , N(0,2.8)\}\) to the robot’s control of wheel rotation speeds, where the different values represent the intensity of the robot’s control of wheel rotation speeds being interfered by the noise, e.g., when adding \( \text {noise} = N( 0,0.8)\},\) it means that the two wheels of the robot are subjected to Gaussian noise with the parameter N(0, 0.8) during motion.

In each set of experiments, 10 independent runs were performed in which the parameters of the controllers were consistent with “Dispersion analysis” as described in Table 1.

Figures 13 and 14 show that 100 robots executing the diffusion controller are disturbed by Gaussian noise of different intensities during their motions, and all of them eventually succeed in achieving self-organized diffusion at different times.

Fig. 13
figure 13

Results on the dispersion metric from 8 sets of independent experiments at different noise interference intensities, where each curve is the average of 10 independently repeated experiments using 100 robots per simulation. The horizontal axis of the graph represents time t and the vertical axis represents the dispersion metric

From the Fig. 13, it can be seen that the time required for the robot to achieve self-organized diffusion increases gradually and slowly as the intensity of the noise to which the motion is subjected increases. However, the dispersion metric of its final diffusion remains relatively stable. As seen in Fig. 14, as the intensity of the noise to which the robot is subjected in its motion increases, the uniformity of the robot’s eventual diffusion to the steady state can be maintained at a relatively stable result when \(\text {noise} \le N(0,2),\) but when \(\text {noise} > N(0,2),\) the robot’s swarm’s uniformity metric is difficult to converge to a stable low value.

Fig. 14
figure 14

The results on the uniformity measure from 8 sets of independent experiments under different noise interference intensities. Each curve is the result of averaging 10 independent repetitions of the experiments. In both plots, the horizontal axis represents the time t and the vertical axis represents the values of the uniformity metric

Scalability

To study the scalability of the proposed algorithm, the proposed diffusion controlling strategies were tested by the controller by increasing the number of robots. We conducted 10 independent simulations for each value of \(n\in \{50,100,150,\ldots ,500\}.\) For each run of dispersion, we only changed the initial distribution of the diffusion experiments.

According to the experimental results, with the proposed strategies, up to 500 robots succeeded in diffusing to a uniform distribution. Figure 15 shows that the time to achieve the uniform diffusion task increases with the number of robots.

Fig. 15
figure 15

The task time for diffusion with different numbers of robots

We conduct a special simulation to verify the effectiveness of dispersion when the scale of the robot swarm is huge. The number of simulated e-puck in this simulation is 1024. The snapshots are shown in Fig. 16, and the corresponding simulation video can be found in the supplementary files. It can be seen that the proposed self-organized controllers for dispersion work effectively with highly large-scale robot swarms.

Fig. 16
figure 16

Snapshots of 1024 simulated e-puck robots for dispersion

Physical experiments

To test and verify the feasibility of the proposed controller, we conduct physical experiments using the SwarmBang robotic system.

Physical platform

As shown in the Fig. 17, the SwarmBang robotic system consists of SwarmBang robots, motion capture cameras, and computing and data processing equipment.

First, we use the motion capture system to track the robot’s position and heading, and then broadcast the robot’s global information to all robots through the 2.4G RF module through a customized communication protocol, and finally, each robot makes its own decision based on the local information extracted from the global information. The SwarmBang robotic system is a pseudo-distributed structure, which adopts centralized perception and decentralized decision-making, and can flexibly use swarm robots to conduct extensive experiments.

Fig. 17
figure 17

The SwarmBang robotic system. The experiments were conducted in a \(6\,\text {m}\times 6\,\text {m}\) area with the origin point in the center

The SwarmBang robot is a differential wheel driven mobile robot \((6\,\text {cm}\times 6\,\text {cm}\times 6\,\text {cm}),\) see Fig. 18. To prevent collusion between the robots, each is encased in a white circular shell. The speed of each wheel can be set independently, with a maximum speed of 2.4 cm/s, forward or backward. Four markers for the motion capture camera to obtain position and heading are fixed to the top.

Fig. 18
figure 18

The SwarmBang robot is encased in a white circular shell

Experimental demonstration

To conduct the experiment for dispersion, the \(\nu \) and \(\omega \) were set to 1 cm/s, 0.17 rad/s, respectively, for \(I=0;\) whereas, they were set to 1 cm/s and 0.33 rad/s, respectively, for \(I=1.\) The sensing range was set to 60 cm. Figure 19 shows six snapshots taken at different moments through the dispersion process. The supplementary files can find the whole simulation video (physical_dispersion.mp4) playing at \(30\times \) normal speed.

Fig. 19
figure 19

Snapshots of physical experiments for dispersion

The experiment starts with the 30 SwarmBang robots gathered at the center. As the robots begin to disperse, the distance between every two robots gradually increases. Eventually, the sensor range set by the dispersion strategy and the uniformity metric of the robots decreases to a low level. After about 1000 s, the robots stop dispersing and remain dynamically stable.

The diffusion trajectories are shown in Figs. 20 and 21 is given to demonstrate the dispersion dynamics from the perspective of dispersion metric.

Fig. 20
figure 20

The trajectories of 30 SwarmBang robots diffusion process. Each curve represents the trajectory of a SwarmBang robot, and the color on the color bar from blue to red indicates the experiment time from 0 to 1000 s

Fig. 21
figure 21

The curve of dispersion metric under physical experiment. The blue curve indicates the dispersion metric of 30 SwarmBang robots in the experiment, and the red line is a fitted curve

Conclusions

The attractive characteristics of SRS, including adaptability, scalability, and robustness, indicate a bright future for this technique in many real-world applications. Aiming at controlling a large number of low-cost robots, in this paper, a minimalistic controller has been proposed for a swarm of two-wheeled mobile robots inspired by the motions of the algae system to achieve self-organized dispersion. Although the controller is very simple, that is, each robot moves in a forward circular motion with two different radii, it has been proven that dispersion controller can achieve their goals with upper bound limits.

To investigate the effectiveness of the proposed controller, a dispersion metric has been adopted to measure the diffusion process, and a uniformity metric has been proposed to measure the uniformity in the dispersion process. A ENKI simulator with simulated e-puck robots was used to conduct simulations. According to the simulation results, the two-wheeled mobile robots can uniformly disperse shortly after the start. In addition, the dispersion metric gradually increases to a steady value, which means the distance between every two robots reaches an upper bound. The good robustness of the controller is verified by adding different intensities of noise to the sensing and action sessions. Moreover, the scalability of the proposed controller has been validated using up to 1024 simulated e-puck robots. In addition to the simulation, diffusion experiments with 30 physical SwarmBang robots were carried out to demonstrate the technique’s effectiveness.

Themes for future work may focus on the obstacles or constrained environments, the predictability of diffusion outcomes, and the uncertainties that exist within environments and systems not considered in this paper.