## 4 The Trust Evaluation Process
### Trust Calculation for One-Hop Neighbor Nodes
#### 4.2.1 Direct Trust Calculation for One-Hop Neighbor Nodes  
If there are enough information interactions between neighbor nodes, direct trust can be calculated based on their communication behaviors. In this subsection, direct trust is calculated based on two trust evidences: packet error and packet loss. In current trust models, the packet loss is widely used as important trust evidence [32]. Thus in this paper, the statistics of packet loss is also used as follows. It is generally known that underwater acoustic communications are characterized by high bit error and temporary loss of connectivity. Therefore, in UWSNs, the packet loss is always caused by three reasons: unreliable acoustic channel, inevitable node movement and malicious nodes. In order to accurately obtain the packet loss from malicious nodes, we first need to analyze the packet loss caused by acoustic communication channel and node movement. In the acoustic channel, the data packet loss is mainly caused by high Bit Error Rate (BER) which is directly related with the signal-to-noise ratio (SNR) of the channel. Therefore, the SNR of the acoustic channel is first analyzed as:  
\[SNR(l,f)=\frac{P/A(l,f)}{N(f)\Delta f} \tag{1}\]  
where \(P\) is the acoustic signal power. \(\Delta f\) is the noise bandwidth of the receiver node. \(N(f)\) is the the overall power spectral density of noises. \(A(l,f)\) is the path loss of the acoustic signal. There are four kinds of the ocean background noise: turbulence, shipping, waves and thermal noise. We use \(N_{t}(f)\), \(N_{s}(f)\), \(N_{w}(f)\) and \(N_{th}(f)\) to denote the power spectral density of turbulence, shipping, waves and thermal noise, respectively. \[\left\{ \begin{array}{l}10\log N_{t}(f)=17-30\log f\\ 10\log N_{s}(f)=40+20(s-0.5)+26\log f\\ -60\log(f+0.03)\\ 10\log N_{w}(f)=50+7.5w^{1/2}+20\log f-40\log(f+0.4)\\ 10\log N_{t}h(f)=-15+20\log f\end{array} \right. \tag{2}\]  
Therefore, we can obtain \(N(f)=N_{t}(f)+N_{s}(f)+N_{w}(f)+N_{th}(f)\). In addition, the path loss \(A(l,f)\) is calculated by \(A(l,f)=A_{0}l^{k}a(f)^{l}\), where \(A_{0}\) is a normalization constant. \(l\) is the communication distance between two nodes. \(k\) is the energy propagation coefficient. In general, for the spherical spreading, \(k=2\). \(a(f)\) is the absorption coefficient in underwater environment and \(f\) is the frequency of the acoustic signal. Figure 4: Trust calculation for one-hop neighbor nodes. Based on the SNR in Equation (1) and the modulation mode of acoustic communication, the average bit error rate (BER) can be calculated by \(BER(l,f)=\Phi^{M}(SNR(l,f))\), where \(M\) denotes the used modulation mode. Then, the packet loss caused by unreliable acoustic channel can be obtained as:  
\[P_{loss1}=\Psi^{F}(b,BER(l,f)) \tag{3}\]  
where \(F\) denotes the forward error correction (FEC) mechanism. \(b\) is the length of the packet. To study the packet loss caused by node movement, we adopt a Meandering Current Mobility (MCM) model [33] to describe the mobility of ocean current and underwater sensor nodes. MCM exploits the fact that the ocean current is a stratified, rotating fluid. Therefore, compared with the current movement in the horizontal direction, the vertical movement of ocean can be negligible. The ocean current is described as an incompressible two-dimensional flow, which is denoted by a stream function \(\psi\). \(\psi\) consists of two components of the divergenceless velocity: \(u=-\frac{\partial\psi}{\partial y},v=\frac{\partial\psi}{\partial x}\). \(u\) is the zonal (eastward) component of the velocity and \(v\) is the meridional (northward) one. The node movement is calculated based on the solution of Hamiltonian ordinary differential equations: \(\dot{x}=-\partial_{y}\psi(x,y,t),\dot{y}=-\partial_{x}\psi(x,y,t)\). Therefore, we can judge whether two nodes \(\mathbf{a}\) and \(\mathbf{b}\) are neighbor nodes or move out of the communication range \(r\) according to the movement trajectory. If two node cannot directly communicate with each other, we think the packet loss is infinite.