Principle of AFM measurement