Syndicate content
Open-source tools for energy monitoring and visualisation
Updated: 5 min 34 sec ago

Adding a RTC to the emonPi

Thu, 09/07/2015 - 15:05
The emonPi updates its internal linux time from NTP when connected to the internet. However if the emonPi is to be used on an offline network or for an application when accurate timestamp is essential then a hardware Real Time Clock (RTC) can easily be added to the Pi's GPIO. We have tested using a DS3231 based RTC module. This RTC module communicates with the emonPi via I2C, it can be easily connected as follows by soldering a four-pin header onto the emonPi aux GPIO pins:
emonPi with hardware RTC module added
DS3231 based RTC module

I2C bus scan showing LCD & RTC
Full install guide can be found on the wiki:
Categories: Blog

What is the embodied energy of a microcontroller?

Mon, 06/07/2015 - 10:51
Continuing with the investigation into the embodied energy that it takes to make an energy monitor, I thought I would explore in a little more detail the embodied energy of the microcontroller which is often associated with the most energy intensive aspect of electronics manufacture.

As I mentioned before I wouldn’t put a large amount of confidence in the accuracy of the figures below, computer chips are incredibly complex things that take a large number of manufacturing processes to make and I have found it hard to find open detailed information on energy requirements of these. The calculations below are based on the datasets that I could find including the EU ecodesign dataset which I'm told is one of the higher quality freely available sources. But I could not find much detail on how the figures where derived to know what it does and does not include and the breakdown of energy use in its manufacture.

The idea here is more to get an initial set of numbers that could be improved upon in the future. My motivation for looking into this started by being inspired by howies and patagonia's efforts on footprint and supply chain analysis, partly by reading sustainable energy without the hot air that identifies industry as being a significant part of overall energy use and also after reading the article here about 'the monster footprint of digital technology'.

The following starts by looking at the available datasets and then investigates deriving figures for the embodied energy of a chip by calculation of the actual semiconductor volume contained which compares well for the small IC embodied energy value.

1) Datasets

EU Ecodesign methodology
The EU ecodesign methodology downloadable here provides embodied energy values for a variety of electronic component categories, it provides two embodied energy values for IC's (integrated circuits) these are:

Large IC                        8021.88 MJ/kg
Small IC                        1786.73 MJ/kg

MJ/kg: 1,000,000 Joules per kg

The question is what constitutes a small or large IC? Dimensions? processing power? and there is a large difference between both of these values!

Another paper that lists sources for embodied energy values including the EU ecodesign dataset is this paper on the embodied energy of an offgrid light: It lists two other useful values:

Semiconductor Grade Si             35000 MJ/kg, Taiariol et al. 2001
EPROM Chip (M27C1001, 0.36 W IC)   12.5 MJ/chip,  Taiariol et al. 2001

Jean Claude Wippler of JeeLabs did an interesting post a couple of years ago on what is inside an ATmega8 chip. The Silicon part was extracted by dissolving the outer casing with sulphuric and nitric acid.

The size of the semiconductor part inside the ATmega8 is 2855 x 2795 um, less than 3x3mm:

Is it possible to estimate the embodied energy of a microcontroller by working out the embodied energy of the silicon part and the casing part separately? and how would the figure compare with the embodied energy values given for a small and large IC in the EU ecodesign dataset?

To find the embodied energy of the silicon part we need to first work out the weight of that part. To do this we will need the density and thickness of the silicon wafer. The thickness of a silicon wafer can be anywhere between 275um and 926um.

Density of silicon: 2.3290 g.cm3

2855 x 2795 um x 275 um = 0.00219 cm3 x 2.329 g.m3 = 0.0051 g
2855 x 2795 um x 625 um = 0.00499 cm3 x 2.329 g.m3 = 0.0116 g
2855 x 2795 um x 926 um = 0.00739 cm3 x 2.329 g.m3 = 0.0172 g

The embodied energy of silicon grade Si is around 35000 MJ/kg, 35 MJ/g

0.0051 g x 35MJ/g = 0.178 MJ = 0.049 kWh
0.0116 g x 35 MJ/g = 0.406 MJ = 0.113 kWh
0.0172 g x 35 MJ/g = 0.602 MJ = 0.167 kWh

The weight of a SMT Atmega 328 is 0.14375g:

Large IC: 8021.88 MJ/kg = 1.153 MJ = 0.320 kWh
Small IC: 1786.73 MJ/kg = 0.257 MJ = 0.071 kWh

The EPROM Chip (M27C1001, 0.36 W IC) example is 12.5 MJ/chip = 3.47 kWh
Which is between 10 and 50x the large/small IC estimates and 20 to 70x the wafer only estimates.

The large IC is between 2x and 6x the wafer only and small IC is between 0.5x to 1.5x the wafer only estimate.

The weight of the silicon part of the chip for the ATmega8 should be between 3.5% to 12% of the total chip weight.

The rest of the weight is metal and plastic. Copper has an embodied energy of between 38MJ/kg and 142MJ/kg depending on manufacturing process and plastic is anywhere between 80-120MJ/kg. If we assume a copper/plastic mix of around 100MJ/kg as a rough estimate.

This would then contribute an additional 0.0132 MJ = 0.0037 kWh which would only increase the embodied energy of the chip by around 2-7%.

Our estimate therefore for the embodied energy of the small microcontroller is between 0.053 kWh and 0.171 kWh, mid range of 0.117 kWh for 625um wafer which compares well with the small IC estimate of 0.071 kWh (it is of the right magnitude). We would expect a certain amount of assembly energy for combining the plastic, copper and semiconductor parts which is not included when taking a constituent parts approach which will likely add a little more to the total.

