Principle of primary frequency regulation of power grid energy storage