# Novel Internet of Things Platform for In-Building Power Quality Submetering
## 5 Evaluation and Experimental Results
Figure 14: (a) V\({}_{\text{RMS}}\) (b) I\({}_{\text{RMS}}\) uploaded in ThingSpeak. To quantify the reliability of the sensor, the cumulative distribution function of the measurements shows that when setting 220 V in the power source, the interval between 10% and 90% of the registered values gives 220.27 to 220.4 V (Figure 16a). In this interval, the average is 220.3 V with 0.05 V standard deviation. The same ratio appears when setting the power source to 230 V, in this case the sensor measurement varies from 230.45 to 230.6 V (10-90% confidence interval) (Figure 16b). The average voltage is 230.4 V (with a standard deviation 0.04 V). In the case of the current, the standard deviation is below 0.01 A. Regarding the active and apparent monitored energy data (Figure 17), both trends are equal as the load was configured as a pure resistive load with unit power factor. Figure 16: Cumulative distribution function of registered values with 220 (**a**) and 230 V (**b**). Figure 15: Voltage (blue) and current (dark green) during the long-term monitoring test. Apart from voltage and current magnitudes, different voltage sags (with different magnitudes and durations) have been created in the power source and fed to the electronic load to be monitored by the IoT PQ meter and check the event detection functionality. Therefore, the California Power Source was configured to create user-defined sags. The first sag tested was a 380 ms 83.5% V\({}_{\text{NOM}}\) (Figure 18) where the V\({}_{\text{RMS}}\) change from the nominal value (230 V) to 192.05 V during 19 line frequency cycles, and after these 380 ms, there is a recovery and the voltage returns to 230 V. Figure 18 shows the voltage measured with the Yokogawa DL850E Oscilloscope and processed with MATLAB. This allows graphical testing of the voltage waveform and consideration as a reference to compare the measurements recorded by the IoT PQ sensor. In fact, the data that are uploaded to ThingSpeak are those that are important to quantify a sag, i.e., the voltage magnitude of the sag (in this case 192.05 V) and the duration (380 ms in this case). The result of this first measurement given by the IoT cloud system is shown in the first row in the Table 3 Sag Report. Figure 17: (a) Active Energy during the long-term monitoring test. (b) Apparent Energy during the long-term monitoring test. Figure 18: Example of Sag 1 (380 ms 83.5% V\({}_{\text{NOM}}\)). Another magnitude and duration has been selected. The second voltage sag generated and monitored by the sensor is a 210 ms 79.6% V\({}_{\text{NOM}}\) (Figure 19). The measurement registered at the ThingSpeak platform by the IoT PQ sensor is shown at row 2 of Table 3, showing the magnitude (183.4 V) and the duration (210 ms) without no error in the measurement. In this case, the voltage waveform measured by the Yokogawa DL850E instrument is shown in Figure 19. The sag changes from the nominal value to a voltage level of 183.1 V, kept during 10.5 periods at line frequency. The report shown in Table 3 is generated within the ThingSpeak platform, done with MATLAB code included in the Cloud. The report contains the historic sag events measured by the IoT sensor. The two first voltage sags represent the sags previously shown in Figures 18 and 19 respectively. This is another novelty of this paper: a sag report generated in the Cloud with data from an IoT PQ sensor. The interesting point here is that the sag timestamp comes from the RTC peripheral information, so it is a precise value. The disadvantage with ThingSpeak is that the timestamp is given by the time when the measurement is uploaded, but in this case, the information sent to the Cloud also contains information about the timestamp. Extra functionality has been implemented in ThingSpeak with a MATLAB code integrated in the application. For the usefulness of the management operator, not only is a PQ report needed, but also a graphical way of looking, such as including the ability to show if the recorded sag meets the standard.