What is needed is a more subtle, coordinated mode of response. When our own immune systems are performing at their best, they orchestrate their defenses through countless chemical conversations among T-cells and antibodies, enabling these defenders to calibrate their response to pathogens. In the same way, the thousands of power plants and substations in the grid need to be able to communicate with one another when any part of the system is breached, so they can collectively decide which circuit breakers should be tripped and which can safely remain intact.
The technology necessary to achieve this has existed for about a decade. It relies on computers, sensors and protective devices tied together by optical fiber so that all parts of the grid would be able to talk to one another at the speed of light [~] fast enough to get ahead of an onrushing blackout and confine it.
The sensors would continuously monitor the voltage, frequency and other important characteristics of the electricity coursing through the transmission lines. When a line appeared at risk of being overloaded, a computer would decide whether to switch on a protective device. At present, such decisions are made purely parochially. Power plants defend themselves first, and don't worry about the consequences for neighboring plants on the grid. Nor do they consider any potentially helpful or harmful actions that those neighbors might be taking at the same time.
In the new approach, each plant would have nearly instantaneous information about all the other plants and power lines in its extended neighborhood. Everyone would know what everyone else was doing and thinking. As threats arose (either from random failures or malicious attacks), the sensors would fire a flurry of warning signals down the optical fibers, and the networked computers would decide which protective devices to activate to contain the threat most effectively. The grid would then be responding as an integrated entity, not as a ragtag collection of selfish units. It would look a lot like an organism defending itself.