{'fraction_non_alphanumeric': 0.024619196620022554, 'fraction_numerical': 0.005241506377166093, 'mean_word_length': 4.91840571536003, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Multirobot Heterogeneous Control Considering Secondary Objectives

Cooperative robotics has considered tasks that are executed frequently, maintaining the shape and orientation of robotic systems when they fulfill a common objective, without taking advantage of the redundancy that the robotic group could present. This paper presents a proposal for controlling a group of terrestrial robots with heterogeneous characteristics, considering primary and secondary tasks thus that the group complies with the following of a path while modifying its shape and orientation at any time. The development of the proposal is achieved through the use of controllers based on linear algebra, propounding a low computational cost and high scalability algorithm. Likewise, the stability of the controller is analyzed to know the required features that have to be met by the control constants, that is, the correct values. Finally, experimental results are shown with different configurations and heterogeneous robots, where the graphics corroborate the expected operation of the proposal.


Introduction
Recent advances in robotics have allowed the migration from the operation of a single large vehicle to the integration of many ones in search of a common goal. This migration is the result of optimizing various processes, which require a robot with great capabilities to a set of robots with distinctive features. Applications such as the search and rescue of objectives in natural disasters [1], displacement of extremely heavy or very long objects, mapping of land [2], assembly of pieces, and so on, are an example of the need to bring together small-scale robots and lead them on a common task [3]. In this type of terrestrial applications, the mobile robots based on wheels predominate over robots composed of legs or caterpillars, subdividing them in the way in how the wheels are distributed in the mechanism [4,5].
The usual configuration of mobile robots consists of two wheels joined by a common axis, where the stability of the mechanism is achieved by placing a castor-type wheel. This type of vehicle has had a considerable amount of analysis given the ease of its construction, despite its limitations, such as the non-holonomicity (a common feature of wheeled robots in general) or the loss of traction in sharp turns [6]. However, the limitations presented by this type of differential robot can be complemented by a different configuration, e.g., an Ackerman or an omnidirectional type. A robotic mechanism in the Ackerman configuration is the one found in conventional vehicles, where one motor drives the mobile, and another modifies its orientation. Although this configuration does not provide holonomicity to the mechanism, its application can solve tasks which require traction, since all the wheels have a fixed on a reinforcement learning algorithm and the second based on a particle filter. The main objective of the work is searching and tracking people with cooperative mobile robots, which locate goals, calculate their distance to them, and follow them, considering they work in highly unstructured spaces. The results of the proposed control algorithms are validated through an extensive set of simulations considering up to five agents, in addition to the hours of real-life experiments with two social robots.
Furthermore, the control methods for the formation of robots have a similar criterion as for a traditional robotic system, where the way in which the points of interest of all the participants are unified differs in many works. In this aspect, [25] can be considered, where the aim is controlling both the center and the angles of rotation and elevation of the triangle formed by a robotic set, a group that is greater than or equal to three members. The triangle formed supposes to be an irregular object held up by the operative end of all the mobile manipulators, where additionally, the redundancy of the systems is considered to carry out the evasion of obstacles or other secondary objectives. In contrast, the shape and orientation of the whole set can be configured through projections between each robot. Reference [26] takes into account this consideration, where the objective is to transport an object by two mobile anthropomorphic robots. The proposed controller to carry out the problem is based on the Lyapunov method, where it is analytically demonstrated that it is asymptotically stable. Additionally, experimental results are shown where three-dimensional platforms are used in order to evaluate the performance of the proposal.
In this work, the fulfillment of the primary and secondary objectives of a set of robots with heterogeneous characteristics and different modes of control and operation, working cooperatively, is analysed assuming that the position of each robot, the path to follow, and the shape of the formations are known as the initial condition, while taking into account that the robotic set knows the environment from external information or previously stored data. Through the proposal of a control algorithm based on linear algebra, which makes the computational cost less and becomes easily programmable, that are a great advantage in the implementation of the system, the set of robots can accomplish a task in a coordinated way by following a desired path as the primary task, while the formation of them is altered depending on the environment or the mission requirements (secondary tasks); this is the main novelty of the proposed system. Different to traditional ways of controlling a group of terrestrial robots, in this work the robotic set is moved along a path with a desired velocity not parameterized in time, which can depend on various purposes (evasion of obstacles encountered along the way, optimization of energy, and so on), while simultaneously it can alter the formation of the whole set through the modification of distances and orientations of the main and secondary projections. Contrary to works presented in [2,3,5,6], the formation scheme of heterogeneous robots is analyzed from projections between a pair of robots (being physical or virtual ones depending on the requirements), providing flexibility and scalability at the moment of adding up the robotic systems. Likewise, the controller based on linear algebra is designed, simulated, and implemented on the set of heterogeneous robots, further analyzing their stability. Another great advantage of the proposed system is that being a set of heterogeneous robots that operate, makes the kinematic and dynamic control of each residing in them, thus reducing the processing load of the system and giving the possibility of increasing robots of any operational feature, including their kinematic and dynamic control in it without the need to modify any other part of the system at all. It is not known of any work that has done something similar. Compared to references [8,9,14], the proposed controller uses a hierarchical control structure, in order to provide scalability to the system and at the same time, not saturate the processing unit, thus merging both the centralized and decentralized information processors. At a very high hierarchy level, a centralized computer is responsible for generating the control actions to achieve the primary and secondary objectives, while, at a local level, each member of the heterogeneous robotic set includes its own processing unity to achieve kinematic and dynamic control and also to provide feedback of odometric information, which is shared through wireless communications based on a data frame (assuming no constrains given by the environment). Additionally, another relevant advantage of the proposal is the low computational cost obtained through the control method based on linear algebra, avoiding saturating both the centralized computer and those ones located in each robot.
In [21] and many more, Gustavo Scaglia presents works based on Linear Algebra theories for collaborative control of mobile robots focused on the leading-follower technique; however, he does not consider the scalability of the robots nor the execution of the secondary control objectives, i.e., modification of robot formation, and obstacle avoidance, among other criteria. We, in our work, have done all of this, which makes it a substantial improvement.
This current work is presented in six sections, including the introduction and conclusions. Thus, Section 2 presents the multilayer control scheme, superficially describing the proposed control structure, while Section 3 presents the development of controllers based on numerical methods considering secondary tasks. Section 4 presents the controllers to execute the primary task, and the secondary task raised, analyzing the stability of both proposed methods. Section 5 shows the proposed kinematic control based on numerical methods, as well as a dynamic compensator for each robotic system. Finally, Section 6 shows three real experimental results to validate the proposed controllers, denoting the control responses of both the formation and each of the robots.

Multilayer Control Scheme
The multilayer scheme defines how the appropriate variables that make up the cooperative control of heterogeneous mobile robots are distributed ( Figure 1). Taking into account that each of the layers has different functionalities, the scheme is divided into six sections: (1) Acquisition of the characteristics of the environment allows planning the path to follow, maintaining the integrity of the robotic systems as well as fulfilling the pre-programmed task. This section has two layers, and in the off-line planning layer, the initial parameters are configured, i.e., the desired path to be followed, the starting locations of all the robotic systems, and the desired structure of formation. The on-line planning layer allows the execution of the secondary objectives, reacting to the unforeseen environmental changes in the off-line layer, produced by the lack of space to fulfill the desired parameters of formation, objects to avoid along the path, environmental conditions that require to change the formation performed, among other conditions, that can alter the fulfillment of the task. This is also very important because, through this scheme, you can navigate between the structured and unstructured environments. When the path is known, or the operating environment has already been obtained previously, this information is entered in this layer, if not, and as the robots are multi-sensors, you can easily install a radar and make the path planning and follow those trajectories found in real-time.
The objective of the (2) formation control layer is focused on calculating the control actions so that the vehicles maintain a positioning that satisfies the desired formation, generating the control signals for each of the robots. The (3) kinematic control layer takes as a reference the velocities generated by the formation control (upper level), i.e., the local controllers receive reference velocities to follow the profile guided by the formation, so these controllers are responsible for delivering maneuverability velocities that correspond of each heterogeneous robot involved (omnidirectional, car-like, unicycle). The (4) dynamics of each robot acting as an individual mechanism is solved by the adaptive dynamic compensation layer, within the control and operation scheme this layer is of paramount importance and provides, as mentioned above, the advantage that if robots of other characteristics are increased, each one has its own controller on top, which means that the only major modification that has to be made to the system is to enter the data from this robot into the communications frame, completely eliminating any change outside of this. The (5) Robots layer represents the set of heterogeneous robots considered in the formation. In addition, two virtual robots are used for the calculation of each of the projections. Finally, the (6) environment layer represents the structural space where the robot interacts, considering obstacles and other physical objects.
From what has been described, it can be noted that the work presented by us differs from the collaborative control literature in the following items: (1) Proposal of a modular multilayer control scheme, that is, it is possible to implement different control techniques without modifying the general structure of the collaborative control between n robots; (2) the control scheme considers both the centralized control technique, and the decentralized control technique, which allows generalization of the collaborative control to n heterogeneous robots; (3) the proposed control algorithms are based on the theory of linear algebra, which has as an advantage a low computational cost and, therefore, can be implemented in robots built with low-cost technology. In addition, when considering the linear algebra technique for the design of control algorithms, it is possible to incorporate redundancy in the transformation matrices of the formation, thus it is feasible to execute the main task (path follow-up of predefined tasks) and several secondary tasks, for example, modification of the formation, evasion of obstacles, fewer movements, among other control criteria; (4) the proposed algorithm considers path follow-up, that is, following the desired profile without being parameterized in time. Most of the works in the literature perform trajectory tracking, which is not feasible to implement in real applications since the trajectory tracking defines the desired position at a certain time. That is, it has a tracking profile parameterized in time; and finally (5) in the article presented there is a formal analysis of the stability of each one of the proposed control algorithms, in which mathematically asymptotic stability is demonstrated, that is, the control errors tend to zero.
Sensors 2019, 19, x FOR PEER REVIEW  5 of 28 cost and, therefore, can be implemented in robots built with low-cost technology. In addition, when considering the linear algebra technique for the design of control algorithms, it is possible to incorporate redundancy in the transformation matrices of the formation, thus it is feasible to execute the main task (path follow-up of predefined tasks) and several secondary tasks, for example, modification of the formation, evasion of obstacles, fewer movements, among other control criteria; (4) the proposed algorithm considers path follow-up, that is, following the desired profile without being parameterized in time. Most of the works in the literature perform trajectory tracking, which is not feasible to implement in real applications since the trajectory tracking defines the desired position at a certain time. That is, it has a tracking profile parameterized in time; and finally (5) in the article presented there is a formal analysis of the stability of each one of the proposed control algorithms, in which mathematically asymptotic stability is demonstrated, that is, the control errors tend to zero.

Kinematic Transformation.
Since the formations are composed of projections between a pair of robots, an additional formation is necessary to include a third robot, requiring the use of a virtual robot to generate the additional projection. It is assumed that the object to be transported or the shape that the robotic set should have does not have a defined geometry-it may have an unequal weight distribution, or it could be moving in a semi-structured space. In this aspect, the fulfillment of tasks with this type of objective can present better results if the robotic mechanisms have heterogeneous characteristics such as car-like, omnidirectional, or differential robots. The location of each of the robots depends

Kinematic Transformation
Since the formations are composed of projections between a pair of robots, an additional formation is necessary to include a third robot, requiring the use of a virtual robot to generate the additional projection. It is assumed that the object to be transported or the shape that the robotic set should have does not have a defined geometry-it may have an unequal weight distribution, or it could be moving in a semi-structured space. In this aspect, the fulfillment of tasks with this type of objective can present better results if the robotic mechanisms have heterogeneous characteristics such as car-like, omnidirectional, or differential robots. The location of each of the robots depends totally on the requirements of the tasks, being able to alter the configurations at any moment of time if the workspace requires it.
Based on the formation presented for the analysis (Figure 2), the main projection to transport an object by three mobile vehicles is described as  Based on the formation presented for the analysis (Figure 2), the main projection to transport an object by three mobile vehicles is described as represents the separation between the other two physical robots 2 and 3 , while and represent the orientation of both projections with respect to Y-axis and X-axis from the reference plane <R> In turn, the inverse kinematic transformation f (.) is denoted by Remark 1: x O , y O , x V , y V are located on the frame of the inertial reference.
The relationship between the variation of g(t) and γ(t) can be obtained through the time derivative of the forward and the inverse kinematics transformations, represented by the Jacobian matrix Γ F (g) defined as: . γ(t) = Γ F (g) . g(t) (5) and in the inverse way is given by: . where with e, f = 4.

Controller Analysis Considering Secondary Objectives
The design of the kinematic controllers proposed in this paper was based on numerical methods tools. To facilitate the search for the solution of a set of equations, a system can be represented in a matrix structure, where theorems and axioms of linear algebra are applied. In this way, it is considered the first-order differential equation: .
where η(t) represents the output of the system to be the controller with initial conditions η(0) = η 0 , . η(t) is the first derivative with respect to time, and . ζ(t) is the control action. Furthermore, η(t) becomes η(k) in the discrete time with t = kT 0 , where T 0 represents the proposed sampling time respecting the Nyquist theorem, and k are the samples of the continuous response. Given that the state and the control action on the time instant t(k − 1) are known, the system's state at instant t(k) can be approximated by Euler's method [27] as The design of the kinematic controller was based on the kinematic transformation of the mobile vehicles cooperation. In order to design a formation controller or a path following, the kinematic transformation can be approximated as: where Γ(ζ(k)) contains the characteristics of both the positioning and the formation of all the robotic systems in the case of the formation controller or the positioning information of the object in the case of the path following.
It is important to mention that following a path consists of maintaining the position and orientation of the object to be transported within a predefined route without parameterization in time. In this way, the control objective is to position the object at the closest point of the marked path P at the desired velocity υ d . To reach this goal, the following expression is considered, is a point of the desired path with the desired shape at the previous instant of k and with η represents the error vector at the outputs of the controller (see Figure 3), and m that represents each of the states of formation of the cooperative control. Now, Equations (9) and (10) can be considered to generate the system of equations which let us rewrite the system as In this way, the control actions are defined as u = A −1 b. In case A is quadratic (with det(A) 0), A has a direct inverse solution, otherwise, it must be necessary to use a method to solve the pseudoinverse problem, given by: incorporated into the formation system includes its own kinematic controller and a dynamic compensator, therefore, for the formation control, the type of system included is transparent. This section briefly describes the basic control scheme to maintain the formation of many robotic systems, a basis to integrate more robots in a scalable way. Figure 3 shows the control structure implemented for this work, denoting both the controllers which maintain the formation, orientation, and following of the desired path and the controllers that correct the final actions of each robot. The adoption of the null-space approach was due to the possibility of treating tasks and subtasks separately, which were unified at the end to get the control actions. Since the main task does not conflict with the secondary task, the designer of the controllers selected the task hierarchy. By means of this, different control objectives can be achieved, e.g., maximum manipulability, energy saving, obstacle avoidance, and so on [29]. In this case, the main task was to reach that the set of robots followed a path, while the secondary task was to maintain the geometric shape and orientation of every projection formed by the vehicles.
The unified Jacobian matrix in Equation (9) contains both the first derivatives corresponding to the positions of the center point of a formation, as well as the distance and the orientation between the two robots forming the projection. For the calculation of different control actions, it is taken into account that the Jacobian matrix in Equation (9) is divided into two parts:

Remark 2:
The pseudo-inverse here applied was that introduced by Moore and Penrose. It has the property that it thus distributes the coefficients of the redundant columns in the solution that the sum of squares of these coefficients was minimized [28]. Unfortunately, in cases where loses rank, it is known that the pseudo-inverse approach will not always avoid singular configurations. In singularities, the original task is replaced by a solution of which does not precisely correspond to the original one. By means of the use of the Gram-Schmidt algorithm or the Singular Value Decomposition, pseudoinverses can be constructed in which the singularities can be avoided, but that is beyond the scope of this work.
Furthermore, it is said that a system of linear equations is homogeneous if it can be written in the form Au = 0. Now, assuming that the configuration of the robotic system (13) is redundant, the Jacobian matrix Γ(ζ(k)) ∈ R m×n has more unknowns than equations (m < n) with range r = n for each b, and taking into account that the homogenous equation has a not trivial solution, the system could have infinite solutions. In this case, suppose the equation Au = b is consistent for a b given and letting v p be a particular solution, the solution is the set of all the vectors of the form with v h as any solution of the homogeneous system Γ(ζ(k))v h = 0.
A viable solution method is to formulate the problem as a constrained linear optimization problem yielding the particular solution On the other hand, the null space of Γ(ζ(k)) in R n is the set of velocities that do not produce any effect over the actions of the heterogeneous robotic set. In that case, it is necessary to rethink the cost function, expressing it as that yields the homogeneous solution Thereby, inserting Equations (16) and (18) into (14), it yields the proposed law of control where the first term on the left-hand side is the particular solution v p and second term v h of this equation belong to the null space of Γ(ζ(k)).
For the purposes of this work, the second term in Equation (19) represents the projection on the null space of the robotic systems, where v 0 is an arbitrary vector that contains the velocities associated with the shape and orientations of the robotic set. Therefore, any value given to v 0 will affect the internal structure of the formation only, but not the final control of the first objective at all. The null space created by the high-level task matrix allows each velocity to be projected onto that space, where the sub-tasks compete to solve the problem in different ways. However, the velocities of the second task need to be calculated and included in v 0 , being where Γ s (ζ(k)) is the Jacobian matrix, which contains the secondary objectives.

Remark 3:
The consideration of having more than one robot working on the same purpose allows achieving secondary tasks at the same time collectively. To achieve these objectives, a behavior-based controller can be implemented to split tasks into sub-objectives, solving problems separately, and finally combining them to obtain the final solution.

Formation and Following Control
The cooperative control of heterogeneous mobiles considers that the type of robots incorporated into the formation system includes its own kinematic controller and a dynamic compensator, therefore, for the formation control, the type of system included is transparent. This section briefly describes the basic control scheme to maintain the formation of many robotic systems, a basis to integrate more robots in a scalable way. Figure 3 shows the control structure implemented for this work, denoting both the controllers which maintain the formation, orientation, and following of the desired path and the controllers that correct the final actions of each robot.
The adoption of the null-space approach was due to the possibility of treating tasks and subtasks separately, which were unified at the end to get the control actions. Since the main task does not conflict with the secondary task, the designer of the controllers selected the task hierarchy. By means of this, different control objectives can be achieved, e.g., maximum manipulability, energy saving, obstacle avoidance, and so on [29]. In this case, the main task was to reach that the set of robots followed a path, while the secondary task was to maintain the geometric shape and orientation of every projection formed by the vehicles.
The unified Jacobian matrix in Equation (9) contains both the first derivatives corresponding to the positions of the center point of a formation, as well as the distance and the orientation between the two robots forming the projection. For the calculation of different control actions, it is taken into account that the Jacobian matrix in Equation (9) is divided into two parts: where 1 ( ( )) ∈ 2×4 are the first derivatives of the midpoint positions of the projection, 1 ( ( )) ∈ 2×4 are the first derivatives of the distance and orientation angle, ̇∈ 2×1 corresponds to the first variable to be calculated and ̇1 ∈ 2×1 the second variable to calculate.
Considering the proposed splitting in Equation (21), differentiated controls can be proposed to achieve both the primary and secondary objectives. The work proposes as the main objective of the point of interest (redefined as for the application of the proposed controller) follows a profile not parameterized in time, with a velocity imposed by the designer. On the other hand, the secondary objective was to modify the formation of robotic systems, as long as they did not conflict with satisfying the first objective. Having a formation based on projections, the main projection plays an important role since it is the basis for calculating the velocities that the rest of the projections will adopt to fulfill the tasks. Additionally, having a main straight line that can be projected and oriented according to the requirements of the controller designer allows locating the robotic systems to be agreed upon. Contrast the possibilities a) and b) of Figure 4; the first projection has a different length and orientation to the second projection. However, the main objective was achieved in both, where the variation in distances and secondary orientations did not conflict with the main task. The following paragraphs describe the characteristics mentioned in more detail. (21) where Γ 1M (ζ(k)) ∈ R 2×4 are the first derivatives of the midpoint positions of the projection, Γ 1S (ζ(k)) ∈ R 2×4 are the first derivatives of the distance and orientation angle, . η 1M ∈ R 2×1 corresponds to the first variable to be calculated and . η 1S ∈ R 2×1 the second variable to calculate. Considering the proposed splitting in Equation (21), differentiated controls can be proposed to achieve both the primary and secondary objectives. The work proposes as the main objective of the point of interest p O (redefined as η 1M for the application of the proposed controller) follows a profile not parameterized in time, with a velocity υ d imposed by the designer. On the other hand, the secondary objective was to modify the formation of robotic systems, as long as they did not conflict with satisfying the first objective. Having a formation based on projections, the main projection γ O plays an important role since it is the basis for calculating the velocities that the rest of the projections will adopt to fulfill the tasks. Additionally, having a main straight line that can be projected and oriented according to the requirements of the controller designer allows locating the robotic systems to be agreed upon. Contrast the possibilities (a) and (b) of Figure 4; the first projection has a different length and orientation to the second projection. However, the main objective was achieved in both, where the variation in distances and secondary orientations did not conflict with the main task. The following paragraphs describe the characteristics mentioned in more detail. the projections will adopt to fulfill the tasks. Additionally, having a main straight line that can be projected and oriented according to the requirements of the controller designer allows locating the robotic systems to be agreed upon. Contrast the possibilities a) and b) of Figure 4; the first projection has a different length and orientation to the second projection. However, the main objective was achieved in both, where the variation in distances and secondary orientations did not conflict with the main task. The following paragraphs describe the characteristics mentioned in more detail.  (a) Path following controller To achieve that the center of the projection follows the desired path, the proposed controller is defined by (a) Path following controller To achieve that the center of the projection η iM follows the desired path, the proposed controller is defined by where Γ iM (ζ(k)) is the first part of the general Jacobian that determines the characteristics of the robotic set to follow the desired path, with ζ iM (k) are two pairs of velocities that will be applied to the robots located at the ends of the projection, whether physical or virtual. These velocities are due to maintain the point of interest in the desired path but leaving aside the errors of the distance between the robots and the angle formed with respect to R . It is important to note that the main projection (where the point of interest of the transported object is located) can have the desired velocity, in this case,

