# Formation Control of Dual Auto Guided Vehicles Based on Compensation Method in 5G Networks
## 2 5G Networks Characteristics
### 5G Delay Estimation  
While AGV1 measures \(RTT\), AGV2 will actively send data to AGV1 in collaborative transport. AGV1 could not obtain the delay of current data of AGV2. In the situation, the following work is to estimate the delay of current transmission by using previous \(RTT\). Researchers have proposed many estimation methods, including neural network methods [27], time series analysis methods [28] and Kalman filter methods [19]. Both neural network method and time series analysis method will bring large computing load to controller, which may affect the accuracy of servo control. In contrast, Kalman filter method requests less computing resource and is suitable for real-time control. As a typical real-time control system, AGV system sets most closed-loop control in local to ensure the stability and accuracy, which requires an estimation method with less computation load. Therefore, Kalman filter method is applied to estimate delay in this paper. This paper has the following assumptions in the estimation of delay:  
1. In a round-trip transmission, the two E2E delay are equal. 2. The communication network is relatively stable between two \(RTT\) measurements. Figure 3: \(\Delta RTT\) distribution histogram. If assumption 1 is established, \(RTT/2\) can be used to express the E2E delay. If assumption 2 is established, the estimation of \(RTT\) can be used to represent the network status in the time between 2 round-trip time measurements. The conclusion in Section 2.2 shows that the \(RTT\) jitter is relatively stable. Meanwhile, it is a vital serious safety risk that network conditions violently and rapidly fluctuate. Devices will not continue to work in this situation. Therefore, it can be considered that assumption 2 is established. Considering the conclusions of Section 2.2 and referring to the [19], the delay of the transmission process could be modeled as  
\[\left\{ \begin{array}{l}\tau(k+1)=\tau(k)+a(k)\\ y_{rtt}(k)=\tau(k)+b(k)\end{array} \right. \tag{2}\]  
where \(\tau(k)\) refers to the current real RTT delay, \(a(k)\) is a white noise with a mean value of 0 and a covariance of \(Q\). \(y_{rtt}(k)\) is the current measured RTT, and \(b(k)\) is a mean value of 0 white noise with covariance \(R\). Through the above modeling, the Kalman filter can be used to estimate the time delay. The formula for using the Kalman filter to estimate is  
\[\left\{ \begin{array}{l}\tau(k)=\tau(k-1)\\ P^{-}(k)=P(k-1)+Q\\ K(k)=\frac{P^{-}(k)}{P^{-}(k)+R}\\ \tau(k)=\tau^{-}(k)+K(k)\big{(}y_{rtt}(k)-\tau^{-}(k)\big{)}\\ P(k)=P^{-}(k)(1-K(k))\end{array} \right. \tag{3}\]  
To better reflect the influence of the current data in the long-time operation, the forgetting factor \(\lambda\) is often deployed. Thus it can be rewritten as  
\[K(k)=\frac{1}{\lambda}\frac{P^{-}(k)}{P^{-}(k)+R} \tag{4}\]  
The process of obtaining the estimated value of time delay is shown in Figure 4. AGV 1 will continue to measure RTT and generate an estimate delay \(\tau(k)\) once \(RTT(k-1)\) is obtained. Before \(RTT(k)\) is obtained, the \(\tau(k)\) will represent the network delay status. There are some statistical estimation methods [29] such as the mean method (5), median method (6), and max value method (7). \[\tau(k+1)=\text{mean}\{RTT(k),RTT(k-1),\ldots,RTT(1)\} \tag{5}\]  
\[\tau(k+1)=\text{median}\{RTT(k),RTT(k-1),\ldots,RTT(1)\} \tag{6}\]  
Figure 4: Schematic diagram of Kalman filter delay estimation. \[\tau(k+1)=\max\{\text{mean}(RTT(k),RTT(k-1),\ldots,RTT(1)), \tag{7}\] \[\text{median}(RTT(k),RTT(k-1),\ldots,RTT(1))\}\]  
The \(\tau(k)\) is estimated from \(RTT(k-1)\). The RTT data measured in Section 2.2 is used to verify the performance of the Kalman filter estimate method with \(Q=0.4\), \(R=16\)\(\lambda=1\). Using root mean square error (RMSE)  
\[S_{e}=\sqrt{\frac{\sum_{k=1}^{k=n}(RTT(k)-\tau(k))^{2}}{n}} \tag{8}\]  
to characterize the performance of estimation methods. Table 2 shows the \(S_{e}\) of Kalman filter method and the above statistical methods.