Controlling Grid Integrity after Power System Emergencies