Posts Tagged ‘energy’

Estimating Canadian electricity CO₂ intensities

I recently became interested in the Electricity Map project. It uses real-time electricity generation data to estimate real-time CO₂-equivalent emissions and intensity per kilowatt-hour — essentially, how green a region’s electricity generation is.

For instance, Germany routinely varies from over 450 g CO₂eq/kWh (grams CO₂-equivalent per kilowatt-hour) to under 250 g CO₂eq/kWh on windy or sunny days, while Poland varies from over 750 to 600 g/kWh. Other jurisdictions, like France or Ontario, have large baseline low-emission generators (often nuclear and hydro) and might vary from 20 to 50 g/kWh. The idea behind Electricity Map and the related CO₂ Signal API is that energy-storage consumer-level devices like batteries, heaters, or coolers can use electricity when it’s greener, or in case of an electric vehicle crossing a regional border, where it’s greener.

For this we need real-time information, for some definition of real-time. Electricity Map can show changes for every 15 minutes, but hourly updates are also common for some jurisdictions. Daily updates are too coarse. Generally, the availability of real-time data is correlated with privatization or decentralization of electricity systems: when different companies operate power stations, the transmission grid, and consumer billing (or some mix of these), real-time information on supply and demand is normally needed to determine purchasing price and in turn generation mix.

The site currently includes data for a few Canadian provinces: Alberta, Nova Scotia, Ontario, Prince Edward Island, and partial data for New Brunswick. Alberta and Ontario have privatized markets, and Prince Edward Island is showcasing how much wind generation is currently taking place (remainder of PEI’s electricity is imported from New Brunswick). New Brunswick provides interchange data (how much electricity it’s importing and exporting) and their demand — possibly driven by their relatively central location, passing on cheap plentiful hydroelectricity from Québec to Nova Scotia, PEI, and the U.S. I want to give credit to Nova Scotia: despite not being privatized nor particularly green, they report their generation mix hourly (in an attempt to highlight their renewables — but they report their coal faithfully too).

Spurring this particular write-up is Prince Edward Island. They report on-island generation and load, and imports can be inferred from this. However, the imports are from New Brunswick, which doesn’t have real-time information, so Electricity Map doesn’t know their generation CO₂ intensity. In these cases, Electricity Map by default assumes the import is the same intensity as the in-province generation.

This assumption doesn’t hold for PEI: local generation is almost always all wind, which has a much lower CO₂ intensity than the electricity imported from New Brunswick. As a result, the value shown in Electricity Map is often too optimistic and too low.

We don’t know New Brunswick’s real-time generation mix — but we can estimate it based on historical data, to at least get within an order of magnitude and hopefully within a margin of 2.

Statistics Canada has the data. The most interesting source is CANSIM Table 127-0002 (linked from CANSIM Energy consumption and disposition). Use “Add/remove data” to control it:

  1. select the desired province or territory in Step 1;
  2. deselect the subcategories “electric utilities” and “industries” in Step 2 since that’s not useful for us;
  3. select all types of electricity generation in Step 3. (The types in Statistics Canada don’t line up with Electricity Map’s fuel divisions – for instance, StatCan distinguishes “Conventional steam turbine”, “Internal combustion turbine”, and “Combustion turbine”, but won’t tell you if the turbines are heated by coal or gas – but we can estimate this later.)
  4. in step 4, select a date range – Table 127-0002 has monthly data from 2008 until 2015, which while not perfect (2016 data would be nice), is not too bad.

The second useful source is CANSIM Table 127-0008, which gives local supply and use vs imports and exports. Unfortunately, this only provides yearly data, but can be used to get a general sense of how electricity systems in the province are used. In this table, “interprovincial deliveries” are exports from a province, and “interprovincial receipts” are imports to the province.

I have put together a Jupyter notebook showing how to obtain and process the data — the numbers below mostly come from there and straight from the StatCan tables.

Because of a chain of imports within Atlantic and Eastern Canada, a brief overview of a few provincial electricity systems might be helpful.

Newfoundland and Labrador

Newfoundland and Labrador (population 530 thousand, GDP around $30 billion) largely runs on hydroelectricity. There is one particularly large hydroelectric project in Labrador, Churchill Falls, the electricity from which is exported to Québec. Per Table 127-0008, about 70-75% of all generation in the province is exported. Québec is Newfoundland and Labrador’s only current export link; an undersea link to Nova Scotia is under construction and should finish in late 2017 or early 2018.