Package type?

Calculating the embodied energy this way brings up an important question about the package type of the IC, I.e how much plastic and connector metal surrounds the semiconductor core. If the size of the semiconductor inside a through-hole and SMT version of a ATmega328 is the same then surely a total weight based measure is not a good guide for the embodied energy. Given that over 90% the embodied energy is associated with 3.5 - 12% of the weight.

RaspberryPi chips
The ATmega8 or ATmega328 is not a particularly powerful chip, the emonpi also uses a RaspberryPi which has three chips on board.

Its not clear what the volumes of the semiconductors inside these chips are. But given their small size and relatively large processing power lets assume for an initial calculation that the size of the package is very close to the size of the semiconductor. If the wafer thickness is 625um then the embodied energy of the chips can be estimated as:

Broadcom        14 x 14 mm x 625um = ~2.8 kWh
Elpida          12 x 12 mm x 625um = ~2.0 kWh
Smst            8.7 x 8.7 mm x 625um = ~1.1 kWh

These estimates which cover a quad core 900Mhz + 1GB ram computer are much larger than the ATmega8 estimate as we would expect but are still significantly lower than the embodied energy figure given for the 32MB 2g memory chip referenced in the article on the the monster footprint of digital technology of 20 kWh - while delivering much more functionality, almost a full computer!

Are these figures accurate? are the underlying datasets accurate for modern processors? Does it mean that newer miniaturised technology with the ability to pack much more computing power inside the same volume of semiconductor has resulted in a significant reduction in the embodied energy for equivalent amounts of computing digital technology functionality? These are all significant guesses at the moment and it would be really interesting and useful to see more open data available on the embodied energy of newer technology. It would be good to see greater interest from the manufacturers of these chips in calculating and giving information on the embodied energy of their products, making data available on this would really help with understanding this question about the impact of technology.
Categories: Blog

Open Source Circular Economy OSCEdays London

Sun, 05/07/2015 - 20:48

Three weeks ago, time runs fast! I attended the open source circular economy event OSCEdays in London. It was a fantastic event with a lot of energy and ideas exploring how the circular economy could benefit from an open source approach.

OSCEdays at FabLab London

Initial draft embodied energy analysis of the emonpiThere was a wide range of challenges and projects there including: circular makerspaces submitted by the great recovery looking at how fablab's and makerspaces could encourage circular thinking, an initiative developing re-usable containers for cosmetics, a challenge looking at the implications of the circular economy for wearable technologies, 'trust is not waste' by the rubbish diet project and ours looking at the embodied energy and lifecycle analysis of the OpenEnergyMonitor EmonPi.

Id like to thank Rachel Stanley, David Green, WoonTan and Paidi Creed for all their help and input and for Erica Purvis and Sharon Prendeville for organising the event and the wider team that where involved in running the event in many other cities around the world.

Our discussions and findings are partly documented here, there's also a bit more that needs writing up which will be online soon:

The research that I did on the embodied energy of the emonpi in the lead up to the event can be found here:

We are really interested in the lifecycle impacts and embodied energy side of OpenEnergyMonitor and so were going to keep building on this. I've almost finished a post that looks at the embodied energy calculation for the emonpi microcontroller and raspberrypi chips in more detail which will be up soon.

If your interested in embodied energy, lifecycle impacts, the circular economy and how open source could play a part do check out OSCEdays
Categories: Blog

Open source hourly zero carbon energy model, combining traditional electric, heating and electric vehicle demand.

Sat, 04/07/2015 - 14:20
The last 6 zero carbon energy model examples (linked below) have explored the core parts of a household energy model looking at supply and demand including the electrification of space heating demand and transport demand so that it can be provided for with renewable electricity.

This final model in this series brings all these components together to see how the combination of demands interact and how they affect the supply and demand matching.

It also explores the contribution of two small scale stores a 7kWh electrical store (such as a Tesla power wall) and a 10kWh heatstore.

The interactive modelling tool can be opened here: Online tool: > navigate to 7. All
The following table show the results in terms of percentage of demand supplied directly of running the model with different electric vehicle charging profiles, and storage options. There is a small 4% oversupply.

No stores4% OS + night charging62.3%4% OS + 1/2day 1night charging76.2%4% OS + flat charging78.3%4% OS + smartcharging86.3%Liion store4% OS + night charging + 7 kWh li-ion store84.4%4% OS + 1/2day 1night charging + 7 kWh li-ion store86.0%4% OS + flat charging + 7 kWh li-ion store86.2%4% OS + smart charging + 7 kWh li-ion store88.6%Heatstore4% OS + night charging + 10 kWh heatstore70.2%4% OS + 1/2day 1night charging + 10 kWh heatstore81.0%4% OS + flat charging + 10 kWh heatstore82.4%4% OS + smartcharging + 10 kWh heatstore87.5%Liion + heatstore4% OS + 7 kWh li-ion store + 10 kWh heatstore + nightcharging85.5%4% OS + 7 kWh li-ion store + 10 kWh heatstore + 1/2d 1n86.9%4% OS + 7 kWh li-ion store + 10 kWh heatstore + flatcharging87.1%4% OS + 7 kWh li-ion store + 10 kWh heatstore + smartcharging89.3%
Its interesting that a matching of 89.3% can be achieved with 7 kWh li-ion store, 10 kWh heatstore and electric car smartcharging up from a minimum of 62.3% with no stores and night time charging only. I think its quite impressive and encouraging that this high a level of matching can be achieved from a relatively small amount of storage and that 86% can be achieved with the smartcharging option only.

