# Reconfigurable Formation Control of Multi-Agents Using Virtual Linkage Approach
## 4 Simulation and Results
### Parameters Analysis
#### 4.3.2 Number of Virtual Links and Shape Transformations  
In order to analyze the performance using a different number of virtual links, nine agents are designed as a virtual linkage with three virtual links to perform the same task in Section 4.2. In detail, the configuration of the virtual linkage is predefined:  
\[\text{Virtuallinkage\_C}=\left\{\begin{array}{l}\text{virtuallink1}=\{\text{ agent1,agent2,agent3,agent4,agent5\}}\\ \text{virtuallink2}=\{\text{agent5,agent6,agent7\}}\\ \text{virtuallink3}=\{\text{agent7,agent8,agent9\}}\end{array}\right. \tag{18}\]  
Recall that the position of the \(i\)th point in the \(j\)th virtual link coordinate frame is represented as \({}^{vj}p_{i}\), and the designed virtual linkage has the following points.  
\[\begin{array}{ll}{}^{v1}p_{1}=[0,0],&{}^{v1}p_{2}=[0.1,0],{}^{v1}p_{3}=[0.2, 0],{}^{v1}p_{4}=[0.3,0],{}^{v1}p_{5}=[0.4,0];\\ &{}^{v2}p_{5}=[0,0],{}^{v2}p_{6}=[0.1,0],{}^{v2}p_{7}=[0.2,0];\\ &{}^{v3}p_{7}=[0,0],{}^{v3}p_{8}=[0.1,0],{}^{v3}p_{9}=[0.2,0];\end{array} \tag{19}\]  
The schematic of the designed virtual linkage is presented as Figure 22. It is worth mentioning that two virtual joint angles,  
\[\theta_{d}=[\theta_{1},\theta_{2}], \tag{20}\]  
are needed to specify the formation pattern. The significance of this property is that we are able to have more reconfiguration ability. In detail, the virtual linkage here is able to behave as the virtual linkage defined as Equations (11) and (12) by letting \(\theta_{2}=0\). Meanwhile, the nine agents are able to form some additional formation shapes and transformations by setting \(\theta_{2}\) into different values.  
The nine agents are designed to pass through the gallery with a predefined trajectory and formation transformation using Equations (13)-(15) and (21).  
Figure 21: Comparison between virtual linkages with different number of agents: (**a**) the virtual linkage defined in Equation (11); (**b**) the virtual linkage defined in Equation (16).  
Figure 22: Schematic of the designed virtual linkage.  
As it can be seen from the results, the virtual linkage here behaves as the virtual linkage defined in Figure 11 when \(\theta_{2}=0\). Meanwhile, the virtual linkage can transform into more formation shapes when \(\theta_{2}\
eq 0\). In fact, this phenomenon can be illustrated with the principle of DOF (degrees of freedom). In mechanical engineering, DOF is the number of independent parameters that define its configuration. This implies that the more DOF there are, the more formation shapes the virtual linkage  
Figure 26: (a) Real and desired virtual joint angle; (b) error between real and desired virtual joint angle.  
Figure 25: (a) Real and desired attitude of the virtual linkage; (b) error between real and desired attitude.  
can be configured to. When the virtual linkage is designed as a series of virtual links connected by virtual joints that extend from a base to an end, the DOF has the form:  
\[\text{DOF}\,=\,\text{numberofvirtualjoints}\,=\,\text{numberofvirtuallinks}\,-\,1 \tag{22}\]  
In such situations, the reconfiguration ability of the virtual linkage increases with the growing number of virtual links.