Open Mullti Power Meter
Open Mullti Power Meter
1 Universidad de Almería, Escuela Superior de Ingeniería, La Cañada de San Urbano, 04120, Almería, Spain; email: [email protected],
[email protected], [email protected], [email protected]
2
Universidade da Coruña, Campus Industrial de Ferrol, Departamento de Enxeñaría Naval e Industrial, Escola Politécnica de Enxeñaría de Ferrol,
Esteiro, 15471 Ferrol, Spain; email: [email protected]
3 Universidade da Coruña, Campus Industrial de Ferrol, Departamento de Química, Escola Politécnica de Enxeñaría de Ferrol, Esteiro, 15471 Ferrol,
Spain; email: [email protected]
Abstract. In our world, it has never been more important to optimise the We also have the NILMTK toolkit, which implements two of the
use of energy in such a complex socio-political context, which is clearly algorithms known and studied in the world of disaggregation, such as
dependent on fossil fuels. With the idea that nothing can be optimised that the combinatorial algorithm (CO) and the hidden model algorithm of
cannot be measured, precisely why it is important to use accurate, intelligent Markoff (FHMM). [1], which are the perfect tools to test the reliability
energy meters, which provide us with these measurements of electricity and usefulness of the measures taken with the OMPM.
consumption, to optimise their use using the NILM (Non-Intrusive Load
Monitoring) technique.
Our aim is therefore to make it possible for engineers and researchers to 2. Related work
carry out basic electrical measurements in a reproducible and extensible way, There are commercial and research meters that can be used together
which we believe we have achieved through a new open hardware solution that
or separately to measure electricity consumption or power quality (or
we have called OMPM (Open Multi Power Meter), based on a single
microcontroller with its associated hardware, whose firmware has been
devices that integrate both functions). For example, some power
developed in open source, and several standard measurement modules quality analysers are used by engineers, electricians, maintenance
interconnected by a bus, which we believe offers us an easily implementable technicians and facilities to record power quality, perform diagnostic
device, all without losing the reliability and precision that some non-professional work on electrical systems or equipment, identify energy waste in
devices suffer from. facilities, or detect and prevent energy problems before they occur.
It is precisely the characteristics of this new solution Open Multi Power
Meter (OMPM), based on the new measurements obtained using and adapting
Unfortunately, all these devices are expensive and difficult for non-
the Non-Intrusive Load Monitoring Tool Kit (NILMTK), that allow us to create a qualified users, as they are typically used to perform advanced energy
new DS with which to compare the results obtained by applying this toolkit with savings audits, repairs, network analysis, etc. On the other hand, as for
those obtained by applying it to other public dataset using commercial monitors the software of these devices, it is usually proprietary, although the
or even those based on open hardware (as in the case of the OZM). The results growing trend is that it is constituted on open-source resources, which
obtained will undoubtedly be surprising, given the simplicity and flexibility of this today is evident not only for energy measurement, but for a series of
innovative approach.
areas such as the NILM.
[2] among others.
A. Module PZEM004
There are also other platforms based on other boards, such as
The PZEM004 is an extremely popular low-cost real-time power
Raspberry Pi, where proposals have emerged such as Wattson, which
consumption monitoring module. This is the most important part of
use a non-invasive current sensor and an oled screen, emonPi, a the proposed solution, since it allows us to obtain the five basic
Raspberry Pi-based device for energy monitoring and data logging, electrical characteristics of one circuit, such as RMS voltage, RMS
providing real-time consumption information and online access for current, active power, frequency, and power factor.
analysis, or RPICT, a Raspberry Pi-based hardware project for energy
monitoring that use current transformers to measure and monitor The module is self-powered, with optocoupled outputs for serial
electrical energy consumption offering a cost-effective and communication at TTL level, using Rogowsky coils for current
customizable solution for real-time energy monitoring and analysis. measurement.
If you doubt before such a wide range of options surprises the The core of the module is the Vango Tec 9881, an ARM microcontroller
wonderful difference between some energy monitors present on the Cutx -M0 32-bit, 32kb flash memory and 8kb RAM, designed for
market perform extremely basic functions and estimate the energy applications of control and monitoring of electrical energy with
with a large error, because in general we could say that they have functions of protection against over-current, over-voltage and short-
circuit. It also has communication interfaces such as UART, SPI and I2C, As already mentioned, the assembly is completely scalable according
allowing integration with other electronic devices. to needs thanks to the implementation of an RS485 bus, so that all the
measurements of voltage, current, power, frequency, and power
Below is the internal schematic of this versatile module: factor obtained by each module are transmitted to the main controller
via the RX (GPIO 16) and TX lines(GPIO17). All measurements are
acquired at a frequency above approximately 10Hz.
• SDA : GPIO 13
• SCL : GPIO 14
Below we present the diagram of the final circuit that has been
As for the accuracy of each PZEM-004 module, they have a built-in
implemented (the screen of 16x2 not is mandatory but it is
calibration function that allows the offset and gain of the module to
convenient).
be adjusted to ensure that it supplies correct readings.
B. Measurement Module
Figure 4-Wiring diagram of the solution of OMPM.
First, we initialize the SD card, capture the current date and time by
STP using a network connection and at once we create 6 files for each
application differentiated by the counter number concatenated with
the first capture date.
Once the measurement files are created, we add the headers of the
fields in the first line in NILMTK format: "timestamp,VLN,A,W,F,PF",
which corresponds, respectively "timestamp" to the value of the
timestamp in 13-digit format , "VLN " to the value of the RMS voltage,
"A" at RMS current value, "W" at actual power, "F" at frequency, and
"PF" at power factor. The format is therefore 6 fields separated by
commas, which will help us to find the 5 measurements offered by
each PZEM 004 module, along with the 13-digit timestamp mark.
Figure 6-Picture of the sequencer in action.
The body of the main program periodically takes all the readings of
Obviously, from the relay board, the normally open contacts of each
each meter, making sure before that each meter is active and has its
output relay are connected in parallel to each switch of each of the 5
measurements accessible (otherwise the request would be the next).
applications used in this assembly, leaving their manual switches in
Logically, each group of measurements is recorded in its
the open position.
corresponding file together with the value of the corresponding
timestamp.
Figure 8-Consumption of the applicative plus the aggregate. Table 1-First estimations.
We can even see the periods when a measurement is recorded at a Once we have an idea of what could be the rightest combination for
defined threshold (including peaks). the disaggregation of energy consumption, using many more sampling
periods, we run the two CO and FHMM algorithms with the three
different filling methods, obtaining the following results:
In the earlier table, we can see that the best sampling time is 60
The data set is divided into three groups: Training, Validation and seconds for all combinations, being the best combination of the CO
Testing. algorithm with the mean filling method, which confirms that the
system could be interesting from the point of view of NILM.
Then we execute the two algorithms implemented by NILMTK (CO and
FHMM) [3], with the different methods of filling (mean, median and If we compare them with the results obtained by applying NILMTK to
first ) and with different sampling periods (between 1 second and 30 the IAWE dataset, we see that the best result is obtained for a
minutes), to obtain which is the optimal combination, for from there sampling time much greater than 10 minutes.
to generate the disaggregation model and calculate all the metrics
available in NILMTK as F1,EAE and MNEAP.
Table 6-Results of F1-score metrics for DEPS.
B. EAE Metric
NILMTK has the calculation of evaluation metrics through the use of Table 7 Metrics of EAE with OMPM.
C. MNEAP Metrics
The MNEAP metric also gives us particularly good values being the
best without a doubt for the LED lamp followed by the halogen lamp
Table 4 Main metrics obtains for applications.
and the fan. For the laptop or the fryer, they are not so excellent, but
they also get incredibly good values (the arithmetic mean obtained is
0.724).
Finally, the RMSE (root mean square error) gives interesting results, Table 10-Metrics of EAE with DEPS.
with the LED lamp being the best performer, followed by the fan, the
computer, the deep-fat fryer and finally the incandescent lamp.
D. Metric RMSE
A. F1 Metrics On the RMSE metric this time the data are incredibly good for all
applications especially if we compare them with those obtained with
The F1 metric gives particularly reliable results for the fan, the halogen the DEPS.
lamp, and the LED lamp. Perhaps the less good data are the results for
the laptop or, very curiously, for the deep fryer.
Index matching
For metrics EAE, the error is zero for all the cases and for metric
MNEAP, the error is greater when we exceed the sampling time of 1
minute, increasing for the combinatorial model and decreasing for
FHMM.
In this case, the comparison is again with DEPS dataset, whose best
performance was with the FHMM algorithm.
To finish for CO median method, we can see the metrics for OMPM.
treatment of NILMTK in its separate phases (validation, training, and
metrics).
The data shown again shows that although the metrics F1-score stands REFERENCES
out in some devices with the dataset of DEPS, the result is not so good
in some others (the HVAC_4 and lights_2), so we could say that for the [1] Y. Karen, V. Nick, and P. Thibaut, “Energy Disaggregation
dataset of OMPM the results are more homogeneous. from Non-Intrusive Load Monitoring Combinatorial
Optimization, Factorial Hidden Markov Model,
Too for the metric EAE, the results are again excellent for both Convolutional Neural Network,” AM 207, 2016.
datasets (DEPS and OMPM), and in the other hand the metric MNEAP
for dataset of DEPS, the excellent result for the rack application stands [2] S. Biansoongnern and B. Plangklang, Nonintrusive load
out, but for the rest of appliances are both similar. monitoring (NILM) using an Artificial Neural Network in
embedded system with low sampling rate; Nonintrusive
Finally, for the RMSE metric as we had already seen, the differences load monitoring (NILM) using an Artificial Neural Network
are very remarkable, strongly highlighting the superior results in embedded system with low sampling rate. 2016. doi:
obtained with the dataset of OMPM compared to those obtained with 10.1109/ECTICon.2016.7561398.
dataset of DEPS, which as we see are not so good.
[3] V. Eduardo, A. Alfredo, M. Francisco G., B. Raul, and A.-C.
5. Conclusions Francisco M., “OpenZmeter: An efficient low-cost energy
smart meter and power quality analyzer,” Sustainability
(Switzerland), vol. 10, no. 11, Nov. 2018, doi:
This work presents a new hardware-based solution that is scalable, 10.3390/su10114038.
accessible, and replicable at an extremely low cost, with the high
precision typical of a professional solution. We also use open [4] B. Nipun, K. Jack, P. Oliver, D. Haimonti, and K. William,
software, both in the firmware of the microcontroller and in the “NILMTK: An Open Source Toolkit for Non-intrusive Load
processing software based on the NILMTK toolkit, which has been Monitoring,” Apr. 2014, doi: 10.1145/2602044.2602051.
adapted to support a new set of data obtained with the new
hardware. [5] “AriasSilva/DEPS_NILM_Dataset: DEPS: Dataset de la
Escuela Politécnica Superior.”
It is therefore worth highlighting the creation of a new converter, https://github.com/AriasSilva/DEPS_NILM_Dataset
based on the OMPM measurement files, which generates the new (accessed Jun. 03, 2022).
dataset with 13-digit timestamp support, allowing us to follow the