This paper investigates large fluctuations of locational marginal prices (LMPs) in wholesale energy markets caused by volatile renewable generation profiles. https://www.selleckchem.com/products/alkbh5-inhibitor-2.html Specifically, we study events of the form [Formula see text] where LMP is the vector of LMPs at the n power grid nodes, and α-, [Formula see text] are vectors of price thresholds specifying undesirable price occurrences. By exploiting the structure of the supply-demand matching mechanism in power grids, we look at LMPs as deterministic piecewise affine, possibly discontinuous functions of the stochastic input process, modelling uncontrollable renewable generation. We use techniques from large deviations theory to identify the most likely ways for extreme price spikes to happen, and to rank the nodes of the power grid in terms of their likelihood of experiencing a price spike. Our results are derived in the case of Gaussian fluctuations, and are validated numerically on the IEEE 14-bus test case. This article is part of the theme issue 'The mathematics of energy systems'.The increasing reliance on renewable energy generation means that storage may well play a much greater role in the balancing of future electricity systems. We show how heterogeneous stores, differing in capacity and rate constraints, may be optimally, or nearly optimally, scheduled to assist in such balancing, with the aim of minimizing the total imbalance (unserved energy) over any given period of time. It further turns out that in many cases the optimal policies are such that the optimal decision at each point in time is independent of the future evolution of the supply-demand balance in the system, so that these policies remain optimal in a stochastic environment. This article is part of the theme issue 'The mathematics of energy systems'.We apply the JuDGE optimization package to a multistage stochastic leader-follower model that determines a transmission capacity expansion plan to maximize expected social welfare of consumers and producers who act as Cournot oligopolists in each time period. The problem is formulated as a large-scale mixed integer programme and applied to a 5-bus instance over scenario trees of varying size. The computational effort required by JuDGE is compared with solving the deterministic equivalent mixed integer programme using a state-of-the-art integer programming package. This article is part of the theme issue 'The mathematics of energy systems'.The urgent need to decarbonize energy systems gives rise to many challenging areas of interdisciplinary research, bringing together mathematicians, physicists, engineers and economists. Renewable generation, especially wind and solar, is inherently highly variable and difficult to predict. The need to keep power and energy systems balanced on a second-by-second basis gives rise to problems of control and optimization, together with those of the management of liberalized energy markets. On the longer time scales of planning and investment, there are problems of physical and economic design. The papers in the present issue are written by some of the participants in a programme on the mathematics of energy systems which took place at the Isaac Newton Institute for Mathematical Sciences in Cambridge from January to May 2019-see http//www.newton.ac.uk/event/mes. This article is part of the theme issue 'The mathematics of energy systems'.We perform a rare-event study on a simulated power system in which grid-scale batteries provide both regulation and emergency frequency control ancillary services. Using a model of random power disturbances at each bus, we employ the skipping sampler, a Markov Chain Monte Carlo algorithm for rare-event sampling, to build conditional distributions of the power disturbances leading to two kinds of instability frequency excursions outside the normal operating band, and load shedding. Potential saturation in the benefits, and competition between the two services, are explored as the battery maximum power output increases. This article is part of the theme issue 'The mathematics of energy systems'.Scenario reduction techniques are widely applied for solving sophisticated dynamic and stochastic programs, especially in energy and power systems, but are also used in probabilistic forecasting, clustering and estimating generative adversarial networks. We propose a new method for ensemble and scenario reduction based on the energy distance which is a special case of the maximum mean discrepancy. We discuss the choice of energy distance in detail, especially in comparison to the popular Wasserstein distance which is dominating the scenario reduction literature. The energy distance is a metric between probability measures that allows for powerful tests for equality of arbitrary multivariate distributions or independence. Thanks to the latter, it is a suitable candidate for ensemble and scenario reduction problems. The theoretical properties and considered examples indicate clearly that the reduced scenario sets tend to exhibit better statistical properties for the energy distance than a corresponding reduction with respect to the Wasserstein distance. We show applications to a Bernoulli random walk and two real data-based examples for electricity demand profiles and day-ahead electricity prices. This article is part of the theme issue 'The mathematics of energy systems'.Weather forecast information will very likely find increasing application in the control of future energy systems. In this paper, we introduce an augmented state space model formulation with linear dynamics, within which one can incorporate forecast information that is dynamically revealed alongside the evolution of the underlying state variable. We use the martingale model for forecast evolution (MMFE) to enforce the necessary consistency properties that must govern the joint evolution of forecasts with the underlying state. The formulation also generates jointly Markovian dynamics that give rise to Markov decision processes (MDPs) that remain computationally tractable. This paper is the first to enforce MMFE consistency requirements within an MDP formulation that preserves tractability. This article is part of the theme issue 'The mathematics of energy systems'.