# Prototype of 5G Integrated with TSN for Edge-Controlled Mobile Robotics
## 4 Discussion and Results
### Evaluation of the Implementation Regarding the Use Case  
In Section 2, we discussed the motivation behind the use case and utilizing 5G in combination with TSN for cooperative tasks between mobile robots. As mentioned before, the reliable real-time communication between the factory cloud system and the mobile robots is vital to enable the synchronized movements of mobile robots. The factory cloud system calculates and transmits the Robot Operating System (ROS) based commands related to the path planning, manipulator movement, obstacle avoidance, and advanced AI/ML algorithms for object detection to the mobile robots. The factory cloud system transmits control commands to the mobile robots periodically with the cycle time of 7 ms with the packet size ranging from 32 to 80 bytes. Since control commands are critical, the PLC is configured such that the data should arrive at the receiver side within a latency bound of 6.3 ms (90% of 7 ms cycle time). Otherwise, the mobile robot will come to a halt, since the controller raises a critical error due to the safety requirement. Hence, communication  
Figure 14: Left: Jitter of the PC output at the network card of the PC. Right: Jitter of the traffic shaped including over-the-air transmissions at the egress gate of TSN-Switch 2 using IEEE 802.1 Qbv. Figure 13: Left: Jitter of the PC output at the network card of the PC. Right: Jitter including over-the-air transmission at the egress gate of TSN-Switch 2 without scheduled traffic. between the factory cloud system and the mobile robots--including the TSN network and the 5G system--needs to fulfill this upper latency bound. As measurement tests indicate, the 5G system integrated with the TSN network provides a latency below 0.8 ms with high reliability. Such reliability ensures that the critical traffic is transmitted within the required time window for the use case. In our use case, mobile robots transmit their LiDAR data and camera data to the factory cloud system. LiDAR data are classified as a medium traffic. LiDAR data periodically transmit data to the factory cloud system every 25 to 100 ms (which is configurable) in order to provide essential data for obstacle avoidance and emergency stop. LiDAR data are part of the uplink communication in our 5G and TSN setup with the required throughput of around 1 to 3 Mbps. LiDAR data are transmitted to the factory cloud system in real time with high reliability within the latency below 1 ms. On the other hand, camera traffic is considered as background traffic with large packet sizes, which requires higher throughput compared to LiDAR but without strict latency requirement on the wireless communication. The challenge for the camera data is the high throughput, which is limited in the uplink direction by the uplink capacity of around 150 Mbps. In the use case, the resolution of the camera is reduced to keep its throughput within 20 to 50 Mbps while not yet degrading the performance of AI/ML-based object detection running on the factory cloud system. Based on the measurement test for the data packet size of 1042 bytes, the maximum latency for over-the-air communication stays around 1 ms, which is much lower than what is required for data transmission of the camera. The coordination of mobile robots demands 5G and TSN to fulfill the traffic requirement of both mobile robots at the same time. In this case, the robot controller in the factory cloud system receives the necessary data from both mobile robots and schedules the movement of each of the mobile robots to execute the coordination tasks. The challenge of coordination tasks in our use case is syncing the movement of mobile robots specially when they handle sensitive materials such as glasses, since any jitter that causes the latency of communication between the controller and the mobile robot to go beyond the maximum latency bound causes one mobile robot to stop operating.