# Design of Encoding Algorithm for Underwater Wireless Optical Communication Based on Spinal Code
## 5 Simulation Verification
Transmission accuracy and decoding time are recorded to assess the communication performance of different encoding algorithms in highly variable underwater channels. Figure 8a presents the BER curves for four algorithms: the Superposition UEP-Spinal Code, Spinal code, Spinal code mapped to \(36\)-bit encoded packets via RNG, and Spinal code mapped to \(43\)-bit encoded packets via RNG, as well as the transmission without encoding in the underwater highly variable channel. The curves are sorted from largest to smallest, where the Superposition UEP-Spinal Code includes three distinct BER curves: MIBs, LIBs, and overall  
Figure 6: Comparison of communication performance for head and tail codes of three encoding methods. Figure 7: Comparison of bandwidth efficiency for different encoding methods in AWGN channel. combined performance. Figure 8 compares the decoding times for the four encoding methods. The decoding time provides an intuitive way to compare the decoding complexity and delay of each encoding scheme. Due to the inherent uncertainty of the communication environment caused by the random channel's time-varying characteristics, the error rates and decoding delays of each simulation show significant dispersion. To systematically evaluate the encoding algorithm's performance, Figure 8 ranks the probability distribution curves of all test results from largest to smallest for analysis. From Figure 8, it is evident that the unequal error protection mechanism of the Superposition UEP-Spinal Code provides adequate protection for the MIB, and its decoding complexity is lower compared to the Spinal code with 43-bit encoded packets mapped through RNG. From Figure 8, it can be observed that the overall BER performance is arranged from lowest to highest as follows: Superposition UEP-Spinal Code MIB, Spinal code mapped to 43-bit encoded packets via RNG, Superposition UEP-Spinal Code, Spinal code mapped to 36-bit encoded packets via RNG, Superposition UEP-Spinal Code LIB, and Spinal code. From Figure 8, the decoding times are arranged from lowest to highest as follows: Spinal code, Superposition UEP-Spinal Code, Spinal code mapped to 36-bit encoded packets via RNG, and Spinal code mapped to 43-bit encoded packets via RNG. Based on the comprehensive simulation results, it can be concluded that the Superposition UEP-Spinal Code, due to its unequal error protection algorithm, shows superior BER performance for the protected header code compared to the Spinal code mapped to 43-bit encoded packets via RNG, enabling more reliable transmission. At the same time, the decoding time for the Superposition UEP-Spinal Code is lower than that of the Spinal code mapped to 43-bit encoded packets via RNG, thus simplifying the complexity of the communication system. Furthermore, under the unequal error protection algorithm, the tail code structure of the Superposition UEP-Spinal Code is more compact, and it exhibits a lower error rate compared to the Spinal code with the same transmission code length. Given that the Superposition UEP-Spinal Code emphasizes protecting the header code, its overall error rate is lower than that of the Spinal code mapped to 36-bit encoded packets via RNG. In conclusion, benefiting from the unequal error protection algorithm, the Superposition UEP-Spinal Code offers high transmission reliability and low decoding complexity, and it provides a stable, reliable, and timely encoding solution for underwater wireless optical communication. Through simulation, it can be observed that the Superposition UEP-Spinal Codes are an improved encoding method based on Spinal Codes. Although they increase encoding  
Figure 8: Comparison of different encoding methods in a simulated random channel. (**a**) Comparison of BER for different encoding methods. (**b**) Comparison of decoding time for different encoding methods. complexity, they enhance the reliability of the encoding under low SNR conditions.