Modeling the Dynamics of Two Cooperating Robots

: The paper presents a description of the dynamics of two mobile robots cooperating in the transport of a bulky load in the form of a beam. The purpose of modeling such a system was to obtain a mathematical model in an appropriate form. Lagrange equations of the second type were used to describe the dynamics, followed by the projection method, which allowed for the elimination of Lagrange multipliers. Thanks to this approach, the unknown dry friction forces at the contact points of the robots’ wheels with the ground were eliminated from the description, and the dynamics in the controllable coordinates were obtained. The resulting model has structural properties that enable its use in the synthesis of a control system based on a mathematical model.


Introduction
The A team of robots used to complete a difficult or complex task together is called a robot formation. An example of a task that is impossible for one mobile robot to implement is the transport of objects of large size or significant mass. This type of problem concerns both the living world and technology. In the natural environment, a number of solutions can be found, an example of which is the transport of objects by ants or the very similar problem of two people moving a table. The cooperation of robots is the subject of a number of works, concerning, e.g., the problems of pushing a box [1], pushing a large load with its own support in the form of wheels [2], tugboats moving a tanker [3], transporting an object above the robots [4], or moving of an object by robots next to it [5] or two robots transporting a beam [6]. The authors of such works most often use, as transport robots, twowheeled robots [7], n-wheel robots [6], and tracked vehicles [8]. The tasks performed by systems or formations of transport robots concern not only the movement of large masses, but also the cooperation of manipulators placed on vehicles [9], or performing behavioral tasks in an unknown environment based on signals from cameras or scanners [2]. In the literature, we found solutions based on considerable simplifications, e.g., robots and the object being moved are modeled with concentrated masses [8], as well as works considering cooperation and interaction between the robot and the object [4]. An alternative approach that simplifies the description of the kinematics of a complex system is the introduction of one-dimensional systems (unidirectional interaction) in the form of ropes or chains. We have here a number of examples such as construction cranes on ropes transporting an object [10], a team of helicopters transporting a tank [11], and transporting an object using drones [12]. Another approach is to use omnidirectional wheels, which allows a vehicle without holonomic limitations to be obtained [13].
In the literature can also be found solutions consisting of connecting objects transported with the use of spring shock absorbers, explicitly allowing for possible displacement in a kinematic pair [8]. This approach allows the use of virtual structure algorithms or leader tracking [1,14]. An interesting solution is a structure [7,15] that allows a formation Appl. Sci. 2021, 11, 6019 2 of 12 of robots to transport a large object thanks to the connection of the object with the center of rotation of the two-wheeled mobile robot by means of an element equipped with two swivel joints.
The construction of the dynamics of models of cooperating robots transporting an object is a current topic, as evidenced by publications [16,17]. The work [18] presents a model of a system of three mobile robots connected with the use of swivel joints with a large-size plate being transported.
The most popular solution that allows the movement of large masses is a tractor-trailer type system. The tractor is an active unit containing drives and control, while the trailer is a passive element connected to the tractor by articulation. In modeling dynamics tasks of this type of nonholonomic systems, approaches are used both with the assumption of movement without slippage and with consideration of lateral and longitudinal slippage of wheels [16,17].
The presented solution assumes no slippage of the driving wheels, similarly to the mathematical model of a single nonholonomic mobile robot. The principles of modeling with such assumptions can be found in article [14]. Modeling of mobile robots using the Lagrange and Newton-Euler equations can be found in [19], an approach using Kane's approach is found in [20], and generalized rules for modeling systems with holonomic and nonholonomic constraints are included in [21]. It should be noted that the assumption of rolling without slippage is used when the slippage is so small that it can be ignored. This happens when the velocities are low and there is sufficient friction between the wheels and the ground. It is clear that at higher velocities and accelerations, and on uneven or slippery terrain, the pure rolling principle will not apply. There are a number of research papers explaining the effects of slippage of driving wheels and containing descriptions of algorithms for controlling such objects. The work [22] describes a control system with a variety that allows for steering in a wheel-ground slip situation thanks to the use of a feedback system, where the tracking error converges to zero. Another solution described in [23] uses simple measurements and a Kalman filter to estimate the amount of slips. A comprehensive description of how the size and type of skid affects a vehicle's controllability is included in [24]. Some researchers treat slippage as a disturbance and propose its compensation with the use of control algorithms. In the work [25], to compensate the slip occurring as a disturbance, an adaptive algorithm using a nonlinear disturbance observer was used. Another example that allows to control a wheeled mobile robot in the presence of longitudinal and lateral skid is the adaptive robust control described in [26]. It is also possible to combine complex algorithms with design solutions, e.g., steering in two steering axes [27]. In this type of approach, algorithms use elements of artificial intelligence, such as fuzzy logic, or artificial neural networks [28], neural fuzzy [29], critic neural [30], neural in behavioral terms [31], neural with adaptive dynamic programming [32].
Mathematical models of robot formation can be used for a variety of purposes, such as research, design, and control. When solving the tasks of dynamics, one searches for the cause-and-effect relationships between the acting forces and moments of forces as causes of motion, and the motion itself, which is the result of the action of these forces and moments of force. After building a mathematical model, it can be used in the analysis of its properties and identification, as well as in the implementation of issues related to control.
This paper proposes a model of a formation of robots that are to be usable in issues related to control. Therefore, a simplification was introduced that takes into account only those elements that have a significant impact on the actual behavior of the system. This study assumed that two identical wheeled robots transport a beam in the form of a cylindrical rod. Each robot consisted of a frame and two drive wheels. The remaining elements were omitted, assuming that they had a negligible impact on the dynamics of the entire system. This article presents a description of the dynamics of the system in controllable coordinates, due to the possibility of using this type of mathematical form in the synthesis of control algorithms.

