## 1 Introduction  
Due to the large-scale use of power electronic devices, there has been an increase in distributed power supply grid-connected non-linear loads. Concurrently the proliferation of reactive power devices and solid-state switches cause the power grid to frequently suffer from various interferences. All these factors result in the emergence of various power quality disturbances [1]. Accurate positioning and identification of power quality disturbances is the premise of power quality analysis and governance. Therefore, pattern recognition of power quality disturbances has become a top priority [2]. The classification study of power quality disturbance (PQD) is divided into three stages, feature extraction, feature selection [3] and classifier design. At present, power quality disturbance feature extraction [4; 5; 6; 7; 8] is mainly based on experience and statistics. In the literature [9], the S transform is used for feature extraction, but the S-transformed Gaussian window changes in the same direction as the frequency, which hinders its adaptability for different signals analysis. In reference [10], the authors further applied the multi-resolution S transform to extract the features, but the analysis of the signal was cumbersome. In another reference [6], the feature extraction was performed by using the short-time Fourier transform, but the Fourier transform window function is fixed, the time-frequency resolution is single, and the extracted features lack the multi-resolution features. Researchers [11] have proposed using discrete wavelet transform (DWT) to overcome the fixed-resolution problem of short-time Fourier transform to analyze PQD signals. DWT is especially suitable for automatic detection and feature extraction of PQD, especially in terms of transient interference. Moreover, DWT has multiple resolutions, which can determine the initial feature set more accurately. In recent years, the vast development of data mining, machine learning algorithms and hardware computing capabilities has offered powerful tools to various fields. From the perspective of classifier design, decision trees (DT), probabilistic neural networks (PNN), support vector machines (SVM) and deep neural networks (DNN) have achieved good results in PQD classification. However, the DT [12] classification threshold setting depends on training samples, simultaneously, DT classification has poor generalization ability; compared with DT, PNN [13] is faster and more accurate in general, but it is slower in classifying new cases, PNN requires more storage space than DT; SVM [14, 15] needs to set many parameters and is prone to overfitting. Although the neural network model [16, 17] has a high classification accuracy, its training and classification speed is slower, and the training network requires a large amount of data. In this study, we extend the extreme learning machine (ELM) and propose a hierarchical ELM (H-ELM) framework for ELM-based multilayer perceptron. H-ELM has both the ability to classify small samples and the high accuracy of deep learning classification. At the same time, the framework has a high classification performance. When processing large amounts of data, the classification speed is fast, and its self-learning feature extraction module can greatly prevent the model over-fitting. Most existing studies have aimed to optimize the classifiers and feature extraction, but have lacked consideration of the actual operating conditions of power quality disturbance data. Artificial intelligence applications, however, should be able to consider actual grid data characteristics. There is a data imbalance in the power quality disturbance data collected by the power grid, and there are great differences even with the same type of interference. Most of the existing research is focused on the balanced data of simulation, while they do not pay attention to the above problem. In this paper, the data enhancement method is used to deal with the imbalance of data and to achieve data balance.