Per Table 127-0002, in 2014-2015, between 94.1% and 97.6% of NL generation came from hydro. By monthly averages, the ratio was higher in the summer and lower in the winter. Between 0.2% and 0.3% of NL generation came from wind. The remaining generation was turbine generation, which, according to Wikipedia’s list of generating stations, consists of a vast majority of fuel oil/diesel and a tiny bit of biomass.

The monthly CO₂ intensity for electricity generated in Newfoundland and Labrador as a whole is around 30 to 70 g/kWh (higher in winter). The electricity exported to Québec is all hydroelectricity (assigned 24 g/kWh on Electricity Map). I haven’t yet calculated the intensity of the local supply excluding the Québec export.


Québec (population 8.4 million, GDP around $380 billion) mostly runs on hydroelectricity. It imports around 18% of its supply, mostly from Labrador (Labrador’s exports are 15% of Québec’s supply). It exports around 13% of its supply (16% of its generation), 10% of it to the U.S. and 3.3% to other provinces. Its import-export balance ends up fairly neutral, and it essentially acts as a conduit from Labrador to the U.S. (Newfoundlanders and Labradorians aren’t too happy about the economic arrangement.)

Between January 2014 and December 2015, Québec’s generation has been between 98.8% and 99.3% hydroelectricity. Fossil generation varied between 0.5% and 0.7% (for offgrid, peakers, and back-ups), and wind generation varied between 0.2% and 0.6%. The only nuclear plant in Québec (Gentilly) shut down in December 2012.

Estimated CO₂ intensity of Québec’s generation is around 25-30 g/kWh. Imports from Labrador, at 24 g/kWh, keep the supply intensity around the same value; the remaining imports, at 3% of the supply, likely come mostly from the other big Canadian province, Ontario, which has CO₂ intensities below 100 g/kWh and thus will not change the Québec intensity significantly.

New Brunswick

New Brunswick (population 760 thousand, GDP around $33 billion), the subject of the post, has a diverse generation mix. Since restarting their nuclear power plant (Point Lepreau) in late 2013, they have had around a third-each split in generation from nuclear, fossil fuel (coal, gas, and oil), and hydroelectricity; however, this varied a lot month-to-month. The CO₂ intensity of generation has bounced around a lot depending on the mix, but stayed around 300 to 400 g CO₂eq/kWh most of the time.

Between 2011 and 2015, imports constituted between 25% and 40% of the supply. Most of the imports come from Québec, at 25-30 g/kWh, thus reducing the CO₂ intensity of the supply by around a third. Over several years, about 33% of supply is exported — around 10% to other provinces and 23% to the U.S.

I would then suggest, in absence of better data, to assume that Prince Edward Island imports electricity which is around 300 g CO₂eq/kWh.

Prince Edward Island

Prince Edward Island (population 150 thousand, GDP around $6 billion), as mentioned, mostly imports electricity from New Brunswick. Local fossil plants (oil and diesel) serve as back-up and sometimes winter load peakers. There has been an increasing amount of wind turbines, which sometimes — but so far not often — cover the island’s complete load.

The Statistics Canada data for PEI is not terribly accurate. There is a large discrepancy between “Total all types of electricity generation” from Table 127-0002 and “Total generation of electricity” from Table 127-0008, present in StatCan’s source table and visible in the Jupyter notebook charts. Perhaps the system is too small to have accurate data.

Sources and programming

The source data is from Statistics Canada. The programming is in a Jupyter notebook on Github Gist. Further analysis or improvements could start from the notebook.

I hope to write further posts about the other provinces and territories.

Build This Idea: Micro-Grids for Peer-to-Peer Energy

This is an instalment of Build This Idea, where I write about stuff I want to exist. Treat it like an idea store; if you like something, take it; if you make it, let me know — I’ll be delighted to check it out. Today, a rather big ask for unifying several existing concepts and services.

London has canals. On canals there are moored houseboats. Until recently many houseboats had a diesel generator for their own electricity. Now it is common to see a photovoltaic panel or three supplementing that, and I’ve seen a few wind mini-turbines (though I’m a bit skeptical if they produced more than needed to light a lightbulb).

