# Design of Encoding Algorithm for Underwater Wireless Optical Communication Based on Spinal Code
###### Abstract
They employ an innovative coding structure that uses hash functions for encoding and decoding, offering low encoding complexity and excellent performance, making them well suited to adapt to varying channel conditions. Spinal codes perform exceptionally well in both AWGN (Additive White Gaussian Noise) channels and BSC (Binary Symmetric Channel) channels. Theoretical analysis and experimental results have demonstrated that the throughput of Spinal codes approaches the Shannon capacity [17]. [PERSON] explored the application of Spinal codes in underwater communication in [18], combining them with differential frequency hopping technology to enhance the security and anti-interference performance of underwater communication. This method effectively improves the robustness of underwater communication systems. The application of Spinal codes in massive MIMO systems has also seen development, achieving promising results [19]. [PERSON] proposed a scheme that concatenates Spinal codes with polar codes, significantly enhancing the performance of polar codes by leveraging the sequential encoding characteristics of Spinal codes. In 2022, [PERSON] conducted an in-depth performance analysis to improve the reliability of Spinal code transmission over fading channels and proposed a self-concatenated coding scheme. This scheme significantly enhances the system's noise resistance and improves signal transmission quality under harsh channel conditions [20]. However, in Spinal codes, when a frame of symbols contains errors, the erroneous information bits are typically concentrated in the last few symbols [21]. The error rate of the final information block severely impacts the overall error rate of Spinal codes, leading to a degradation in their performance. In [21], a method was proposed to reduce the error rate of the final information block by adding additional tail symbols. However, this approach has limited effectiveness in reducing the overall frame error rate. If multiple tail symbols are added to reduce the error rate, it not only increases transmission overhead but may also result in a lower code rate. This paper addresses the issue of increased demodulation complexity in Spinal codes when relying on random number generators to enhance noise resistance. It proposes a Superposition UEP-Spinal Code structure, which improves signal noise resistance under low signal-to-noise ratio (SNR) conditions. This structure utilizes unequal error protection (UEP) to transmit data of different priority levels in parallel. By adjusting the elements of the superposition weighting factor \(P\), it optimizes the communication performance of different priority information sources while simplifying the structural complexity of less critical components. Compared to Spinal codes of the same code length, it achieves an average error rate reduction of 23.62%, where the error rate is defined as the number of erroneous bits divided by the total transmitted bits over a given time interval. Meanwhile, it enhances the noise resistance of critical components, achieving an average error rate reduction of 5.04% under the same spectral efficiency. Additionally, the overall decoding complexity is reduced by 13.3%, aiming to provide a more stable, reliable, and efficient communication solution for underwater wireless optical communication with random channel variations.