There are clearly different routes possible to achieve higher degree's of matching. If smart charging is technically possible with the flexibility used within the model and that it doesn’t provide too much of a burden on the user and only requires potentially a relatively small amount of electronics, embodied energy and cost compared to the li-ion store and heatstore then smart charging may be a more effective option.

A li-ion store and flat rate charging provides about the same benefit as smart charging and so if smart charging does not pan out to be practical then there may be an option to make up for it with a li-ion store, especially if the embodied energy and cost of storage reduces significantly.

The combination of measures provide smaller gains (if you apply smart charging first then the li-ion store only provides ~3% additional gains, however if you apply the li-ion first it looks like its the smart charging that only provides the small gain). Perhaps an important aspect is that a combination could provide important redundancy. It looks worthwhile to explore and develop each of the above solutions with a focus on how they integrate, the flexibility at which they can match supply, their costs and embodied energy.

The other blog posts in this series are linked below and the next model will explore the use of large capacity energy stores such as power to gas to reach 100% supply/demand matching. All the modelling behind this work is open source and available on github here: 
Categories: Blog

Hourly energy model example 6: Electric vehicles and a renewable energy supply

Thu, 02/07/2015 - 17:22
Continuing the blog series on building a hourly zero carbon energy model based on the ZeroCarbonBritain dataset the 6th example model explores another another key solution used in the ZeroCarbonBritain report and in David MacKay's book Sustainable energy without the hot air: the electrification of transport.

The intention here is to explore what level of supply/demand matching between a renewable energy supply and electric vehicle charging could be achievable with different electric vehicle charging profiles. A higher level of supply/demand matching reduces the amount of backup or energy storage required to meet demand.

The first example starts by integrating electric vehicles with a simple night time charge profile. The second example then explores more constant charge profile throughout the day – this constant charge profile could be the result of a large number of electric cars all charging at different times, some at work, others at home over night. The third example explores a basic smart charging approach where the charge rate can aligned with the availability of renewable energy. There are many people who are already choosing their charge times to align with domestic solar pv output and there is much discussion about the opportunity that this may provide for matching supply and demand.

 To open the examples, launch the online tool:
Online tool: > navigate to 6. electric vehiclesNight time chargingThe first model investigates night time charging between 1am and 8am (7 hours). The charge profile of an aggregation of electric vehicles is much more likely to be smoother than this with a distribution over the day especially as the number of work based charging facilities and rapid chargers increase but for interest we will consider this case.
Onshore wind Offshore wind Wave Tidal Solar Installed capacity 0.86990.58640.99311.17832.9825 Percentage of demand
supplied directly 27%28%29%28%3% Flat charging profileThe results of running the model for a flat demand profile is the same as the earlier example where we considered the degree of matching between supply and a flat demand. Substantial improvements in matching compared to the night time charging profile is gained by just managing to distribute the charging requirements evenly across a day. This is unlikely to be possible on a single household basis but perhaps possible when the aggregate demand of many hundred cars are taken into account with day time charging at work encouraged.
Onshore wind Offshore wind Wave Tidal Solar Installed capacity 0.86990.58640.99311.17832.9825 Percentage of demand
supplied directly 65%76%74%57%40% Percentage of time demand is
more or the same as the supply 40%46%45%38%32% Smart charging (variable rate charger that matches available supply)Smart charging could allow electric vehicles that are left connected to the grid to charge when renewable electricity is available. The simple smart charging algorithm in this example starts by using available supply to charge the car's battery directly. A minimum SOC level required to cover the days journeys is maintained with a top-up charge if needed. The battery SOC is kept between 10% and 80% to help ensure long life is maintained.

The charge rate is based on a forecast of available supply over the next 24 hours, if the available supply is more than the forecast demand then the charge rate can be reduced. If there is twice as much supply forecast than demand then the rate of charge could by dropped to half the available supply in order to distribute the charge better across the 24h.
Onshore wind Offshore wind Wave Tidal Solar Installed capacity 0.86990.58640.99311.17832.9825 Percentage of demand
supplied directly 78.7%85.3%80.3%84.1%72.2% Percentage of time demand is
more or the same as the supply 69.5%74.5%67.5%76.1%69.2%
The results show substantial improvements again for the addition of smart charging, with smart charging + solar showing the largest gain. It is notable that the model suggests that a 2.98 kW solar PV array (a fairly typical amount for a home solar install) could provide 72.2% of almost 10000 miles a year of driving directly.

The feasibility of implementing this kind of variable rate smart charging on a household level with onsite solar pv needs a bit more investigation. The domestic charger on the nissan leaf can vary its charge rate in between 7A and 32A for the 6kW model or 7A and 13A for the 3kW model. Several people have already build open hardware variable rate electric car chargers making use of the fact that its possible to send a low voltage signal to an electric car to request a charge rate. Here are a couple of links to electric car charging related discussions and resources:

Dod Davies solar charge controller

OPenEnergyMonitor based electric vehicle charging

Smart Charging a EVSE with OpenEnergyMonitor RF data, Working!

Open EVSE:

There are many aspects to consider and understand better when building a smart charger for electric vehicles for example it is suggested that to prolong the health of the battery its better to charge at a higher rate and up to the moment of starting your journey (rather than charge and let the battery sit at a high SOC). A more in depth understanding of the consequences of implementing this kind of charging and the balance point between battery life impacts and improved grid stability benefits or improved household economics would need to be understood.

