To optimize the number of decomposition layers in wavelet threshold denoising for ultrasonic signals, we propose a self-adaptive algorithm of determining the number of decomposition layers based on singular spectrum analysis and wavelet entropy. First the noise-containing signals are decomposed by discrete wavelet transform. The slope of the singular value spectrum for each layer is estimated. Then the wavelet entropy over the signal subinterval is calculated for each layer. Finally the optimal number of decomposition layer is determined by com...