b) Formation and Guidance Control
This part of the control allows the establishment of the desired formation η iS as a secondary objective, providing flexibility to projection modifications between the robots in applications where the tasks of the tracking targets were required, e.g., given the presence of the obstacles on the road. The second part of the Jacobian matrix is considered in this controller, which provides the characteristics of formation and orientation Γ iS (ζ(k)) of both robotic systems. In this way, the controller is defined by Contrary to a), this controller aims to correct the shape of the i th projection, zeroing distance errors between the robots, and general orientation of the robotic pair.
(c) Unified Controller This section defines the priority in the control tasks that the group of robots will have. The work proposes the positioning control of the point of interest (in this case, the midpoint of the main projection). Therefore, the task that does not conflict with the main control objective is the form and orientation of the projection. Based on (19), the proposed final controller is presented in the form where the second part of this controller shows the attempt to correct the errors so long as it does not interfere with the main task, which is carried out by the first part of the controller. This fusion allows having the desired velocities for the pair of robots that form the i th projection.

Remark 4:
Cases (a), (b), and (c) are applicable to one of the i possible projections, requiring i controllers to be programmed as projections exist. This facilitates the scalability of the system, while at the same time making the robotics set more flexible by giving desired parameters to each of the projections at any time.

Remark 5:
In the case study, υ idS can be imposed by the controller designer, but it must be directly related to the error reduction, i.e., a velocity can be configured with which the shape is corrected to desired parameters, but it must have a null value in the event the objectives are achieved, otherwise, errors caused by the same correction action can appear. One way to solve this is to force it to be immersed within the weight given by W S .