A thing that is not so great about this is that each boat has their generator, and they aren’t connected. There are many downsides to grids, but if you’re running a heavy load (kettle, oven) and your neighbour isn’t, a grid is a handy thing to have. A grid lets you pool resources, essentially timeshare.

But we don’t always need country-wide grids. Much of the averaging and pooling is feasible on neighbourhood or city scale. Traditional large-scale grids are most useful with centralized generation, and actually have problems with independently operated small-scale generation.

Instead, we should connect the houseboats with micro-grids. This should also be done in other cases where people use electricity in geographically close but off-grid situations, such as parked RVs, camped tents, or clusters of cabins. This would help with temporary heavy loads: your panel or battery might not be able to support a kettle or a vacuum on their own, but together with those of two of your neighbours it might. Then once your kettle is off, your panel can lend electricity to your neighbour. Try to smooth the peaks a little. Keep a running balance of how much electricity was lent and borrowed by everyone to ensure fairness.

To further motivate peak smoothing, have a surge multiplier that rewards providing energy to the grid at peak times by giving out extra credit. During a lower-demand period, the credit can be spent by receiving more energy than lent out at peak. (This is essentially demand management by economic means.)

A rough implementation idea: each houseboat or tent or RV is a system, identified by a unique key (possibly something similar to public/private key). New systems joining a grid (with a new key not previously seen by the grid) are required to lend some energy before being allowed to borrow. This privileges early movers and existing micro-grid members, but also avoids regenerating keys to repeatedly get free energy. Wireless power transfer guided by low-power beacons would make it super cool, but of course there would still be a lot of value in wired connections. Systems can connect and disconnect as they like or need, but will find it advantageous to keep connected as much as possible, to build up credit they can spend later.

Another reason this would be interesting is it sets up a new “edition” of an electrical grid where there was no grid before. If all you had before was your diesel generator, you are more likely to accept limitations on electricity use than if you’re coming from a grid-connected point of view, where this setup might be a downgrade. Further, a secondary grid where the expectations are different can be a good illustration of the concepts of demand management and peak smoothing for people who are used to current constant grids. In software terms, this is a new, rewritten “edition” that doesn’t have some features, as opposed to a new “version” removing features.

The new edition should optimally be built to be a little more resilient and better able to deal with fluctuating supply and demand. Current systems are built assuming 100% reliability, and weird things happen if grid power goes out or voltage drops. However, many of modern household uses of electricity are not particularly time-critical: increasing amounts of electronics have built-in batteries, and in many cases it doesn’t really matter if a fridge or heater turns on five minutes earlier or later. It would then be good to have smaller-scale dispersed generation as well as storage, with house, vehicle, and electronics batteries all capable of being charged or discharged as needed.

Build This Idea: Better DC Power

A significant amount of my home plug use – if not outright electricity use – is for electronics. When travelling, various electronics are the only reason I need to bring plug adapters.

(Point-and-shoot and SLR cameras are particularly bad, usually requiring proprietary chargers that don’t even charge all that fast.)

For a brief moment late last century, you could travel with no chargers, and just buy more AAs wherever you went. Or use a local charger with rechargeable AAs from anywhere. A Walkman would run on American AAs as well as on European AAs.

The Nexus 5 has a 8.7 Wh battery, a lot bigger than 0.6 to 3.9 Wh in an AA battery. But there’s problems.

Phones, tablets, laptops, various camera chargers all ultimately use low-voltage and fairly low-power DC. Using wall-warts from to 220 V AC is just asking for waste. Using incompatible power adapters for many devices is insanity.

USB sort of solves this, but comes with its own problems. Using the same plug for data and power is going to end up like CD autorun did in the 1990s: helpful but dangerous. Plugging into an unknown charger — or an unknown cable — is a risk now. You couldn’t get your Walkman rooted by a AA battery. (You could conceivably get a device fried by a rogue battery, but that’s a one-time loss, not an ongoing pwnage.)

You can now get USB cables with a switch to disconnect data pins, or with data pins unconnected, but that means you’re carrying your own cable. Android has an OS-level data switch, but I am less than confident of many manufacturers’ ability to not get low-level firmware pwned, so a phone-based low-level physical switch would be appreciated. Still, these are hacks: better make sure not to switch by accident.

