A dynamics-constrained method for distributed frequency regulation in low-inertia power systems