# Design of Encoding Algorithm for Underwater Wireless Optical Communication Based on Spinal Code
## 5 Simulation Verification
However, the average decoding overhead of the Superposition UEP-Spinal Code is only \(86.7\%\) of the former, and at an SNR of \(-4\) dB, the decoding overhead is reduced to just \(66.5\%\). This indicates that the Superposition UEP-Spinal Codes reduce encoding complexity, decrease computational overhead during decoding, and shorten decoding time. Figure 6 shows the comparison of BLER for Superposition UEP-Spinal Codes, Spinal codes, and Spinal codes mapped to 43-bit encoded packets under AWGN channel conditions with an SNR ranging from \(-14\) dB to \(0\) dB. Figure 7 presents the comparison of spectral efficiency for the three encoding methods, representing the achievable information rate per unit bandwidth. The duty cycle of the weight factor matrix \(P\) in the Superposition UEP-Spinal Codes is set to \(1\). Figure 6 shows the comparison of BLER for three different encoding algorithms. For each algorithm, the block error rate for both MIBs and LIB is calculated. By comparing the block error rates for these different algorithms in MIBs and LIBs, the communication performance of each encoding scheme is further evaluated, and the effectiveness of the unequal error protection mechanism is validated. Figure 7 displays the bandwidth utilization for different encodings. By comparing the bandwidth utilization, it is confirmed that the Superposition UEP-Spinal encoding algorithm is similar to the previously improved Spinal code mapped to 43-bit encoded packets through RNG in terms of bandwidth efficiency, indicating that the Superposition UEP-Spinal encoding algorithm does not cause any loss in basic performance. As shown in Figure 7, due to the increased encoding complexity of the Superposition UEP-Spinal Codes, they sacrifice approximately \(25\%\) of the spectral efficiency compared to Spinal codes, while their spectral efficiency is almost the same as that of Spinal codes mapped to 43 bits through RNG. From the communication performance comparison in Figure 6, it is evident that the Superposition UEP-Spinal Codes achieve significant performance improvements over Spinal codes. The Superposition UEP-Spinal Code demonstrates excellent performance in protecting the tail bits, with its tail BLER significantly lower than the head BLER of the Spinal code. Compared to the Spinal code, the Superposition UEP-Spinal Code reduces the average BLER of the tail by \(1.09\times 10^{-1}\), achieving an average reduction of \(23.62\%\), while the head BLER decreases by \(7.3\times 10^{-2}\), with an average reduction of \(18.58\%\). Compared to the RNG-mapped Spinal code, the head BLER of the Superposition UEP-Spinal Code decreases by \(1.7\times 10^{-2}\), achieving an average reduction of \(5.04\%\). However, since the Superposition UEP-Spinal Code prioritizes protecting the head for better communication performance, it sacrifices part of the tail protection, leading to an increase in the average BLER of the tail by \(5.4\times 10^{-3}\) within the SNR range of \(-7\) dB to \(-2\) dB, corresponding to an average increase of 34.42%. To validate the encoding performance of the Superposition UEP-Spinal Code in underwater high-dynamic channels, simulations are conducted using an additive white Gaussian noise channel (with an SNR dynamic range from \(-5\) dB to \(0\) dB) and a random erasure channel (with erasure probability ranging from \(0.3\) to \(0.7\)), constructing a composite transmission environment. In each independent experiment, both the SNR value and erasure probability are randomly generated within the specified range. Performance metrics are then calculated from \(300\) repeated tests, with a single transmission of \(4.8\) million bits of original data. The remaining parameters follow the simulation configuration mentioned above. The Superposition UEP-Spinal Code and Spinal code are mapped to \(36\)-bit and \(43\)-bit encoded packets through RNG and transmitted over a simulated random channel.