Photovoltaic systems are often placed into a microgrid, a local electricity distribution system that is operated in a controlled way and includes both electricity users and renewable electricity generation. This course deals with DC and AC microgrids and covers a wide range of topics, from basic definitions, through modelling and control of AC and DC microgrids to the application of adaptive protection in microgrids. You will master various concepts related to microgrid technology and implementation, such as smart grid and virtual power plant, types of distribution network, markets, control strategies and components. Among the components special attention is given to operation and control of power electronics interfaces. You will be familiarized with the advantages and challenges of DC microgrids (which are still in an early stage). As a verified learner you will also have the opportunity to master the topic of microgrids through an exercise in which you will evaluate selected pilot sites where microgrids were deployed. The evaluation will take the form of a simulation assignment and include a peer review of the results. This course is part of the Solar Energy Engineering MicroMasters program designed to cover all physics and engineering aspects of photovoltaics: photovoltaic energy conversion, technologies and systems.