This is being done and it's called synthetic inertia. Just with capacitors and batteries instead of spinning motors.