USB Type C gives more power, which will come in handy for bigger devices. At some point you have to ask why put data pins on something you’d ideally plug in everywhere, why require trusting the chargers? I can only hope it is a stop-gap until better wireless power is possible. (Just make sure you can’t get rooted over the air!)

Still, the installed base means that working with various kinds of USB (type A and micro-B in particular) is probably our best bet — and maybe at some point we’ll get hardware with a physical data pins switch. So: power pins on the 5 V DC USB plug for everything!

Canon and Nikon, I’m looking at you.

Bonus: photovoltaics

Photovoltaic/solar panels generate intermittent DC electricity. That is a very interesting fit with electronics. Traditionally a big problem with using solar power is storing energy for when it’s dark. Many electronics have batteries that can store the energy for several days, and using DC eliminates AC/DC conversions.

It would be a neat project to put a PV panel on the top lid of a laptop. The top of a 15″ laptop is about 0.10 square meters and could collect about 15 to 30 watts (around 45 degrees latitude, with today’s mid-efficiency panels). That’s not as much as a AC power brick — for bigger laptops, these are usually rated 50-70 watt — but it’ll top up a laptop nicely. Plus, a deep purple/black PV panel would look very nice on a black laptop. Novena case, anyone?

One thing to note is that you’d have to make sure things don’t melt. Consumer electronics aren’t usually designed with being left in midday sun in mind.

PV panels on phones would be a tougher sell due to smaller size and therefore energy potential, and things like SLR camera battery chargers are ill-suited. Perhaps it would be better to have one PV panel with a thin battery, and running everything off a common charging standard. These exist for USB but efficiency is iffy and design is often uninspiring.

Even if these aren’t commercially viable for mainstream products, I would love to see them as aftermarket or hobby mods: a replacement lid for a Thinkpad, or a flat, e-reader-size USB power bank with a PV panel on top.

Silicon Valley transportation technology for the rest of the world

Silicon Valley is trendy, has lots of mindshare and lots more of press-share. Unfortunately, its ideas are sometimes best suited for Silicon Valley and not much else, and this is frequently the case with transportation technologies as the Valley’s built form is very different from most of the world. But some of the technology can be useful with a bit of refocusing. In particular:

Better batteries

An American on HN told me in 2013 that Silicon Valley companies are the primary force working to electrify world transport. They must not have heard of that “train” thing; but at the same time it would be nice to have easier, cheaper, more complete-lifecycle-environmentally-friendly road vehicles. Some things will continue to run on roads for a while and we might as well try to improve those.

This is primarily my carbon guilt speaking, but I’m thinking of places like Iceland in particular. It seems ideally suited: there is lots of renewable electricity to charge the cars, most of long distance trips are within a 400 km range, and most users would be able to charge overnight – whether at houses, at assigned parking lots, or in case of truckers and tourists (hence my carbon guilt) at hotels/hostels/destinations.

Apparently there’s been lots of deployment in Norway, but Norway is a rich country even by Western European standards – it would be good to have this more widely.

Beyond rides for tourists, there’s lots of room to improve electric and hybrid delivery vehicles and buses where conversion to trolleybuses or streetcars is not feasible. Central London is choking in diesel and could really use better buses and taxis. Batteries will also help off-grid applications and help smooth out grid electricity usage peaks.

A lot was made of the California-built Tesla cars initially, but it looks like in the long run their battery technology will have more impact. Still, whoever does the best batteries, many will benefit.

Last mile

It seems pretty clear that trunk services are better off operated with trunk transit, and plans to combine last-mile with trunk (such as individual pods joining up into a train) are largely in sci-fi gadgetbahn stage and might never be practical due to size/mass-per-passenger inefficiency.

Of course the correct solution for last-mile woes is walkable communities where a transit stop with good service is within an easy walk, but redeveloping areas not built like this will take a long time, and smaller improvements can be made in a shorter timeframe.

Self-driving cars don’t solve inefficiencies along trunk routes and they are poorly suited for dense downtowns/city centres. On the former, with much closer vehicle spacing we might get 16-lane freeways down to six lanes, but it will still compare poorly with passenger throughput of a two-lane transitway. In the latter, a certain level of assertiveness is needed to balance avoiding obstacles with, well, getting anywhere: imagine pedestrians if they know a car will stop.

