What Happens When You Flip the Light Switch?

[Total: 14    Average: 3/5]

Few people know what happens when a customer does something like flipping a light switch. The full explanation requires descriptions of topics that span nanosecond to decade-long time scales. Think of it as scales measured with a high speed chronograph, a stopwatch, an hourglass, or by a calendar.

At the earliest and briefest instants, pure physics governs. At longer time spans, engineered control systems come into play. Beyond that, we have the commitment, existence, and planning of resources which are economic, demographic and political issues. The grid demands an integrated and seamless approach to all aspects and all time scales thus some cross-discipline generalists. A few generalists work in all time scales. I was fortunate to be one of them, so it is my privilege to take you for a walk through the sequence of events.
old power station

Kudos to Thomas Edison who invented not just the light bulb, but the whole electric utility industry.  Edison’s original vision incorporated the entire physics-engineering-economics continuum discussed in this article.  His execution of the plan became The Edison Electric Illuminating Company.  Today, it is called Consolidated Edison of New York.

Suppose a customer throws a switch to turn on an electric load (anything from a light bulb to a steel factory), the sequence below shows how the grid responds. Keep in mind the following.

  1. Each entry in the list below describes a range of time following the switch action; the earliest and most short lived first. The list includes two dotted lines. The first dotted line marks the boundary between reactive response to unplanned events (such as your light switch), and proactive actions anticipating the future. The second dotted line marks the boundary between automated actions (supervised by humans) and manual actions.
  2. The word dispatch refers to a particular allocation of power to all generators on the grid to satisfy all the loads. Some dispatches are more desirable than others in terms of risk and economics. A valid dispatch will not overload any part of the grid or otherwise violate security constraints. A valid dispatch also conforms to the physics. It satisfies all loads and accounts for power losses.
  3. Energy is conserved at all instants of time and all ranges of time, respecting Ohm’s law V=IZ and P=VI on an instantaneous basis. To simplify the discussion, I won’t talk about reactive power.
  4. The size of the power grid is nearly continental. It has billions of components. Its configuration changes second by second, and the instrumentation monitoring it can not measure every point. A state estimator is part of the software. It provides estimates the actual operating state that are consistent with observations and physics.
  5. The phrase contingencies means the following. Given the state and a proposed dispatch, consider the unexpected outage of every major line, or generator in the entire grid. It includes every possible outage one-at-a-time. In certain critical areas, we include all combinations of outages taken two at a time or three at a time. For each combination, we calculate the power flows in the entire grid and compare them to the allowable maximums. We reject dispatches that would result in overloads following any combination of contingencies. We may evaluate more than 100,000 such contingencies each candidate dispatch.
  6. Practices and nomenclature vary from place to place. The following reflects my experience.

Here is what happens, starting at time zero when the customer throws the switch (without asking permission or scheduling the event in advance).

Zero – 0.01 seconds

A transient surge races through the grid at about 0.8 light speed. Stored electric and magnetic fields in the grid supply the energy to your light. Every nearby and remote generator on the grid, every node voltage, and every current in a wire of the entire grid will be altered slightly. This is pure physics. We could observe it using a chronograph.

0.01-1 seconds

When the surge reaches generators, they begin to slow down. Generators closer to your light switch decelerate earlier and more. Inertia stored in the rotating shafts supplies the energy to your light. Grid frequency decreases on a downward slope, and the phase angles of the voltage at all nodes change. To some extent, the magnitudes of other loads on the grid will change with frequency, but that is a second-order effect. This is pure physics.

1-15 seconds

Synchronous generators are “phase locked.” Except for brief transients, they all see exactly the same frequency everywhere in the grid. This too is physics on the stopwatch scale.

Now, engineered controls begin to act. The speed governors at the power plants begin to adjust mechanical power to the prime movers in response to frequency changes. Typically, each 1% change in frequency causes a 20% change in power. This applies to every generator on the grid, but some can respond more rapidly than others. By the end of this period, grid frequency will be almost be returned to normal, and changes in the prime mover powers will supply energy to your light.scheme for frequency control

