A phase-locking apparatus, comprising an amplitude adjustment unit, an amplitude and phase detector connected to the amplitude adjustment unit, a first loop filter connected to the amplitude and phase detector, a second loop filter connected to the amplitude and phase detector, a first oscillator connected to the first loop filter, and a second oscillator connected to the second loop filter; wherein the amplitude adjustment unit is configured to compensate for a first voltage signal based on an amplitude adjustment amount output by the first oscillator, to obtain a second voltage signal, wherein the first voltage signal is an voltage signal from an alternating-current connection point, and the alternating-current connection point is an access point configured to access an alternating-current system; the amplitude and phase detector is configured to: determine an amplitude difference based on the second voltage signal and a preset reference voltage amplitude, and determine a phase difference based on the second voltage signal and a phase estimate output by the second oscillator; and the amplitude and phase detector is further configured to output the amplitude difference to the first loop filter and output the phase difference to the second loop filter, wherein the amplitude difference is used to represent an offset of an amplitude of the second voltage signal relative to the reference voltage amplitude, and the phase difference is used to represent an offset of a phase of the second voltage signal relative to the phase estimate; the first loop filter is configured to filter the input amplitude difference to obtain an amplitude control amount, and the second loop filter is configured to filter the input phase difference to obtain a phase control amount; and the first oscillator is configured to convert the amplitude control amount output by the first loop filter to obtain the amplitude adjustment amount, and the second oscillator is configured to convert the phase control amount output by the second loop filter to obtain the phase estimate. the amplitude adjustment unit is configured to compensate for a first voltage signal based on an amplitude adjustment amount output by the first oscillator, to obtain a second voltage signal, wherein the first voltage signal is an voltage signal from an alternating-current connection point, and the alternating-current connection point is an access point configured to access an alternating-current system; the amplitude and phase detector is configured to: determine an amplitude difference based on the second voltage signal and a preset reference voltage amplitude, and determine a phase difference based on the second voltage signal and a phase estimate output by the second oscillator; and the amplitude and phase detector is further configured to output the amplitude difference to the first loop filter and output the phase difference to the second loop filter, wherein the amplitude difference is used to represent an offset of an amplitude of the second voltage signal relative to the reference voltage amplitude, and the phase difference is used to represent an offset of a phase of the second voltage signal relative to the phase estimate; the first loop filter is configured to filter the input amplitude difference to obtain an amplitude control amount, and the second loop filter is configured to filter the input phase difference to obtain a phase control amount; and the first oscillator is configured to convert the amplitude control amount output by the first loop filter to obtain the amplitude adjustment amount, and the second oscillator is configured to convert the phase control amount output by the second loop filter to obtain the phase estimate.