## 3 Experiment and Result Analysis
### Result Analysis  
In order to verify the efficiency and adaptability of the method proposed in this paper, we used the method to predict and code the periodic signal, which has a varying period and amplitude.  
Figure 8 verifies the efficiency and adaptability of the method proposed in this paper. We observed that the amplitude and period of the periodic signal change, which has little effect on the prediction accuracy of this method. This effect only occurs in the first period of amplitude and period changes. In addition, the output of the coding has a strong \"energy concentration\" characteristic, which has many 0 values. Furthermore, the method proposed in this paper is a lossless compression algorithm.  
Figure 8: (**a**) Original signal (**b**) Coding output (**c**) Decoding output (**d**) Error between the decoding output and the original signal.  
Next, the original signal in Figure 8 was the added noise, whose signal to noise ratio is 34.2 dB. In Figure 9, the prediction effect of this algorithm on the noise-added periodic signal, whose prediction effect is worse than the prediction effect in the Figure 8, is shown. This is because the method proposed in this paper is a lossless compression algorithm. We added the noise to the periodic signal, and the amplitude of the signal is random within a certain range. It is difficult for the prediction model to use context information to accurately predict the amplitude of the signal, so the output prediction residuals fluctuate within a small range. Therefore, the signal in Figure 9 is also the next in-depth research direction of this algorithm.  
Then, the period signal with period T = 200 is selected. The signal was cut to different sizes (L = 1, 2,..., 10 K), which were coded by the method proposed in this paper. The entropy of the coding output were calculated by Equation (8).  
By comparing the results in Figure 10, we can know that the larger the compressed data size, the better the predictive coding effect of this method. In addition, when the size of the compressed data is large enough, the information entropy no longer decreases, and the information entropy at this time reaches the limit.  
Finally, we selected 10 sets of sample signals that have different periods and amplitudes. The different methods, including the methods of this paper, 2-D DCT, 2-D LWT, and DPCM were selected to code 10 sets of periodic signals. In addition, LZW was used to further compress the signal.  
By comparing the results in Figure 11 and Table 2, we can see that the coding effect of this paper's method on periodic signals is much better than the other three methods. When the coding output of the method proposed in this paper is compressed by LZW, the compression ratio is much higher than the other three methods. Furthermore, the method proposed in this paper belongs to lossless compression. When the signal is compressed by the method, the signal information will not be lost.  
Figure 9: (**a**) The signals containing additive noise (**b**) Coding output (**c**) Decoding output (**d**) Error between the decoding output result and the original signal.  
The time complexity of our proposed method, DPCM, 2-D DCT, and 2-D LWT are presented in Table 3. The time complexity of our proposed method is the same as that of DPCM and 2-D LWT, and is simpler than that of 2-D DCT.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Coding Methods** & **CRmean** & **CRmin** & **CRmax** & **PSNR (dB)** \\ \hline Proposed method & 64.90 & 32.11 & 129.77 & - \\
2-D DCT & 46.78 & 32.72 & 98.92 & 63.77 \\
2-D LWT & 20.78 & 14.87 & 25.22 & 56.07 \\ DPCM & 21.00 & 11.31 & 50.63 & - \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of the compression ratio of the methods proposed in this paper with 2-D DCT, 2-D LWT, and DPCM.  
Figure 11: Comparison of the compression ratio of the signal compression by LZW.  
Figure 10: The effect of block size on compression efficiency.