Another possibility is that an aggregate demand profile for charging hundreds of electric cars could generally fit a renewable energy availability profile through a mixture of a larger portion of fixed rate charging cars charging at times of high availability than at other times.

In the next and final example in this zero carbon energy modelling series, we will combine the demand models for traditional electricity demand, electric heating and electric vehicles into one model and explore the implication of different electric vehicle demand profiles when interacting with multiple generation sources and multiple demand types.
Categories: Blog

Improved my solar application specific dashboard for tablet energy display's

Thu, 02/07/2015 - 15:55
With my Refurbished Samsung Galexy Tab 3 energy display up and running I've made a few changes to the solarPV application specific dashboard to make it work better. Thanks to Steve for many of the suggestions, see forum post.
  • The view now automatically updates as a rolling window, in any of the modes, 3 hour, 6 hour, day etc 
  • The balance Import/Export is now the same size as the solar & house consumption. 
  • Night time noise on the solar pv channel less than 10W is zeroed. 
  • The in-window stats are now easier to see at a distance with larger font.
  • The view buttons are easier to click on a touch screen.
  • Its possible to make up the consumption or solar generation feed from multiple feeds on the fly by entering comma separated feed id's in the configuration interface.
Here's the result:

To upgrade on the emonPi or latest emonbase image navigate to the admin tab in emoncms and then click the update button. Otherwise the app's module can be downloaded and updated using git:
Categories: Blog

Using a tablet as a wall mount energy display

Mon, 29/06/2015 - 19:25
We've been discussing for a little while using re-purposed tablets for energy display's rather than trying to develop our own pre-assembled version of the EmonGLCD (we're planning on keeping the through-hole version though).

I got myself a refurbished Samsung Galaxy tab 3 last week for £50 off ebay and the Koala Tablet Wall Mount Dock by Dockem.

Here are a couple of pictures of it in action:

Categories: Blog

OpenEMC - An emonTH mod for woodworkers

Fri, 26/06/2015 - 09:54
It's fantastic when we get top hear about our energy monitors being used for applications we have never have thought of. Here is one such example:

SolarMill Writes:

We've just published our first open source project! It's called OpenEMC, and it's a code modification for the emonTH sensor by the OpenEnergyMonitor project. OpenEMC translates temperature and humidity readings into an easy to understand equilibrium moisture content (EMC) value, useful for woodworkers and operators of solar kilns.

We’ve been using Open Energy Monitoring components for the past few months for power monitoring and love its open source flexibility.  We recently received an emonTH to monitor Temp and Humidity values in our workshop and have developed a useful modification to the firmware.

emonTH code is on GitHub:

Read more about this application on this technical and well written forum post by Bert Green and Andy Fabian.

emonTH in drying box

Stable EMCin Controlled Box
SolarMill make eco-friendly gifts and home decor using solar-powered machinery, they have a super cool looking workshop:

Categories: Blog

Hourly energy model example 5: Simple space heating model with heatpump's powered by renewable energy

Mon, 22/06/2015 - 11:04
The 5th example in the online zero carbon energy modelling tool is where it starts to get more interesting: modelling the supply/demand matching between a variable renewable supply and space heating delivered by heatpumps. The electrification of heating with heatpumps so that heating can be supplied with renewable electricity is one of the key solutions used in ZeroCarbonBritain and Sustainable energy without the hot air.

Online tool: > navigate to 5. Variable supply and space heating demand

The ZeroCarbonBritain dataset includes weighted daily temperatures for 10 years. This dataset can be combined with the solar dataset and a basic household energy model to create a seasonal heating demand model.

Solar gains are an important aspect of space heating. Using MyHomeEnergyPlanner (The open source retrofit modelling tool we are developing with Carbon Coop) to model a concept low energy house with fabric energy efficiency of 120W/K and a total of 16m2 of window area on a 80m2 (floor area) house with external surface area 206.4m2 the maximum potential annual solar gains where calculated to be 4429 kWh.

MyHomeEnergyPlanner: Running a low electricity demand of 2200 kWh a year and taking into account the solar gains. The space heating demand is only 4,247 kWh/year (compared to 13500 kWh/year for a typical house today a 68% space heating energy saving). If that remaining heat demand is supplied by a heatpump the electrical input should be 1,416 kWh/year.

Building an hourly space heating model:

In order to calculate the space heating demand the model first calculates the total heating demand before solar gains and internal gains are taken into account. The space heating demand assumes constant internal temperature target of 18.5C rather than a morning and evening heating period. A further example with a higher internal temperature and variable profile would worth exploring for comparison. (21.0C being the passivhaus internal temperature target and there is an interesting discussion about the role of heating profiles, heatpump performance and demand spikes)

The model then subtracts the internal gains (heat given off by appliances/cooking/lights etc) and the heat provided by solar gains through the windows, we use the solar pv capacity factor dataset here to provide our solar irradiance dataset. The amount of solar gain was scaled to match the amount of solar gain calculated in the SAP MyHomeEnergyPlanner tool based on the window orientations and areas – the total available solar gain energy is equivalent of 5.0 kW of solar pv.

The model also keeps track of unused solar and internal gains when the internal temperature is already at the target temperature. The assumption at this point is that the excess heat is dumped outside perhaps through increased ventilation.

The space heating demand after internal and solar gains are taken into account is then supplied with a heatpump with the simplifying assumption that the COP is constant and the heatpump fully responsive. A more complex model taking into account a degree of thermal mass in the building and the dynamics of the heatpump cross checked with real data would be useful here to check the assumptions taken in order to create an initial simplified model.

Running the same fabric energy efficiency, max available solar gains and internal gains through this hourly model gives a space heating demand that is 14% higher than the space heating demand calculated with the SAP based MyHomeEnergyPlanner. The difference may be due to the differences in the way solar gains and internal gains utilisation is calculated in a monthly vs hourly model, further investigation is needed to fully understand the reason for this difference.

Model heating demand results:
Total heat demand8445 kWh/y- Total utilized internal gains:2044 kWh/y of 2201 kWh/y- Total utilized solar gains:1566 kWh/y of 4132 kWh/y= Total space heating demand:4835 kWh/yTotal heatpump electricity demand:1611 kWh/y
Running the model for each renewable generation type to investigate the degree of direct supply demand matching we get the following results:

Onshore wind Offshore wind Wave Tidal Solar Installed capacity 0.568kW0.383kW0.651kW0.776kW1.95kW Percentage of demand
supplied directly 51%57%61%43%10% Percentage of time demand is
more or the same as the supply 59%59%58%54%41%
Onshore, Offshore and Wave give quite similar levels of matching. Solar PV supplies the least demand because most of the solar electricity is generated in the summer and most of the heating demand is of course in the winter but also importantly when the sun is shining the heat demand is less due to direct solar gains, the dataset we are using for solar pv generation and solar gains is the same dataset.

The online example also explores the effect of adding a very basic thermal store in order to increase the level of supply matching.

The source code and datasets for the heating demand model and full supply/heating demand matching simulation is all open source available in both javascript and python.

Space heating demand
Space heating demand with
Full source code:
Categories: Blog

Optical Utility Meter LED Pulse Sensor

Fri, 19/06/2015 - 12:19
Optical Utility Meter LED Pulse Sensor attached to meter via removable sticky pad
We have just taken delivery of a batch of custom made Optical Utility Meter LED Pulse Sensor units. We're very excited about these new sensors, they will enable the emonPi and emonTx to interface directly with Utility Meters measuring exactly the amount of energy being measured by the utility meter.

The Optical Pulse Sensor works by sensing the LED pulse output from utility meters. Each pulse corresponds to a certain amount of energy passing through the meter. The amount of energy each pulse corresponds to depends on the meter. By counting these pulses the meters KWh value can be calculated.

Unlike clip-on CT based monitoring pulse counting is measuring exactly what the utility meter is measuring i.e. what you get billed for. The pulse counting cannot provide an instantaneous power reading like CT based can. Where possible we recommend using pulse counting in conjunction with CT monitoring. The emonPi and emonTx can simultaneously perform pulse counting and CT based monitoring.

In the future we plan to look at how the pulse counting energy value can be used to calibrate the CT based power calculations.

The Optical Pulse sensor will work plug-and-play with emonPi / emonTx connecting via RJ45 socket, older units will require a firmware update. See documentation page for update instructions.

Optical Pulse Sensor Documentation Page

Optical Pulse Sensor is now available to purchase from the OpenEnergyMonitor online shop

If you have backed us on Kickstarter or have purchased an emonPi from us as a thank you for your support we would like to offer you 20% off the Optical Pulse Sensor, use code PYN5031978E9T at checkout (valid until 1st July 2015).

Pulse sensor installed & connected to emonPi via RJ45

Green LED on sensor flashes in sync with LED pulse
Big box of pulse sensors arrived today! :-) 
Categories: Blog

