  Grid-following and grid-forming inverters are integral components of
microgrids and for integration of renewable energy sources with the grid. For
grid following inverters, which need to emulate controllable current sources, a
significant challenge is to address the large uncertainty of the grid
impedance. For grid forming inverters, which need to emulate a controllable
voltage source, large uncertainty due to varying loads has to be addressed. In
this article, a mu-synthesis-based robust control design methodology, where
performance under quantified uncertainty is guaranteed, is developed under a
unified approach for both grid-following and grid-forming inverters. The
control objectives, while designing the proposed optimal controllers, are: i)
reference tracking, disturbance rejection, harmonic compensation capability
with sufficient LCL resonance damping under large variations of grid impedance
uncertainty for grid-following inverters; ii) reference tracking, disturbance
rejection, harmonic compensation capability with enhanced dynamic response
under large variations of equivalent loading uncertainty for grid-forming
inverters. A combined system-in-the-loop (SIL), controller hardware-in-the-loop
(CHIL) and power hardware-in-the-loop (PHIL) based experimental validation on
10 kVA microgrid system with two physical inverter systems is conducted in
order to evaluate the efficacy and viability of the proposed controllers.
