**4. Conclusions**

The article presents the application of cluster analysis to long-term power quality measurements obtained in an electrical power network of the mining industry with distributed generation. The selected algorithm, due to its sensitivity to data dissimilarity, was the Ward algorithm. The article contains a discussion of the pros and cons of the hierarchical approach.

The article also contains the analysis of the sensitivity of different (known) working conditions of an electrical power network of the mining industry to the obtained classification. Conditions such as the impact of distributed generation, reconfiguration appearance, or the character of the object schedule (exploitation or maintenance breaks) are indicated. Additionally, the ranking of the impact of the parameter on the classification was conducted using predictor analysis. This analysis indicated that the level of active power, harmonic pollution, and flicker are important with regards to the obtained classification.

The obtained classification indicated the unknown working condition. After the comparison with other groups, the unknown condition was indicated as a high harmonic pollution period of time. Thanks to this, it is possible to analyze a short period of time to find the problem with harmonic pollution in an electrical power network of the mining industry.

The article contains the proposition of reducing a database concerning the calculation of one value that represents three phase-to-phase values. The results were similar (close to 95%), and the calculations were reduced by over 57%.

The presented approach of obtaining automatic data classification with regards to different working conditions (especially distributed generation or the harmonic pollution problem) is an important element of a smart grid. It is worth noting that the presented approach is conducted for area-related analysis—four different measuring points that are considered as common input data.

**Author Contributions:** Conceptualization, M.J. and T.S.; methodology, M.J. and T.S.; software, M.J.; validation, M.J., T.S., K.B.; formal analysis, M.J. and E.J.; investigation, M.J.; resources, M.J., T.S., K.B.; data curation, M.J.; writing—original draft preparation, M.J.; writing—review and editing, T.S.; visualization, M.J. and E.J.; supervision, T.S., Z.L.; project administration, T.S.; funding acquisition, Z.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Chair of Electrical Engineering Fundamentals (K38W05D02), Wroclaw University of Technology, Wroclaw, Poland.

**Acknowledgments:** The authors would like to thank KGHM Polska Mied ´z S.A. for support.

**Conflicts of Interest:** The authors declare no conflict of interest.