Hourly energy model example 4: Complementarity of different renewable generating technologies

Thu, 18/06/2015 - 08:26
We hear a lot that a renewable energy system benefits from having a mix of generating technologies. Combining wind and solar for example is said to provide a higher supply/demand matching than relying on one technology alone. When the wind isn’t blowing it may be sunny or vice versa.
How do we work out the best mix of different renewable generating technologies. When is it cheaper to add more wind than to add more solar, what is the balance point for a particular demand profile?

This example explore's the balance point for onshore wind + solar, both having large resource availabilities associated with them. The mix will be balanced based on energy cost. It would also be good to explore the balance based on embodied energy. As with all modelling based on costs the outcome will change as costs change, the important thing here is to understand the method so that we can explore for a given set of costs what the optimum mix might be.
In the recent contracts for a difference auction in the UK for renewable generation many of the onshore wind farms received a strike price of £82.50 per MWh. Two offshore wind projects received £115 per MWh and three solar farms received £79.23 per MWh.
Source: Contracts for Difference Auction Results

In this example we will use these cost figures, the ZCB capacity dataset for onshore wind and solar and a simple flat demand profile.

If we look at the results from example 2 investigating annual matching for wind and solar and add in the cost information:
  • 1.164kW of onshore wind delivers 3300 kWh/y at £272/y and a supply/demand matching of 65.88%.
  • 3.99kW of solar delivers 3300 kWh/y at £261/y and a supply/demand matching of 40.61%.
One way to investigate the best mix is to fix the total annual energy cost and change the installed capacities of both solar and wind to achieve the greatest level of matching for a given energy cost.

So lets take an annual energy cost of £272 and work out for this cost what is the maximum level of matching we can obtain from a wind + solar mix.

Online tool: > navigate to 4. Mixed supply and flat demand

