**1. Introduction**

A smart grid can be seen as the future of electrical power systems [1–3]. A smart grid requires the monitoring and cooperation of more and more elements, devices, and systems. Thus, it introduces the need for analyzing an increasing amount of data. Single parameter analysis, conducted by humans, has become a thing of the past in terms of the functioning of an electrical power system (EPS). Thus, a need for tools to support the long-term assessment has become very necessary [4–7].

This research is a continuation of previous work [8], which involves a method for analyzing long-term power quality (PQ) data using non-hierarchical clustering and its assessment using global indices in [9]. The presented results in Jasi ´nski et al. [8] were based on 72 cases of clustering, which differ in terms of both the number of clusters (2/25), and also the distance definition of the items in the database (Euclidean, Chebyshev) for the K-mean algorithm. The different constructions of the database were discussed. The direct impact of the distributed generation (DG) on the PQ conditions was obtained when clustering using the K-mean algorithm and the Euclidean distance for non-standardized data that are extended by power consumption, using database C: frequency (f), voltage variations (U), short term flicker severity (Pst), asymmetry (ku2), total harmonic distortion in voltage (THDU), active power (P). Thus, in this article, the same input database was selected. However, the Ward

algorithm is presented in this research, which represents the hierarchical approach. Additionally, this work contains an analysis of the importance rate in order to indicate which parameters have an impact on the final classification. The comparison of clusters, which represent different working conditions of the electrical power network (EPN), obtained automatically, was only conducted for the indicated parameters with a high importance rate but not using a global index, which includes all the parameters as in [9]. Additionally, the next novelty of this work is the proposition of reducing the input database without losing data features. The proposed reduction to one value, instead of three phase-to-phase parameters, assured the classification with a 95% agreement when compared to the complete database classification.

The article is organized into four sections. Section 2 presents the state of the art of literature review. Section 3 describes the definitions and techniques of cluster analysis (CA), with special consideration for the Ward algorithm. Also, Section 3 contains the description of the research object—the EPN of the mining industry with gas-steam units and conducted long-term PQ measurements. Additionally, Section 3 contains the application of the Ward algorithm to PQ data and the results of the analysis with regards to the different working conditions of the EPN. The final element of Section 3 presents a discussion of the obtained results. Section 4 highlights the conclusions.
