An optimal controller for high-precision spiral positioning of a piezoelectric tube scanner used in an atomic force microscope (AFM) is proposed in this paper. In the proposed control scheme, a second-order vibration compensator is incorporated with the piezoelectric tube scanner (PTS) to suppress the vibration of the PTS at the resonant frequency. An internal model of a reference sinusoidal signal is included with the augmented plant model and an integrator is introduced with a linear quadratic Gaussian controller which reduces the phase error between the input and output sinusoids. The proposed method allows a commercial AFM to scan at high scanning speeds as an alternative to the raster scanning approach. The performance of this controller is assessed with closed-loop frequency response, tracking accuracy, and a set of spiral scanned images. The raster scanned images obtained using the standard AFM PI controller is also presented for comparison with the spiral images. Experimental results prove the effectiveness of the proposed method. Note to Practitioner-The main motivation for this work is to propose a control system for high-speed imaging using an AFM. The scanning speed of a commercial AFM is limited by the positioning accuracy of the scanner. The scanner is made of a piezoelectric tube actuator. The commercially available scanners have the following problems: 1) creep effect at slow speed scanning; 2) hysteresis effect during large range scanning (these two effects result in inaccurate reference motion tracking); and 3) vibration effect at high frequencies due to its mechanical flexibility. To overcome these limitations, an internal reference model-based linear quadratic Gaussian control approach is designed and experimentally implemented using the dSPACE ds-1103 real-time prototype system. Before the control design, the scanner is modelled (experimentally) by using a system identification method, and a vibration compensator is incorporated with the identified model. Apart from the control design, a spiral motion of the scanner is considered instead of a well-known raster scanning which is adopted in all commercial AFMs. The designed controller is applied in the piezoelectric tube scanner experimentally, and the obtained results are presented in terms of tracking accuracy, damping of scanners vibration, and generating high-quality images as compared with the existing commercially available methods. The existing commercial system can generate a sensible image up to 30 Hz scanning frequency but, using the proposed method, a high-quality image up to 120 Hz is achieved. With a slight software modification, the proposed improvement can be used in commercial AFMs.