Simulating an Orkney Aggregator
- Evaluating different decision models in a simulated Orkney aggregator.
Introduction
In a previous post we looked at how well the prices of the electricity market reflected energy generation in Orkney, using time series datasets reflecting the generation and demand of electricity in Orkney1 and the closing prices of the N2EX electricity market.2 We concluded that there was no noticeable correlation between generation and price, and that using price as deciding factor would be a poor choice if ones goal was to optimize utilization of the renewable energy produced Orkney.
In this post we will get a bit more detailed in our estimations, going beyond simply “good” or “not good”. We will use our datasets to simulate an aggregator, using Python to step through the datasets chronologically, making decisions based on different optimization models. This can give us concrete estimations of the price and usage of such an aggregator.
Table of Contents:
- Why prioritize local energy?
- Defining the specifications
- Designing the simulation
- Decision models
- Simulation Results
- Conclusions
Why prioritize local energy?
The UK energy systems and corresponding electricity markets are designed based on the idea that all electrons, once in the grid, are equal. That it does not matter for a consumer whether the electricity they use have been produced locally or in the opposite end of the grid, and by whom. And while this might be true for the majority of users, it is not the case in Orkney.
Orkney is at the forefront of renewable energy innovation, producing large amounts of wind energy and testing wave and tidal energy generators. These plentiful energy sources result from the geographical situation of Orkney: A relatively flat archipelago off the northeastern coast of Scotland, with all of the winds, waves and tidal currents that come with this territory.
But this also situates Orkney at the edge of the power grid, with a single bottleneck connection to mainland Scotland, and an internal grid that is often unable to accommodate the energy that is produced on the islands. This results in frequent generator curtailment, the intentional slowing or halting of generators, to ensure that the grid is not over capacity. The result of this is to purposefully produce less low-emission energy at one point in time, while at another importing high-emission energy from mainland Scotland to power the islands.
One way to attack this problem is to use the energy locally, reducing the amount of energy that needs to be transported through the constraint points in the grid. This is our main motivation for using an aggregator to add flexibility to the grid.
Another reason to increase the use of local energy, is that a lot of the generators in Orkney are community owned. Reducing curtailment also increases revenue for many local development trusts, allowing them to invest in their island communities.
Defining the specifications
In order to carry out simulations, we need to first define the specifications of our aggregator. For this we take our outset in the proposed components of the ReFLEX project in Orkney, consisting of up to 600 electric vehicles (EVs), 500 domestic batteries, and 100 large-scale batteries.
For each type of assets, we estimate an average battery capacity and charge speed,3 allowing us to describe the total capacity and maximum load of each asset type (Table 1).
Asset Type | Amount | Est. Total Capacity | Est. Total Charge Speed |
---|---|---|---|
Electric Vehicles | 600 | 12 MWh | 1.38 MW |
Domestic Batteries | 500 | 6.75 MWh | 2 MW |
Large-scale Batteries | 100 | 2.4 MWh | 2.4 MW |
Furthermore we need to estimate the load, meaning how much electricity is needed to meet the continuous demand of the assets. In this simulation, we will disregard the aspect of selling electricity back to the grid, and rather focus on the flexibility in consumption that an aggregator provides. We want the aggregator to buy enough power to match our consumption, but when to buy the power is up to its decision engine.
To make the simulation simpler, we define an average daily load based on government statistics of the power consumption of domestic and non-domestic clients in Orkney,4 the average amount of miles driven in rural areas,5 and the average power consumption per kilometer for EVs6 (Table 2).
Type | Yearly Load per Asset | Daily Load per Asset | Daily Load Total | Daily Charge |
---|---|---|---|---|
Electric Vehicles | 2,525 kWh (14,792 km) | 7.1 kWh (41.6 km) | 4.26 MWh | 4.26 MWh |
Domestic Clients | 5,459 kWh | 15.3 kWh | 7.65 MWh | 6.75 MWh |
Non-domestic Clients | 23,804 kWh | 66.9 kWh | 6.69 MWh | 2.4 MWh |
For these simulations, we will define the task for the aggregator as a fixed daily load for each asset type. For simplicity’s sake, we will disregard the patterns in use from these assets. We allow the aggregator to charge at any time during a day, as long as power equivalent to the average load is delivered sometime during the days 24 hours.
For the domestic and large-scale batteries the load exceeds the battery capacity, in which case we limit the aggregators daily load to the maximum capacity. We also disregard the round trip efficiency of the assets, which would contribute a loss of power, further increasing the amount of power needed to meet the demand. We collect all the specifications in a single file, making it easy to revise our estimations in the event of new information (Listing 1).
Designing the simulation
Now that we have defined the assets and task of our aggregator we are ready to design some simulations. We join our datasets to one large pandas DataFrame, with “generation”, “demand”, “price” and other relevant parameters as columns.
We can then step through each day, picking out the hours that best fit our decision model (e.g. “lowest price”), buying as much energy as we can (bounded by both daily load and charge speed). We then exclude the chosen hour from our dataset and repeat the process until our daily quota has been met (Listing 2).
During each simulation we keep track of the primary aspects: The energy usage, the cost, and the amount of local Orkney renewables used. We accumulate them as we go and store all of our “purchases”, enabling us to analyze them further afterwards.
Upon completion, the we output the finals stats of the simulation and return the DataFrame joined with the columns representing the individual purchases.
Decision models
With the simulation structure in place, all we need to do is to feed it some data and a decision model. Our experiments will be based on the N2EX day-ahead market for wholesale electricity, which closes its daily auctions at 12:00 each day. This means that we can only based our decisions about when to buy, on information that is known to us at noon the day before delivery.
We will be evaluating 3 different day-ahead decision models:
- Lowest prices
- Highest wind speed (forecasts)
- Highest expected surplus generation (forecasts and statistical model)
The lowest prices are decided based on the closing prices of the N2EX day-ahead auction. The wind speeds are based on the UK Met Offices forecasts for Westray Airfield, which are collected from their open DataPoint API as 5-day ahead forecasts at 3-hour intervals. We select the forecast as it was available at noon the previous day, and apply linear interpolation between the 3-hour data points.
The third decision model also uses the wind forecasts, but combines them with the statistical average power generation at a given wind speed (what is sometimes called a power curve) and the statistical average demand at a given weekday and hour.7 This is done to estimate not just how much we generate, but how large our surplus (or deficit) is going to be.8
For comparison, we will also be simulating two decision models that are not affected by the day-ahead constraint, and that base their decisions on the actual state of Orkney generation and demand. These can be used as indicators for the optimal and worst possible decision models with regard to using local renewable energy, and gives us a baseline for our other models. Finally, we will also be evaluating a decision model optimizing for the highest price, and one making random choices.
- Highest relative generation (optimal local)
- Lowest relative generation (worst local)
- Highest price
- Random choice (mean of 100 simulations)
Each decision model is implemented as a function that takes a DataFrame with a datetime-index and rows representing the hours to choose from.9 The function returns a datetime object for the optimal hour to purchase electricity. The implementations of our decision models are shown in Listing 3. These functions can then be passed as arguments to the main simulation function.
It’s worth noting here, that we treat the aggregators task as a Continuous Knapsack type problem,10 and hence we designed both the simulation and its corresponding decision models as greedy algorithms that always chooses the locally optimal choice before moving on to next iteration.
Simulation results
While we have both price and Orkney power data for the first seven months of 2019, the dataset of weather forecast only stretches back until the start of april, limiting our simulations to the four months of April through July. For these 4 months, the mean price of electricity on the N2EX market11 was 41.9 £/MWh. The accumulated usage for our aggregator was 1,447.8 MWh12, which would cost 60,663 £, if bought at the mean price. If we run our simulation on our data for these months, we get the results listed in Table 3.
Cost | Local Energy | ||||
---|---|---|---|---|---|
Decision Model | Total | £/MWh | % of Mean Price |
Total | % |
1. Lowest price | 45,691 £ | 31.6 £ | 75.3% | 594.9 MWh | 41.1% |
2. Highest wind speed | 58,798 £ | 40.6 £ | 96.9% | 834.5 MWh | 57.6% |
3. Highest model output | 55,050 £ | 38.0 £ | 90.8% | 819.5 MWh | 56.6% |
Baselines | |||||
4. Most local renewables | 57,295 £ | 39.6 £ | 94.5% | 989.6 MWh | 68.4% |
5. Least local renewables | 65,171 £ | 45 £ | 107.4% | 216.9 MWh | 15.0% |
6. Highest price | 82,765 £ | 57.2 £ | 136.4% | 485.2 MWh | 33.5% |
Mean Random (n = 100) | 60,767 £ | 42 £ | 100.2% | 578.6 MWh | 40% |
The results in Table 3 show, as expected, that the decision model optimizing for price (Model 1) ends up using considerably less money than the mean price, a total saving of nearly 15,000 £. This decision model uses 41.4% locally produced renewable energy, which is midway between our two baselines for local energy (Models 4 & 5).
The decision model optimizing for wind speeds (Model 2) ends up with a cost very near the mean price for the period, but uses 239.6 MWh, or around 17 percentage points (pp), more local energy than Model 1.
Model 3, incorporating the historical median demand with the expected generation, somewhat surprisingly uses slightly less (~1pp) local renewables than the model just optimizing for wind speeds. But its cost is ~3700£ lower than Model 2. This indicates that while our model is not very successful in estimating the expected surplus of energy in Orkney, it does seems somewhat successful in incorporating the rhythm of the demand, thereby lowering the mean price.
This trade-off between price and local renewable energy becomes even clearer when we plot our results as in Figure 1, where this relationship is highlighted. The possible range of results within this concrete dataset is delimited by Models 1,4,5 & 6 (of which only Model 1 is a reasonable decision model), and for comparison we have also plotted the results of 100 simulations with a random decision model.
Figure 1 shows a slight correlation between price and local energy, in that model 4 has a lower cost than model 5, and that model 1 uses more local energy than model 6. These discrepancies are greater then the deviation in the random samples, albeit only slightly, which might be caused by the similar seasonal patterns (daily, weekly & yearly) in the Orkney demand and the N2EX prices.13 And although the demand is not the dominating factor in the Orkney grid (the fluctuations of the generation is far greater than those of the demand), it does seem to have a slight influence.
Conclusions
In this post we have used our collected datasets to simulate the effects of different decision models in an Orkney aggregator, looking at both their effect on the cost of electricity purchases, and on the amount of local energy used. Lowering the price is attractive for obvious reasons, but increasing the utilization of Orkney energy affects both the carbon footprint of the aggregator and the economies of Orkney island communities.
We have designed a simulation, including a mock aggregator, to evaluate different decision models based on the task of buying a daily fixed amount of electricity on the N2EX day-ahead market. We have evaluated models that seek to minimize the cost of electricity (by charging when the prices where lowest), and models that seek to maximize the use of local renewable energy (by charging when wind speeds are forecasted to highest, or when a statistical model indicated that energy surplus would be highest).
Our results indicates that, when compared to random decision models, prices were reduced by ~25% when optimizing for low costs (Model 1), with no significant change in the amount of local renewable energy used. When optimizing for wind speeds (Model 2) the prices are similar, but the amount of local energy used is increased by 44.2%. When using the statistical model (Model 3), that incorporates both wind speeds and historical demand patterns, utilization of local energy is increased by 41.6% and prices are reduced by 9.6%.
In conclusion, we have found that optimizing exclusively for price does not influence the amount of local energy used, and that optimizing exclusively for local energy does not influence the price of electricity. Finally we have also found that is is possible to make a decision model that acts as a compromise between the two, both lowering price and increasing utilization of Orkney renewables.
- Continuously collected from https://www.ssen.co.uk/ANM/ - available as CSV here. [return]
- Collected from https://www.nordpoolgroup.com/historical-market-data/ - available as CSV here. [return]
- EVs: EV battery capacities range a lot. Estimation here is based on these examples, charge speed estimated based on the 2-3 kW home chargers described here.
Domestic batteries: Estimation based on the Tesla Powerwall.
Large-scale batteries: Estimation based on Tesvolt TS 48 V battery with 5 modules [return] - Source: https://www.gov.uk/government/statistical-data-sets/regional-and-local-authority-electricity-consumption-statistics [return]
- Source: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/729521/national-travel-survey-2017.pdf
The survey differentiates between rural town and rural village. We weight Orkney as 70% town and 30% village, as the population in Kirkwall & Stromness account for approx. 70% of the population of Orkney. [return] - Source: https://ev-database.org/cheatsheet/energy-consumption-electric-car [return]
- For more details on the development of this model, see Section 6.2 and 10.4 in this MSc Thesis, or page 3 of the executive summary. [return]
- This model is somewhat crude, as it assumes that the demand will be the same no matter the time of year, which is most definitely not the case. So there is room for further improvement here. [return]
- Initially all 24 hours in a day, but an hour is dropped through each iteration of the inner while loop (Listing 2, line 31). [return]
- See https://en.wikipedia.org/wiki/Continuous_knapsack_problem [return]
- For this average we weight all hours equally, even though presumably more electricity is bought during the more expensive hours, since the demand is what causes the price to increase. [return]
- This excludes several days where we have missing data for the Orkney grid. [return]
- This becomes visible if we do a weekly seasonal decomposition of the Orkney demand and the N2EX prices. [return]