**Carlos Iturrino Garcia 1,2,\*,†, Francesco Grasso 1,2,†, Antonio Luchetta 1,2,\*,†, Maria Cristina Piccirilli 1,2,†, Libero Paolucci 1,2,\*,† and Giacomo Talluri 1,2,†**


Received: 30 July 2020; Accepted: 21 September 2020; Published: 27 September 2020

**Abstract:** The use of electronic loads has improved many aspects of everyday life, permitting more efficient, precise and automated process. As a drawback, the nonlinear behavior of these systems entails the injection of electrical disturbances on the power grid that can cause distortion of voltage and current. In order to adopt countermeasures, it is important to detect and classify these disturbances. To do this, several Machine Learning Algorithms are currently exploited. Among them, for the present work, the Long Short Term Memory (LSTM), the Convolutional Neural Networks (CNN), the Convolutional Neural Networks Long Short Term Memory (CNN-LSTM) and the CNN-LSTM with adjusted hyperparameters are compared. As a preliminary stage of the research, the voltage and current time signals are simulated using MATLAB Simulink. Thanks to the simulation results, it is possible to acquire a current and voltage dataset with which the identification algorithms are trained, validated and tested. These datasets include simulations of several disturbances such as Sag, Swell, Harmonics, Transient, Notch and Interruption. Data Augmentation techniques are used in order to increase the variability of the training and validation dataset in order to obtain a generalized result. After that, the networks are fed with an experimental dataset of voltage and current field measurements containing the disturbances mentioned above. The networks have been compared, resulting in a 79.14% correct classification rate with the LSTM network versus a 84.58% for the CNN, 84.76% for the CNN-LSTM and a 83.66% for the CNN-LSTM with adjusted hyperparameters. All of these networks are tested using real measurements.

**Keywords:** power quality disturbances; long short term memory; convolutional neural network; short time Fourier transform