This fully distributed, robust, and hacker resistant, local-sense-and-correct scheme for frequency control has been in use for the past 130 years. This is the first and foremost level of grid control.

15 seconds -15 minutes

The central automatic-generation-control (AGC) system senses the changes, and sends new set points to the local control systems of all power plants. The purpose is to a) Return grid frequency to exactly nominal. b) Return all power transfers between regulated regions to their agreed upon values.

Reactive ▲

Proactive ▼

c) Find the optimum dispatch for the coming period. That includes the past fact that your light switch is on, and future forecasts of what is expected in the next period. AGC may also consider contingencies and constrain the results to avoid potential violation of security constraints.

15-30 minutes

Calculate a new optimum dispatch to supply the total grid load for the coming period, based on the state plus forecasts. This is called Economic Dispatch (ED). ED may include decisions to start or stop short-notice resources such as gas turbines. Every candidate dispatch is validated against the list of contingencies. ED considers more contingencies than AGC. AGC and ED are typically done in regional-level control centers.

Solar and wind generators are not as controllable as conventional power plants.  The wind gusts, and clouds pass overhead.  It is best to think of these variations like incremental changes in load, in both the plus and minus directions.  Other unplanned events, such as a tree knocking a line down, or a power plant tripping offline, are handled in ways analogous to handling your light switch event.

1 hour: The Real-Time-Market (RT)

This is an economic auction to determine who will supply services and capacity, and at what prices, to make up for the incremental difference between the current forecast for the next hour’s needs and yesterday’s forecast for the same hour, Occasionally, a major unplanned event will make the next hour’s reality very different from yesterday’s forecast. Possible starting and stopping of resources or curtailment of human plans are part of the decision, as are contingencies.

1 day: The Day-Ahead-Market (DAM)

The DAM is an economic auction to determine who will supply energy and services satisfy the forecasted needs for each hour of the following day. An optimization finds the least cost way to serve the needs while observing the constraints. Every candidate dispatch is validated against the list of contingencies. Some plants will be called to run, some to shut down, and some to run at partial capacity. Ditto for requests to import-export power to other regions.
The results of the auctions are posted as tomorrow’s hour-by-hour operating plan available to all participants so that they can make their own plans. For example, your employees can take the day off if your plant will not be called on to run.

We use essentially the same kinds of calculations for DAM, RT, ED, and AGC optimizations. The difference is that the further we look into the future, the more options are available to choose from. The closer we are to real time, the more locked in we are to the current state.

The RT and DAM auctions set a wholesale price for energy for each electric location on the grid for each instant of time (with a bit of granularity).  Buyers are matched with sellers to determine quantity and price in a manner analogous to buy/sell clearing prices of stock on a stock market.  Services other than energy are also auctioned.Wholesale energy prices can be very volatile, ranging from -30 to +100 ¢/kWh, and averaging perhaps 3 ¢/kWh.  Most retail customers are completely shielded from the volatility.  They expect the light to come on when they throw the switch, and they get a bill at the end of the month.  They can ignore everything else. Retail invoices include the charge for delivering the energy to the customer’s doorstep.

1-4 days:

Load Forecast based on demographics, history, the calendar, and weather, calculate the anticipated loads for each bus in the grid for each hour. For example, if tomorrow is a holiday or it will be hot, the forecasted loads will be different. Special forecasts are generated for DAM, RT, ED and AGC. Many modern load forecasters use neural networks and artificial intelligence learning methods.

1 week: Outage Scheduling

Power plants, transmission lines, and all parts of the grid need maintenance that requires equipment to be taken out of service temporarily. Outage schedulers make sure that not too many planned outages pile up on the same day in the same area.

1-3 months: Installed Capacity Markets

According to economic theory, the RT and DAM markets are competitive only when there are a surplus of bidders, and some of the bidders go home with their offerings unsold. If generation bidders held back, prices would soar. That is what happened in California in 2000 with Enron among the infamous bad guys. To prevent that, utilities must purchase guarantees that installed capacity resources ready and able to provide adequate bids to the auctions. Both long-term contracts and shorter term capacity auctions are used.

About half the time utilities enter into long-term power purchase contracts with generation owners, thus bypassing the DAM and RT, but they still need the markets for the other half.

