This article presents a proposed system that enables energy transfer from the dc grid to a single-phase onboard grid, operating at an hi frequency. In addition to the energy transfer function, it additionally enables compensation of reactive power in the ac grid when the converter operates at less than rated power. To operate in compensator mode, it is necessary to decouple the current from the grid into active and reactive components and control them independently. To achieve good dynamics, synchronizers that operate in the dq system are used. In the case of a single-phase grid, it requires such a synchronizer to generate virtual quadrature signals. The used systems based on second-order generalized integrator are good, but to improve dynamics in the work a quadrature generator based on trigonometric calculations was proposed. The developed system was implemented in a proportional resonant current control system. Tests performed in steady state and in dynamic states related to typical grid disturbances showed better dynamic properties than the standard integrator-based system.Keywords: power transfer; compensator; P+R controller