(d) Stability Analysis
Rewriting the proposed control law (24) in a way where represent a pseudo-inverse matrix notation, the analysis can be developed in a simpler manner. Now, the analysis is done for the control of the main objective, in addition, it is considered that the secondary objective of the formation is not affected when Equation (25) is multiplied by Γ M .
The stability analysis for Equation (27) is done by means of the feedback, i.e., if it is considered that Equation (21)  ζ C (k), and taking into account that the error for the primary objective is defined as therefore, replacing the velocity for the main objective in Equation (28) and also considering that the desired velocity for the path is Next, the differential derivative is applied to obtain Simplifying T 0 and grouping Equation (30) with the current states (k) and the previous state represent the current error and the previous error, respectively, Equation (31) is reduced to and grouping similar terms, it results that The primary objective error η M (k) is separated to have the following expression therefore, stability in discrete time is realized by the Z transform, and taking account the analysis for each diagonal matrix value W M so Finally, the poles of the function obtained in the following way are analyzed: Thus, for the control to be stable, the Z plane pole must be inside the unit circle. Therefore, the values of the diagonal matrix must be considered as 0 <diag(W M ) < 1, hence the control error η M (k) come close to being zero when k → ∞ , then the system is asymptotically stable. Now, as a second step, we proceed to effectuate the analysis for the secondary objective of formation. In a similar way to the primary objective, multiply both members of the control law by Γ S , then Equation (25) it is written as: According to [28], where an important property of Jacobian matrices is analyzed when one does not have a conflict between them, i.e., that it is feasible to fulfill the two tasks simultaneously and completely, it results that Therefore, if Equations (36) in (37) are replaced, the below expression is obtained: Additionally, considering Equation (21) to be perfect tracking, there is . η S (k) Γ S . ζ C (k). Performing a similar procedure of analysis that Equations (27) in (39), it is concluded in the same way that z = I − W S , therefore the values of the diagonal matrix must be considered as 0 <diag(W S ) < 1, hence the control error η S (k) come close to being zero when k → ∞ , then the system is asymptotically stable.

