# Power Factor Prediction in Three Phase Electrical Power Systems Using Machine Learning

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

^{®}three phase power quality analyzer from Circutor

^{®}. Data is stored in a 25 GB external SD memory card. Each selected ELC was monitored for a 7-day time period by using demand period storage rate of 5 min and recording current measurements for each phase along with real-time PF calculations [19]. Figure 4 shows the connection diagram of the analyzer in a 3F + N system [20].

## 3. Results and Discussion

^{2}is considered desirable.

^{2}were calculated for each site. As observed from results depicted in Table 3, ELC-3 site showed the lowest RMSE as well as the higher R

^{2}value.

^{2}coefficient (0.85) along with a low RMSE error except for ELC-4 where RMSE error is slightly bigger (0.175). The higher discrepancy obtained for site ELC-4 could be associated to a weaker correlation observed between phase currents and PF for this particular site (see Figure 7). Therefore, a different approach should be considered like taking into account also the phase voltages or consider only one phase current (i.e., IL3) for model prediction.

## 4. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## Nomenclature

1. (GDP) | Gross Domestic Product |

2. (OCDE) | Organization for Economic Co-operation and Development |

3. (AIE) | International Energy Agency |

4. (PF) | Power Factor |

5. (PFC) | Power Factor Compensation |

6. (STATCOMs) | Static synchronous compensator |

7. (THD) | Total Harmonic Distortion |

8. (AI) | Artificial Intelligence |

9. (CV) | Computer Vision |

10. (ML) | Machine Learning |

11. (NN) | Neural Networks |

12. (DL) | Deep Learning |

13. (NLP) | Natural Language Processing |

14. (ELC) | Electric Load Centers |

15. (ID) | Identification |

16. (OLS) | Ordinary Least Squares |

17. (PLY) | Polynomial |

18. (RF) | Random Forest Regression |

19. (MAE) | Mean Absolute Error |

20. (MSE) | Mean Square Error |

21. (RMSE) | Root Mean Square Error |

22. (KDE) | Kernel Distribution Estimation |

23. (NB) | Naive Bayes |

24. (IL1) | Line Current 1 |

25. (IL2) | Line Current 2 |

26. (IL3) | Line Current 3 |

## References

