## 3 DSSS in Electric Field Communication
### The Modulation of DSSS BPSK Signals  
In a digital communication system, the source output contains the information to be transmitted, known as the digital baseband signal. To transmit the signal through an underwater channel, the digital signal must be modulated onto a carrier wave, shifting the signal's spectrum to a higher frequency. Modulation is the process of using the baseband signal to control certain parameters of the carrier wave. Digital modulation can be divided into Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), and Phase Shift Keying (PSK). For a digital communication system, the bit error rate (BER) is an important metric to assess its reliability and effectiveness. The BER formulas for binary digital modulation systems are shown in Table 2[20].  
Figure 2: Distribution of electric field strength in the _xoz_ plane (\(y=0\)) at different frequencies.  
where \(r\) represents the SNR, and \(erfc(x)\) is the complementary error function, expressed as follows:  
\[erfc(x)=\frac{2}{\sqrt{\pi}}\int\limits_{x}^{\infty}e^{-\eta^{2}}d\eta \tag{12}\]  
Comparatively, under the same SNR, the BER is the lowest when using BPSK modulation, followed by 2 FSK, and 2 ASK has the highest BER. For the same modulation scheme, coherent demodulation results in a lower BER compared to non-coherent demodulation. Therefore, BPSK modulation offers better interference resistance than 2 ASK and 2 FSK. This paper employs BPSK modulation with coherent demodulation.  
BPSK is a modulation process that utilizes changes in the carrier wave's phase to convey digital signals. In BPSK modulation, the carrier wave's frequency and amplitude remain constant. When transmitting bit \"1\", the carrier wave phase is set to \(\varphi_{1}\), and for bit \"0\", the carrier wave phase is \(\varphi_{2}\). This can be represented as:  
\[e_{2 psk}=\begin{cases}A\cos(\omega t+\varphi_{1})&\text{When ``1'' is sent with a probability of $p$}\\ A\cos(\omega t+\varphi_{2})&\text{When ``0'' is sent with a probability of $(1-p)$}\end{cases} \tag{13}\]  
Its waveform is depicted in the following Figure 3:  
The receiver demodulates the received BPSK signal to recover the baseband signal using coherent demodulation, employing the Costas loop [21; 22]. The principle of DSSS modulation is to modulate the original signal with a random sequence before carrier modulation. In practical use, considering the difficulty of replicating a truly random sequence, m-sequences are often used as pseudorandom code sequences to spread the signal. Based on the simulation in Section 2, the parameters used are shown in Table 3.  
\begin{table}
\begin{tabular}{c c c} \hline
**Modulation** & \
\begin{tabular}{c} **The Coherent Demodulation** \\ **BER (Pe)** \\ \end{tabular} &
\begin{tabular}{c} **The Non-Coherent** \\ **Demodulation BER (Pe)** \\ \end{tabular} \\ \hline
2 ASK & \(\frac{1}{2}erfc\Big{(}\sqrt{\frac{\tau}{4}}\Big{)}\) & \(\frac{1}{2}e^{\frac{\tau}{4}}\) \\
2 FSK & \(\frac{1}{2}erfc\Big{(}\sqrt{\frac{\tau}{2}}\Big{)}\) & \(\frac{1}{2}e^{\frac{\tau}{4}}\) \\
2 PSK (BPSK) & \(erfc\Big{(}\sqrt{r}\Big{)}\) & \(\frac{1}{2}e^{-\tau}\) \\ \hline \end{tabular}
\end{table}
Table 2: BER formulas for binary digital modulation systems.  
Figure 3: BPSK modulation waveform.  
After determining the primitive polynomial, a linear shift register can be constructed based on this primitive polynomial. Using a fifth-degree primitive polynomial generates a periodic m-sequence with a period of 31. The modulation signal in the DSSS can be divided into three main processes: generating a pseudorandom code sequence, spreading the original signal through the pseudorandom code sequence, and modulating the carrier. Meanwhile, pulse shaping is applied to the spread signal to filter out signals and noise outside the main lobe, improving transmission efficiency. The phase transition of a PSK signal is relatively gradual at the symbol transition instants. The waveform and spectrum of a directly spread modulated signal are shown in Figure 4.