An apparatus includes a sample stage, a cantilever mount, a
cantilever-force detector, a cantilever feedback system, and a sample
stage feedback system. The sample stage is configured for holding a
sample. The cantilever mount is configured for mechanically fixing a
mechanical cantilever having a scanning tip. The cantilever-force
detector is configured to produce an electrical cantilever-force error
signal. The cantilever feedback system is configured to
electromechanically drive the mechanical cantilever in a manner
responsive to the cantilever-force error signal. The sample stage
feedback system is configured to electromechanically displace the sample
stage in a manner responsive to the cantilever-force error signal. The
cantilever feedback system and the sample stage feedback system are
connected to receive the cantilever-force error signal in parallel.