# Formation Control of Dual Auto Guided Vehicles Based on Compensation Method in 5G Networks
## 4 Experiment and Result  
The AGV in this paper is product of Huaheng welding company, type of Muliuliiuma-500. The parameters of the AGV used in this paper are shown in Table 3.  
The control system is developed by TwinCAT2 and the controller is Beckhoff CX5010. The 5G CPE is the product of Lierda. The 5G CPE is connected to the controller through the EtherCAT EAP protocol and the communication protocol of the servo motor is CANOPEN. The architecture of the AGV system is shown in the Figure 10.  
Three optoNCDT 1420 laser sensor of Micro-Epsilon are used to measure the distance, the difference of two AGV postures [\(\Delta\chi\)\(\Delta\)\(\Delta\)\(\beta\)] \({}^{T}\) could be obtained by calculation. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Unit** \\ \hline Size & 1000 \(\times\) 805 \(\times\) 300 & mm \\ Weight & 210 & kg \\ Maximum load & 500 & kg \\ Radius of driving wheel & 105 & mm \\ Distance between driving wheel & 718 & mm \\ Maximum accelerates & 0.6 & m/s\({}^{2}\) \\ Guided method & QR & - \\ Drive method & Different drive & - \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Parameters of AGV. Figure 10: Experiment AGV system architecture. Figure 11 shows the measurement method of posture error \(\delta\) with 3 laser sensors.CC1 and CC2 are the geometric centers of 2 AGVs. The coordinate is set as Figure 11 and CC1 is the origin. (\(x_{1}\), \(y_{1}\)), (\(x_{2}\), \(y_{2}\)) and (\(x_{3}\), \(y_{3}\)) are the three sensor positions while \(L_{1}\), \(L_{2}\) and \(L_{3}\) are distance measured by 3 sensors. \(A\) (\(x_{a}\), \(y_{a}\)), \(B\) (\(x_{b}\), \(y_{b}\)) and \(C\) (\(x_{c}\), \(y_{c}\)) are the laser beam measurement points on the AGV2. \(GH\) and \(GI\) are the edges of AGV 2 and \(GH\) is vertical to \(GI\). A reflector is installed parallel to \(GH\) on AGV2. The distance between the reflector and CC2 is \(L_{C}\). \(EF\) is the line where the reflector is located. \(C\) is on the \(EF\) and \(M\) is the midpoint of the \(EF\). By calculating the position of CC2, the \(\delta\) could be obtained. This paper has two assumptions:  
1. The measurement equipment is installed accurately to ensure \(\overset{\rightarrow}{L_{1}}\), \(\overset{\rightarrow}{L_{2}}\) // \(\overset{\rightarrow}{x}\), \(\overset{\rightarrow}{L_{3}}\) // \(\overset{\rightarrow}{y}\), \(EF\) // \(GH\). Therefore, \(|EF|=l\) and \(|DCC2|=L_{C}\). 2. There is no deformation on both AGV's body and measurement equipment during measurement operation. The laser beam measurement positions are \(A\) (\(x_{a}\), \(y_{a}\)) = (\(x_{1}+L_{1}\), \(y_{1}\)), \(B\) (\(x_{b}\), \(y_{b}\)) = (\(x_{2}+L_{2}\), \(y_{2}\)), and \(C\) (\(x_{c}\), \(y_{c}\)) = (\(x_{3}\), \(y_{3}+L_{3}\)). \(A\) and \(B\) are both on the edge of AGV2, so the difference of heading direction angle is  
\[\theta=\arctan\frac{L_{2}-L_{1}}{y_{1}-y_{2}} \tag{17}\]  
The slope and equation of \(AB\) are  
\[\left\{ \begin{array}{c}K_{AB}=\frac{y_{b}-y_{a}}{x_{b}-x_{a}}\\ L_{AB}:y-y_{a}=K_{AB}(x-x_{a})\end{array} \right. \tag{18}\]  
Geometric relationship shows \(AB\perp EF\) and \(C\) is on the \(EF\). The slope and equation of \(EF\) are  
\[\left\{ \begin{array}{c}K_{EF}=-\frac{1}{K_{AB}}=-\frac{x_{b}-x_{a}}{y_{b}-y_ {a}}\\ L_{AB}:y-y_{c}=K_{EF}(x-x_{c})\end{array} \right. \tag{19}\]  
As the intersection of \(AB\) and \(EF\), the position of \(E\) (\(x_{e}\), \(y_{e}\)) could be calculated by (18) and (19). There is  
\[\left\{ \begin{array}{c}x_{e}=\frac{K_{AB}x_{a}-K_{EF}x_{b}+y_{c}-y_{a}}{K_{ AB}-K_{EF}}\\ y_{e}=K_{AB}(x_{e}-x_{a})+y_{a}\end{array} \right. \tag{20}\]  
Figure 11: Measurement system schematic diagram. Then midpoint \(M\) is applied to calculate the position of CC2. According to the geometric relationship, there is  
\[\left\{ \begin{array}{l}x_{CC_{2}}=x_{e}+l\cos\theta+L_{c}\sin\theta\\ y_{CC_{2}}=y_{e}+l\sin\theta-L_{c}\cos\theta\end{array} \right. \tag{21}\]  
The posture difference \(\delta=[\Delta x\ \Delta y\ \Delta\theta]^{T}=[\ x_{CC2}\ y_{CC2}\ \theta]^{T}\).