  Reactive power sharing and containment of voltages within limits for
inverter-based resources (IBRs) are two important, yet coupled objectives in ac
networks. In this article, we propose a distributed control technique to
simultaneously achieve these objectives. Our controller consists of two
components: a purely local nonlinear integral controller which adjusts the IBR
voltage setpoint, and a distributed primal-dual optimizer that coordinates
reactive power sharing between the IBRs. The controller prioritizes the voltage
containment objective over reactive power sharing at all points in time;
excluding the IBRs with saturated voltages, it provides reactive power sharing
among all the IBRs. Considering the voltage saturation and the coupling between
voltage and angle dynamics, a formal closed-loop stability analysis based on
singular perturbation theory is provided, yielding practical tuning guidance
for the overall control system. To validate the effectiveness of the proposed
controller for different case studies, we apply it to a low-voltage microgrid
and a microgrid adapted from the CIGRE medium-voltage network benchmark, both
simulated in the MATLAB/Simulink environment.
