The proposed voltage regulator has a power converter, a switch, a
transformer, and a switching control device. The power converter is
electrically connected to a power source for providing a voltage to
compensate the output voltage of the voltage regulator when the output
voltage is higher or lower than a predetermined level. The transformer is
electrically connected to the switch for being used as a variable voltage
source and the connecting configuration of the switch is determined by the
input voltage. Also, the switching control device is electrically
connected to the power converter for causing the voltage to have a phase
shift with the input voltage and the inner product of the voltage and the
input current being a positive value. The proposed control method is
employed for generating a compensation voltage to stabilize the output
voltage of the voltage regulator.