But sprawling, low-density suburbs should be well-suited for self-driving operations. It will be particularly useful if demand road pricing is allowed. It will turn out that it is, say, 2-3 times cheaper to accept a ride to a transit terminal and transfer onto a mass transport vehicle than to stay in the self-driving car all the way to the destination. If working in a lower density area, there would be a second transfer at another terminal close to the destination. This will work regardless of how the vehicles are powered, too, due to pricing of space. (Just consider how many houses could be built on the area of a medium-size freeway junction.)

Flexible transit

Suburbs, exurbs, and smaller towns are currently served by a mix of infrequent scheduled transit and paratransit. Demand dispatch technology could help reduce waits and increase usage. Rather than concentrating on cities where you are competing with classic bus service, it would be good to look after the long tail and allow some degree of car independence in smaller towns. A Lyft Line-like service that, with a living wage and reasonable job security for the drivers, could improve upon traditional infrequent bus service in lower density areas.

As an example, Grand River Transit is starting transit service in Wilmot township outside Kitchener – having it flexibly scheduled and with shorter waits for users as a result would be nice. Knowing that you won’t have to compete with big names like Uber anytime soon can only be a bonus.

This probably won’t get billions in VC money, but will be good.

Build This Idea: Soft Meter, a smart meter for everything

This is second instalment of Build This Idea, where I write about stuff I want to exist. Treat it like an idea store; if you like something, take it; if you make it, let me know — I’ll be delighted to check it out. Today, a web service I think would be super neat but haven’t had the time to built yet.

I would like a web service where I can easily enter any kind of meter reading, transit trips, plane flights, etc, and have it collate those over time and calculate and display usage and approximate carbon footprint.

I was able to get this for electricity from a BC Hydro smart meter when I lived in Vancouver. But a lot of people, and a lot of data categories, don’t have smart meters.

Screenshot of a website showing a bar graph of energy use by day

BC Hydro’s daily energy use tracker

This would be the smart meter for everything else. Have a simple interface with one field: the current meter reading. The user walks by the physical meter with their phone and enters the current reading in the browser. Three or five days later, do the same. With two data points, the site can calculate usage. With three data points, the service can display a trend. Draw a graph.

Knowing the trend — and visualizing it — is perhaps the biggest thing. Nothing motivates quite like “you’ve used more this week than last week.” What can be measured can be improved, what can be tracked can be optimized, and what can be seen improving can motivate to improve more.

Most people get some feedback when they get their bill. But feedback every two months isn’t as effective as feedback every three days. People can link what they did in the past three days easier than what they did in the last sixty days. You can change behaviour quicker.

Frequent feedback can be done with a smart meter. Or it can be done with a service that will be a smart meter for the rest of us.

The neat thing is that the solution can scale itself to so many things. Electricity meter. Gas meter. Water meter. A car’s odometer. Also point data: a flight from Heathrow to Pearson; number of transit trips in a month.

I’ve created something like this for myself but updating it is substantially more involved than one input field. It doesn’t estimate environmental footprint (currently a 1000 km flight appears the same as a 10 km drive) and there’s quite a lot of technical debt. But it is a nice proof of concept and I did find that tracking motivates me to use less.

There will of course be privacy issues. I have been thinking of a Javascript-based site where all data is stored on user’s device unless otherwise requested, but there’s many possible solutions. Surprise me.

I often say that when you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot express it in numbers, your knowledge is of a meagre and unsatisfactory kind; it may be the beginning of knowledge, but you have scarcely, in your thoughts, advanced to the stage of science, whatever the matter may be.

— William Thomson, 1st Baron Kelvin, Lecture on “Electrical Units of Measurement” (3 May 1883), published in Popular Lectures Vol. I, p. 73

If you can not measure it, you can not improve it.

— snappier Kelvin, according to the internet, so it must be true

Extra functionality

For when you’ve nothing left to do but add exciting new features:

  • Add ability to upload data from external sources, like CSV exports of BC Hydro smart meter data, or Oyster history exports.
  • When presenting trends, add generalized data from the city/region/whole system for comparison, or add weather history to help people understand what might be driving their usage.