  This paper presents a distributed frequency control method for power grids
with high penetration of inverter-connected resources under low and
time-varying inertia due to renewable energy (RE). We provide a distributed
virtual inertia (VI) allocation method using the distributed subgradient
algorithm. We implement our distributed control strategy under full and sparse
communication architectures. The distributed full and sparse communication
controllers achieve comparable performance to a centralized controller and
stabilize the test system within 6~s. We study the sensitivity of the
controller performance to varying objective function weights on phase angle
versus frequency deviation, gradient step sizes, and allowed rate of change of
inertia (RoCoI) coefficients. We observe that the settling time of the states
and the controller performance and effort are susceptible to changes in the
gradient step size and objective weights on the frequency and angle deviation.
While a higher objective weight on angle versus frequency deviations positively
affects their settling times, it negatively impacts controller performance and
control effort. The impact of this work is to propose distributed control
schemes as new mechanisms that act before or in alignment with primary and
secondary control to safely regulate the frequency in future power grids.