Kinematics Control and Dynamic Compensation of Each Robot
The velocities delivered by the position and formation controller are inputs for each of the robots, where the local controllers interpret independently the velocities as the profile . h i to follow. This section describes the control of each of the heterogeneous robots that could be considered in the set, both for the kinematic control and for the correction of errors given by the dynamics of each system.
(a) Kinematics control The kinematic model of a mobile robot gives the location of a point of interest to any part of the robotic system. The instantaneous kinematic model of a mobile robot gives the derivative of its point of interest as a function of the derivatives of the whole system itself Through the Euler's approximation of the kinematic model of whatever mobile robot, the following kinematic model discrete is obtained by: where, values of h at the discrete time t = kT 0 will be denoted as h(k), with T 0 as the sample time, and k ∈ {0, 1, 2, 3, . . .}. Next, by the Markov property and to adjusting the performance of the proposed control law, the states vector h(k + 1) are replaced by: where W is a diagonal matrix, which must satisfy 0 <diag W hx , W hy < 1, allowing to reduce the variations in state variables, and h d is the desired trajectory. Then, from Equations (41) and (42), the following system of linear equations is obtained, which allows at each sampling instant to calculate the control actions where

From Equation (43), its solution by least squares is obtained by solving the normal equations
(b) Dynamics compensation This section details how the controller was designed to compensate the robot's dynamics in the workspace, achieving greater robustness for each robot. A dynamics controller was programed within each mobile platform, i.e., robotic platforms have an internal control that corrects linear and angular velocity errors.
Linear or angular errors can be caused by external forces or torques that affect the dynamics of the platforms. Given that all the robots received the maneuverability commands as input (linear and angular ones), the number of velocities depended on each mobile robot to meet the formation requirements. Figure 5 describes how the internal controller is structured to compensate for the dynamics of robots. In this case, the controller generates a control output defined as: where, Linear or angular errors can be caused by external forces or torques that affect the dynamics of the platforms. Given that all the robots received the maneuverability commands as input (linear and angular ones), the number of velocities depended on each mobile robot to meet the formation requirements. Figure 5 describes how the internal controller is structured to compensate for the dynamics of robots. In this case, the controller generates a control output defined as: are the gains that weigh the control error, and is the sampling time considered for the discrete PID (Proportional, Integral and Derivative control). Direct and reverse transformation matrices depend on the configuration of each mobile robot to achieve linear velocities, angular, and, eventually, the position and orientation of the mobile robot to feedback the control loop of the proposed cooperative scheme.

