In this thesis, phase error compensation algorithms in SAR imaging are investigated. Phase errors are decomposed into two kinds, space-invariant errors caused by undesired motions of the platform and space-variant errors caused by signal processing in PFA. Many autofocus solutions to compensate the motion error problem have been proposed. However, there are still some disadvantages in estimating high frequency phase errors or in computationally demanding process. In our work, MSSA algorithm, which is one of metric-based autofocus techniques, is proposed. By formulating new metric in Fourier domain, the phase error estimating ability and processing speed are improved at the same time. Especially, our proposed method shows strong performance for high frequency phase error that conventional approaches fail to estimate. However, since it sometimes shows scene dependent feature, additional techniques for this problem are proposed. In addition, the phase errors also occur during the signal processing in PFA, which is the space-variant error. When the range from a platform to a target is not large enough compared to the target scene diameter, the curvature error in the mixing process can be significant and it distorts a SAR image. In order to reduce the effect of the curvature error on the image, subarea technique is utilized when the far-field assumption is invalid. Moreover, some modifications are added to compensate the bad effect of subarea technique on the composed SAR imaging or autofocus procedure followed by the mixing process.