CostWind capacitySolar capacityMatching£272.021.1635065.86 %£272.031.02350.570.04 %£272.030.93950.871.22 %£272.030.91150.971.33%£272.040.89750.9571.35%£272.040.88351.071.34 %£272.040.86951.0571.31 %£272.040.85551.171.26 %£272.040.82751.271.09%
At an energy cost of £272/year a flat demand and the ZCB dataset we can see a clear benefit from combining solar and wind in the energy mix, increasing solar pv capacity appears to make sense up to 105.8% of installed wind capacity after which the matching starts to drop again for the given energy cost.

Its important to note however that wind still provides the majority of the electricity at 2543 kWh of the 3300 kWh generated annually (76%). This is because of wind's higher capacity factor in comparison with solar.

How does the mix change if we decide to oversupply and pay a higher cost for the electricity. If we fix our annual cost to say £320

CostWind capacitySolar capacityMatching£320.061.369069.88 %£320.071.2290.573.98 %£320.081.1440.875.20 %£320.081.0891.075.44 %£320.081.0751.0575.45 %£320.081.0611.175.44 %£320.081.0471.1575.41 %£320.081.0331.275.37 %
The maximum matching we obtained in this case happened where solar capacity was 97.7% of wind capacity.

It appears that in these model runs, the optimal mix between solar and wind is to install an equal capacity of both, its interesting that this happens to be the case and that its not say half the wind capacity. The model results confirm the often discussed complementarity between solar and wind supply and that the benefit of their combination increases supply demand matching by around 5% points for no additional cost and is a similar scale of supply/demand matching improvement seen by increasing the oversupply of wind to 120% of demand but without the additional cost.

Download python model:
Categories: Blog

Hourly energy model example 3: Variable supply and traditional electricity demand

Sun, 14/06/2015 - 07:33
The ZeroCarbonBritain dataset includes 10 years of hourly traditional electricity demand data for the UK. The previous example compared renewable supply data with a flat demand profile, this example explores the effect of the variable traditional electricity demand profile with its day time peaks and night time low on supply/demand matching for the different renewable energy generators.

The screenshot below gives a flavour for what the traditional electricity demand profile looks like in blue, the black line is the supply from onshore wind, using the tool you can compare traditional electricity demand to: onshore wind, offshore wind, tidal, wave and solar power.

Online tool: > navigate to 3. Variable supply, traditional electricity demand and oversupply

These are the results for the amount of demand supplied directly for each generation type, matching annual supply totals with demand totals:

Onshore wind Offshore wind Wave Tidal Solar Installed capacity 1.17kW0.79kW1.33kW1.58kW3.98kW Percentage of demand
supplied directly 66.5%76.7%75.2%57.0%42.1% Percentage of time demand is
more or the same as the supply 40.7%46.5%44.7%38.7%31.1%
Interestingly they only change marginally. Solar PV makes a gain 2% on the demand supplied directly which reflects higher demand in the day vs night time and we see a couple of other 1% changes but the differences are quite marginal and smaller than the difference between each renewable energy type so we don’t really see any change of order.
Increasing the degree of supply/demand matching between a variable renewable supply and traditional electricity demand by over supplyThe are multiple ways of increasing the level of supply/demand matching or reducing the unmet demand. Over-supply is one way we can do this and is one of the measures used in the ZeroCarbonBritain scenario. In the previous examples we sized the installed capacity of the renewable electricity generating technologies to produce over the 10 year model period the exact same amount of electricity as was used in the 10 year period.
We can re-run the same model but with installed capacity amounts set to 110%, 120% or 130% of demand

Oversupply: 110%
Onshore wind Offshore wind Wave Tidal Solar Installed capacity 1.28kW0.86kW1.46kW1.74kW4.39kW Percentage of demand
supplied directly 68.9%79.6%77.958.9%43.0% Percentage of time demand is
more or the same as the supply 44.1%51.8%50.0%41.7%32.4%
Oversupply: 120%
Onshore wind Offshore wind Wave Tidal Solar Installed capacity 1.28kW0.94kW1.60kW1.89kW4.79kW Percentage of demand
supplied directly 71.1%81.9%80.3%60.4%43.8% Percentage of time demand is
more or the same as the supply 47.2%56.5%54.3%44.3%33.5%
Oversupply: 130%
Onshore wind Offshore wind Wave Tidal Solar Installed capacity 1.51kW1.02kW1.73kW2.05kW5.19kW Percentage of demand
supplied directly 72.9%83.9%82.2%61.7%44.5% Percentage of time demand is
more or the same as the supply 50.1%60.7%58.1%46.7%34.4%
For every 10% of demand increase in supply we see 1-3% improvements in the percentage of demand supplied directly and 1-5% improvements in the amount of time demand is more or the same as supply.

The python code for the above examples is very similar to the previous example for the flat demand profile and can be downloaded here:

The next example looks at the question of complementarity between different renewable energy types and asks the question what might the optimum capacity mix point be between wind and solar for a given electricity price point.
Categories: Blog

Hourly energy model example 2: Variable supply and flat demand (python code included)

Fri, 12/06/2015 - 08:52
The second example in the hourly energy modelling tool models the degree of supply/demand matching between a variable renewable supply consisting of a single renewable energy generation type and a flat electricity demand profile.

A flat demand may not of course be particularly realistic and the more complex examples later on address this, but I've used it here just to illustrate this particular simple example case.

Online tool: > navigate to 2. variable supply and flat demand
The demand is subtracted from the supply for every hour in the 10 year period and the total amount of unmet demand and excess generation is measured as well as the amount of time the supply was more than or equal to the demand.

The demand level is set to an annual average electricity demand of 3300 kWh which is the average UK household annual electricity consumption. The amount of installed capacity is set to match this demand on the 10 year basis of the dataset.

