  Microgrids are increasingly recognized as a key technology for the
integration of distributed energy resources into the power network, allowing
local clusters of load and distributed energy resources to operate
autonomously. However, microgrid operation brings new challenges of its own,
especially in islanded operation as frequency and voltage control is no longer
provided by large rotating machines. Instead, the power converters in the
microgrid must coordinate to regulate the frequency and voltage and ensure
stability. We consider the problem of designing controllers to achieve these
objectives. Using passivity theory to derive decentralized stability conditions
for the microgrid, we propose a controller design method for grid-forming
inverters. For the analysis we use higher order models for the inverters and
also advanced dynamic models for the lines with an arbitrarily large number of
states. By satisfying the decentralized condition formulated, plug-and-play
operation can be achieved with guaranteed stability, and performance can also
be improved by incorporating this condition as a constraint in corresponding
optimization problems formulated. In addition, our control design can improve
the power sharing properties of the microgrid compared to previous non-droop
approaches. Finally, realistic simulations confirm that the controller design
improves the stability and performance of the power network.
