A method of controlling a three-phase alternating current, AC, generator connected to an inverter to regulate a direct current, DC, bus voltage, the method comprising: determining an error between a DC bus voltage command and a detected DC bus voltage, the detected DC bus voltage being a part of an outer feedback loop; obtaining one of a virtual conductance or a virtual resistance, the one of the virtual conductance or the virtual resistance being a part of an inner feedback loop relative to the outer feedback loop; generating a first parameter based on a proportional integral, PI, function and the error; determining a second parameter based on the one of the virtual conductance or the virtual resistance and the detected DC bus voltage; detecting a three-phase current from the output of the three-phase AC generator and, based on a rotor position of the generator, converting the detected three-phase current to a q-d axis current that has a direct component and a quadrature component; generating a charging current command as a difference between the first parameter and the second parameter; generating a q-d axis current command based on the charging current command, the q-d axis current command having a direct component and a quadrature component; and controlling the three-phase AC generator to regulate the output DC bus voltage based on the detected q-d axis current and the generated q-d axis current command, wherein generating the q-d axis current command based on the charging current command comprises: i) generating a first power command based on the charging current command; ii) generating a second power command based on the first power command and a feed-forward power; iii) determining whether the second power command is within a first saturation limit and a second saturation limit; iv) generating a torque command based on whether the second power command is within the first saturation limit and the second saturation limit; and v) generating the q-d axis current command based on the torque command, the DC bus voltage, a measured electric rotor speed of the generator, and one or both of a maximum torque per amp curve and a maximum torque per volt curve. determining an error between a DC bus voltage command and a detected DC bus voltage, the detected DC bus voltage being a part of an outer feedback loop; obtaining one of a virtual conductance or a virtual resistance, the one of the virtual conductance or the virtual resistance being a part of an inner feedback loop relative to the outer feedback loop; generating a first parameter based on a proportional integral, PI, function and the error; determining a second parameter based on the one of the virtual conductance or the virtual resistance and the detected DC bus voltage; detecting a three-phase current from the output of the three-phase AC generator and, based on a rotor position of the generator, converting the detected three-phase current to a q-d axis current that has a direct component and a quadrature component; generating a charging current command as a difference between the first parameter and the second parameter; generating a q-d axis current command based on the charging current command, the q-d axis current command having a direct component and a quadrature component; and controlling the three-phase AC generator to regulate the output DC bus voltage based on the detected q-d axis current and the generated q-d axis current command, wherein generating the q-d axis current command based on the charging current command comprises: i) generating a first power command based on the charging current command; ii) generating a second power command based on the first power command and a feed-forward power; iii) determining whether the second power command is within a first saturation limit and a second saturation limit; iv) generating a torque command based on whether the second power command is within the first saturation limit and the second saturation limit; and v) generating the q-d axis current command based on the torque command, the DC bus voltage, a measured electric rotor speed of the generator, and one or both of a maximum torque per amp curve and a maximum torque per volt curve. i) generating a first power command based on the charging current command; ii) generating a second power command based on the first power command and a feed-forward power; iii) determining whether the second power command is within a first saturation limit and a second saturation limit; iv) generating a torque command based on whether the second power command is within the first saturation limit and the second saturation limit; and v) generating the q-d axis current command based on the torque command, the DC bus voltage, a measured electric rotor speed of the generator, and one or both of a maximum torque per amp curve and a maximum torque per volt curve.