## 3 Materials and Methods
### Latency Evaluation  
We evaluated several test cases to comprehensively study the impact on communication latency introduced by 5G. These scenarios were selected to provide a deeper understanding of the contributions to the overall latency resulting from each processing step within the end-to-end communications process. Specifically, the steps taken to transmit a GOOSE protocol packet over 5G include the encapsulation of the GOOSE packet within TCP, the 5G network processing, sending the packet over 5G using the GPRS Tunneling Protocol (GTP), and finally, the UE extracting and forwarding the GOOSE packet over Ethernet. A timing diagram of this process can be seen in Figure 4. To isolate the effects of each network component on the latency of the overall system in the absence of 5G, we also conducted additional tests for direct TCP communication between both sides, referred to as the \"TCP\" test scenario, as well as TCP communication with an additional hop to the Core Network workstation, which we call \"TCP 2-Hop\" in this paper. For each scenario outlined, a GPIO on the test controller was configured to read the state of an IED contact. The contact was configured to reflect the value of a boolean variable within the GOOSE dataset. Each of these network configurations is explained in more detail in the following paragraphs. L2-Eth--This network configuration measures the delay of the standard GOOSE network. GOOSE operates by sending Ethernet frames directly over a wired link. In this configuration, the test controller is connected to the same managed switch as the DUT. GOOSE packets are generated by the test controller and multi-cast to a pre-defined MAC address of the DUT subscription. This scenario is used as a baseline for all tests moving forward and outlines the difference between the subsequent tests and the IED's baseline response time. These results are also used to characterize the stability of the measured 5G network latency and to detect and contrast the occurrence of outliers within a standard GOOSE configuration compared to the 5G-encapsulated packets. TCP--The network configuration for both the TCP and TCP 2-Hop configurations can be seen in Figure 5. In this configuration, the GOOSE Publisher creates the same GOOSE packet that would occur in the L2-Eth scenario. However, after the packet is generated, it is encapsulated within a TCP/IP frame structure, similar to the procedure required for R-GOOSE communications. The GOOSE publisher establishes a TCP session with the UE before sending any encapsulated GOOSE packets. Since GOOSE packets are scheduled at a rate not exceeding once per second throughout all of our tests, the same TCP session is used  
Figure 4: Complete latency timing diagram. for all packets. In this configuration, the gNB machine is removed from the network setup, and instead, the UE is directly connected to the switch, thereby providing a direct TCP connection from the publisher to the UE for the extraction and publishing of the GOOSE packet. This is illustrated in Figure 6.  
TCP 2-Hop-- In the TCP 2-Hop configuration, an additional routing step is added at the Core Network workstation. This configuration is utilized to identify any latency contribution that is introduced through the additional routing step required to communicate between the GOOSE Publisher and gNB in cases where the 5G core tunnels traffic using GTP. This test generates packets at the same publisher, but it first sends the TCP packet to the Core Network instead, which is then tasked with forwarding the packet to the UE through a second TCP session, representing the GTP tunnel as a second network hop. 5G--With the initial 5G test configuration, a standard TCP session over 5G eMBB is utilized. The test controller establishes a regular TCP session with the UE that traverses through the 5G network by virtue of a GTP tunnel within the 5G realm of this network configuration.