Description of the Kinematics of Two Robots in the Beam Transport Task
This study assumed that two mobile robots transporting a beam move on a flat surface. It was assumed that the beam is fixed at points H 1 and H 2 outside the wheel axis ( Figure 1). ci. 2021, 11, 6019 3 of 13 controllable coordinates, due to the possibility of using this type of mathematical form in the synthesis of control algorithms.

Description of the Kinematics of Two Robots in the Beam Transport Task
This study assumed that two mobile robots transporting a beam move on a flat surface. It was assumed that the beam is fixed at points and outside the wheel axis ( Figure 1). The robot wheels are non-deformable and will not skid longitudinally (spinning) or transversely (drift). The vector of generalized coordinates was adopted in the form of = and the vector of generalized velocities = . The physical meaning of the individual variables is as follows: , -coordinates of the characteristic point of the beam being transported in the xy system; -beam rotation angle in the xy plane; and -angles of rotation of the frames of robots 1 and 2, respectively; and -angles of rotation of robot 1 wheels; and -angles of rotation of robot 2's wheels. The equation describing the kinematics is presented as follows: The Jacobian has the following form: The robot wheels are non-deformable and will not skid longitudinally (spinning) or transversely (drift). The vector of generalized coordinates was adopted in the form of q = x M y M ϕ β 1 α 11 α 21 β 2 α 12 α 22 T and the vector of generalized . The physical meaning of the individual variables is as follows: x M , y M -coordinates of the characteristic point of the beam being transported in the xy system; ϕ-beam rotation angle in the xy plane; β 1 and β 2 -angles of rotation of the frames of robots 1 and 2, respectively; α 11 and α 21 -angles of rotation of robot 1 wheels; α 12 and α 22 -angles of rotation of robot 2's wheels.
The equation describing the kinematics is presented as follows: The Jacobian has the following form: Appl. Sci. 2021, 11, 6019 4 of 12 where r is the radius of robot wheels, l 1 is the distance between the robot's center (point A) and the wheel, and l 3 is the distance between the beam attachment point (point H) and point A.
Out of nine generalized coordinates, only four are controllable coordinates. These are the angles of rotation of the wheels that drive the robots, forming the vector of controllable coordinates q N = α 11 α 21 α 12 α 22 T .
The relationship between generalized velocities and controlled velocities .
α 22 T is written as: where matrix D has the following form: The obtained matrices J and D satisfy the condition JD = 0, which makes it possible to eliminate unknown dry friction forces in the description of the dynamics.

