An inverter controller configured to generate control signals for operation of an an inverter that outputs AC power to an AC filter, the inverter controller comprising: at least one input terminal for receiving a nominal VAR reference, a DC feedback voltage signal (V dcFbk) measured at an input to the inverter, a first AC feedback current signal (L_I Fbk) measured at the output of the inverter, an AC voltage feedback signal (V Fbk) measured at the output of the AC filter, and a second AC current feedback current signal (I Fbk) measured at the output of the AC filter; a feedback loop comprising a first summer, a second summer, a VAR regulator, a third summer, an AC voltage regulator, a fourth summer, a current regulator and a bandpass filter, wherein the first summer is configured to sum the nominal VAR reference signal with a first feedback signal from the current regulator to generate a first command signal (VAR Cmd); the second summer is configured to subtract a second feedback signal (VAR Fbk) from a VAR calculation block from the first command signal (VAR cmd) and to provide the difference to the VAR regulator to generate a second command signal (V regCmd); the third summer configured to subtract a third feedback signal (V regFbk) from the second command signal (V regCmd) and to provide the difference to the AC voltage regulator, the third feedback signal (V regFbk) comprising the magnitude of the AC voltage feedback signal (V Fbk); the fourth summer is configured to subtract the first AC feedback current signal (L_I Fbk) from the output of the AC voltage regulator and to provide the difference to the current regulator; and the current regulator is configured to generate the first feedback signal and to feed the first feedback signal to the first summer via the bandpass filter; a fifth summer configured to sum at least one component signal generated by the current regulator with a product of the output of a DC voltage regulator, a nominal reactor inductance and a nominal grid frequency and the product of the output of the AC voltage regulator and the nominal reactor resistance to produce a command signal (L_V yCmd); and a modulator configured to detect an islanding condition based on the first AC feedback current signal (L_I Fbk) and the command signal (L_V yCmd) when a variation in the frequency or magnitude of the inverter output exceeds a predetermined threshold and to generate a control signal to control the inverter. at least one input terminal for receiving a nominal VAR reference, a DC feedback voltage signal (V dcFbk) measured at an input to the inverter, a first AC feedback current signal (L_I Fbk) measured at the output of the inverter, an AC voltage feedback signal (V Fbk) measured at the output of the AC filter, and a second AC current feedback current signal (I Fbk) measured at the output of the AC filter; a feedback loop comprising a first summer, a second summer, a VAR regulator, a third summer, an AC voltage regulator, a fourth summer, a current regulator and a bandpass filter, wherein the first summer is configured to sum the nominal VAR reference signal with a first feedback signal from the current regulator to generate a first command signal (VAR Cmd); the second summer is configured to subtract a second feedback signal (VAR Fbk) from a VAR calculation block from the first command signal (VAR cmd) and to provide the difference to the VAR regulator to generate a second command signal (V regCmd); the third summer configured to subtract a third feedback signal (V regFbk) from the second command signal (V regCmd) and to provide the difference to the AC voltage regulator, the third feedback signal (V regFbk) comprising the magnitude of the AC voltage feedback signal (V Fbk); the fourth summer is configured to subtract the first AC feedback current signal (L_I Fbk) from the output of the AC voltage regulator and to provide the difference to the current regulator; and the first summer is configured to sum the nominal VAR reference signal with a first feedback signal from the current regulator to generate a first command signal (VAR Cmd); the second summer is configured to subtract a second feedback signal (VAR Fbk) from a VAR calculation block from the first command signal (VAR cmd) and to provide the difference to the VAR regulator to generate a second command signal (V regCmd); the third summer configured to subtract a third feedback signal (V regFbk) from the second command signal (V regCmd) and to provide the difference to the AC voltage regulator, the third feedback signal (V regFbk) comprising the magnitude of the AC voltage feedback signal (V Fbk); the fourth summer is configured to subtract the first AC feedback current signal (L_I Fbk) from the output of the AC voltage regulator and to provide the difference to the current regulator; and the current regulator is configured to generate the first feedback signal and to feed the first feedback signal to the first summer via the bandpass filter; a fifth summer configured to sum at least one component signal generated by the current regulator with a product of the output of a DC voltage regulator, a nominal reactor inductance and a nominal grid frequency and the product of the output of the AC voltage regulator and the nominal reactor resistance to produce a command signal (L_V yCmd); and a modulator configured to detect an islanding condition based on the first AC feedback current signal (L_I Fbk) and the command signal (L_V yCmd) when a variation in the frequency or magnitude of the inverter output exceeds a predetermined threshold and to generate a control signal to control the inverter.