- International Energy Agency (IEA). This OECD Energy Statistic and Country Balance Sheets. 2014. Available online: https://www.iea.org/ (accessed on 5 May 2022).
- Osahenvemwen, O.A.; Enoma, O.C.; Aitanke, H. Evaluation of transmission losses and efficiency. Int. J. Eng. Appl. Sci.
**2022**, 1, 1–6. [Google Scholar] [CrossRef] - Theocharides, S.; Makridesl, G.; Liveral, A. Day-ahead photovoltaic power production forecasting methodology based on machine learning and statistical post-processing. Appl. Energy
**2020**, 268, 115023. [Google Scholar] [CrossRef] - Chem, T.H.; Chem, M.S.; Inoue, T.; Kolas, P.; Chebli, E.A. Three-phase generator and transformer models for distribution system analysis. IEEE Transm. Power Deliv.
**1991**, 6, 18–21. [Google Scholar] - Channi, H.K. Overview of power factor improvement techniques. Int. J. Res. Eng. Appl. Sci. (IJREAS)
**2017**, 7, 27–36. Available online: http://euroasiapub.org/journals.php (accessed on 5 May 2022). - Gampa, S.R.; Das, D. Optimum placement of shunt capacitors in a radial distribution system for substation power factor improvement using fuzzy GA method. Int. J. Electr. Power Energy Syst.
**2016**, 77, 314–326. [Google Scholar] [CrossRef] - Kabir, Y.; Mohsin, Y.M.; Khan, M.M. Automated power factor correction and energy monitoring system. In Proceedings of the 2017 Second International Conference on Electrical, Computer and Communication Technologies (ICECCT), Coimbatore, India, 22–24 February 2017; pp. 1–5. [Google Scholar] [CrossRef]
- Stet, D.; Czumbil, L.; Micu, D.D.; Polycarpou, A.; Ceclan, A.; Cretu, M. Power Factor Correction Using EMTP-RV for Engineering Education. In Proceedings of the 2019 54th International Universities Power Engineering Conference (UPEC), Bucharest, Romania, 3–6 September 2019. [Google Scholar] [CrossRef]
- Bayindir, R.; Sagiroglu, S.; Colak, I. An intelligent power factor corrector for power system using artificial neural networks. Electr. Power Syst. Res.
**2009**, 79, 152–160. [Google Scholar] [CrossRef] - Rizo, J.F. Manual of Interactive System and Advanced Infrastructure for Electric Energy Measurement. CFE Specification GWH00-09. 2015. Available online: https://lapem.cfe.gob.mx/normas/pdfs/n/GWH00-09.pdf (accessed on 8 May 2022).
- Standard IEEE-1159-2019; IEEE Recommended Practice for Monitoring Electric Power Quality. IEEE: Piscataway Township, NJ, USA, 2019. Available online: https://standards.ieee.org/ (accessed on 8 May 2022).
- Zhang, X.; Dahu, W. Application of artificial intelligence algorithms in image processing. J. Vis. Commun. Image Represent.
**2019**, 61, 42–49. [Google Scholar] [CrossRef] - Zhao, S.; Blaabjerg, F.; Wang, H. An Overview of Artificial Intelligence Applications for Power Electronics. IEEE Trans. Power Electron.
**2020**, 36, 4633–4658. [Google Scholar] [CrossRef] - Hanson, C.W., III; Marshall, B.E. Artificial intelligence applications in the intensive care unit. Crit. Care Med.
**2001**, 29, 427–435. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Sundaray, P. Machine learning Approach to Event Detection for Load Monitoring. Master’s Thesis, University of Wisconsin-Madison, Madison, WI, USA, 2019. Available online: http://digital.library.wisc.edu/1793/79593 (accessed on 13 June 2022).
- Dobbe, R.; Hidalgo-Gonzalez, P.; Karagiannopoulos, S.; Henriquez-Auba, R.; Hug, G.; Callaway, D.S.; Tomlin, C.J. Learning to control in power systems: Design and analysis guidelines for concrete safety problems. Electr. Power Syst. Res.
**2020**, 189, 106615. [Google Scholar] [CrossRef] - Tandon, A.; Singhal, A. Analysis of Voltage Sag and Swell Problems Using Fuzzy Logic for Power Quality Progress in Reliable Power System. In Intelligent Energy Management Technologies; Algorithms for Intelligent Systems; Shorif Uddin, M., Sharma, A., Agarwal, K.L., Saraswat, M., Eds.; Springer: Singapore, 2021. [Google Scholar] [CrossRef]
- Cesar, D.G.; Valdomiro, V.G.; Gabriel, O.P. Automatic Power Quality Disturbances Detection and Classification Based on Discrete Wavelet Transform and Artificial Intelligence. In Proceedings of the 2006 IEEE/PES Transmission & Distribution Conference and Exposition, Caracas, Venezuela, 15–18 August 2006; pp. 1–6. [Google Scholar] [CrossRef]
- Manual of Energy Regulatory Commission, Resolution by Which the Energy Regulatory Commission Issues the General Administrative Provisions that Contain the Criteria of Efficiency, Quality, Reliability, Continuity, Safety and Sustainability of the National Electric System: Network Code, as Provided in Article 12, Section XXXVII of the Electricity Industry Law. Published by the Government of Mexico in April 2016. Available online: https://www.dof.gob.mx/nota_detalle.php?codigo=5639920&fecha=31/12/2021#gsc.tab=0 (accessed on 16 March 2019).
- 446-1995; IEEE Recommended Practice for Emergency and Standby Power Systems for Industrial and Commercial Applications. IEEE: Piscataway Township, NJ, USA, 1996. [CrossRef]
- Instruction Manual, MYebox150-MYebox1500, CIRCUTOR, p. 21. Available online: https://docs.circutor.com/docs/M084B01-01.pdf (accessed on 4 November 2020).
- Richert, W.; Coelho, L.P. Building Machine Learning Systems with Python; Packt Publishing: Birmingham, UK, 2013. [Google Scholar]

