The phase information reflects the energy dissipation of the probe and sample interactions in tapping mode atomic force microscopes (TM AFMs). In this paper, we use the method of tune test in TM AFM to study the contribution of external environment to energy dissipation by changing the probe position and ambient humidity. Finally, the theoretical and experimental quality factors of air viscous damping, squeeze film damping and liquid bridge force are obtained to characterise energy dissipation. The analytically predicted values of the model established on squeeze film damping, viscous damping and liquid bridge force comparing to the experimental results in this paper is rational. And the comparative analysis results show that the main mechanism of energy dissipation is different at different probe positions and different relative humidness. This result is of great significance for understanding the mechanism of phase imaging experimentally and theoretically.