Obstacle avoidance of a wheeled robotic swarm using virtual spring-damper mesh

Swarm robotics, in which groups of robots coordinate to achieve a common goal, has the potential to revolutionize a wide range of industries. However, one of the key challenges in developing effective swarm systems is enabling the robots to navigate around obstacles while maintaining cohesion. In this article, the problem of trajectory tracking for a self-organized swarm of wheeled robots in the shape of a regular polygon operating in an environment with obstacles is addressed. The goal is for the swarm to follow a reference point by the geometric center of the swarm, while avoiding collision with obstacles and maintaining a given distance between neighboring robots and the reference point. To solve this problem, a method based on virtual forces that act on each individual robot in the swarm is proposed. These virtual forces are derived from virtual spring-damper connections acting from the obstacles, adjacent robots, and the reference point. The virtual forces allow the robots to dynamically adjust their trajectories to avoid obstacles and maintain the shape of the swarm. The proposed approach is evaluated through simulation and experiment with a swarm of two-wheeled robots. During the experiment the maximum deviation of inter-robot distances was equal to 0.08 m. With the set limit distance to obstacles equal to 0.2 m, from which virtual forces start to push the robot away from the edge of the obstacle, the shortest distance to obstacles was 0.11 m. The results demonstrate the effectiveness of the method in enabling the swarm to accurately follow the reference point while avoiding obstacles and maintaining the desired distances between robots. Overall, the approach represents a step forward in the development of virtual force-based algorithms for obstacle avoidance in swarm robotics.


Introduction
Obstacle avoidance allows robots to navigate around unexpected obstacles during movement, rather than following a predetermined static path like in the path planning process.Controlling a swarm of robots adds complexity to the problem, as the swarm must not only avoid obstacles, but also maintain cohesion and perform the assigned task, such as reaching a specific point.This involves robots maintaining a set distance from each other and moving in a coordinated way along a given trajectory or toward a designated point.Some early methods for obstacle avoidance are based on nature and involve moving directly toward a goal until an obstacle is encountered, at which point the obstacle is circumnavigated until the goal can be pursued again.One of these methods is known as bug algorithm [1].It can result in long trajectories and close proximity to obstacles.Other methods for swarm control are drawn from classical techniques used for single robot control, including graph theory [2,3], Voronoi diagrams [4], and most commonly used artificial potential fields [5][6][7].Advanced methods for obstacle avoidance include fuzzy logic techniques [8,9], genetic algorithms [10,11], neural networks [12,13], and other artificial intelligence approaches [14,15].In practical applications, such as with mobile robots, obstacle avoidance must be considered if an obstacle is detected on the trajectory of the vehicle.Fuzzy logic can be used to define user-friendly robot control rules, which greatly simplifies the mathematical description of the robot control.The genetic algorithms can automate the selection of the right parameters in the swarm control law.Most genetic algorithms are often offline methods, which is caused by high computational complexity.Algorithms are often limited to adapting the control to a specific environment, which can affect the robot's ability to avoid obstacles in a non-simulated environment.Neural networks can be utilized to recognize obstacles in the environment and control the speed of the robot to guide it to its destination.
In the field of swarm robotics, control methods for coordinating the movement of robots are commonly based on the concept of Virtual Physics [16], which is related to the method of virtual potential fields.The aim is to ensure that the robots maintain a specific distance between each other, while moving in a coordinated manner along a given trajectory or toward a desired point.To achieve this, in case of the method of artificial potential fields, the virtual forces acting on the robot are calculated from the resultant virtual potential field in which the robot is located.The environment of the robots is modeled as a sum of virtual potential fields from obstacles, other robots, and the goals of individual robots and the swarm.In this article, a different approach to calculate virtual forces is presented.The virtual forces are the result of virtual spring-damper connections between robots, obstacles, and a reference point.The presented method solves the problem of swarm trajectory tracking in an environment with obstacles, after the swarm has self-organized into the shape of a regular polygon.Tracking control of a swarm is understood as following a given trajectory of the reference point by the swarm's geometric center.The reference point's path is a straight line between two obstacles with velocity profile as a trapezoidal curve, with acceleration and deceleration stages approximated by sigmoidal functions.The robots have to avoid collisions with two polygons spaced apart at a distance of 0.7 times the swarm diameter after self-organization.Due to sensor limitations, each robot can only determine the location of its neighboring robots, while the position of the reference point is known to all robots.The article is structured in 5 sections.In Sect. 1, a comprehensive review of the relevant literature and a clear explanation of the problem under study are presented.The description of the kinematic and dynamic equations for two-wheeled robots in a swarm, along with a thorough explanation of the swarm control method, is presented in Sect. 2. In Sect.3, the details of the simulation and experimental setup, including the assumptions and parameters adopted for the swarm are shown.Section 4 presents and compares the results of the research, which is followed by a discussion.Finally, Sect. 5 provides a summary of the research and the main findings of the article.

