  This paper considers the problem of controlling the operation of
inverter-interfaced distributed energy resources (DERs) in a distribution grid,
to achieve operational and performance goals with limited system-level
information. We develop an online feedback optimization method to drive the
DERs' power setpoints to solutions of an AC optimal power flow (OPF) problem
based only on voltage measurements (and without requiring measurements of the
power consumption of non-controllable assets). The proposed method - grounded
on the theory of control barrier functions - is based on a continuous
approximation of the projected gradient flow, appropriately modified to
accommodate measurements from the power network. We provide results in terms of
local exponential stability, and assess the robustness to errors in the
measurements and in the system Jacobian matrix. We show that the proposed
method ensures anytime satisfaction of the voltage constraints when no model
and measurement errors are present; if these errors are present and are small,
the voltage violation is practically negligible. We also discuss extensions of
the framework to virtual power plant setups. Numerical experiments on a 93-bus
distribution system and with realistic load and production profiles show a
superior performance in terms of voltage regulation relative to existing
methods.
