The phase-locked loop (PLL) serves as the core control unit for a grid-connected inverter, providing grid phase information. Its excellent performance directly determines the quality of grid-connected current. However, the actual grid often operates under various non-ideal conditions, which will affect the PLL's operation. To this end, this paper analysis and design the control loops and parameters of two single-phase PLLs, namely the SRF-PLL and MAF-PLL. Simulation models of single-phase SOGI-SRF-PLL and single-phase SOGI-MAF-PLL are constructed in Matlab/Simulink. Their performance is analyzed under different operating conditions, such as grid harmonics, DC offset, voltage sags, frequency variations, and phase jumps. The simulation results show that the single-phase SOGI-SRF-PLL exhibits faster response to frequency variations and phase jumps, while the single-phase SOGI-MAF-PLL demonstrates better disturbance rejection under conditions of harmonics, DC offset, and unbalanced voltage sags.