# An Experimental Framework for 5G Wireless System Integration into Industry 4.0 Applications
## 3 Experimental Framework for 5G Integration
### 5G Hardware and Software Prototyping Tools
15 ones obtained in [9], or from simulations for those technologies that are not available in the lab, e.g., 5G ultra reliable and low latency communication (URLLC). The interval at which the device adjusts the delay values is fully configurable, although it has not yet been possible to adjust it in a per-packet basis, due to HW limitations. The current implementation adds similar delay in both communication directions, although it should be possible to adjust the SW implementation to introduce different delays for different directions. The 5 GE can be used mainly in connection with STEP 3 in the operational flow to estimate the performance of the selected use case over a given wireless technology and validate the suitability of the selection. The 5 GE constitutes a simplified intermediate solution between a 5G radio channel network emulator like the one from Keysight [17] and an ethernet network emulator such as the ones from Spirent [18] or iTringey [19]. The main benefit from the 5 GE as compared to those commercial devices is that we can emulate 5G performance over ethernet-based links based on empirical traces obtained by ourselves in realistic and controlled operational conditions, without having to rely on pre-configured delay and jitter settings or standard channel models. To date, our 5 GE implementation only allows for emulation of a single 5G link, while commercial tools are capable of emulating larger networks consisting of multiple links. Both devices are \"plug & play\" and their operational procedures are very similar. In order to plug the NTS or the 5 GE into industrial machinery as shown in Figure 3c, the target ethernet cable should be disconnected from the machinery (e.g., PLC in the picture) and connected to the one of the ports of the device (e.g., the orange cable that spans from the top to the bottom of the picture). Then, the other port is connected back to the machinery with the original PLC Ethernet cable (e.g., the green cable in the middle of the picture that connects to the network switch on the left). Once the device is installed, it should be powered on and it will automatically begin its operation. As a practical recommendation, the NTS and 5 GE should be used over the machinery for a time long enough to capture at least one full production cycle in the system as this would ensure that the data traffic analysis or the 5G emulation captures all possible communication states. The functional architecture of the WMAGW is displayed in Figure 4a. As detailed in the diagram, the WMAGW enables two different modes of connectivity: IP-based mode or L2-tunnel mode. The use or one or the other mode depends on the characteristics of the  
Figure 3: (**a**) Functional block diagram of the NTS. (**b**) Functional block diagram of the 5 GE. (**c**) Picture of the NTS/5 GE (v2) device deployed within a production line module. Under such exact same deployment configuration, the box can be used to either logging the data traffic to and from a PLC, or to introduce communication delays to emulate the connectivity of the PLC over 5G wireless. selected industrial application and its associated communication requirements, and the capabilities of the machinery that the WMAGW device will be plug into. By using the WMAGW in L2-tunnel model, we ensure that all traffic at all layers running over the ethernet interface of the production machinery is transported over wireless, e.g., 5G. This is done by encapsulating the incoming ethernet frames into UDP packets, which are later routed over the wireless port interface of the source WMAGW towards a destination WMAGW. The data sent over 5G is received at the destination WMAGW via its wireless interface, where the UDP packets are decapsulated into ethernet frames and sent over the ethernet port of the device into the ethernet interface of the production machinery. If all data control traffic in the selected application is IP-based and there are no L2 control mechanisms implemented in the system (i.e., broadcast), the IP-based mode can be used instead.