A method for coupling an inverter to an alternating voltage source, the inverter
comprising a current controller, which controls phase currents and implements reference
current. The method comprises steps of giving zero current as the reference current
for the current controller, determining phase voltages of the inverter, determining
frequency of the alternating voltage source from the determined phase voltages,
and synchronizing and coupling the inverter to the determined frequency of the
alternating voltage source.