A method for emulating the behaviour of an electric energy source operatively connected to a power utility grid in response to grid-relates events, the method comprising the step of calculating one or more response scenarios of said electric energy source in relation to one or more selected electrical parameters when said electric energy source is modelled in such a way that it behaves as a synchronous machine, characterised in that the calculation of the one or more response scenarios comprises a step of calculating an internal voltage component on the direct axis reference frame (Ed) and an internal voltage component on the quadrature axis reference frame (Eq), on a rotating reference frame d-q, wherein the step of calculating the internal voltage component on the direct axis reference frame (Ed) and the internal voltage component on the quadrature axis reference frame (Eq), comprises calculations of - a static voltage component of the internal voltage component on the direct axis (Eds) and a static voltage component of the internal voltage component on the quadrature axis (Eqs), respectively, wherein calculations of the static voltages components (Eds, Eqs), of the voltages (Ed, Eq), respectively, are based on external inputs of the active power target (Po) and the reactive power target (Qo) and actual voltage components (Vd, Vq) of the utility grid, and - a dynamic voltage component of the internal voltage component on the direct axis (ΔEd') and a dynamic voltage component of the internal voltage component on the quadrature axis (ΔEq'), respectively, wherein calculations of the dynamic transient voltages components (ΔEd', ΔEq'), of the voltages (Ed, Eq), respectively, are based on actual values of voltages (Vd, Vq) and currents (Id, Iq) in the connection point with the utility grid wherein the static voltage component of the internal voltage component on the direct axis (Eds) is added to the dynamic voltage component of the internal voltage component on the direct axis (ΔEd') to form the internal voltage component on the direct axis reference frame (Ed), and wherein the static voltage component of the internal voltage component on the quadrature axis (Eqs) is added to the dynamic voltage component of the internal voltage component on the quadrature axis (ΔEq') to form the internal voltage component on the quadrature axis reference frame (Eq). - a static voltage component of the internal voltage component on the direct axis (Eds) and a static voltage component of the internal voltage component on the quadrature axis (Eqs), respectively, wherein calculations of the static voltages components (Eds, Eqs), of the voltages (Ed, Eq), respectively, are based on external inputs of the active power target (Po) and the reactive power target (Qo) and actual voltage components (Vd, Vq) of the utility grid, and - a dynamic voltage component of the internal voltage component on the direct axis (ΔEd') and a dynamic voltage component of the internal voltage component on the quadrature axis (ΔEq'), respectively, wherein calculations of the dynamic transient voltages components (ΔEd', ΔEq'), of the voltages (Ed, Eq), respectively, are based on actual values of voltages (Vd, Vq) and currents (Id, Iq) in the connection point with the utility grid