Methods
This section provides a full description of swarm control.The section begins with a description of the kinematics and dynamics of a two-wheeled robot.Next, the details of the E Fig. 1 The schematics of the i-th wheeled robot in the swarm of robots swarm trajectory algorithm and the relationship between the virtual forces and robots kinematic parameters are given.The description consists of definitions of virtual forces and deformations of virtual springs.The equations of the control signals of the i-th robot were derived, and the concept of the "geometric center of the swarm" was introduced.The section ends with a detailed swarm control scheme with its description.

Single robot model
The swarm consists of 5 two-wheeled robots with two spherical support wheels.As shown in Fig. 1, each robot has two drive modules marked as 1 and 2 with wheels whose geometric centers marked as points B and C. The center of gravity of the robot is at point S i on the robot's frame 3. The point S i lies on the axis of symmetry of the driving wheels at a distance d from the center of the robot's driving axis.The angles of rotation of the wheels are marked as α 1i and α 2i .Point D is the instantaneous frame rotation center around which the robot's instantaneous frame rotation angle β i is determined.The point A i , shown in Fig. 1, is the geometric center of the i-th robot.It moves with velocity v Ai and has coordinates (x Ai , y Ai ) in the fixed x, y coordinate system.It is assumed that the robots move on a flat surface without skidding.
The i-th robot follows a given trajectory expressed as a function of the angular velocities of the driving wheels α1i and α2i .The angular velocities of the robot's driving wheels are the robot configuration coordinates which are determined from the following equations: as well as equations: ( The robot's angular velocities of driving wheels are denoted by α1i , α2i .The robot's driving wheels are spaced 2L apart and have radius r .Robot kinematic parameters are α 1i , α 2i , α1i , α2i .The dynamic equations for the motion of a two-wheeled robot are described in [17].The presented model of the i-th robot is extended with the dynamics of DC motors with a gearbox [18].Dynamic equations for a mobile robot will have the form: The vectors and matrices in Eq. ( 3) are as follows: vector of generalized coordinates q Mi = [α 1i , α 2i ] T , inertia matrix M, vector of centrifugal and Coriolis forces C( qMi ) qMi , vector of friction forces F( qMi ) and control inputs of the i-th robot (driving torques of wheels in function of voltage) Proper grouping of the matrix elements M, C( qMi ) and vector F( qMi ) will result in: The variables u 1i and u 2i are the normalized control signals, K M is the torque constant, r k is the gear ratio for k-th drive module, and J k1 ,J k2 are the mass moments of inertia of the k-th module.The vector of the parameters a = [a 1 , a 2 , a 3 , a 4 , a 5 , a 6 ] T results from the expansion of the dynamics equations.The process of parametric identification of the robot model was carried out using the nonlinear least squares method.The obtained values of unknown parameters were: a = [7.3125× 10 −5 , 8.97 × 10 −9 , 5.543 × 10 −6 , 0.0126, 0.917, 0.917] and B 1 = 3.01 × 10 −5 , B 2 = 3.37 × 10 −5 The value of the gear ratio r k is known from the documentation [19], while V max is the maximum voltage that can be provided by the robot's power supply.Based on the geometry of the robot and the motor documentation, other parame-ters can be defined as: The presented model is used in the simulation.

