A method of controlling a fluid energy machine applicable to a power generator for feeding energy extracted in particular from gaseous fuels such as biogas into an electrical power supply network having a predetermined phase (φN); whereby energy is converted into mechanical work by means of the fluid energy machine; wherein the fluid energy machine generating a rotary motion with a first torque is connected to an output shaft to which a second torque is applied at a predetermined speed (n); wherein a generator driven by the fluid energy machine is connected to the electrical power supply network to feed the energy generated by the generator having a phase (φG) into the electrical power supply network; wherein the power unit comprises a control device and an auxiliary power unit; wherein the fluid energy machine and the control device form a first control loop with a first time constant for which the control device acts as an actuator; wherein a mass moment of inertia resulting at the output shaft and the auxiliary unit form a second control loop with a second time constant, which is lower than the first time constant, for which the auxiliary unit functions as an actuator, and wherein the method comprises the following process steps: controlling the first torque in a first process step by means of the control device in such a way that the second torque is set to a predetermined intermediate torque at an intermediate speed (nl) which lies in a tolerance band around a predetermined target speed (nZ); controlling the speed (n) of the output shaft in a second process step by means of the auxiliary unit in such a way that the speed (n) is adjusted from the intermediate speed (nI) to the target speed (nZ) in order to bring the phase position (φG) of the generator into line with the phase position (φN) of the electrical power supply network; wherein in the first process step the first torque is controlled exclusively by means of the control device and in the second process step the speed (n) is controlled exclusively by means of the auxiliary unit in order to regulate the fluid energy machine until the fluid energy machine keeps the target speed (nZ) stable. whereby energy is converted into mechanical work by means of the fluid energy machine; wherein the fluid energy machine generating a rotary motion with a first torque is connected to an output shaft to which a second torque is applied at a predetermined speed (n); wherein a generator driven by the fluid energy machine is connected to the electrical power supply network to feed the energy generated by the generator having a phase (φG) into the electrical power supply network; wherein the power unit comprises a control device and an auxiliary power unit; wherein the fluid energy machine and the control device form a first control loop with a first time constant for which the control device acts as an actuator; wherein a mass moment of inertia resulting at the output shaft and the auxiliary unit form a second control loop with a second time constant, which is lower than the first time constant, for which the auxiliary unit functions as an actuator, and wherein the method comprises the following process steps: controlling the first torque in a first process step by means of the control device in such a way that the second torque is set to a predetermined intermediate torque at an intermediate speed (nl) which lies in a tolerance band around a predetermined target speed (nZ); controlling the speed (n) of the output shaft in a second process step by means of the auxiliary unit in such a way that the speed (n) is adjusted from the intermediate speed (nI) to the target speed (nZ) in order to bring the phase position (φG) of the generator into line with the phase position (φN) of the electrical power supply network; wherein in the first process step the first torque is controlled exclusively by means of the control device and in the second process step the speed (n) is controlled exclusively by means of the auxiliary unit in order to regulate the fluid energy machine until the fluid energy machine keeps the target speed (nZ) stable. controlling the first torque in a first process step by means of the control device in such a way that the second torque is set to a predetermined intermediate torque at an intermediate speed (nl) which lies in a tolerance band around a predetermined target speed (nZ); controlling the speed (n) of the output shaft in a second process step by means of the auxiliary unit in such a way that the speed (n) is adjusted from the intermediate speed (nI) to the target speed (nZ) in order to bring the phase position (φG) of the generator into line with the phase position (φN) of the electrical power supply network; wherein in the first process step the first torque is controlled exclusively by means of the control device and in the second process step the speed (n) is controlled exclusively by means of the auxiliary unit in order to regulate the fluid energy machine until the fluid energy machine keeps the target speed (nZ) stable.