Sensors for Relative Position
Within the multiple robotic systems, electronic components were used to power the embedded processing units, know the state of the charge of the batteries, share information with remote receivers wirelessly, know the odometry of the system, and so on. Some of these sensors provided information on the state of each robotic system, allowing the robot to locate itself within their workspace in order to avoid collisions. The robots used for the experiments of this work have built-in sensors to estimate the position given a relative location, i.e., the wheels of each of the robots contain encoders that measure the velocity and the direction of rotation. These sensors determined the angular displacement, and thus the linear displacement of the robots, showing limitations when there were landslides or the resolution of the encoders was not adequate. The proposed control algorithm considers the knowledge of the current position of each one of the mobile robots at all times of the task; therefore, when starting the desired task, the initial condition was the position and orientation of each robot that was part of the collaborative task.

Communication System
The communication structure proposed for the set of robots was based on the IEEE 802. 15.4 protocol. This protocol allows the creation of multipoint networks, and it is also capable of transmitting a large amount of data (bytes) with very low latency and achieving a predictable communication synchronization. The XBEE S2 modules allow the implementation of the established protocol, configured in such a way that they are all within the same wireless network. The topology used in this work was the mesh configuration, i.e., all devices can communicate with each other in such a way that each robot has an identifier to know which data package corresponds to it. This provides the advantage if, at some instant of time the communication fails or is lost, communication can continue between all the other nodes (mobile robots) because the connectivity is forced to be restored. The coordinator of the network sends the maneuverability commands to each robot (linear velocities and angular velocities), where the velocities are packaged within a data frame. Figure 6 shows how the data packet sent by the master-robot and the package that responds to the slave-robots. The communication structure proposed for the set of robots was based on the IEEE 802.15.4 protocol. This protocol allows the creation of multipoint networks, and it is also capable of transmitting a large amount of data (bytes) with very low latency and achieving a predictable communication synchronization. The XBEE S2 modules allow the implementation of the established protocol, configured in such a way that they are all within the same wireless network. The topology used in this work was the mesh configuration, i.e., all devices can communicate with each other in such a way that each robot has an identifier to know which data package corresponds to it. This provides the advantage if, at some instant of time the communication fails or is lost, communication can continue between all the other nodes (mobile robots) because the connectivity is forced to be restored. The coordinator of the network sends the maneuverability commands to each robot (linear velocities and angular velocities), where the velocities are packaged within a data frame. Figure 6 shows how the data packet sent by the master-robot and the package that responds to the slave-robots. The proposed communication scheme complies with a sampling rate of 175 ms, i.e., send-receive and process data from robots within the proposed network. Figure 7 shows how the communication among the robots is structured into the cooperative system. Communications in this type of MESH configuration can eventually be made between 65,000 devices without losing their characteristics, according to the manufacturers data. In this work, the cost of increasing robots makes the frames larger, and that implies a reduction in the velocity of communications, which is established can not be less than 100 ms. Increasing the number of robots that exceed this margin would imply an application of a massive use of robots, but if this were the case, the restriction of communications in the network would have to be increased, reducing the velocity of the system itself: e.g., in an application of object transport, the whole would move at lower velocities.

