Abstract
This study presents an automatic PID control strategy for Tapping-Mode Atomic Force Microscopy (TM-AFM) that addresses the impacts of energy dissipation on tip-sample interactions. Our methodology integrates energy analysis to quantify the critical relationship between energy loss and phase lag dynamics in tapping mode. Additionally, systematic decomposition of interaction force is performed to enable the reconstruction of system transfer functions. The study in this work examines the fluctuations of PID gains during critical oscillations. A SIMULINK-based virtual TM-AFM is developed to simulate practical measurement conditions, based on which a lookup table for PID gains across various phase lags is generated. The efficacy of the proposed algorithm is experimentally validated through the experiments of a calibration nanogrid and two kinds of coated silicon samples, demonstrating the improved tracking accuracy and the improvement of surface height of 5.4% compared to regular control scheme.