# Generating Datasets for Real-Time Scheduling on 5G New Radio
## 1 Introduction  
The networking of industrial systems is the foundation of intelligent manufacturing [1]. Networking means connecting a large number of production elements, such as workers, machines, materials, etc., to the information system, and adopting advanced network techniques to implement high-performance communications between these elements [2]. For modern industrial systems, because wired networks are expensive and cannot connect massive elements, wireless networks are the best choice for industrial networking. However, due to performance limitations, traditional industrial wireless networks can only be used to monitor unimportant elements such as environmental information and instrument data of process industry. It has always been difficult to replace wired networks in industrial applications with low-latency requirements. For example, in order to make a robotic arm move smoothly, the latency of its control command to be transmitted from the controller to the actuator must be less than 10 ms [3]. Wired networks can satisfy the latency requirement easily, whereas traditional wireless networks, e.g., WirelessHART and WIA-PA, take about 100 ms [4], which makes them unsuitable for such industrial scenarios. With the development of 5G, its ultra-reliable and low-latency communication (URLLC) has implemented wireless transmission latency of less than 1 ms [5, 6] and makes it possibleto support wireless motion control. However, many technical details still need to be improved. For example, to immediately retransmit lost data packets without waiting for an authorization, existing techniques must reserve redundant network resources for retransmissions in advance. However, these redundant reservations waste many resources and severely reduce network capacity. Therefore, in order to adopt 5G in industrial systems, the 5G resources should be scheduled effectively to avoid unnecessary waste. A typical 5G-based motion control system is shown in Figure 1. The coordinator of users is directly connected to a 5G base station, and multiple users are connected to the base station through 5G new radio (NR). The 5G NR protocol is the wireless protocol between users and the base station, i.e., it is the wireless part of 5G. The resources of 5G NR include two dimensions: time and frequency. A real-time scheduling algorithm running on the base station assigns time and frequency resources to data packets and sends the assignment results to the corresponding users. Hence, the real-time scheduling algorithm is the key to making full use of 5G resources under low-latency requirements. In harsh industrial environments, the available wireless resources are very limited, so more effective scheduling algorithms should be used. Although there has been a lot of research on scheduling algorithms for industrial wireless networks, they cannot be used in 5G because multiple subcarrier spacings defined in 5G NR are not considered in other wireless networks. If a scheduling algorithm based on single subcarrier spacing is applied to 5G, its performance will be severely limited. The real-time scheduling problem of industrial wireless networks with a single subcarrier spacing has been proved to be NP-hard [7]. Only a few simple scheduling problems can find optimal solutions, whereas most scheduling problems cannot even close to optimal solutions. The 5G scheduling problem with multiple subcarrier spacings is more complicated than others. Thus, the scheduling performance is more difficult to guarantee. For such complicated problems, machine learning is a good choice, and its impressive performance has been demonstrated in many problems. In the field of real-time scheduling, some researchers have used supervised learning to solve the task scheduling problem of processors, and the results show that supervised learning can further improve the scheduling performance [8]. However, the work is limited by the training dataset.