As progress in nanotechnology and molecular biology advances, demand for high speed and high quality imaging techniques have increased to the point where image acquisition rates in atomic force microcopy (AFM) become impediments to further discovery. High speed operation excites lateral resonances in the AFM's x-y scanner that can distort the image, and addressing these disturbances typically require sophisticated modeling and controls techniques to mitigate their influence. This places excessive demands on routine users of AFM not accustomed to system identification and compensator design. This paper presents a novel method for characterizing lateral resonances using only cantilever deflection information, and automatically designing and implementing controllers for realtime compensation of scanner resonances. A new custom-built high speed AFM is described and modeled, and compensators are automatically designed and implemented without user interaction. This combined system has achieved scan rates of over 1,000 lines per second in liquid, yielding 5 μm × 5 μm images more than eight times per second. © 2012 AACC American Automatic Control Council.