## 3 Simulation of Underwater Electric Field Communication
### Analysis of Underwater Electric Field Communication Simulation Results
#### 3.2.3 Underwater Electric Field Communication End-to-End Delay Simulation Test  
In underwater electric field communication, end-to-end delay is used to evaluate the smoothness of network transmission in the underwater CSMA/CA channel. End-to-end delay consists of three parts: transmission delay, encapsulation delay, and queuing delay. Transmission delay is determined by the link length divided by the propagation speed, so it is a fixed value that only depends on the link length and transmission speed. Encapsulation delay is the time it takes for the first byte of data to enter the link until the last byte enters the link, which is the time it takes to put the entire packet into the link. Queuing delay occurs when multiple packets arrive at the same router at the same time and are stored in the router's buffer in order of arrival for transmission. Therefore, this delay depends on how many waiting packets are in front of the data packet, and it is an uncertain delay [33]. End-to-end delay is measured by the routing layer when receiving data, and it represents the average time it takes for a data packet to successfully travel from the source node's routing layer to the destination node's routing layer. In underwater electric field communication, this parameter is used to reflect the smoothness of data transmission in the network, where a smaller delay indicates a smoother network. Its definition is shown in Equation (12). \[d_{end-end}=\frac{d_{TotalTime}}{d_{TotalNumber}} \tag{12}\]  
where \(d_{end-end}\) is the end-to-end average delay, \(d_{TotalTime}\) is the sum of the transmission time of all data packets arriving at the destination node, and \(d_{TotalNumber}\) is the number of data packets arriving at the destination node. In communication networks, the number of packets in the node cache represents the number of packets stored in the routing layer buffer. The fewer the number of packets, the shorter the time the data stays in the wireless router, allowing the data to be forwarded faster. The number of discarded packets due to the lack of routing refers to the number of packets discarded by the node when the corresponding routing response does not arrive before the end of the routing discovery period after the node sends out the routing request. In the simulation scenario, two protocols (OLSR and ADOV) were applied to five nodes within 10 s. The comparison results of the end-to-end delay of the two routing protocols under the CSMA/CA channel are shown in Figure 7.  
The simulation results show that the OLSR routing protocol had a smaller routing packet delay and shorter communication time compared to AODV during communication  
Figure 7: Comparison analysis of underwater electric field communication delay. among five nodes. Therefore, in the subsequent underwater electric field communication, OLSR routing protocol based on the CSMA/CA channel was chosen for multi-node underwater communication. This can reduce the time delay in signal transmission between nodes, ensuring real-time operations and improving operational efficiency in underwater multi-node. Thus, in the subsequent design and experimental verification process of the underwater electric field communication channel contention protocol, the OLSR routing protocol was chosen to be embedded in the CSMA/CA channel design process, ensuring larger received packet size and shorter routing packet delay time in multi-node communication, thereby improving the network topology structure of underwater multi-node clusters, providing guarantee for high reliability and low delay data transmission, as well as improving the signal transmission stability and real-time performance between nodes. Design and Experimental Verification of Backoff Protocol for Underwater Electric Field Communication Channel  
To achieve the dynamic underwater electric field multi-node communication system, the primary issue to address was the communication problem within the underwater multi-node.