# Novel Internet of Things Platform for In-Building Power Quality Submetering
## 1 Introduction
### Power Quality Literature Survey
In the state-of-the-art literature, energy metering has mainly been considered, as in [23] which presents a detailed survey of behind-the-meter energy management systems, or [24] which monitors energy usage, but also adding information about individual appliances allowing identification of which appliance is using energy, and in turn speculate on the activity and number of users. Some other authors have also considered the measurement of PQ parameters as in [25], which studies how to take advantage of the basic PQ measures inherent in most of today's smart meters in the context of a smart building with Energy Management System (EMS), particularly the implementation details and results at laboratory scale. With similar in mind, paper [26] proposes a signal analysis framework for simplified PQ informative methods based on a lightweight assessment of these measures to allow optimal real-time network operation and market-correlated services. They all use existing smart meters provided by the electrical company to gather extra information aside from for billing purposes, meaning that the information is aggregated by individual consumers, making it difficult to act over individual loads and implement measures to anticipate faults in an early stage. To that end, the ground-breaking smart meter developed in paper [27] provides standard PQ information as Total Harmonic Distortion (THD); in addition to event detections such as sags, swells, or interruptions, a complementary NILM approach is implemented in the prototype to identify appliances or industrial equipment. However, data are stored in an external micro-SD memory, so access to the data are offline, meaning no control can be done with it, and it exists only for monitoring purposes. In [28], the same ADE7758 Integrated Circuit (IC) selected here is employed to monitor energy parameters, and complemented with overvoltage and overcurrent alarms functionality; however, the solution does show data in an LCD display, so data are not stored to be later processed. Paper [29] presents a Wi-Fi smart plug which, in addition to monitoring energy consumption, can remotely activate the electrical appliances connected, but power quality data are not calculated. In [30] authors present a small-size power sensor able to measure the appliance power down to 1 W and generate power for its Microcontroller Unit (MCU) and radio frequency module by energy harvesting; they emphasize that the sensor does not consume power when the electrical appliance is off. The inconvenience is that only power consumption is measured, and a Personal Computer (PC) is needed to upload data to the cloud system, so the sensor is not provided with internet access. Authors of [31] criticize most approaches for being \"distributor-centric\" rather than \"customer-centric,\" undermining user acceptance, so they have designed a customer-centric and scalable architecture to facilitate user acceptance. According to the authors, this architecture (1) facilitates the integration of smart-grid applications with other home applications; (2) can gather data from heterogeneous communication protocols; (3) provides secure access to data; and (4) allows unequivocal mapping of each sensor and actuator to common abstraction layers so that applications easily can identify them.