We consider an oscillator model to describe qualitatively friction force for an atomic force mi-croscope (AFM) tip driven on a surface described by periodic potential. It is shown that average value of the friction force could be controlled by application of external time-dependent periodic perturbation. Numerical simulation demonstrates significant drop or increase of friction depending on amplitude and frequency of perturbation. Two different oscillating regimes are observed, they determined by frequency and amplitude of perturbation. The first one is regime of mode locking at frequencies multiple to driving frequency. It occurs close to resonance of harmonic perturbation and driving frequencies. Another regime of motion for a driven oscillator is characterized by aperiodic oscillations. It was observed in the numerical experiment for perturbations with large amplitudes and frequencies far from oscillator eigenfrequency. In this regime the oscillator does not follow external driving force, but rather oscillates at several modes which result from interaction of oscillator eigenmode and perturbation frequency.