In some areas, utilities still own the power plants. In that case, the capacity issues are internal and not transparent.

Automated ▲

Manual ▼

1 year: Fixed for Float Swaps

Some parties (think of a city government for example) need predicable budgets and can’t stand price uncertainty. They can make contracts with other people who are willing to take on risk in exchange for a fixed fee. Financiers call these fixed-for-float swaps. For wholesale grid energy, they are typically negotiated by lawyers at least one year in advance.

1-10 years Transmission Planning

Based on anticipated regional demographics, and anticipated new generating facilities, transmission planners figure out how many lines of what capacities are needed and where they should be. They mostly do that by simulating lots of possible contingencies to come up with a plan robust enough to meet requirements. The simulations are speculative, but their differential equations are physics-based. Since it can take up to 10 years to build a new power line, planning is done with very long planning horizons.

1-20 years Generation Planning

Based on anticipated regional demographics, anticipated fuel costs, anticipated technologies, and anticipated laws, regional planners figure out the mix of generation types and locations needed for a 20 year planning horizon. In today’s deregulated world where any investor can decide to install solar, or wind, or gas turbines anywhere without asking permission from any planners, generation planning. Imagine also the impact of a carbon tax on future plans, or worse the uncertain possibility of such a tax. Such issues have made generation planning less useful than in the past, to the point of being nearly moot.

On the other hand, old fashioned power plants were designed for 45 year lifetimes, but some modern facilities can be designed, installed, and paid off in just a few years, thus making generation planning less needed.


We looked at the immediate and long term cause & effects of turning on a light. Next time you’re on an airliner at night, watching the lights of the cities glide past below, think what a miracle that really is.

The next likely step in the future will be to consider the state of the national natural gas pipeline network, and to integrate that into the electric grid security constraints.


PF Science Advisor Jim Hardy contributed valuable suggestions to this article.

Link to the forum post

