# Design of Encoding Algorithm for Underwater Wireless Optical Communication Based on Spinal Code
## 5 Simulation Verification
In cases where the protection of MIB information is prioritized, the duty cycle of \(P\) can be appropriately  
Figure 3: Comparison of BLER for head and tail codes with different weight factor matrix \(P\). (**a**) Comparison of communication BLER for different duty cycles. (**b**) Comparison of BLER for head and tail codes with different duty cycles. reduced to sacrifice the communication performance of LIB information in exchange for a lower BER for MIB information. From the simplified complexity analysis formulas (25) and (26), it can be deduced that when the hash length \(v\) = 32, the code length of the Spinal code mapped to 43 bits through RNG is the same. Figure 4a presents a comparison of the BLER for the Superposition UEP-Spinal Codes, Spinal codes mapped to 36-bit and 43-bit encoded packets, and Spinal codes without RNG mapping, under AWGN channel conditions with a SNR ranging from \(-14\) dB to \(0\) dB. Figure 4b shows the BLER comparison for the same four encoding methods in a BEC with a fixed SNR of \(0\) dB. The duty cycle of the weight factor matrix \(P\) in the Superposition UEP-Spinal Codes is set to 1, meaning all elements in matrix \(P\) are 1. Figure 5 provides a comparison of the decoding system overhead for Superposition UEP-Spinal Codes and the two mapping-based encoding methods in the AWGN channel. To minimize interference in the comparison, the generated bit data during decoding are normalized, and the normalized bit data are used to compare the system's decoding overhead. Figure 4, by comparing the BER curves under different channel conditions, proves that the noise resistance of the Superposition UEP-Spinal Code remains at the same level as that of the original Spinal code, indicating that the Superposition UEP-Spinal encoding algorithm does not cause any loss in basic performance. Figure 5's decoding overhead comparison shows that the Superposition UEP-Spinal encoding algorithm reduces decoding complexity compared to the previous Spinal code encoding algorithm, thereby demonstrating the communication performance optimization effect of the Superposition UEP-Spinal Code. Figure 4: Comparison of BLER for different encoding methods: (**a**) AWGN channel, and (**b**) BEC channel. Figure 5: Comparison of system overheads for different encoding methods. It is evident that the performance of the Superposition UEP-Spinal Codes in both the AWGN and BEC channels is nearly identical to that of the Spinal code mapped to 43 bits with the same code length. From Figure 4a, it can be observed that in the AWGN channel, the BLER of the Superposition UEP-Spinal Code shows the greatest reduction compared to the Spinal code without RNG mapping at an SNR of \(-5\) dB, with a maximum decrease of \(90.64\%\), and an overall average BLER reduction of \(9.83\times 10^{-2}\). Compared to the Spinal code mapped to a 36-bit encoding packet, the maximum BLER reduction at \(-5\) dB reaches \(71.53\%\), with an overall average BLER reduction of \(6.82\times 10^{-2}\). From Figure 4b, it can be observed that in the BEC channel, the BLER of the Superposition UEP-Spinal Code shows the greatest reduction compared to the Spinal code without RNG mapping at a deletion probability of \(0.45\), with a maximum decrease of \(90.76\%\) and an overall average BLER reduction of \(5.37\times 10^{-2}\). Compared to the Spinal code mapped to a 36-bit encoding packet, the maximum BLER reduction at a deletion probability of \(0.45\) reaches \(72.08\%\), with an overall average BLER reduction of \(1.08\times 10^{-2}\). From Figure 5, it can be observed that compared to the Spinal code mapped to 36-bit encoded packets, the average decoding overhead of the Superposition UEP-Spinal Codes is \(91.9\%\). Compared to the Spinal code mapped to a 43-bit encoding packet, which has the same code length, the BLER curves of both schemes are nearly identical in the AWGN and BEC channels.