Running the model for each of each generation type, matching total 10 year supply to total 10 year demand of 3300 kWh x 10 we get the following results:

Onshore wind Offshore wind Wave Tidal Solar Installed capacity 1.17kW0.79kW1.33kW1.58kW3.98kW Percentage of demand
supplied directly 65.9%76.4%73.9%57.7%40.6% Percentage of time demand is
more or the same as the supply 40.1%46.2%45.3%38.6%32.1%

We can see again here that offshore wind is the clear winner with the lowest installed capacity requirement and highest level of supply/demand matching. Perhaps an interesting result is how less predictable technologies such as wind and wave provide greater levels of matching than power from tidal which is very predictable.

Python example source code
Alongside the online javascript modelling tool there are a series of python versions of the examples which are simpler to follow as they dont include all the code to create the visual output, they just print out the main results at the end.

I've highlighted the main parts in bold below:

# dataset index:
# 0:onshore wind, 1:offshore wind, 2:wave, 3:tidal, 4:solar, 5:traditional electricity
gen_type = 1

installed_capacity = 0.785 # kW

annual_house_demand = 3300 # kWh
house_power = (annual_house_demand * 10.0) / 87648  

# Load dataset
with open("../dataset/tenyearsdata.csv") as f:
    content = f.readlines()
hours = len(content)

print "Total hours in dataset: "+str(hours)+" hours"

total_supply = 0
total_demand = 0

exess_generation = 0
unmet_demand = 0

hours_met = 0

# for every hour in the dataset
for hour in range(0, hours):
    values = content[hour].split(",")
    # calculate the supply
    supply = float(values[gen_type]) * installed_capacity
    total_supply += supply
    # calculate demand
    demand = house_power
    total_demand += demand
    # subtract demand from supply to find the balance
    balance = supply - demand
    # record the total amount of exess and unmet demand
    if balance>=0:
        exess_generation += balance
        hours_met += 1
        unmet_demand += -balance

capacity_factor = total_supply / (installed_capacity*hours) * 100

prc_demand_supplied = ((total_demand - unmet_demand) / total_demand) * 100

prc_time_met = (1.0 * hours_met / hours) * 100

# print out the results
print "Installed capacity: %s kW" % installed_capacity
print "Capacity factor: %d%%" % capacity_factor
print "Total supply: %d kWh" % total_supply
print "Total demand: %d kWh" % total_demand
print "Exess generation %d kWh" % exess_generation
print "Unmet demand %d kWh" % unmet_demand
print "Percentage of demand supplied directly %d%%" % prc_demand_supplied
print "Percentage of time supply was more or the same as the demand %d%%" % prc_time_met
Categories: Blog

Hourly energy model example 1: Variable Supply

Thu, 11/06/2015 - 10:18
This first example in the hourly energy modelling tool model's the hourly output of a given installed capacity of wind, wave, tidal or solar. The model really isn’t doing much its just loading the capacity factors for every hour from the 10 year dataset and multiplying the capacity factor by the installed capacity.

The total electricity generated is calculated as the sum of the electricity generation in each hour and printed along with the capacity factor at the end.

This example is useful for just seeing what the ZeroCarbonBritain renewable capacity factor dataset looks like, you can zoom and pan through the datasets for onshore wind, offshore wind, tidal, wave and solar pv, click on the link below to open the tool:
Online tool: > navigate to 1. variable supply

The units are really not important the example could just as well be in MW's or GW's. kW's where chosen as the other model examples in the series are focused around building a hourly model that's relatable to an average households energy demand. The kW's of installed capacity could just relate to a small share of a much larger wind turbine, solar farm, wave or tidal power installation.

Running the model for each of these generation types with the same installed capacity the results are as follows:

Onshore wind Offshore wind Wave Tidal Solar Installed capacity 1.0kW1.0kW1.0kW1.0kW1.0kW Annual generation 2834 kWh4204 kWh2482 kWh2092 kWh826 kWh Capacity factor 32%47%28%23%9%
In all of the examples above the installed capacity of the renewable generator was the same (1.0kW) but we can see straight away that there is a significant difference in the total electricity generated by each type. A unit of offshore wind generates just over 5 times as much energy as a unit of solar pv using the zerocarbonbritain dataset. By itself this is not enough information to evaluate the effectiveness of a technology, we would need to compare the costs per unit of installed capacity, embodied energy per unit of installed capacity, how well a particular solution matches demand, the land areas required, the availability of the resource to name just a few of the many factors that need to be weighed up but it does highlight one of the important factors.

Python example source code
Alongside the online javascript modelling tool there are a series of python versions of the examples which are simpler to follow as they dont include all the code to create the visual output, they just print out the main results at the end.

The following 19 lines of python code are all you need to load the ZeroCarbonBritain dataset and run through all 87,648 hours, calculating the power output for each hour and accumulating the total energy supplied over the 10 year model period:

# dataset index:
# 0:onshore wind, 1:offshore wind, 2:wave, 3:tidal, 4:solar, 5:traditional electricity
gen_type = 4

installed_capacity = 1.0 # kW

# Load dataset
with open("../dataset/tenyearsdata.csv") as f:
    content = f.readlines()
hours = len(content)

print "Total hours in dataset: "+str(hours)+" hours"

total_supply = 0

for hour in range(0, hours):
    values = content[hour].split(",")
    supply = float(values[gen_type]) * installed_capacity
    total_supply += supply

capacity_factor = total_supply / (installed_capacity*hours) * 100

