We analyze the steady state tip sample interaction in atomic force microscopy by using an electrical circuit simulator. The phase shift between the cantilever excitation and tip, and the amplitude versus distance curves are obtained with sample stiffness as a parameter. The height shifts and hysteresis in amplitude and phase curves are observed as a result of the influence of the force between the tip and the sample. The damping and switching mechanisms are explained using the force traces obtained from simulations. The oscillation amplitude dependence of operating mode is inspected. We find that improper selection of the free tip oscillation amplitude is the cause of operating state transitions. (C) 2002 Elsevier Science B.V. All rights reserved.