The idea behind Non-Intrusive Load Monitoring (NILM) is to solve an inverse problem of decomposing a superposition of different household electrical energy loads, based on observing only the time-series of the total load. This goal was pioneered by G.W. Hart, MIT. Solving this theoretical problem has also far reaching practical motivations, spanning from understanding large industrial system loads to reducing the overall world energy consumption.
Figure 1: An embedded web interface with real-time data.
Embedded algorithms here include basic unsupervised and supervised machine learning techniques (K-means, Fuzzy K-means, EM-clustering, Bayes classifier), linear and non-linear signal processing (filtering, edge detection) and a genetic algorithm type combinatorial optimization for learning the finite state machine.
Figure 2: A diagram of unambiguous finite automaton (from Wikipedia).A working prototype was realized with an Artila iPAC5010 ARM-linux embedded development card together with a custom photodiode circuit triggering on the optical output of a standard household energy meter (1k pulses/kWh). In addition, a 1-wire network support with "hot-plugging" onewire temperature sensors is included. The user interface is provided by an embedded web-server (async Javascript front end, PHP & C++ back end). An SQL-database (SQLite3) is used for saving the measurement data. A modern ARM board with floating point support is recommended.
This prototype system was introduced and awarded in 2009 in a technical innovation competition IIDA09 at Tampere University of Technology (TUT), Finland.
Figure 3: An embedded web interface with time-series data.
(c) 2008-2009 Mikael Mieskolainen, TUT
- Upload all data collected between 2009-2021
- Change all code comments to English
- Adapt the code for Rasperry Pi (only GPIO interfaces need modification)
- Implement modern algorithms, e.g. deep learning with self-supervision / matrix factorizations
- Copy everything under
/mnt/
to the ARM board with SD card - Use GPIO port 8 for the energy meter trigger circuit
- Connect ethernet
- Connect onewire adapter into the serial port (optional)
Scripts under the following paths control the startup
/mnt/disk/etc/
/mnt/disk/
C++ real-time and web back-end programs
/source/{*.c, *.h, Makefile}
PHP web back-end + javascript front-end
/mnt/disk/home/
Database files (sqlite3) collected with the prototype. Extract .db
files from .tar.xz
files.
/mnt/mmc/{*.db}
Compiled multithreaded real-time programs
/mnt/disk/powercalc
/mnt/disk/cluster
Compiled web back-end programs
/mnt/disk/home/httpd/apps/get_file_archive.cgi
/mnt/disk/home/httpd/apps/get_statistics.cgi
/mnt/disk/home/httpd/apps/socket_client.cgi
Additional standard programs utilized
/mnt/disk/php
/mnt/disk/openssl
/mnt/disk/cron
/mnt/disk/ntpclient
/mnt/disk/lighttpd/*
/mnt/disk/ntpd/*
/mnt/mmc/sqlite3 (for manually inspecting database files)
The components of the read-out circuit are
- Reverse biased photosensitive PN-diode
- Bipolar transistor + bias resistors
- Voltage source
- Cabling
Database: SQLite3 https://www.sqlite.org/ (Public domain)
1-Wire: Dallas/Maxim driver C-libraries ((C) 2000 Dallas Semiconductor Corporation)
JQuery https://jquery.com/ (MIT license)
prototype.js http://prototypejs.org/ (MIT license)
script.aculo.us https://script.aculo.us/ (MIT license)
ContentFlow http://contentflow.eu (MIT license)
DHTML calendar (LGPL license)