Remark 6:
The encoding and size of packets sent to each robot depend on the type of mobile platform, while the feedback information has similar sizes. As a MESH configuration was used in this work, the robots were able to exchange all the information between them, whether they were the destination or not; they received it to process it or only as a rebroadcast node. This means that the robots exchange all the information of the system as transport nodes but only process the information of which they are the addressees. The proposed communication scheme complies with a sampling rate of 175 ms, i.e., send-receive and process data from robots within the proposed network. Figure 7 shows how the communication among the robots is structured into the cooperative system. Communications in this type of MESH configuration can eventually be made between 65,000 devices without losing their characteristics, according to the manufacturers data. In this work, the cost of increasing robots makes the frames larger, and that implies a reduction in the velocity of communications, which is established can not be less than 100 ms. Increasing the number of robots that exceed this margin would imply an application of a massive use of robots, but if this were the case, the restriction of communications in the network would have to be increased, reducing the velocity of the system itself: e.g., in an application of object transport, the whole would move at lower velocities. The communication structure proposed for the set of robots was based on the IEEE 802.15.4 protocol. This protocol allows the creation of multipoint networks, and it is also capable of transmitting a large amount of data (bytes) with very low latency and achieving a predictable communication synchronization. The XBEE S2 modules allow the implementation of the established protocol, configured in such a way that they are all within the same wireless network. The topology used in this work was the mesh configuration, i.e., all devices can communicate with each other in such a way that each robot has an identifier to know which data package corresponds to it. This provides the advantage if, at some instant of time the communication fails or is lost, communication can continue between all the other nodes (mobile robots) because the connectivity is forced to be restored. The coordinator of the network sends the maneuverability commands to each robot (linear velocities and angular velocities), where the velocities are packaged within a data frame. Figure 6 shows how the data packet sent by the master-robot and the package that responds to the slave-robots. The proposed communication scheme complies with a sampling rate of 175 ms, i.e., send-receive and process data from robots within the proposed network. Figure 7 shows how the communication among the robots is structured into the cooperative system. Communications in this type of MESH configuration can eventually be made between 65,000 devices without losing their characteristics, according to the manufacturers data. In this work, the cost of increasing robots makes the frames larger, and that implies a reduction in the velocity of communications, which is established can not be less than 100 ms. Increasing the number of robots that exceed this margin would imply an application of a massive use of robots, but if this were the case, the restriction of communications in the network would have to be increased, reducing the velocity of the system itself: e.g., in an application of object transport, the whole would move at lower velocities.

