## 2 Simulation Model Setting for Underwater Electric Field Communication
The NS-3.31 virtual network structure based on CSMA/CA is shown in Figure 2.  
The node model in this article sets the initial position coordinates for five nodes using the MobilityHelper object and configuring properties related to \"position allocator functionality\". The mobility helper in this node model uses a two-dimensional grid to initially place the nodes. The underwater electric field communication nodes are set within a 60 m \(\times\) 60 m area, and communication between multiple nodes is established. Next, the nodes are added to a NodeContainer, which is a helper class in NS-3.31 that allows for operations on multiple nodes and stores pointers to these objects in the system. Then, the CAMA/CA channel is installed to connect the electric field communication devices to the nodes, creating a network topology for underwater electric field communication with multiple nodes. After that, the OLSR and AODV routing protocols are installed based on the TCP/IP protocol stack, which installs a corresponding network protocol stack for each node in the node container. Finally, the appropriate application layer protocol is chosen based on the selected transport layer protocol to enable data communication between the server and clients, completing the setup of the entire simulation process. When AUV multi-nodes communicate in electric fields underwater, they have the advantage of good omnidirectional data parameters, but there is a characteristic of signal transmission attenuation, mainly related to transmission distance. Therefore, in underwater multi-node network communication based on CSMA/CA channels, it is necessary to determine the propagation loss model at a specific distance. Due to the long transmission distance of underwater electric fields in low-frequency communication, the communication frequency, i.e., carrier frequency 14 kHz, is adopted. Next, based on the characteristics of underwater media, a 15 m path loss model is calculated, and the calculation results are imported into the NS-3.31 network model to complete the underwater electric field multi-node networking communication model based on CSMA/CA channels, verifying the stability and backoff characteristics of signal transmission between nodes. The CSMA/CA channel attenuation model will be calculated based on the relationship between underwater communication transmission distance and signal attenuation, providing a theoretical basis for NS-3.31 simulation based on underwater electric field communication. In underwater electric field communication, the transmission distance is related to the signal attenuation model, which is also known as the propagation model. This model implements the Friis propagation loss model, which was first described in [27]. The original equation was described as follows:  
\[\frac{P_{r}}{P_{t}}=\frac{A_{r}A_{t}}{d^{2}\lambda^{2}} \tag{1}\]  
where \(A_{r}\) is the effective receiving area of the receiving end (m\({}^{2}\)) and \(A_{t}\) is the effective transmitting area of the transmitting end (m\({}^{2}\)). For an isotropic antenna with no heat loss, the following equations are used:  
Figure 2: NS-3.31 virtual network structure. \[A_{t}=\frac{\lambda^{2}}{4\pi} \tag{2}\]  
The final equation becomes the following:  
\[\frac{P_{r}}{P_{t}}=\frac{\lambda^{2}}{\left(4\pi d\right)^{2}} \tag{3}\]  
The initial expansion of this original equation is as follows:  
\[P_{r}=\frac{P_{t}G_{t}G_{r}\lambda^{2}}{\left(4\pi d\right)^{2}L} \tag{4}\]  
where \(P_{t}\) is the transmit power (W), \(P_{r}\) is the receive power (W), \(G_{t}\) is the transmit gain, \(G_{r}\) is the receive gain, \(\lambda\) is the wavelength (m), \(d\) is the distance (m), and \(L\) is the system loss. The conductivity and permeability are set to \(\sigma=4\) Sm\({}^{-1}\) and \(\mu=1.257\times 10^{-6}\) Hm\({}^{-1}\), respectively. The communication frequency is set as the carrier frequency \(f=14\) kHz.