# Software Integration of Power System Measurement Devices with AI Capabilities
## 6 Conclusions  
The main novelty of this paper is its designed framework capable of integrating electrical monitoring devices, such as PMUs, PQMs, and SMs, as well as adding AI capabilities to the recorded data. This framework covers a necessity given the large number of applications based on electrical monitoring data and the growth of DERs in distribution grids, which increase the necessity of monitoring and forecasting in these grids. In addition, only open-source software has been used, which is an advantage in terms of transparency, flexibility, and customization. Moreover, the framework has been proven to be capable of executing real-time machine learning models, which is something not usually discussed in the literature for similar frameworks. This capability allows the framework to process and analyze electrical monitoring data more effectively, improving applications such as fault diagnosis, state estimation, and event detection. In general, the chosen scheme was tested with remarkable success, both in the laboratory and in a distribution grid. Figure 24: Harmonic values distributions in training set (None, Lamp1, Lamp2, Lamp3) vs. real time experiment (NoneRT, Lamp1 RT, Lamp2 RT, Lamp3 RT). \begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline
**Class** & **Model** & **Support** & **TP** & **FN** & **FP** & **TN** & **Accuracy** & **Precision** & **Recall** & **F1-Score** & **MCC** \\ \hline \multirow{3}{*}{None} & NN & 6825 & 6825 & 0 & 0 & 3213 & 1.00000 & 1.00000 & 1.00000 & 1.00000 & 1.00000 \\  & DT & 6825 & 6825 & 0 & 0  
Integration capabilities were tested in both laboratory and field tests. In the laboratory, it was observed that measurements were synchronized among devices of the same type, but there was a noticeable delay of about one second between different devices. This is likely caused by the different synchronization methods used: PMUs are synchronized via a GPS, while PQMs use an NTP. In the field test, a more complex scenario was created using configurable National Instruments equipment. All equipment was connected via TSN, enabling the PQMs to use the same GPS signal as the PMUs. In this test, the measurements were strongly synchronized, and the delay was less than one second. Ongoing efforts are focused on further characterizing this field environment. In conclusion, performance may vary depending on the measurement equipment used, although the framework adapts to even the most demanding environments. Due to the robustness of the software, no data loss was observed. Once data were properly registered, machine learning techniques were integrated in a real-time load identification example. Neural Network, Decision Tree, and Random Forest classifiers for real-time load identification were implemented and experimentally validated to identify the connected LED from the voltage harmonics recorded by a PQM. Of the three options, the Decision Tree was found to be the most sensitive to data variability, while both the Neural Network and the Random Forest had near 100% accuracy. In all three cases, real-time executions were performed without visible delay or data congestion. Even the Neural Network, which required more computing time, was executed seamlessly. This guarantees the integration of machine learning techniques with the framework, although the capacity to execute more complex classifiers would depend on other external factors, such as the processing power. With both integration and load identification tests, the capabilities of the framework were tested. Looking ahead, the framework has the potential to support a wide range of applications involving electrical devices and AI, including monitoring and control, state estimation, event detection, and fault location. Although certain software tools, such as the selected TSDB InfluxDB, could be substituted with similar alternatives, the tools utilized in this study delivered outstanding performance and notable success. Conceptualization, V.A.-R. and F.C. ; methodology, V.A.-R. and F.C. ; software, V.A.-R. and F.C.