print "Installed capacity: %s kW" % installed_capacity
print "Total supply: %d kWh" % total_supply
print "Capacity factor: %0.2f%%" % capacity_factor

Next: Variable supply and flat demand - investigating the degree of supply/demand matching
Categories: Blog

Modelling hourly demand and supply for renewable powered domestic electricity, heating with heatpumps and electric vehicles

Wed, 10/06/2015 - 08:42

Earlier this year I did some work with Philip James from the Centre for Alternative Technology and a researcher on the ZeroCarbonBritain project on creating an open source online zero carbon energy modelling tool based on the ZeroCarbonBritain energy model which is one of the Uk's leading energy scenarios outlining a positive, aspirational 100% renewable zero carbon energy future.

This first tool is available online here and blog post, using it it is possible to explore how its possible to supply energy demands such as space heating and electric vehicles from a variable renewable supply consisting of wind, solar, tide and wave power and a mix of storage technologies. The tool models supply and demand on an hourly basis which is a significant improvement over simpler annual approach.

Understanding its workings
I had been wanting to dig down deeper into the workings of the model and unpick the effect of the different components, the full model has so many different things going on that its hard to see how each component such as space heating demand from heatpumps, space heating profiles, electric vehicle charging profiles, water heating, or different generation technologies affects the bigger picture of the overall supply/demand balance and resulting storage requirements and so over the last month and a half I've spent some time looking into this in more detail.

Python and javascript example models
I started by writing a series of python models that modelled many of the key components in turn using the full 10 year hourly dataset used in the ZeroCarbonBritain spreadsheet model, exploring the level of supply/demand matching for each generation technology. As I started to model some of the more complex demands such as space heating from heatpumps, including the effect of solar and internal gains, I needed to be able to see what was going on in more detail so I converted the models to javascript and wrote a data viewer using flot.

Online visual tool
I've put all these model examples together into an online tool and added alongside each model a brief analysis and extended results of the many model run's I ran with different parameters. The tool also includes an introduction and overview of the uk energy context which is intended to help put the model examples which focus on domestic traditional electricity demand, space heating and electric transport in context. This tool is now available online here:

Launch online zero carbon energy system example models:

and its all open source with the code and full website on github here:

The tool covers the following model examples and context pages:

    Energy Overview
    1. Variable supply
    2. Variable supply and flat demand
    3. Variable supply, traditional electricity demand and oversupply
    4. Mixed supply and flat demand
    5. Variable supply and space heating demand
    6. Electric Vehicles
    7. All
    ZCB Dataset
    ZCB web model
    Python models

I have found it really interesting doing this work, but it also feels like a chapter early on in a large book. There is a lot more I'd like to understand in more detail and expand on which I hope to continue with over time.

Categories: Blog

EmonTx v2.5 and throughhole kits

Sat, 06/06/2015 - 11:29
We've had quite a few people ask about the throughhole emontx v2 and emonGLCD's designs since we've moved away from stocking them in the shop and developed the pre assembled units. I've also had several conversations with people offline who said how much they enjoyed building the kits and encouraged us to keep supporting and stocking them. The challenge is the complexity of running an online shop with many different product lines and the additional workload of kiting and stock ordering - but it seems like it might be worthwhile for us to look into a way to make it possible.

The emontx v2 currently uses different 3.5mm jacks to the emontx v3 and emontx shield, It also required a different case which needed milling to use. To try and standardise on the components required I've been working on a new version that is designed to fit in the emonTH case that doesn't require milling and uses the higher quality 3.5mm jacks used on the emontx v3 and emontx shield.

As I got stuck in to the design I thought Id add the powering via AC circuitry that's on the emontx v3 and find a way of ensuring all spare IO is available + the addition of a row of terminal blocks with power, ADC's and digital IO breakout in much the same style the EmonTH.

The first revision of this new design is now available on github here:

and looks like this (im really quite pleased with how it turned out, there's something quite satisfying about designing and routing together a pcb, trying to find neat layouts and so on):

The main features are:
  • 2x CT sensor inputs using higher quality 3.5mm jacks used on the EmonTx v3 and emontx shield
  • 1x ACAC Voltage sensing and power input
  • Terminal block power, ADC's and Digital IO breakout + full spare IO breakout.
  • Onboard DS18B20 footprint
  • Based around ATmega328 + RFM69 core
  • Fits in emonTH enclosure
The main downside perhaps of this design is that in order to get it into the emonTH case I needed to drop the number of CT inputs down from 3 to 2, the thinking being that most applications are house consumption + solar pv. But Im aware that this does make is unsuitable for 3 phase application, we do want to develop a dedicated 3 phase board design with voltage sensing on each phase so perhaps that's the better option for 3 phase application than using the emontx.

I've sent off for a first prototype PCB from ragworm so will be building and testing this design hopefully next week. Id welcome thoughts on the design and any suggestions and may do another revision before getting these made in quantity.

Common component kit

The other idea we've had is that since the emonglcd and emontx kit share so many of the same resistors and capacitors we could potentially offer a general openenergymonitor throughhole component kit with enough of the common components to build an emonglcd or several emontx kits. Then alongside the common component kit would be the PCB and emontx/emonglcd specific components such as the LCD, connectors and perhaps the atmega. We're' just working out the pricing for this. This could be quite a good option for people who have good home electronics stocks of different resistors/capacitors and could simplify the kitting for us with just one kit with 10x 20x of all the different resistors and capacitors. Interested in hearing people's thoughts on the idea.

This blog post is a repost from the forum thread here:
Categories: Blog