Thermal defocusing in the cases of a stationary and moving nonlinear medium is studied. The characteristics of the radiation are calculated in the far zone both in the aberration-free approximation and taking aberrations into account. The effectiveness of phase compensation of nonlinear distortions of radiation is investigated for thin and distributed thermal lenses. The optimal values of the control parameters are found. The theoretical data are compared with known experimental results.