The role of temperature in the variability and extremes of electricity and gas demand in Great Britain

The daily relationship of electricity and gas demand with temperature in Great Britain is analysed from 1975 to 2013 and 1996 to 2013 respectively. The annual mean and annual cycle amplitude of electricity demand exhibit low frequency variability. This low frequency variability is thought to be predominantly driven by socio-economic changes rather than temperature variation. Once this variability is removed, both daily electricity and gas demand have a strong anti-correlation with temperature (relec = −0.90 , rgas = −0.94). However these correlations are inflated by the changing demand–temperature relationship during spring and autumn. Once the annual cycles of temperature and demand are removed, the correlations are r elec = − 0.60 and r gas = − 0.83 . Winter then has the strongest demand–temperature relationship, during which a 1 °C reduction in daily temperature typically gives a ∼1% increase in daily electricity demand and a 3%–4% increase in gas demand. Extreme demand periods are assessed using detrended daily temperature observations from 1772. The 1 in 20 year peak day electricity and gas demand estimates are, respectively, 15% (range 14%–16%) and 46% (range 44%–49%) above their average winter day demand during the last decade. The risk of demand exceeding recent extreme events, such as during the winter of 2009/2010, is also quantified.


Introduction
Predicting electricity and gas demand is important for ensuring there is sufficient supply to meet demand. This is particularly important during extreme demand periods, when the risk of energy shortages and whole sale energy prices rise (National Grid 2014, van Goor and Scholtens 2014).
Energy demand is driven by weather and a variety of socio-economic factors (Psiloglou et al 2009, Soldo 2012. Temperature is the dominant weather driver of electricity and residential gas demand in many developed countries (Sailor et al 1998, Mirasgedis et al 2006, Timmer and Lamb 2007, Cho et al 2013, where lower temperatures produce heating demand and higher temperatures create air conditioning demand (Hahn et al 2009). Inclusion of additional weather variables has been shown to modestly improve demand predictability, such as relative humidity, solar radiation, wind-speed and other derived variables (Psiloglou et al 2009, Soldo 2012, Szoplik 2015. Socio-economic factors affecting electricity and gas demand include energy prices, consumer behaviour, income, gross domestic product (GDP), manufacturing, population and building characteristics (Henley and Peirson 1997, Psiloglou et al 2009, Szoplik 2015. Previous studies have found a near-linear, negative relationship between temperature and electricity and gas demand in the UK (Hor et al 2005, Bessec and Fouquau 2008, Psiloglou et al 2009, Summerfield et al 2015. Energy demand is shown to vary across a range of timescales, with clear daily, weekly and annual cycles (Taylor and Buizza 2003, Taylor 2010, van Goor and Scholtens 2014. In addition, UK electricity demand exhibits a long term trend (Hor et al 2005). However these studies either use high temporal resolution, but short length data sets, or longer Original content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence.
Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. data sets of lower temporal resolution. For example Hor et al (2005) and Bessec and Fouquau (2008) consider the relationship over 26 and 15 years respectively but only use monthly data, while the daily and subdaily studies of Psiloglou et al (2009) and Henley and Peirson (1997) only consider 5 and 1 year of data respectively.
This study therefore aims to better quantify the relationship between demand and temperature in Great Britain (GB), at a daily timescale, using the longest demand records available (38 years for electricity, 16 years for gas). A comparison of the annual, seasonal and monthly relationships is given. In addition, the risk of demand extremes in GB is quantified for the first time, by creating an artificial extension of the demand data back in time using observed temperature observations and the recent demand-temperature relationships.
2. Observed data sets 2.1. Demand data Daily electricity demand data for GB was provided by National Grid, the grid operator, for 1971-2013 in giga (10 12 ) watt hours (GWh). This dataset for GB has been generated by combining two separate demand datasets, one for England and Wales and one for GB (see supplementary material for further details). Data is considered from 1975 onwards due to the coal mining strikes and power cuts during the early 1970s. Annual GB electricity demand increased almost monotonically from 1975 until 2006, thereafter a reduction up to the present is apparent (figure 1, upper). A clear annual cycle is visible, with on average a maximum monthly demand in January and a minimum in August, and more clearly seen in figure 2 for one year, 2010-2011.
Daily gas demand data (in GWh) for GB was also provided by National Grid for the shorter period 1996-2013. The gas demand represents the total of non-daily metered demand (mainly domestic usage), daily metered demand (for large industrial premises) and shrinkage (gas leaks, theft). It does not include gas consumers directly connected to the national transmission network, such as gas-fired power stations and large industrial units (National Grid 2012a, Wilson et al 2013). Compared to electricity, there is little low frequency variability in gas consumption over this more limited period (figure 1, lower). However there is a clear annual cycle of gas demand with on average a peak in January and minimum in August, as seen in van Goor and Scholtens (2014).
As noted by Taylor and Buizza (2003), a strong weekly cycle in electricity demand is evident, with reduced demand during weekends and holidays (figure 2, grey line). Weekend and holiday days have on average 15%-20% less electricity demand than week days. While for gas demand a much smaller weekly cycle is seen, with on average only 5%-10% less demand on non-working days. The difference is consistent with a higher proportion of electricity demand relating to industrial activity, which reduces over the weekend (DECC 2013).

Temperature data
To explore the relationship between GB energy demand and temperature, the Central England Temperature record (CET, Parker et al 1992) is used. This observational dataset gives the average temperature of an area enclosed by Lancashire, London and Bristol and daily data are available from 1772. Shorter datasets covering the whole of GB are available, but as population and demand are weighted to the south of GB, the CET dataset is deemed suitable. In addition the CET record captures the temperature variability seen in other parts of the UK (the daily correlation between CET and the average temperature in Scotland or Wales is very strong, r = 0.93 and r = 0.99, respectively), in agreement with Croxton et al (2006). The variability in temperature associated with both the annual cycle and daily fluctuations, is much greater than any low frequency variability (figures 2 and 3).
As described previously, temperature is the dominant weather driver of electricity demand. However this cannot be the case for the low frequency electricity demand variability seen in figure 1. The steady increase in annual electricity demand up to the mid-2000s would need to be accompanied by a reduction in temperatures over the same period, this is not seen in figure 3. The long term trend in electricity demand leads to a large amount of scatter in the week-day demand-temperature relationship (figure 4, left), which is in contrast to the strong relationship seen in individual years (figure 12 in supplementary material). Therefore to better quantify how demand varies with temperature, this low frequency, non-temperature driven demand variability needs to be identified and removed. There is a strong positive correlation between GDP and electricity demand prior to 2006 ( = r 0.98, see figure 5) in agreement with Hor et al (2005). However from 2007 onwards there is little correlation ( = r 0.07). The reduction in demand since the mid 2000s is thought to be due to the financial crisis, energy saving measures, an increase in embedded generation (demand that is not seen by the grid operator) and a move away from heavy industry (DECC 2012 and National Grid 2014). The latter three factors would reduce the relationship between GDP and energy demand and may explain the change in relationship seen after 2006. As for electricity, gas demand has a positive but weaker correlation with GDP prior to 2007 ( = r 0.42) and little correlation after ( = r 0.07). The time varying and complex combination of socio-economic drivers of demand suggests that using an individual driver (such as GDP) to model and then remove the long term demand trend is not appropriate. Rather the trend is modelled using a 5 year centred running mean demand. This low frequency demand variability effectively represents the combination of different socio-economic drivers on demand and is subsequently removed prior to comparison with temperature (described in section 4.1.1). A five year centred running mean demand is chosen to be not too long, while minimising the impact of an extreme demand season (which could be weather driven) on the yearly demand evolution.

Low frequency demand variability
The long term trend and magnitude of the annual cycle of demand are identified using Fourier analysis (see Wilks 2006), benefitting from the quasi-sinusoidal nature of the annual cycle of demand. To construct an evolving background demand ( ( ) y t ), the demand in any year (April-March) is analysed using a Fourier representation of the form:  where, = p w 365 2 days. A second order representation is necessary to capture the asymmetries in the annual cycle of demand. This produces yearly values of each parameter on the right-hand side of equation (1). To produce a smoothly evolving background demand, the evolution of each of these parameters is smoothed. A 1 , B 1 , A 2 , and B 2 are smoothed by fitting a linear regression line through the annual values between 1975 and 2013. Yearly mean demand (y ) is smoothed by taking a 5 year running mean due to its nonlinear form (red line, figure 6 left), as described earlier. For the two years at either end of the timeseries y is represented by a 3 year average. Low frequency variability is therefore defined as variability with a timescale of greater than about 5 years, while highfrequency variability is defined as variability on a daily, seasonal and inter-annual timescale.
Here, the focus is on the week-day (Monday-Friday) temperature-demand relationship, and including non-working days would have undesirable effects on the Fourier representation. Consequently, prior to fitting the Fourier expansion, weekend demand is replaced with the average of the adjacent Monday and Friday. Similarly, demand during bank holidays and 3 days either side, is replaced with linearly interpolated values between adjacent non-holiday days. This process maintains the length of the record for the sake of the Fourier analysis. The processed and original demand timeseries are shown in black and grey in figure 2 respectively.

Results
The slowly evolving background electricity and gas demand timeseries, resulting from the Fourier fitting and smoothing, are shown in red in figure 1. The Fourier representation successfully captures both the low frequency demand variability and its changing annual cycle.
The Fourier representation also allows the amplitude of the annual cycles of electricity and gas demand and their evolution to be compared. The first Fourier . Gas demand has a large annual cycle, where its amplitude (C 1 ) is ∼60% of the long term mean demand and changes little over the recorded period (figure 1 lower, see supplementary material for further details). In contrast the annual cycle of electricity demand is considerably smaller and reduces by approximately a third over the last 38 years (figure 6 right, also seen in figure 1 upper). In 2012 the amplitude was only 14% of the mean demand of that year. Between 2005 and 2012, approximately two-thirds of residential gas consumption was for space heating compared to less than a quarter for electricity (DECC 2013, see their table 3.02, Domestic data), explaining the greater sensitivity of gas demand to temperature and its larger annual cycle. The reduction in the amplitude of the annual cycle of electricity demand is associated with summer demand increasing at a faster rate than winter demand, with the difference reducing by on average 1.7 GWh/year, or approximately 7% per decade (figure 13, supplementary material). An equivalent reduction in the seasonal cycle of temperature is not seen, rather non-meteorological drivers are likely responsible.

Demand-temperature relationships
The desire to understand the current risk of demand extremes has determined how the demand-temperature relationship is established.
4.1. Methodology 4.1.1. Demand-removing the low frequency variability Low frequency demand variability, associated with socio-economic changes, weakens the demand-temperature relationship and is therefore removed. This is achieved by replacing the slowly varying background demand field with a constant annual cycle demand background. The two stages undertaken to achieve this are: where: D=Demand (black line in figure 1).
B=Slowly varying background demand (red line in figure 1).
R=Residual demand. B c =Repeating climatological mean annual demand cycle (red line in figure 7).
D d =Detrended demand, where the low frequency variability has been removed (black line in figure 7).
The resultant detrended demand (D d ) timeseries is shown in figure 7. This process has effectively retained the high frequency demand variability and the climatological annual cycle, while removing long term variations in both annual mean demand and annual cycle magnitude. For example the demand spike in winter 1986-1987 or the anomalously high demand throughout winter 1978-1979 are still present in this detrended demand timeseries. The detrended demand timeseries is available in supplementary material.  temperature are important to include when calculating the risk of demand extremes. However longer scale temperature variability, which is presumed to be predominantly associated with anthropogenic climate change, makes the likelihood of cold winter days lower today (Brown et al 2008, Bindoff 2013, Hartmann 2013. To account for this non-stationarity, the long term temperature trend needs to be removed prior to establishing the demand-temperature relationship and the risk of extremes (as discussed in Coles 2001).
A long term trend in CET can also be modelled using a Fourier expansion, as shown in red in figure 3 for the recent period. The same approach as for demand is used (see section 4.1.1), with a few important differences. Firstly, the evolution of the annual mean temperature is represented by a third order polynomial (blue line, figure 8), to better capture the long term trend. Secondly, the evolution of A x and B x is not modelled, rather climatological average values are used, giving a constant annual cycle. Consequently, the resulting 'detrended temperature' timeseries has only had the long term trend removed, while decadal and higher frequency variability remains, including any changes in the annual cycle.
The relationship between detrended demand and detrended temperature can now be established. The relationship is determined using all years of data, this approach therefore assumes the relationship remains constant through the data period. The relationship is only considered over working week-days (excluding weekends, bank holidays and 3 days either side of bank holidays).

Annual relationship
The removal of low frequency demand variability leads to a much stronger week-day relationship between electricity demand and detrended temperature, increasing the correlation from −0.61 to −0.90 (figure 4, right and top row table 1), which is now similar to that seen within individual years. This suggests that the key relationship between demand and temperature has been retained while the socioeconomic influences on demand have been successfully removed. The strength of the relationship is now comparable to that of raw gas demand and temperature, where =r 0.94 (figure 9). Low frequency gas demand variability is small, consequently its removal barely modifies its annual correlation with temperature (table 2). The daily relationships are seen to be slightly nonlinear, with the negative relationship levelling off above ∼17°C, similar to that found in Psiloglou et al (2009) and Summerfield et al (2015).

Seasonal and monthly relationships
The electricity demand-temperature relationships for each season also improve substantially after removal of low frequency demand variability, for example the winter correlation increases from −0.19 to −0.80 (table 1). Modest correlation increases are also seen after detrending the gas demand (table 2). A strong anti-correlation between daily detrended temperature and electricity demand is found in winter, spring and autumn (magnitude - 0.80, figure 10), with a much weaker correlation in summer ( =r 0.28), in agreement with Psiloglou et al (2009). Electricity demand saturation at extreme low temperatures, as claimed by Hor et al (2005), is not seen. Gas demand is strongly related to temperature in each season, with stronger correlations than those of electricity, particularly in summer (table 2 and figure 14, left-hand column, supplementary material). The impact of removing the long term trend in temperature on these relationships is small (see supplementary material for further details).
For both electricity and gas demand, the all days correlation is higher than that of individual seasons. This reflects the large annual cycle in temperature and the fact that the annual cycle in demand is not fully Figure 6. Fourier harmonic parameters of electricity demand analysis. Left: annual mean demand (y , black), its 5 year running mean (red). Right: first harmonic wave amplitude (C 1 , GWh, black) and its smoothed representation (red). The smoothed C 1 is calculated from the linear representations of A 1 and B 1 .  explained by the annual cycle in temperature. During spring or autumn the relationship between demand and temperature changes (see figure 10 and figure 14 in supplementary material). For example, the March relationship is nearer to that seen in winter, while the May relationship is more similar to that found in summer. A day with a temperature of 7°C would on average give an electricity demand of ∼900 GWh in March, ∼850 GWh in April and ∼800 GWh in May. However during winter or summer, the monthly relationships are very similar. The change in relationship within a season cannot be caused by temperature. One hypothesis is that during spring and autumn, for the same daily average temperature, a difference in daylight hours could modify the demand for lighting and possibly also for heating.
The strength of the seasonal relationships during spring and autumn is better established using the residual relationships (where the annual cycles have been removed, see figures 14 and 15 in supplementary material). The all days correlation is now lower or equivalent to that of the individual seasons ( =r 0.60 for electricity and =r 0.83 for gas, see last column in tables 1 and 2). Winter now has the strongest relationships, with approximately two-thirds of the variability in electricity demand being linearly accounted for by temperature variability ( =r 0.81) and over four-fifths of gas demand variability ( =r 0.90). Temperature sensitivity in winter is now similar or higher than that seen in spring and autumn, contrary to that seen when the annual cycle is present. Over the data period, a 1°C decrease in daily temperature during winter months will typically give rise to a 10-12 GWh increase in daily electricity demand (∼1% increase, established using the monthly linear fits in figure 10) and a 105-115 GWh increase in daily gas demand (3%-4% increase). Temperature sensitivity is at a minimum in summer (see supplementary material for further details).

Extreme demand periods
In preparation for each winter, National Grid estimates both the magnitude of extreme electricity and gas demand conditions and total generation capacity, to ensure sufficient supply. For electricity demand, they estimate the 1 in 20 year peak day demand, where peak day is defined as the maximum daily demand during a financial year. They also estimate the average cold spell peak demand, which is defined as the peak demand within a year which has a 50% chance of being exceeded as a result of weather variation alone (National Grid 2012b). As part of the gas winter security assessment, the 1 in 50 year peak daily, weekly, monthly and seasonal mean demand is estimated (National Grid 2014).

Methodology
The longer a demand timeseries the better the quantification of its extremes. The observations of electricity and gas demand cover 38 years and 16 years respectively. However a much longer artificial demand timeseries can be generated using the entire detrended CET record (1772-2013) and the modern detrended temperature-demand regression relationships (as described in section 4.2). These artificial daily demand estimates, give the demand that would have occurred given historical temperatures, but are consistent with demand from a modern energy system. The winter mean regression relationship is chosen because of the Table 1. Summary of correlations between daily GB electricity demand and daily CET, between 1st January 1975 and 31st March 2013, considering week-day and non-holiday days only (column 1). Column 2, the same however the correlation is between detrended demand and detrended CET. Column 3, the same as column 2, except the respective annual cycles have been removed.  interest in high demand extremes. The risk of recent extreme demand periods is assessed by counting the number of artificial events since 1772 where demand equals or exceeds the recent event of interest. The mean absolute error between regression predicted and actual demand over the observed period is small. Bootstrap sampling is employed to quantify uncertainty in the demand estimates, resulting from uncertainty in the regression model and the limited sample size. For further details on the mean error and bootstrap sampling see supplementary material. All extreme demand estimates are presented as a percentage difference from the average winter day demand over the last decade (December 2003-February 2013, hereafter referred to as 'climatology'), as calculated by the regression model. The climatological electricity and gas demand are 980 GWh and 2951 GWh respectively.

Daily extremes
Over the 241 years, the top 1% of electricity demand days in winter have a demand estimate which is at least 10.8% (10.4%-11.1%) above climatology ( figure 11  and table 3). The 1 in 20 year peak day electricity demand estimate is 15% (14%-16%) above climatology, while the average cold spell demand estimate is 10.2% (9.8%-10.6%) above climatology. The coldest day in the record occurred on the 20th January 1838, with a detrended temperature of −11.7°C, giving an electricity demand estimate 17% (12%-21%) above climatology.  Equivalent statistics are given in table 3 and figure 11 for gas demand. The deviations from climatology are greater for gas than electricity, which is consistent with gas demand being more sensitivity to temperature change. The 1 in 20 year peak day gas demand estimate is 46% (44%-49%) above climatology, while the 1 in 50 year demand estimate is 50% (47%-54%) above.

Monthly and seasonal extremes
December 2010 is a recent, extremely cold month (Maidens et al 2013). The detrended temperature was on average −1.5°C, giving temperature driven electricity and gas demand estimates of, respectively, 5.7% (4.9%-6.4%) and 19% (18%-21%) above climatology. Over the 241 year period, a month with at least as much electricity or gas demand as December 2010 is estimated to occur on average once every ∼34 years (20-60 years). Months with greater demand would have occurred in the past given the temperatures experienced. For example January 1795 was the coldest month since 1772, with a detrended average temperature of −2.9°C. Such conditions would give a monthly average electricity and gas demand estimate 7.2% (6.4%-7.9%) and 24% (22%-26%) above climatology respectively.
The 1 in 50 year peak gas demand week, month and season are estimated to be 35% (33%-37%), 20% (18%-22%) and 9% (8%-11%) above climatology respectively. It is of interest to note that due to the long term trend in temperature, the risk of a December 2010 or a winter 2009/2010 demand has approximately halved.

Conclusions
Observed daily electricity and gas demand in GB have been analysed between 1975GB have been analysed between -2013GB have been analysed between and 1996GB have been analysed between -2013 respectively. The daily relationships between weekday energy demand and temperature have been established and their variation with month and season investigated. Low frequency, non-temperature related  demand variability is represented by a slowly evolving truncated Fourier expansion, and is removed prior to establishing the relationship with temperature. Artificial estimates of daily demand are made back to 1772 using detrended temperature observations and the modern detrended demand-temperature regression relationships. The current risk and magnitude of extreme demand events has then been quantified. The main conclusions are given below: • From 1975-2006 annual electricity demand increases almost monotonically, after which a reduction is seen. Over the same period the annual cycle amplitude of electricity demand reduces by a third, which is associated with summer demand increasing at a faster rate than winter demand.
• Both daily electricity and gas demand are strongly anti-correlated with daily mean temperature ( =r 0.90 elec , =r 0.94 gas ), once low frequency non-temperature related variability in demand has been removed. However these correlations are inflated by the demand-temperature relationships changing throughout spring and autumn. Once the annual cycles of temperature and demand are removed, the correlations drop to =r 0.60 elec and =r 0.83 gas .
• Winter has the strongest demand-temperature relationship (r elec =−0.81 , r gas =−0.90), and high temperature sensitivity. Over the data period, a 1°C reduction in daily temperature in winter typically gives a ∼1% increase in daily electricity demand and a 3%-4% increase in gas demand.
• A higher proportion of gas demand is consumed for domestic heating compared to electricity, which is consistent with its stronger anti-correlation with temperature, its larger relative annual cycle, its weaker weekly cycle and its greater sensitivity to temperature change.
• The 1 in 20 year peak day electricity demand estimate is 15% (14%-16%) above the average winter day demand. The 1 in 20 and 1 in 50 year peak day gas demand estimates are 46% (44%-49%) and 50% (47%-54%) above the average winter day respectively. Today the risk of a month having at least as much electricity or gas demand as December 2010 is estimated to be one in ∼34 years (20-60 years). The risk of a winter having at least as much electricity or gas demand as the 2009/2010 winter is estimated to be one in ∼18 years (12-27 years). The long term trend in temperature means the risk of a December 2010 or a winter 2009/2010 demand has approximately halved.
This improved understanding of the demandtemperature relationships and the risk of extremes should aid operational management and longer term planning of GBʼs energy system.