An optimal algorithm is synthesized to control the adaptive optical systems, in which the wavefront phase distortions are estimated based on multichannel phase modulation of the received signal. The algorithm takes into account both the atmospheric background noise and the photodetection noise. The efficiency of optimal and suboptimal algorithms is compared under conditions of the turbulent atmosphere