Swarm trajectory tracking algorithm
The main goal of robots is to follow a reference point at a certain distance, maintain a given distance to the nearest neighboring robots and avoid collisions with obstacles by moving away from them further than the set minimum distance.A given robots trajectory is defined for the virtual reference point, the initial position of which is selected by the swarm operator.The robots that are closest to their neighboring robots are considered the j-th robots within the sensory range of the i-th robot.Robots know predefined coordinates of a moving reference point.The behavior of one single robot under the influence of virtual forces can be described in the following way.The center of the driving axis A i of the i-th robot in the swarm is influenced by a virtual force derived from the starting point of the resultant force W, moving at the velocity v w .The W i point is the point from which the virtual force F i W acts on the i-th robot.The robot is placed in the fixed x, y coordinate system at a distance r i from the point (0, 0).At point A, the local movable coordinate system p, q is attached, where the p axis is directed to the front of the robot and the q axis coincides with the drive axis of the robot (Fig. 2).
Virtual force F i W is the vector sum of virtual forces from neighboring robots and the reference point.The robots are to reach the point W i that is at the distance r i W from the point A i .The closer the distance from the point A i to the point W i , the closer to zero is the vector sum of the virtual forces acting on the i-th robot.The angle of inclination of the robot frame to the x axis is β i , and the center of the drive axis of the i-th robot moves at the velocity v Ai .
Fig. 2 The resultant virtual force acting on the i-th robot in the virtual force field The value of the vector of the resultant force acting on the i-th robot is defined as: The virtual force F i W has two parameters, the spring constant of the virtual resultant spring k i W > 0 and the damping constant of the virtual resultant damper c i W > 0. The virtual spring has a virtual deformation denoted by e i W .In order for the robot to move in the direction of the resultant force to its source, the velocity vector of the point A i must have the direction of the resultant vector of virtual forces, therefore the following relationship must be fulfilled: The angle ψ i W between the vectors F i W and dV i will approach zero if the vector of the instantaneous velocity of the robot's frame is proportional and opposite to the vector product ( 6) [20]: By eliminating the vector product, the value of the desired angular velocity β id in relation to the x and y projections F i W x and F i W y of the force F i W will take the form: The values of the projections of virtual forces on the x and y axes are determined from the rotation equation of the p and q coordinate system: The projections of virtual force F i W on the p and q axes (F i W p , F i W q ) can be derived from Fig. 2 as follows: Assuming that: By inserting the relationships from Eq. ( 12) into Eq.( 8), the general form of the desired angular velocity of the robot frame will take the form: Using Eq. ( 11), the value of the desired angular velocity of the robot frame will be: Assuming that the acceleration of the robot is proportional to the projection of the vector F i W on the p axis (10), the desired acceleration of the i-th robot a id can be expressed as: By integrating Eq. ( 15), the desired velocity of the point A i , (v id ), will be: Knowing that v id = u vi and β id = u βi , after writing out the equation of virtual resultant force (5) in Eqs.(16,14), we will get: The robots determine their own u vi and u βi controls based on their knowledge of the positions and velocities of neighboring robots and a reference point.The obtained values of the control signals are used to determine the desired trajectory to be followed by the i-th robot.The position of the i-th robot in relation to the j-th robot and to the moving reference point in the presence of an obstacle is shown in Fig. 3.The i-th robot is described in relation to the same coordinate systems as in Fig. 2. The j-th robot, point O io and point P are a distance r i j ,r io ,r i p from the point A i , respectively.
It is difficult to calculate the value of the resultant spring deformation e i W , therefore it is necessary to decompose the resultant force vector F i W into its components.Those components are the virtual forces from neighboring robots, the reference point and obstacles.The virtual forces and the distances between the i-th robot and adjacent j-th robots and the reference point and the obstacle O are related to each other and their relation is described as follows: the i-th robot is affected by virtual forces from virtual spring-damping connections between the nearest robots F i j (between the centers of the robot's drive axes i and j), obstacles F io (between the center of the drive axis of the i-th robot and the nearest point O io on the edge of the obstacle O) and the reference point F i p .The vectors of virtual forces are described by the equations: The vectors F i j and F i p point in the direction of the unit vectors δ i j ,δ i p that come from the center of the drive axis of the i-th robot A i to the center of the drive axis of the nearest adjacent j-th robot A j and to the reference point P, respectively (Fig. 3).The virtual forces F i j and F i p are proportional to the virtual spring deformation e i j , e i p and their derivatives.The virtual deformations e i j and e i p are calculated between the i-th and j-th robots and between the i-th robot and point A, respectively.
The values of the virtual component forces are: Equations ( 21) and ( 22) describe the virtual forces from the spring and dampers.There are two types of constants, the spring constant of the virtual spring k i j and the damping constant c i j of the virtual damper between the i-th robot and the closest j-th robot.Similar constants are for the reference point P, i.e., k i p and c i p .
The values of the virtual deformation e i j and e i p are expressed by the following equations: The virtual deformations are calculated knowing the x and y coordinates of the centers of the robots i, j (x Ai , y Ai ) and (x A j , y A j ) and the coordinates of the reference point (x p and y p ).The resting lengths of virtual springs are denoted as l i j > 0 for the spring between the i-th robot and the j-th robot and l i p > 0 for the spring between the i-th robot and the reference point P. The virtual force vector F io is described by the equation: The vector e io is the virtual spring deformation between the i-th robot and point O io .The unit vector δ io is directed from the center of the drive axis of the i-th robot A i to the nearest point O io on the o-th obstacle (Fig. 3).The value of F io virtual force is given by the formula: Similarly to Eqs. (21,22) the virtual force F io has two constants, virtual spring constant k io and virtual damper constant c io between the i-th robot and the obstacle O.
The value of the virtual deformation e io expresses the relationship: The coordinates (x Ai , y Ai ) and (x io , y io ) are x and y coordinates of the robot's driving axis center and coordinates of the nearest point on the o-th obstacle closest to i-th robot, respectively.The constant l io is the resting length of the virtual spring between the point A i of the i-th robot and the point O io on the obstacle (so called limit distance).For robots to be pushed away from obstacles, the force between the robots and the obstacles F io must satisfy the inequality: The i-th robot is influenced by virtual forces from the closest neighboring robots in the swarm, from the nearest obstacles in the sensory range and from the reference point.Moreover, it is assumed that the obstacles do not limit the sensory range of the robot, i.e., the robots' sensors are not obstructed by obstacles.Given that the virtual force F i W is the vector sum of F i j ,F i p and F io we can replace the projections of F i W in Eqs.(14,16) with the corresponding projections of vectors F i j ,F i p and F io .Therefore, the velocity values of the given robots will be calculated from the following equations: The velocity profile of the P point is a modified trapezoidal profile expressed by the formula: The v pmax is the maximum velocity of point P (velocity in steady motion), c 1/s is the coefficient affecting the velocity change during acceleration and deceleration of point P, b s and b1 s are the coefficients describing the appropriate mean time of accelerating and braking.Time t s is the current value of the simulation/experiment time.
In order to be able to define the shape of the swarm by specifying the given inter-robot distances, it was assumed that the i-th robot is influenced by virtual forces only from the closest neighboring robots in the swarm and from the reference point.
The range of sensors (SR) is limited to the following inequalities: The inequality (32) can be illustrated in the case of a swarm without obstacles and without a point of reference.The forces acting on the robots will be in equilibrium when the robots are be spaced at the given distance l i j creating a mesh made of equilateral triangles.This is the case when the robot is influenced by virtual forces coming only from the closest neighboring robots (Fig. 4).The geometric center of the swarm T (x t , y t ) is introduced as a quality indicator of the swarm's trajectory tracking and is expressed by the equation: the velocity of the swarm's geometric center is: where i is the robot number and n is the total number of robots.
If the geometric center of the swarm coincides with the reference point during its movement, the trajectory tracking can be considered successful.Any deviation from this would be considered as a trajectory tracking error.
To summarize, the swarm control presented in this article is shown in Fig. 5 and can be described in the following way.
The desired trajectory of the i-th robot is realized by the tracking control algorithm.Due to the simple construction of the robot and the high computational complexity of the algorithm for generating the desired trajectory, the PD controller ("PD" block) was used as the trajectory tracking controller of the robot (Fig. 5).The controller gains were selected experimentally.The values of the proportional (k p ) and derivative (k d ) gain constants of the PD controller were selected as k p = 0.113 and k d = 0.046.Integrating the dynamic equation of motion (3) of a mobile wheeled robot (block "WMR"), the kinematic parameters were determined: α 1i , α 2i , α1i and α2i for the i-th robot, which on the basis of the Eq. ( 2) allows for calculation the velocity projections of the point A i ẋ Ai and ẏAi and angular velocity βi ("WMR position determination" block).The knowledge of these kinematic parameters and initial conditions enables the determination of the coordinates of the A i points and the orientation angles of the β i frames of all robots.The values of the position of the point P, i.e., x p and y p are determined on the basis of the values of the velocity projections of the point P, i.e., ẋ p and ẏp .With the kinematic parameters of the robots and knowledge of the coordinates of the reference point, based on Eqs.(23,24) the distances between the robots e i j , the robots and the reference point e i p were determined.The robots determine the position O io of the nearest point on obstacles within the range of their sensors by determining the end point of the shortest distance to the detected part of the obstacle.The angles between the virtual force vectors F i j and F i p and the p axis, i.e.. ψ i j and ψ i p and their derivatives are calculated ("distance and orientation determination" block).With knowledge of the distances, angles, and their derivatives, the controls u vi and u βi can be determined using Eqs.(29, 30) ("controls determination" block).Based on Eqs.(1) ("kinematics equation" block) and (2) ("set trajectory" block), the set trajectory for the i-th robot is determined.
The used notations have the following meaning: subscript ( ) d means the set (desired) values, whereas i = [ 1i , 2i ] is an error vector determined from the dependence 1i,2i = α 1id,2id − α 1i,2i .The control signals u 1i and u 2i come from the PD controller and are determined from the relationship: The PD controller gains were selected during a test where the robot had to follow the desired trajectory.The path to follow was a straight-loop-straight curve with a trapezoidal velocity profile of the robot's geometric center.The goal was to find the PD gains that would make the robot position difference less than 1 mm.In case of the chosen gains, the difference was 0.15 mm.The difference was calculated based on encoder measurements.It is possible to find the initial values of k p and k d for the linearized i-th model of the robot and its step response using the PID tuner available in Simulink.These initial values were the basis for finding the correct regulator gains during the experiment.The linearized model was assumed as a differential equation of the secondorder with constant coefficients.The coefficients were chosen using Matlab System Identification.First, k p was lowered to limit robot response oscillation and overshoot.Second, k d was increased to further limit response oscillations if necessary.The correction had to be small to avoid numerical instability.Then, if oscillation is no longer a problem, k p can be increased for faster robot response.This procedure can be repeated, or it can be used for different starting values of the controller gains.

Simulation and experiment setup
The presented swarm control method was tested numerically and experimentally.The simulation was performed using the Matlab/Simulink software, and it was verified experimentally using Motion Capture System, taking into account the behavior of the swarm of two-wheeled robots.
The simulation and experiment concern a swarm of 5 robots which, after the process of self-organization around the reference point P = 0.7,0 m, follows the moving reference point along a given trajectory in the environment with obstacles.The reference point moves along the straight line with the length of 1.4 m at the velocity v pmax = 0.02 m/s with a trapezoidal profile reaching the position [− 0.7,0] m.The velocity profile coefficients are: b = 8.3 s, b1 = 78.2s, c = 5 1/s.Obstacles are rectangles diagonally spaced apart at a distance equal to 0.7 of the diameter of the circle described on the shape of a swarm after self-organization.The robots' task is to achieve and maintain the set distance from each other (l i j ) and the reference point (l i p ) and to avoid collisions with obstacles, knowing the limit distance to the obstacles (l io ).The Motion Capture System was used to verify the simulation tests.The arena used for experimental research and testing algorithms for controlling a swarm or a group of wheeled robots consists of two systems: a vision system and a wireless communication system with robots.Motion Capture [21] is a technology used for determination of the position and tracking the movement of markers that reflect or generate infrared light.The technology is based on a vision system consisting of more than three infrared cameras.The experimental research presented in the paper was carried out on a research arena thanks to participation in the TerriNet (The European Robotics Research Infrastructure Network) project organized by the Federal University of Technology in Lausanne.
The arena (Fig. 6a) was equipped with infrared cameras enabling the determination of the position of passive markers placed on the robot (Fig. 6b) with an accuracy of 0.15 mm while maintaining 350 frames per second.
The simulation and experiment parameters are presented in Table 1, while the initial positions of points A i and the  2 and in Fig. 7.
The coordinates of the obstacle corners are shown in Table 3.

Results
The task of the swarm tracking control in the environment with obstacles is aimed at the movement of the swarm in the shape of a polygon along a given trajectory, keeping its shape and avoiding the obstacles.The reference point moves in accordance with a given trajectory, e.g., along a straight line, along a loop, etc.The task of the swarm is to move in such a way that during the movement the geometric center of the swarm coincides with the moving reference point.The reference point can be understood as a common known point, relative to which the robots maintain a given distance.The values of elasticity coefficients and damping of the virtual spring-damper connections as well as the values of the λ 1 and λ 2 parameters are selected experimentally.
If it is assumed that the deformations of the virtual spring are similar in nature to the error of a PD controller, an example of a method for selecting appropriate swarm control parameters can be taken from PD controller tuning methods.The procedure for selecting these parameters firstly requires setting the value of λ 2 to 1.This parameter can be used to increase or decrease the velocity of the robots if the velocity of the swarm movement is not satisfactory.The parameter λ 1 should be set to a value that is an order of magnitude higher than λ 2 to prioritize direction changes toward the point W i over the movement toward it.The spring-damper coefficient values should then be made equal, with small values below 1, to ensure stability of control.Next, in a series of simulations, the damping coefficient values should be increased to limit oscillating motion in the robots, and the spring coefficient values should be adjusted so that the deformation value is close to zero.The most challenging aspect of the tuning process is choosing the correct values of the spring-damper coefficients to prevent collisions with obstacles.This can be done by increasing the values of the obstacle virtual force F io parameters or by decreasing the velocity of the robots (lower value of λ 2 ).The article does not provide a formal stability proof for the swarm control, so an experimental tuning method must be used to determine the appropriate parameters.

Simulation
In this subsection, the simulation results in form of plots are presented.First of all, the robot paths with four positions in time were presented to illustrate the movement of the swarm between obstacles in Fig. 8.In addition, the plots of the distances between the robots each other, and between the robots and obstacles are presented in Figs. 9, 10, 11 and 12.Then, a comparison of the coordinates and paths of the geometric center of the swarm and the reference point is presented in Figs.13a and 13b and 14.The last Fig.15a and Fig. 15b shows the x,y projections of the swarm's geometric center and the reference point.Those are the tracking quality indicators of the desired trajectory followed by the swarm.Due to the introduced sensory disturbances, all plots except for Fig. 8 show the plots every twentieth sample.For the sake of clarity of the graphs, the data from 3 out of 5 robots are presented.The other two robots behaved similarly to the presented robots.Their responses were similar in magnitude and shape; therefore, they do not add value to the following analysis.
The paths of the robots (Fig. 8) indicate that the robots are correctly avoiding obstacles.The robots did not collide with each other, even if their paths overlapped.The robots were in the same place, but at different times.On the basis of the shape of the robot paths and the plots of the distances between the robots (Fig. 9), it can be concluded that the greatest deformation of the swarm occurred between the obstacles.Despite the deformations of the swarm's shape, the final shape took the form of a regular pentagon.The plot of the robot paths shows the change in the positions of the robots in the final shape of the swarm compared to the initial shape.The swarm's rotation results from the action of virtual forces tangent to the swarm's shape on the robots.
The distances between robots and obstacles show when the obstacle was in the robot's sensor range.In the case of robot 1 (Fig. 10), obstacle 1 was in the sensor range in 28 s and left the sensor range in 40 s.This is a consequence of the robot's position change due to virtual forces other than the virtual force from obstacle.In the case of obstacle 2, the robot crossed the limit distance, this time by 0.05 m, while from 68 s the distance from the obstacle was more than 0.2 m.
Similar graphs of the distances between the other robots and obstacles are shown in Fig. 11 for obstacle 1 and Fig. 12 for obstacle 2.
Figures 13a, 13b, 15a and 15b illustrate the geometrical parameters of the swarm movement.
The position coordinates (Figs.13a and b) and the geometric center velocities (Figs.15a and b) oscillate around the set values.Due to the presence of obstacles in the swarm's path, the swarm is deformed, which is visible on the plots of the coordinates of the geometric center.The swarm has to alter its path to avoid collision with obstacles (Fig. 14).The differences in the values of the coordinates on the x-and y-axis are close to each other and do not exceed 0.08 m.The largest differences in the values of the coordinates and the velocity of the swarm's geometric center and the reference point are visible in [20-45 s] and [55-80 s].During these time intervals, the greatest number of robots was subjected to repulsive forces from obstacles.This resulted in a correction of the position of the robots in relation to the reference point, and thus a change in the velocity and position of the geometric center of the swarm.

Experiment
In this subsection, the experiment results in form of plots are presented.The plots are for the same variables as in the simulation.The presented results are for robot paths (Fig. 16), the distances between robots and between robots and the obstacles (Figs.17, 18, 19 and 20) and the comparison of the swarm geometric center to the reference point (Figs.21a,  b, 23a and 23b).
The experiment was carried out for the same values of swarm parameters as in the simulation.Due to the introduced sensory disturbances, all plots except for Fig. 16 show the plots every twentieth sample.For the sake of clarity of the graphs, the plots of 3 out of 5 robots are presented in the simulations.
Similarly to the simulation (Fig. 8), the paths of the robots in Fig. 16 show that the robots are avoiding collisions with obstacles.As expected, the biggest deformation of the swarm shape was between the obstacles.After the robots moved   away from the obstacles, the swarm took shape of a regular pentagon.Due to the presence of obstacles the distances between robots (Fig. 17) differ from the set values.Only after the swarm moves out of the influence of virtual forces from obstacles, the inter-robot distances as well as the distance robot-reference point come close to the desired values.The obtained final shape of the swarm differs from the initial shape in positioning of the robots in the swarm.During the movement of the swarm in the simulation and experiment, the action of virtual forces tangent to the swarm's shape on the robots causes the swarm to rotate.Figure 16 shows that the virtual forces from obstacle 1 changed the swarm shape from the polygon in 20th s into an arc in 30th s.After passing around obstacle 1, the swarm shape returned into the polygon shape in 60th s.Avoiding obstacle 1, robot 1 had to stop in the 20th s, causing it to lag behind the other robots.Slowing  The distances between robot 1 and the obstacles (Fig. 18) show that the robot moved beyond the limit distance to obstacle 2. Same behavior can be observed in case of the other robots as shown in Fig. 19 and Fig. 20.When the robot crosses the limit distance, the repulsive force from the obstacle starts acting on the robot (see Eq. 28).The robots did not collide with obstacles, which means that the virtual force io parameters are appropriate for this example.
Figures 21a, b, 23a and b illustrate the geometrical parameters of the swarm movement.
Similarly to the simulation, the position coordinates (Figs.21a and b) and the geometric center velocities (Figs.23a and b) oscillate around the set values.The plots of the coordinates of the geometric center of the swarm show that the shape of the swarm is deformed.Similarly to the simulation the swarm changes its path (Fig. 22) to avoid collision with obstacles.The difference in the values of the coordinates on the x axis does not exceed 0.015 m, while on the y axis it is less than 0.1 m.Likewise in the simulation, the greatest divergences appear when the swarm comes near the obstacles and is subjected to the virtual forces from them.This affects the value of the velocity and the geometric position of the swarm center.The results of the simulation and the experiment show that as a result of the virtual forces coming from the obstacles, the distance differences increase to 0.08 m for the inter-robot distances.The shortest distance recorded was the distance between point A i of robot 4 and obstacle 1 which was 0.11 m.Despite the resulting deformations of the swarm's shape, the swarm moved between the obstacles, reaching its final position, forming a shape close to the desired one.The projections of velocity and coordinates of the geometric center and the reference point differ in shape from each other, which is caused by the deformation of the swarm's shape.There are differences in the shapes of the graphs from the simulation and the experiment.These differences result from slight variations in the deformations of the virtual springs that accumulate over time due to small inaccuracies in the model parameters of the swarm.When comparing the graphs of inter-robot distances from the simulation (Fig. 9) to those from the experiment (Fig. 17), it can be seen that the distances start to deviate from 5 s.These small changes in the positions of the robots lead to different values of virtual forces, which in turn cause larger differences in inter-robot distances between the simulation and the experiment.However, it is worth noting that the overall behavior of the swarm remains the same and the differences are of a similar magnitude.The swarm maintains its shape while moving between obstacles without collisions.More experimental tests were made with the same parameters and obstacles positions in order to prove the swarm control efficiency.A slight change in the orientation or position of the robots at the start resulted in a noticeable change in the path of the robots, but without colliding with obstacles.The experiments were also carried out with different positions of obstacles.It can be noted that with the appropriate selection of parameters, collisions with obstacles can be avoided.The paper presents one example to demonstrate control algorithm at work.

Conclusions
The paper presents a method of virtual forces enabling simultaneous tracking control and the control of the shape of a swarm of wheeled robots.The research concerned the swarm's travel, i.e., following a given trajectory by the swarm's geometric center with stationary obstacles.The analysis and synthesis of the swarm trajectory tracking comparing the coordinates of the swarm's geometric center and the reference point.The greatest impact of swarm shape deformation was visible when comparing the y projection of the swarm's geometric center and the reference point.
The results of the conducted verification coincided with the simulation results sufficiently enough to conclude that the proposed swarm control algorithm enables the swarm to follow a moving reference point in an environment with stationary obstacles.

Fig. 3
Fig. 3 Virtual forces acting on the point A i of the i-th robot from the neighboring j-robots and the moving reference point P in the presence of an obstacle

Fig. 5
Fig. 5 Schematics of the swarm tracking control

Fig. 6 a 1 Table 2 Table 3
Fig. 6 a Research arena, b robot with markers

Fig. 7
Fig.7 The initial positions of A i points and the orientations of the robot frames 1-5 and the position of obstacles 1 and 2

Fig. 8
Fig. 8 Paths of the robots with marked robots position in time

Fig. 10
Fig. 10 Distances obtained between robot 1 and the obstacles

Fig. 21 aFig. 23 a
Fig. 21 a comparison of the values of the x coordinates of the swarm's geometric center and the reference point, b comparison of the values of the y coordinates of the swarm's geometric center and the reference pointFig.22 Paths of the swarm's geometric center and the reference point caused the other robots to move faster around obstacle 1 to keep up with the moving reference point.This caused the final shape of the swarm to rotate in relation to its initial shape.The robots had to change their position relative to each other to avoid colliding with obstacles.