Adaptive optics correcting technique based on stochastic parallel gradient descent (SPGD) control algorithm is an alternative approach which is independent of wavefront sensor and optimizes the performance metric directly. In this paper we establish a simulation model of tip-tilt adaptive optics system, where SPGD optimization algorithm is used to correct the tip-tilt aberration induced by dynamic turbulence. The distance between the measured centroid of a blurring image and the demarcated centroid of the ideal image is considered as the system performance metric, and signals applied to compensation of the drifting atmosphere are generated for tip-tilt mirror. The sensitivity of the performance metrics is investigated, and the convergence rate and the stability are analyzed. By means of this optimization algorithm, the centroid of the image is modified in real time, which results in the improvement of the long exposure image.