Jack's blog

Dimmers and sparse-sampling home energy monitors don't mix

I have been recording the power consumption of my whole home using two systems: a Current Cost CT clamp and my home-brew "sound card power meter". The latter samples my home's voltage and current waveforms at 44.1kHz and calculates the apparent and active power once a second.

Most of the time, the signal from the Current Cost CT clamp and my SCPM agree remarkably well.

One situation where the two systems disagree wildly is when our kitchen ceiling lights are on. These lights consist of 10 x 10W Philips dimmable LEDs driven by a cheap TRIAC dimmer. Here's a graph showing a time period where the lights start off, then turn on, and then turn off again. The Current Cost reports a rapidly varying power consumption. The SCPM, on the other hand, reports a very steady power consumption. I have also plotted the mains voltage to demonstrate that the mains voltage wasn't doing anything odd during this period:

What's going on? Why does the Current Cost think the kitchen light's power consumption wobbles up and down wildly?

Which software license for disaggregation code?

I have finally started writing my smart meter disaggregation code! I'll keep the code private until we publish a paper on our disaggregation system, and then I'll open up the repository on github.

I spent a while worrying about which software license to use. I've just finished reading "Free as in Freedom: Richard Stallman's Crusade for Free Software" so I was very tempted to use GPL. The GPL forces people who modify your code to release their modifications in the hopes that everyone can benefit from every improvement. This has worked very well for projects like the Linux kernel; but there does seem to be good evidence that some software companies and developers are "allergic" to the GPL because it limits their freedom to modify the code, hence some companies would rather re-write GPL'd code or go with an alternative project.

One of my main motivations for doing a PhD on smart meter disaggregation is the rather idealistic hope that my work might, in some very small way, help people to reduce their energy consumption. As such, the priority must be to allow as many people as possible to use any disaggregation software I write. So I've gone for a very simple and permissive license: the MIT license.

(Of course, I rather suspect that my code won't be used much, so all this worrying about licenses might be somewhat premature ... but it's worth getting it right from the start).

I considered a number of different names for my Python disaggregation code: nilmpy, pynilm, nilmtk, disaggpy. I went with "slicedpy" because it makes me smile ;) (the idea being that smart meter disaggregation is a little like taking a pie (representing your whole-home energy consumption) and slicing it into its component pieces (each representing the energy consumed by an individual appliance); hence the name "SlicedPy". It's spelt "py" not "pie" because the code is mostly written in Python).

Update 1/8/2013

@OpenTRV suggested that I use the Apache v2.0 software license because it has some patent protection. It won't protect against patent trolls but it seems better than no patent protection. I am now using the Apache v2.0 license.

Useful links

UK Patents, Copyright and disaggregation

During my PhD one key aim is to design, implement and validate a software system which can disaggregate a smart meter signal. Disaggregation is definitely something which has commercial potential. Several people who have told me: "make sure you protect your IP".

I am rather sceptical of the worth of patents in general and software patents in particular but I also appreciate that I don't know much about IP. To try to find out more, I just attended a lecture on "Intellectual Property and its Importance to Researchers". In particular, I want to figure out:

  • Is it desirable to protect a disaggregation system?
  • Is it possible to protect a disaggregation system?

Let's take these questions in reverse order:

Very basic electronics kits for 2 year olds!?

My 2 year old daughter appears to enjoy the very basic geeky things that she's gotten her hands on so far.  Things like plugging headphones into the iPad to listen to music; building things with large Lego blocks; turning torches on and off; playing with little remote-controlled-cars etc etc.

I'd like to see how she gets on with some sort of basic "electronics kit" which allows her to experiment a little while teaching her some very basic principals (like circuits require both a power source and a load).

All existing electronics kits I've seen would be way to advanced for her.  For example, she's years away from being able to understand what "completing a circuit" means (i.e. any kits which require you to connect both a negative and positive cable from power source to actuator would be way to abstract for her).

I'm thinking of making her a very, very basic "electronics kit".  Each component would be in its own little tinted, semi-transparent box. 

There would be several "sources" of electrical power (small battery pack, PV cells, little hand-cranked dynamo etc).  Each source module would have a single large DC socket to send power to another module. Each source would produce about 3 volts and would have short-circuit protection.

There would be several "actuator" modules like a lamp, motor, door bell, volt meter, radio etc.  These modules would each have a single small DC socket.

Cables would have a large DC socket on one end and a small DC socket on the other.  The use of large DC sockets on the power source modules and small DC sockets on the actuator modules should make it mechanically impossible to create a "wrong" circuit (like connecting a battery pack to a PV cell).

And maybe some basic "control" modules like a switch, light-operated switch, oscillator etc.  Each control module would have both a small DC socket (power input) and a large DC socket (power output to actuator).

Each class of module (actuator, controller, power source) would have its own colour.

Does anyone know if a similar kit exist for purchase?

If not, I'll make the kit for my daughter, unless anyone has good evidence that such a project would still be way to advanced for a 2 year old.  Of course, I'll start with the real basics like just a battery module, switch, light and two cables to see how she gets on with it.

If the kit is a success then we could extend it by adding "control" / "audio" cables (maybe 3.5mm jack sockets) so we could make a simple telephone, radio, synthesiser etc etc. (Yes, you've guessed it: this entire project is just an excuse for me to finally get round to building the modular analogue synth I've wanted to build since I was a kid!).

(I also posted this on the Instructables forum)

(BTW, sorry I haven't posted much about my PhD work for a while. Been busily wrapping up my data collection work and writing a paper).

Data clustering in Python

Just a list of data clustering packages in Python

Reviews of energy saving lamps (LED and CFL)

Brief reviews of some energy saving lamps we've used.

Using computer science to improve environmental sustainability

I believe that computer science geeks have an important role to play in engineering our way out of the various environmental problems we currently find ourselves lumbered with.

This blog post is a non-exhaustive list of interesting subject areas for folks who, like me, are interested in both computer science and environmental sustainability. It aims to provide an (incomplete) answer to the question: how can a computer scientist contribute measurable improvements to our environmental sustainability?

Energy use recommendations

There are a number of systems and projects out there which aim to provide advice on your energy consumption. I don't personally do research on this stuff but it is quite closely related with my core work of disaggregation. So I wanted to start a list of energy use recommendations projects.

THIS LIST IS BY NO MEANS EXHAUSTIVE YET! Please, if you know of an energy recommendation project not currently on this list then please leave a comment and I'll add it! (Makes me think we need a wiki for this type of stuff...)

Smart Meters Equipment Tech Spec Version 2 (SMETS2)

By 2019 2020, all homes in the UK will have a smart meter installed. DECC is working on the spec for these meters at the moment. In the context of my PhD on smart meter disaggregation, I have several questions I need to answer about these specs:

  • exactly which power metrics will UK smart meters expose to the home area network (HAN)? (just active power? And reactive power? Can we distinguish between leading vs lagging? THD?)
  • report rate? (one measurement every 5 seconds? The 2011 "Functional Requirements Catalogue" said "The smart metering system shall support capture of consumption and demand data at 5 second intervals."
  • and how could a disaggregation system read these data?

The Smart Meters Equipment Tech Spec Version 2 (SMETS2) was released in Jan 2013. Some useful paragraphs for those of us interested in disaggregation:

UK-based disaggregation researchers

Are you based in the UK and working on some aspect of smart meter disaggregation (Non-Intrusive Load Monitoring / NILM / NIALM)? If so, please get in touch (either leave a comment at the bottom of this blog post or contact me directly). I was speaking to Oli Parsons and he came up with the great idea that we should have a UK disaggregation meetup!


Subscribe to RSS - Jack's blog