Description of the Dynamics of Two Robots Transporting a Beam
Type II Lagrange equations were used to describe the dynamics of the robot formation, which in the vector notation take the form: where E is the kinetic energy of the system, Q is the vector of generalized forces, and λ is the vector of Lagrange multipliers. The right-hand sides of Lagrange's equations were determined based on the principle of virtual work. The virtual work δL performed by the forces acting on the formation of robots is equal to the sum of the virtual work forces acting on the individual members of the robot formation.
Relationship (6)   In the analyzed case, the virtual work is: where M ij is the moment driving the i-th wheel of the j-th robot, N ij is the pressure on the i-th wheel of the j-th robot, f ij is the coefficient of rolling friction of the i-th wheel of the j-th robot, and δα ij is the virtual displacement of the i-th wheel of the j-th robot. The virtual work can also be expressed in the form: where Q k is the k-th generalized force, and q k is the k-th generalized coordinate. After comparing Equation (7) to Equation (8) and taking into account the vector of generalized coordinates, the vector of generalized forces was obtained: The vector of the Lagrange multipliers is written as: Taking into account the vector of generalized forces Q, the Jacobian J, and the vector of Lagrange multipliers λ, the right-hand sides of the Lagrange equations were written as follows: Lagrange multipliers represent the forces of dry friction occurring in the plane of contact of the wheel with the ground, and they are values not available for measurement.
In the conducted analysis, the resistance to motion between the transported beam and the robots was omitted.
In order to determine the right-hand sides of the Lagrange equations, it is necessary to calculate the kinetic energy of the robot formation. The total kinetic energy is equal to the sum of the kinetic energies of the individual robots and the kinetic energy of the beam being transported. In the adopted model, it is the sum of the kinetic energy of the beam being transported, the kinetic energy of the robot frames, and the kinetic energy of the wheels driving the robots. The kinetic energy of the supporting wheels and other elements was omitted due to its low influence. Figure 3 shows the components of the system and the reference systems adopted.  The kinetic energy of the formation of robots is given by the following relationship:  The kinetic energy of the formation of robots is given by the following relationship: where m 0 is the mass of the beam being transported, m 1 is the mass of the robot, m 11 is the mass of the robot's wheel, I 0z is the mass moment of inertia of the beam in relation to the axis z passing through point M, I z1 is the mass moment of inertia of the robot in relation to the axis passing through the center of its mass I z11 is the mass moment inertia of the wheel with respect to its axis of rotation, I x11 is the mass moment of inertia of the wheel with respect to the vertical axis passing through the center of the wheel, l is the beam length, and l 2 is the distance between the robot's center of mass and point A.
The right-hand sides of Lagrange's equations were written in matrix form as: where M is the inertia matrix, and C q, q is the vector of centrifugal and Coriolis forces. The inertia matrix is in the form of a symmetric matrix: where: Matrix C q, . q has the form: where a = (m 1 (l 2 + l 3 ) + 2l 3 m 11 ). Finally, the dynamics of the formation of robots in generalized coordinates is given by the equation:
A feature of the model is that the matrix S = .
M − 2C is skew symmetric, which is a key property from the point of view of the synthesis of control of the analyzed system with the use of methods using a mathematical model.

Description of Robot Formation Dynamics in Controllable Coordinates
In order to describe the dynamics of robot formation in controllable coordinates, the transformation of Equation (3) was performed. For this purpose, the vector of generalized attachments was determined in the form: Substituting Equations (3) and (18) into Equation (17), the following equation was obtained: which, after multiplication by D T , was written in the form: where it was taken into account that D T J T = JD = 0. The presented calculations made it possible to eliminate the vector of the Lagrange multipliers λ, which contains immeasurable variables. A key property of the model is the skew symmetry of the matrix S N = . M N − 2C N . In order to demonstrate this property, the S N matrix was written as follows: Using the transformations: the following was written: Multiplying the skew matrix S on the left-hand side by D T and on the right-hand side by D results in a skew matrix. Therefore, the S N matrix is skew symmetric.