Remark 6:
The encoding and size of packets sent to each robot depend on the type of mobile platform, while the feedback information has similar sizes. As a MESH configuration was used in this work, the robots were able to exchange all the information between them, whether they were the destination or not; they received it to process it or only as a rebroadcast node. This means that the robots exchange all the information of the system as transport nodes but only process the information of which they are the addressees.

Remark 6:
The encoding and size of packets sent to each robot depend on the type of mobile platform, while the feedback information has similar sizes. As a MESH configuration was used in this work, the robots were able to exchange all the information between them, whether they were the destination or not; they received it to process it or only as a rebroadcast node. This means that the robots exchange all the information of the system as transport nodes but only process the information of which they are the addressees.

Experimental Results
Experimental results are shown in this Section. To demonstrate the scalability of the proposed system, the fulfillment of tasks with two, three, and four robots were proposed. In order to include more robots, it was necessary to add the recognition of communication frames and a control segment for the new projection. At the computational level, this did not significantly increase the processing time since dynamic and kinematic controllers were carried out in each robot. An additional simulated result was included at the end, in order to validate the scalability of the control system. The control scheme presented in Figure 3 allows meeting the objectives of shape and position for a system of multiple heterogeneous robots. For the validation of the proposed controller, robots of different dynamic configurations were used in order to experience the scalability of the cooperative control. Figure 8 shows the robots used for the experiments performed. It can be seen that the set of robots was heterogeneous, with two holonomic omnidirectional robots of different characteristics: Type A was an omnidirectional robot, while the Type B robot was very similar but contained components of greater performance that made it able to carry heavy weights; the Type C robot was a normal unicycle robot, with two rear-wheel drive, and finally the Type D robot had a four-wheel drive.

Experimental Results
Experimental results are shown in this Section. To demonstrate the scalability of the proposed system, the fulfillment of tasks with two, three, and four robots were proposed. In order to include more robots, it was necessary to add the recognition of communication frames and a control segment for the new projection. At the computational level, this did not significantly increase the processing time since dynamic and kinematic controllers were carried out in each robot. An additional simulated result was included at the end, in order to validate the scalability of the control system. The control scheme presented in Figure 3 allows meeting the objectives of shape and position for a system of multiple heterogeneous robots. For the validation of the proposed controller, robots of different dynamic configurations were used in order to experience the scalability of the cooperative control. Figure 8 shows the robots used for the experiments performed. It can be seen that the set of robots was heterogeneous, with two holonomic omnidirectional robots of different characteristics: Type A was an omnidirectional robot, while the Type B robot was very similar but contained components of greater performance that made it able to carry heavy weights; the Type C robot was a normal unicycle robot, with two rear-wheel drive, and finally the Type D robot had a four-wheel drive.

First Experiment
The first experiment consisted of executing a formation between a unicycle robot (Type C robot) and an omnidirectional robot (Type A robot). The desired path ( ) is described by  Figure 9 illustrates the path executed by the robots, where the primary objective ( , ) stays on the desired path. On the other hand, the second objective during the experiment meets the shape defined, i.e., orientation and distance.

First Experiment
The first experiment consisted of executing a formation between a unicycle robot (Type C robot) and an omnidirectional robot (Type A robot). The desired path ρ(s) is described by x dO = x dO [rad]. Figure 9 illustrates the path executed by the robots, where the primary objective (x O , y O ) stays on the desired path. On the other hand, the second objective during the experiment meets the shape defined, i.e., orientation and distance.      For the planned experiment, the formation controls generated velocities references [̇̇], which by means of the kinematic control, each robot led to follow a trajectory to fulfill the formation expected. Therefore, in Figure 12, the position errors of each robot during the experiment are presented.  Figure 10 presents the desired position errors η(k) of the object. It is noted that at the beginning of the experiment, there was a major error that was caused by the initial positions of each robot. Once the point closest to the path was found, the mobile platforms were positioned in such a way that the position of the main objective was on the desired path.     For the planned experiment, the formation controls generated velocities references [̇̇], which by means of the kinematic control, each robot led to follow a trajectory to fulfill the formation expected. Therefore, in Figure 12, the position errors of each robot during the experiment are presented.      For the planned experiment, the formation controls generated velocities references [̇̇], which by means of the kinematic control, each robot led to follow a trajectory to fulfill the formation expected. Therefore, in Figure 12, the position errors of each robot during the experiment are presented. For the planned experiment, the formation controls generated velocities references . h 1 . h 2 , which by means of the kinematic control, each robot led to follow a trajectory to fulfill the formation expected. Therefore, in Figure 12

Second Experiment
The second experiment propounds to incorporate four robots for the formation, two unicycle-type mobile platforms (Type C and D robot), and two omnidirectional-type mobile platforms (Type A and B robot). In contrast, with the previous experiment, the desired formation for the four robots varied the shape parameters during the experimentation, the change in shape consisted of varying the angle and the defined virtual distances. Figure 13 indicates the shape parameters for the proposed cooperative control experiment, the number of parameters depends on the type of shape and the number of robots incorporated. Table 1 indicates the parameters desired for this experiment.
Virtual Robot1   Figure 12. Position errors of the Unicycle and Omnidirectional robots during the experiment.

Second Experiment
The second experiment propounds to incorporate four robots for the formation, two unicycle-type mobile platforms (Type C and D robot), and two omnidirectional-type mobile platforms (Type A and B robot). In contrast, with the previous experiment, the desired formation for the four robots varied the shape parameters during the experimentation, the change in shape consisted of varying the angle and the defined virtual distances. Figure 13 indicates the shape parameters for the proposed cooperative control experiment, the number of parameters depends on the type of shape and the number of robots incorporated. Table 1 indicates the parameters desired for this experiment.

