Integrated modeling of power network and connected flywheel energy storage system for optimal power and energy ratings of flywheel