Simulation of the Obtained Solution
The simulation tests of the dynamics task were performed in the MATLAB/Simulink program using the work emulator described in publication [33].
For the purposes of the simulation, it was assumed that the M point of the transported beam moves along the path shown in Figure 4c with the assumed linear velocity as in Figure 4a and the angular velocity as in Figure 4b. It was assumed that the courses describing the angular and linear velocity profiles are functions of class C2.

Simulation of the Obtained Solution
The simulation tests of the dynamics task were performed in the MATLAB/Simulink program using the work emulator described in publication [33].
For the purposes of the simulation, it was assumed that the M point of the transported beam moves along the path shown in Figure 4c with the assumed linear velocity as in Figure 4a and the angular velocity as in Figure 4b. It was assumed that the courses describing the angular and linear velocity profiles are functions of class C2. The initial conditions were assumed to be zero, defining the setting of the robots as in Figure 4d. The angular velocities of the driving wheels are presented in Figure 5a and the angular accelerations of the driving wheels are presented in Figure 5b. The obtained values of velocity and accelerations are the input parameters for the simulation of correctness of the solution of the simple dynamics problem described by Equation (21). As a result of the simulation, time courses of the moments driving the wheels of two mobile robots performing the task of transporting the beam along the path shown in Figure 4c were obtained. A view was generated with the use of a robot emulator The initial conditions were assumed to be zero, defining the setting of the robots as in Figure 4d. The angular velocities of the driving wheels are presented in Figure 5a and the angular accelerations of the driving wheels are presented in Figure 5b.

Simulation of the Obtained Solution
The simulation tests of the dynamics task were performed in the MATLAB/Simulink program using the work emulator described in publication [33].
For the purposes of the simulation, it was assumed that the M point of the transported beam moves along the path shown in Figure 4c with the assumed linear velocity as in Figure 4a and the angular velocity as in Figure 4b. It was assumed that the courses describing the angular and linear velocity profiles are functions of class C2. The initial conditions were assumed to be zero, defining the setting of the robots as in Figure 4d. The angular velocities of the driving wheels are presented in Figure 5a and the angular accelerations of the driving wheels are presented in Figure 5b. The obtained values of velocity and accelerations are the input parameters for the simulation of correctness of the solution of the simple dynamics problem described by Equation (21). As a result of the simulation, time courses of the moments driving the wheels of two mobile robots performing the task of transporting the beam along the path shown in Figure 4c were obtained. A view was generated with the use of a robot emulator The obtained values of velocity and accelerations are the input parameters for the simulation of correctness of the solution of the simple dynamics problem described by Equation (21). As a result of the simulation, time courses of the moments driving the wheels of two mobile robots performing the task of transporting the beam along the path shown in Figure 4c were obtained. A view was generated with the use of a robot emulator showing the shape of the formation of robots at successive points in time, as presented in Figure 6b. The frequency of generation of successive images by the emulator was 2 Hz.
For the purposes of the simulation, the mass of the transported body was assumed to be 10 kg. The appearance of the task implementation and the shape of the time courses of driving moments confirm the correctness of the dependencies obtained in Section 4. showing the shape of the formation of robots at successive points in time, as presented in Figure 6b. The frequency of generation of successive images by the emulator was 2 Hz. For the purposes of the simulation, the mass of the transported body was assumed to be 10 kg. The appearance of the task implementation and the shape of the time courses of driving moments confirm the correctness of the dependencies obtained in Section 4.

Conclusions
In the presented work, a mathematical model of two robots transporting a beam was obtained. The resulting model takes into account the most important phenomena related to the movement of the system. The application of the projection method made it possible to eliminate the Lagrange multipliers from the description. The lack of Lagrange multipliers and the skew symmetry of the matrix = − 2 make the model applicable in the synthesis of control algorithms. The mathematical description of the dynamics of the system of two robots transporting a beam was simulated in the MATLAB/Simulink program. The use of a proprietary robot emulator allowed for the visualization of the system's movement under simulation conditions. The obtained time courses of the moments driving the wheels of the robots and the appearance of the robots movement during the simulation confirmed the correctness of the solutions obtained.