Second Experiment
The second experiment propounds to incorporate four robots for the formation, two unicycle-type mobile platforms (Type C and D robot), and two omnidirectional-type mobile platforms (Type A and B robot). In contrast, with the previous experiment, the desired formation for the four robots varied the shape parameters during the experimentation, the change in shape consisted of varying the angle and the defined virtual distances. Figure 13 indicates the shape parameters for the proposed cooperative control experiment, the number of parameters depends on the type of shape and the number of robots incorporated. Table 1 indicates the parameters desired for this experiment.
Virtual Robot1   Figure 13. Formation parameters scheme for the second experiment. Through the changing of shape, it was verified that during the execution of the task, the robots could autonomously modify the positions to move the object from one place to another following a defined path. Figure 14 shows the stroboscopic movement of the executed task, while in Figure 15, it is appreciated how the shape of the robotic set changes gradually. Figure 16 shows the errors of the formation (main objective -secondary objectives), i.e., the errors of the main point In the same way, the errors of virtual parameters are denoted as  Through the changing of shape, it was verified that during the execution of the task, the robots could autonomously modify the positions to move the object from one place to another following a defined path. Figure 14 shows the stroboscopic movement of the executed task, while in Figure 15, it is appreciated how the shape of the robotic set changes gradually.  Through the changing of shape, it was verified that during the execution of the task, the robots could autonomously modify the positions to move the object from one place to another following a defined path. Figure 14 shows the stroboscopic movement of the executed task, while in Figure 15, it is appreciated how the shape of the robotic set changes gradually.    Finally, Figure 17 indicates the position errors of each robot during the experimentation, where it is shown that the error is approaching zero of each robot in the executed experimentation. Finally, Figure 17 indicates the position errors of each robot during the experimentation, where it is shown that the error is approaching zero of each robot in the executed experimentation. Finally, Figure 17 indicates the position errors of each robot during the experimentation, where it is shown that the error is approaching zero of each robot in the executed experimentation.

Third Experiment
The third experiment was performed with three robots (Type C-D-A robots) changing the formation conditions of distances and orientations at an instant of time . Table 2 indicates the desired parameters for the formation. Figure 18 shows how the robots comply with the requirements of position and shape.

Third Experiment
The third experiment was performed with three robots (Type C-D-A robots) changing the formation conditions of distances and orientations at an instant of time t. Table 2 indicates the desired parameters for the formation. Figure 18 shows how the robots comply with the requirements of position and shape.   Figure 19, shows in detail the formation of robots as they follow the desired path, demonstrating that each robot changed the position according to the required shape.  Figure 19, shows in detail the formation of robots as they follow the desired path, demonstrating that each robot changed the position according to the required shape.   To validate the correct operation of the controller and verify that the robots complied with the task designed in shape and position, the errors are shown in Figure 21.    To validate the correct operation of the controller and verify that the robots complied with the task designed in shape and position, the errors are shown in Figure 21. To validate the correct operation of the controller and verify that the robots complied with the task designed in shape and position, the errors are shown in Figure 21. To validate the correct operation of the controller and verify that the robots complied with the task designed in shape and position, the errors are shown in Figure 21.

Fourth Experiment
In order to demonstrate the system scalability, this additional experiment was taken into account. For this, a task with eight robots is carried out in a simulated environment, given the hardware limitations. Figure 22 shows the stroboscopic movements of the robotic set, while Figure  23 presents the control errors of the first, second, third, and fourth projections. The rest of the projections are supposed to tend to zero, given the stroboscopic results.

Fourth Experiment
In order to demonstrate the system scalability, this additional experiment was taken into account. For this, a task with eight robots is carried out in a simulated environment, given the hardware limitations. Figure 22 shows the stroboscopic movements of the robotic set, while Figure 23 presents the control errors of the first, second, third, and fourth projections. The rest of the projections are supposed to tend to zero, given the stroboscopic results.

Fourth Experiment
In order to demonstrate the system scalability, this additional experiment was taken into account. For this, a task with eight robots is carried out in a simulated environment, given the hardware limitations. Figure 22 shows the stroboscopic movements of the robotic set, while Figure  23 presents the control errors of the first, second, third, and fourth projections. The rest of the projections are supposed to tend to zero, given the stroboscopic results.

Conclusions
Cooperative control considering primary and secondary objectives is achieved through linear algebra methods in this work, where diverse heterogeneous robots were used to determine the performance of the developed controllers. Compared with other formation control techniques, this

Conclusions
Cooperative control considering primary and secondary objectives is achieved through linear algebra methods in this work, where diverse heterogeneous robots were used to determine the performance of the developed controllers. Compared with other formation control techniques, this proposal proposes to create projections for each robot that is included, providing the system with scalability in an easier way than other ones found in related works. Moreover, this work mathematically analyses the needed controllers to fulfill a primary task, in this case, the path followed by the robotic set, while the shape and orientation of all the robotic systems can be modified depending on the application without altering the main task given the redundancy of the system. Additionally, the stability analysis of the control law is presented to know the maximum values that the calibration parameters must have, as well as to demonstrate that the system is asymptotically stable. Furthermore, this work fuses centralized and decentralized processing of tasks in order to have a computer calculating the primary and secondary objectives, while processing units assure the kinematic and dynamic control of each robot. Finally, the set of robots used to obtain the experimental results is shown, results that demonstrate the proper functioning of the proposed controller through different real experiments where up to four different mechanisms are used. Everything described can be applied in civil construction environments, for transport and placement of materials in strategic sites; in warehouse management for transport of heavy objects of various characteristics and dimensions, and finally also in military applications for placement of dissuasive objectives in training camps. Funding: This research was funded by Corporación Ecuatoriana para el Desarrollo de la Investigación y Academia-CEDIA