**Figure 1.**Total energy consumption vs. GDP for OCDE/AIE, adapted from Ref. [1].

**Figure 4.**Power quality analyzer connection in a three phase facility, adapted from Ref. [20].

**Figure 6.**Time evolution of power factor in selected sites. All four sites show important power factor variations due to large inductive loads operation.

**Figure 7.**Correlation map between power factor, phase voltages and phase currents. It can be observed the strong correlation between PF and phase currents whereas concerning phase voltages the correlation is rather poor.

**Figure 8.**Histogram distribution and kernel density estimation for each monitored location. Bimodal and multimodal distributions can be observed.

**Figure 9.**Residuals plot obtained for ELC-3 using the three main linear regression algorithms Ordinary Least Squares (OLS), Polynomial (Poly) and Random Forest (RF). (

**a**) Residual plot for OLS algorithm; (

**b**) Residual plot for Polynomial algorithm; (

**c**) Residual plot for Random Forest algorithm.

**Figure 10.**RF predictions results for al monitored sites. It can be observed that model underestimates the PF variations in most cases. (

**a**) RF prediction vs. actual measured data for site ELC-1; (

**b**) RF prediction vs. actual measured data for site ELC-2; (

**c**) RF prediction vs. actual measured data for site ELC-3; (

**d**) RF prediction vs. actual measured data for site ELC-4.

Site | ID | Geographical Location |
---|---|---|

ALSA | ELC-1 | Zacatecas, México |

Centro-Sahuayo | ELC-2 | Michoacán, México |

Yerbabuena | ELC-3 | Michoacán, México |

Castellanos 2 | ELC-4 | Michoacán, México |

X1 | X2 | X3 | Y |
---|---|---|---|

Current phase A | Current phase C | Current phase B | Power Factor |

MAE | MSE | RMSE | R^{2} | |
---|---|---|---|---|

ELC-1 | 0.159 | 0.031 | 0.175 | 0.70 |

ELC-2 | 0.052 | 0.007 | 0.087 | 0.73 |

ELC-3 | 0.023 | 0.001 | 0.029 | 0.82 |

ELC-4 | 0.072 | 0.009 | 0.096 | 0.73 |

MAE | MSE | RMSE | R^{2} | |
---|---|---|---|---|

ELC-1 | 0.099 | 0.012 | 0.110 | 0.85 |

ELC-2 | 0.091 | 0.014 | 0.117 | 0.85 |

ELC-3 | 0.012 | 0.0003 | 0.018 | 0.85 |

ELC-4 | 0.135 | 0.031 | 0.175 | 0.85 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Gámez Medina, J.M.; de la Torre y Ramos, J.; López Monteagudo, F.E.; Ríos Rodríguez, L.d.C.; Esparza, D.; Rivas, J.M.; Ruvalcaba Arredondo, L.; Romero Moyano, A.A.
Power Factor Prediction in Three Phase Electrical Power Systems Using Machine Learning. *Sustainability* **2022**, *14*, 9113.
https://doi.org/10.3390/su14159113

**AMA Style**

Gámez Medina JM, de la Torre y Ramos J, López Monteagudo FE, Ríos Rodríguez LdC, Esparza D, Rivas JM, Ruvalcaba Arredondo L, Romero Moyano AA.
Power Factor Prediction in Three Phase Electrical Power Systems Using Machine Learning. *Sustainability*. 2022; 14(15):9113.
https://doi.org/10.3390/su14159113

**Chicago/Turabian Style**

Gámez Medina, José Manuel, Jorge de la Torre y Ramos, Francisco Eneldo López Monteagudo, Leticia del Carmen Ríos Rodríguez, Diego Esparza, Jesús Manuel Rivas, Leonel Ruvalcaba Arredondo, and Alejandra Ariadna Romero Moyano.
2022. "Power Factor Prediction in Three Phase Electrical Power Systems Using Machine Learning" *Sustainability* 14, no. 15: 9113.
https://doi.org/10.3390/su14159113