When performing FFT transformation, if you do not take coherent sampling, there will be some problems, such as spectrum leakage. In order to avoid spectrum leakage, there are generally two methods, one is to take the relevant sampling, the other is to use The window function compensates to reduce the spectral leakage, but it cannot be completely eliminated. There are different kinds of general window functions, and the appropriate window function can be selected according to the actual situation.
Regarding the relevant sampling, it is necessary to follow certain rules: 1) The sampling signal needs to be divided into cycles; 2) Fs/N=Ft/M, Fs is the sampling frequency, N is the number of sampling points, and Ft is the frequency of the sampled signal, M The number of cycles sampled for the sampled signal; 3) In addition, M and N need to be prime numbers and need to be integers, which avoids repeated sampling and improves efficiency.