47 replies
Newer Comments »
  1. ddesaneis
    ddesaneis says:

    Consider what happens during the flip of the switch.  Let a galvanic cell be the power source.  A galvanic reaction exports a single electron w/ chemical reaction energy (not a small energy change), after determination of circuit integrity.  The anode and the cathode reactants must SIMULTANEOUSLY detect the integrity (no open circuit) of a (macroscopic) inductor, versus simply detecting that an adjacent molecule that is a conductor.  The anode / cathode reactants must also detect the integrity of a path through the electrolyte between the anode and the cathode (sometimes including through a salt bridge), versus detection of w/ a nearby single electrolyte molecule.  Applying chemical reaction energy to a single conductive molecule would result in high current through high resistance E = 1/2 LI^2.  Limitation of thermal loss requires distribution of magnetic energy among the molecules in the current path within a macroscopic inductor, instead of a packet of magnetic energy passing from one molecule to the next.  Electrical current would correspond to the number of times per second that this electron passes through any location (cross-section) within the circuit.  eV = 1/2 LI^2The galvanic reaction will reclaim its electron, before the electron could make a second pass.

  2. ddesaneis
    ddesaneis says:

    "Why do you use the word "simultaneously"?  Just as with any arrangement of charges, the status takes time to establish itself."  Connecting a galvanic cell to an open circuit will not cause a chemical reaction, required for adding magnetic or electrostatic energy into the conductors within the open circuit.  If no previous closed circuit occurred, then the galvanic cell exists as 2 unconnected half cells.  Half cells reactions do not produce magnetic or electrostatic energy.  ""Placing a piece of reactant in an electrolyte solution makes a half cell.  Unless it is connected to another half cell via an electric conductor and salt bridge, NO reaction will take place in a half cell."""Not battery suddenly appears out of empty space but it will be assembled and charges will migrate to establish an equilibrium."  During open circuit conditions, the 2 half cells within the galvanic cell are as isolated from each other as when empty space separates them.  Before a closed circuit occurs, the galvanic cell has no means of adding electrostatic or magnetic energy to the conductor, or the switch.  "The same point was discussed recently about the depletion layer in a solid state diode, which also does not suddenly appear."I did not see that entry.  However, forward diode bias can suddenly INCREASE the conductivity of both anode and cathode (not just the junction).  An increase in junction conductivity alone would not greatly increase diode conductivity.  "Once a circuit is connected across the galvanic cell, there will be another redistribution of charges. In this case, however, the charges will continue to flow until the chemicals, providing the potential energy, are exhausted."The conductors are inductors.  W/o an inductor, there is a place to export the magnetic energy (E = 1/2 LI^2.  Note: The path through the electrolyte is just as import for electrical current, as the closed circuit.  Removal of a salt bridge would stop electrical energy production.  "The fastest that any EM phenomenon can be established involves c.  There is no need for Instantaneity to be involved."The same set of galvanic reactions that generates the electron will remove the electron.  Nothing replaces the electron, until another set of galvanic reactions occur.  An exported electron cannot remain within the external circuit longer than time required for a chemical reaction.  In theory, the distance between the switch and the galvanic cell could be continental (given superconductive lines to the switch).

  3. ddesaneis
    ddesaneis says:

    Perhaps, detection of a closed circuit does not require propagation within the circuit.  One scenario that avoids speed of light propagation during detection could be that metals already contain conductive paths within them.  Contact between 2 metal objects (a switch) joins conductive paths within each conductive object.  In other words, a switch can join a galvanic cell to existing conductive paths, instead causing the galvanic cell to detect the conductivity of every atom within an unknown path.

  4. jim hardy
    jim hardy says:

    I just scanned that fascinating White Paper on frequency response.So gas turbines droop the wrong way(fig 6)?  And they want to kill coal? That's a dark joke..Power system stability looks to me like a secure career…  btw we had some 3% governors.

  5. anorlunda
    anorlunda says:

    why is almost every paragraph finsihed with “this is physics

    what else is it? black magic?

    I was trying to point out the difference between physícs, engineered features, and economics, because they are commingled.

  6. dlgoff
    dlgoff says:

    anorlunda submitted a new PF Insights post

    [URL=’’]What Happens When You Flip the Light Switch?[/URL]


    [URL=’’]Continue reading the Original PF Insights Post.[/URL]

    This is awesome anorlunda.
    To see some of what is required from the regulator’s standpoint, here are a couple papers that can be viewed with Adobe Reader.

    [URL=’’]Frequency Response Standard Whitepaper[/URL]

    [URL=’’]Balancing and Frequency Control[/URL]

  7. anorlunda
    anorlunda says:

    To see some of what is required from the regulator’s standpoint, here are a couple papers that can be viewed with Adobe Reader.

    [URL=’’]Frequency Response Standard Whitepaper[/URL]

    Thanks for your kind words. I just read that paper on frequency response with interest.

    When I started in this business, just after the Northeast Blackout of 1965, every single generator used a 5% regulation (i.e. 20% change in power for 1% change in frequency); there were no exceptions that we knew of. The reason was that if everybody used the same gain, then all generators shared all load changes in proportion to their rated capacity. That is pretty close to optimum. There were rumors that some bad actors use wedges to force open the turbine valves the last couple of percent which would make them not respond to frequency, but it was never proved.

    Later in the 2000s, I was shocked to learn that very many plants no longer had frequency governing active full time. But I was told by many people that it’s not a problem. FERC and NERC have standards about frequency and time and tie-line excursions and those standards were being met, so I had to concede that no harm was readily apparent. The paper you linked challenges that.

    I was also shocked to learn here on PF, that operators in New Zealand tuned they hydro governers for less than 5% ([U]more [/U]than 20% per %). The argument is that hydro plants are uniquely able to respond rapidly to incremental changes. That too was news to me.

    I did not mention in the article that on a huge interconnection with billions of “light switches” around, that almost all random switch-on events are canceled by switch-off events. Thus frequency regulation by speed governors is most important on the smallest grids. I once vacationed on a small island and heard the refrigerator motor noticably speed-up and slow-down all day and night.

    Readers can make their own frequency measurement device, plug it into a wall socket, and keep an eye themselves on what is happening. Your socket is just as good as any other place on the grid to make that measurement.

Newer Comments »

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply