This paper deals with the improvement of the transient response and harmonic, subharmonic, and dc-offset voltage rejection capability of a grid voltage sequence detection scheme based on a second-order generalized integrator (SOGI). To perform that, the SOGI structure is first analyzed in deep, emphasizing both its tradeoff limits between settling time and harmonic attenuation and the sensitivity to grid subharmonics and dc-offset voltage. Then, a study of the effect of grid voltage harmonics and subharmonics in SOGI and in the SOGI-FLL and MSOGI-FLL structures is introduced. Hence, to overcome these problems, a new structure based on the use of the SOGI filter as prefilter for the previous structures is proposed to achieve a faster time response and higher harmonic rejection. This structure is used in a sequence detection scheme for the detection of the grid voltage components in the -frame and it is applied in a three-phase PV system. Experimental and comparative results are shown to validate this proposal.