When the pulsar signal propagates in the interstellar medium(ISM), the high frequency and low frequency components of the signal reach the radio telescope with a certain delay. Therefore, the pulsar signal will appear energy dispersion, which will broaden the pulse profile, decrease the signal to noise ratio(SNR), and even lead to the disappearance of the pulse signal. In this paper, we analyze the sampling, polarization and arrangement of baseband data based on the coherent dedispersion algorithm for the problem of pulsar baseband data dedispersion. We systematically study the coherent dedispersion data processing procedure and test the pulse profile changes under different FFT block sizes. An optimal selection strategy of FFT block sizes is proposed for reducing the operation time and obtaining a better pulse profile. We propose two methods, one is the generation of ISM transfer function, the other is the pulsar period and phase prediction method at a certain time, and discuss integral and folding strategies. We test the algorithm based on the baseband data of CASPSR and Medusa terminals observed by Parkes 64m radio telescope, and analyze the reading and processing methods of baseband data of different terminals. The experimental results show that the pulse profile with SNR greater than 200 is obtained, which verifies the effectiveness of the algorithm.