SIAM News Blog
SIAM News

Energy Optimization (Rain Is Free, or Isn’t It?)

Readers of SIAM News are presumably well aware of the importance of applied mathematics in the advancement of science and industry. Mathematics not only enhances scientific progress, but also hides within simple gestures we instinctively repeat every day. Such is the case when we turn on the lights. What does it take to ensure that every time we enter a dark room and flip the light switch, electricity is available and waiting for us to use?

Sophisticated mathematical optimization tools must be put in place to ensure that we can light our rooms at will. While other forms of energy—such as gas—can be kept stored until consumed, such storage, at least in amounts that can sufficiently meet the needs of a city, is impossible for electricity. (Batteries do keep power, but at a very small scale). Electricity poses a difficult challenge, as the electrical network should carry power in an amount that is “enough” without being “too much,” because any excess is wasted.

Given these constraints, how can one generate electricity in a manner that is both satisfactory for consumers and efficient from the network point of view?

Optimization provides an answer to this question and involves establishing a goal, called an objective function, to be minimized while respecting certain constraints. The cost of producing electricity, roughly given by the price of burnt coal if energy is generated by a thermal power plant, becomes the objective function. Constraints include several technical rules representing the process of transforming the burnt fuel into megawatts. One constraint of paramount importance relates to energy demand; ideally, power plants should provide as much electricity as consumers request.

Figure 1. Itaipu, a hydroelectric power plant located between Brazil and Paraguay on the Paraná River. Photo credit: International Hydropower Association.

On one side of the issue is the demand constraint, and on the other is the cost of generating the required power. From an energy optimization perspective, estimating consumer demand is a difficult task, one that calls for econometric models and statistical tools. Fortunately, using past consumption records to calibrate a stochastic model makes recurrent events like peak and off-peak hours relatively easy to foresee. Yet even when estimates are conducted from one day to the next, other indeterminate factors—much harder to predict or model—affect electricity demand and consumption. Consider for example an important soccer match, one deciding the outcome of the FIFA World Cup. In Brazil, a large majority of the population will open the refrigerator during half time to get a beer. This action produces a huge spike in energy consumption that the electrical system must face (shutting down power in the middle of the match would be quite unappreciated). This specific type of extreme event happens only once every four years and thus can be addressed by exceptionally over-generating and creating a (larger than usual) reserve of electricity in the network. This reserve, called spinning reserve, is also useful should the system face a minor production failure or the breakdown of a line.

An example of a more frequent demand uncertainty relates to temperature. In France, many households have electrical heating. During the winter, if the actual temperature for a given day happens to be even 1oC lower than the forecast predicts, it would require adding the full generation of one nuclear power plant to the system!

The aforementioned examples address coal and nuclear power plants. For environmental reasons, other sources of renewable energy are gaining more weight in the power mix worldwide. Nowadays most power systems include significant percentages of clean technologies that generate electricity from hydraulic and wind-driven sources.

Figure 2. The reservoir volume $$x$$ decreases due to evaporation and to water released, either by spillage $$SP$$ or passing through the turbines $$Q$$, to generate power $$u^0$$. The stored volume of water can increase with the inflows $${\xi}$$, which are unknown.
Including renewable energy plants in the optimization problem poses additional challenges related to uncertainty and specific to the distinctive features of each technology. Use of wind energy demands a model defined by historical records that applies econometric techniques to estimate the wind at any given hour of the day. Water is a completely different matter, especially when the hydraulic energy is generated by a plant with a reservoir (the generation of run-of-the-river plants is modeled similarly to wind power). In fact, in terms of energy optimization a hydro-reservoir is a (smart!) way of storing large amounts of energy. Stored water is the equivalent of stored power. Water is the fuel needed to produce hydraulic energy; just letting the water run through the turbines makes the power available to the system. In this case, uncertainty comes from the reservoir volumes, which in turn depend on the pluvial regime and the amount of melted snow. Once again, proper econometric models must be found to estimate the water inflows on the basis of past data.

The impact of inflow uncertainty in hydrogeneration is very different from other kinds of energy generation. As long as the hydro plant has a reservoir, the volume of available water can be considered known from one day to the next; contrary to wind power, there is no uncertainty in this data. Uncertainty is instead in the production cost: how much does it cost to generate hydropower? If we consider the fuel price, like with thermal plants, hydroelectricity costs nothing; water is free!

Here arises a curious phenomenon, resulting from the model itself and not from the data. We can refer to it as the “end-of-the-world” effect. Consider a simple setting with only two power plants: one thermal and one hydro plant with a reservoir. Generating thermal power is expensive due to the coal price, while hydropower costs nothing. Since the optimization problem attempts to minimize cost, its solution will fatally deplete the reservoir whilst trying to generate as much hydraulic power as possible. This solution may very well be the best one for the optimization problem, but it is certainly not desirable in the long term. The optimization problem is short-sighted and does not realize it can be problematic if, after its decision horizon, there is no more water in the reservoir.

Figure 3. Wind turbines harness clean energy from wind and convert it to electricity.
A mathematical optimization formulation addresses the “end-of-the-world” effect. The formula operates on the following key observation: for power generation purposes, a water reservoir is nothing but an electricity storage. Water is dormant energy and, as such, can be priced by computing its cost of substitution. Specifically, if we generate hydroelectricity to save money today, the reservoir level will go down. Then, if there is a drought in the future, we may have to burn (expensive) coal because the reservoir was never refilled. We can use the cost of generating this type of “emergency” thermal power to price the future cost of water.

In mathematical optimization terms, those calculations amount to the approximate computation of the value function of a multistage stochastic linear program. This is by no means an easy task, because often such linear programs are simply intractable. For the Brazilian power system, for example, the linear programming problem must consider 20119 possible scenarios for uncertainty. Only by suitably combining decomposition and sampling methods is it possible to define lower and upper bounds that sandwich the future cost function up to some confidence level. Thanks to this sophisticated machinery, the future cost of water can replace the zero cost for hydrogeneration in the optimization problem. The new objective function will prevent reservoirs from experiencing depletion at the end of the decision horizon. This strategy makes it possible for us to get power when we turn on the lights. It should also prevent unwelcome blackouts during massively popular events like the Super Bowl or the next FIFA World Cup final.

This article is based, in part, on Claudia Sagastizábal’s invited lecture at the 8th International Congress on Industrial and Applied Mathematics (ICIAM) held in Beijing, China, in August 2015.

​Claudia Sagastizábal is a visiting researcher at the Instituto Nacional de Matemática Pura e Aplicada in Rio de Janeiro, Brazil.