Harmonic Source Location and Characterization Based on Permissible Current Limits by Using Deep Learning and Image Processing

: Identiﬁcation of harmonic sources contributing to harmonic distortion, and characterization of harmonic current injected by them, are crucial tasks in harmonic analysis of modern power systems. In this paper, these tasks are addressed based on the permissible current limits recommended by IEEE 519 Standard, with a determination of whether or not injected harmonics are within these limits. If limits are violated, the extent of the violations are characterized to provide information about harmonic current levels in the power system and facilitate remedial actions if necessary. A novel feature extraction method is proposed, whereby each set of harmonic measurements in a power system are transformed into a unique RGB image. Harmonic State Estimation (HSE) is discretized as a classiﬁcation problem. Classiﬁers based on deep learning have been developed to subsequently locate and characterize harmonic sources. The approach has been demonstrated effectively both on the IEEE 14-bus system, and on a real transmission network where harmonics have been measured. A comparative study indicates that the proposed technique outperforms state-of-the-art techniques for HSE, including Bayesian Learning (BL), Singular Value Decomposition (SVD) and hybrid Genetic Algorithm Least Square (GALS) method in terms of accuracy and limited number of monitors.


Introduction
Harmonic monitoring is of great importance in modern power systems with high penetration of Renewable Energy Sources (RES) and a large number of nonlinear loads.The majority of RES generators, including wind farms and solar photovoltaics, are connected to grids via inverters.In addition, RES are typically integrated into power systems as a large number of small Distributed Generators (DGs).High penetration of RES can not only introduce harmonic and interharmonic components into power systems, but different ownerships of DGs can make some harmonic measurements inaccessible for system operators.On the other hand, nonlinear loads and high-frequency switching devices need to be harmonically monitored to ensure that customer power quality (PQ) requirements are met and that adverse effects of harmonics and waveform distortions are avoided [1].
Direct harmonic monitoring of the entire power system can impose a high cost on system operators.Hence, the development of more efficient harmonic monitoring systems is desirable.Reliable harmonic monitoring systems, requiring fewer harmonic monitors, are advantageous, provided that the desired harmonic observability is fulfilled [2].
Indirect monitoring, where harmonic components are calculated or estimated for at least some locations, is an alternative to direct monitoring of harmonics.Indirect monitoring can be implemented at lower cost and/or when direct measurements at some locations are not available.This approach is also referred to as HSE [3].It encompasses analytical and data-based techniques, combined with electrical analysis, to calculate unknown harmonic states throughout the system based on measurements at monitoring locations.Harmonic Energies 2022, 15, 9278 2 of 21 source estimation is a class of HSE where harmonic source currents are considered as the states.
Different techniques have been applied to HSE [4][5][6][7].The Least Square (LS) technique and its variants have been widely used to solve HSE.In [4], uncertainty in transmission line parameters was considered, and the Weighted Least Square (WLS) technique was used to address HSE.The authors in [5] proposed two stages of LS and Euclidian Norm methods to locate harmonic sources.In [6], an evolutionary algorithm was used to minimize the least square error and solve HSE.Least square is sensitive to parameter initialization, which can lead to error.Due to the deficiency of LS techniques in addressing underdetermined HSE problems, SVD has been applied alternatively [8,9].However, there is still a chance to get trapped in a wrong solution due to an infinite number of possible solutions [10].In the recent work of [11], the harmonic sources were located and estimated using the LS and the Genetic Algorithm (GA).Although the number of buses suspected of having harmonic sources was more than the number of measurements (six), only three harmonic sources were operating in each instance.Furthermore, this approach is computationally intensive, making it impractical for real-time HSE of large power systems [11].
Other techniques such as sparsity maximization [2], sensitivity analysis [12,13], and Kalman Filters (KF) have also been used to address HSE.In [2], sparsity maximization was used to solve HSE for an underdetermined system.With nine harmonic meters in place, only five simultaneous harmonic sources could be handled via this method.Sparsity of harmonic sources was an assumption enforced in the methods of [2] and [11].The Kalman Filter (KF) and its variants have been applied to dynamic HSE [14][15][16].In [16], no exact knowledge of the covariance matrix was required.However, KF methods for HSE still require a detailed model of the power system as well as high-resolution timeseries measurements.
BL, as a powerful tool in statistics, was implemented by using Markov Chain Monte Carlo Simulation (MCMCS) to address harmonic source estimation [17][18][19].Although the Bayesian methods proposed in [17][18][19] are useful, they have the drawback that a probability distribution needs to be assumed, a priori, for the unknowns.In addition, an MCMCS needs to be performed for every single estimation, which makes the method time-consuming.
ANN and its variants have been used to address HSE and harmonic source location [3,[22][23][24][25].The strong features of neural networks that make them suitable for HSE application are their adaptability and their capability for nonlinear mapping of intractable functions.In [3,22], measurements from only three harmonic meters were used to estimate five harmonic sources, although all fundamental currents and voltages of the system were included in solving the problem.The authors in [23] used cascade correlation networks, but only for location of harmonic sources.In [24,25], Total Harmonic Distortion (THD) of an unmonitored bus was estimated as a function of voltage and current measurements at DGs.The authors in [26] combined Naïve Bayesian techniques with stages of ANNs and linear regression to solve HSE.FIS and FIS combined with probabilistic NN have also been applied to harmonic source estimation in [27,28], respectively, where the direction of harmonic powers and the sign of the impedance terms were the basis of harmonic source identification.FIS applied to HSE only gave qualitative insights into the level of harmonics.
To reduce harmonic monitoring costs while fulfilling harmonic observability, optimal placement of harmonic meters was addressed in [8,10,27,[29][30][31].In [10,27], network topology was used to determine harmonic meter placement so as to guarantee full harmonic observability.However, the method in [10] may be difficult to apply to large power systems Energies 2022, 15, 9278 3 of 21 with hundreds of buses.The GA [30] and Seeker optimization algorithm [31] were used for harmonic meter placement, by minimizing the weighted least square error of HSE.The authors in [8] proposed an optimal harmonic meter placement by using SVD and elimination of the rows of the measurement matrix with higher condition numbers.In [29], the number of harmonic meters was minimized by using linear programming, provided that full harmonic observability is achieved.
Figure 1 depicts the number of simultaneous harmonic sources vs. the number of harmonic measurements available for different HSE methods in the literature.It can be seen that only the ANN-based methods of [3,22] were successfully applied to cases where fewer measurements were available than the number of harmonic sources present, although in these cases the fundamental voltages and currents were known.All other techniques considered a greater number of harmonic meters than the number of unknown harmonic sources, as the exact locations of harmonic sources were unknown, and buses suspected of hosting harmonic sources were also included in the problem formulation.
identification.FIS applied to HSE only gave qualitative insights into the level of harmonics.
To reduce harmonic monitoring costs while fulfilling harmonic observability, optimal placement of harmonic meters was addressed in [8,10,27,[29][30][31].In [10,27], network topology was used to determine harmonic meter placement so as to guarantee full harmonic observability.However, the method in [10] may be difficult to apply to large power systems with hundreds of buses.The GA [30] and Seeker optimization algorithm [31] were used for harmonic meter placement, by minimizing the weighted least square error of HSE.The authors in [8] proposed an optimal harmonic meter placement by using SVD and elimination of the rows of the measurement matrix with higher condition numbers.In [29], the number of harmonic meters was minimized by using linear programming, provided that full harmonic observability is achieved.
Figure 1 depicts the number of simultaneous harmonic sources vs. the number of harmonic measurements available for different HSE methods in the literature.It can be seen that only the ANN-based methods of [3,22] were successfully applied to cases where fewer measurements were available than the number of harmonic sources present, although in these cases the fundamental voltages and currents were known.All other techniques considered a greater number of harmonic meters than the number of unknown harmonic sources, as the exact locations of harmonic sources were unknown, and buses suspected of hosting harmonic sources were also included in the problem formulation.The idea in this paper is that if harmonic states do not violate standard limits, their accurate estimation is not of great importance provided they are known to be within a bandwidth.This approach will ease the use of powerful Deep Learning (DL) classifiers in a discretized HSE problem.A methodology based on image processing and Deep Learning (DL) is proposed to locate and determine levels of harmonic source currents within a bandwidth and to check whether standard limits on harmonic currents are violated.The proposed method does not require any knowledge of network parameters in the operating The idea in this paper is that if harmonic states do not violate standard limits, their accurate estimation is not of great importance provided they are known to be within a bandwidth.This approach will ease the use of powerful Deep Learning (DL) classifiers in a discretized HSE problem.A methodology based on image processing and Deep Learning (DL) is proposed to locate and determine levels of harmonic source currents within a bandwidth and to check whether standard limits on harmonic currents are violated.The proposed method does not require any knowledge of network parameters in the operating stage.The advantage and effectiveness of the method is demonstrated by comparing outcomes with those when the BL [18], GALS [11], and SVD [8] methods are applied.The contribution of this paper is: (1) For HSE, a new formulation is derived, discretizing it on the harmonic level, enabling application of AI classifiers to determine harmonics within discrete bands.IEEE Standard limits are employed in defining band boundaries.(2) A new technique for harmonic meter placement is proposed by using sensitivity analysis and Monte Carlo Simulation (MCS) whose competence is not degraded when harmonic bus voltages are excluded from the measurements.This will address the case where harmonic bus voltages are not accessible for the network operator.(3) Novel image feature extraction and DL structures are developed to enable fast and efficient harmonic source location and classification in underdetermined systems.
The rest of the paper is organized as per section: (Section 2) harmonic source characterization (localization and estimation), (Section 3) AI system for harmonic monitoring, (Section 4) principles of the proposed method, (Section 5) simulation results and discussion, and (Section 6) conclusion.

Harmonic Source Characterization (Localization and Estimation)
Traditionally, HSE is defined as a mapping from measurements to unknown states, in the presence of measurement errors as in (1) [2].
where Z is the measurement vector comprising M elements, X is the vector of N unknown states, H denotes the measurement matrix, and e is the measurement error vector.The system of equations can be considered as overdetermined, critically determined, and underdetermined for M > N, M = N, and M < N, respectively [29].
The core difference between HSE and fundamental state estimation is that as long as specific harmonic levels are not violated and the desirable level of PQ is fulfilled, the accuracy of harmonics being estimated are not particularly important provided they are known to be within a specified range.Hence, an identifier method that can first locate harmonic sources and then subsequently characterize them, determining whether or not harmonic limits have been violated, could be a useful tool for network operators.Provided that the locations of operating harmonic sources are known, this can bring a discretized version of HSE into the picture, where instead of obtaining a continuous estimation for the i-th element of X, an interval [a i , a i+1 ] is specified to which x i belongs with probability of p i .Let x h lim, i denote the standard limit for harmonic current or voltage of order h at bus i and x i h the i-th unknown harmonic variable of order h.K intervals are defined as (2) with a step factor of f, which is a number lower than unity as (2).The K intervals represent the classes of the harmonic level.The class (c i h ) to which a harmonic value belongs could be defined as (3).
The number of intervals and the step fraction (f) can be customized for any power system based on its PQ requirement.As K increases and f decreases, the discrete problem tends to its continuous counterpart.
Network operators usually follow international or national standards regarding harmonics and waveform distortion.IEEE STD 519-2022 [32] recommends permissible limits for harmonic voltage and current magnitudes at different voltage or current ratings.These standards require that the harmonic current injected by harmonic sources and the harmonic voltage at points of common coupling do not violate the permissible limits.This implies that the exact values of harmonic components are not of great importance, as long as the standard limits are not violated, and the network operator can specify the intervals harmonic components belong to with a degree of certainty.Such an approach provides the opportunity to apply AI classifiers as sophisticated tools to the discrete HSE problem.

Harmonic Source Locator
In this study, prior knowledge about harmonic sources is assumed not to be known.However, some buses in a power system can be assured not to inject any harmonics, such as linear load buses and transformer buses.Hence, a harmonic source locator-a tool for determining the presence or not of harmonic injection at buses-needs to be developed for each bus where a harmonics source may be present.In the event that such information is not available, the harmonic source locator can be developed for every bus in a power system.Let Ns denote the number of buses where harmonic sources are suspected, a binary classifier is developed L i , i = 1, . . .,N s to indicate the presence of an operating harmonic source at bus i, in real time.The classifiers are trained on the training sets for which the harmonic sources' locations are known.The classifier will return 1 if a harmonic source is identified in a bus and zeros otherwise by minimizing the error on the training set.The details on developing classifiers are elaborated in Section 3.

Harmonic Meter Placement
To develop any harmonic monitoring system, suitable harmonic meter locations need to be obtained, to enable better performance compared to the case of randomly picked measurement locations.The objective of this paper is to characterize the harmonic current level of harmonic sources.Hence, the current injected by harmonic sources is excluded from the available measurements.A Monte Carlo-based sensitivity analysis is proposed for selecting locations of harmonic meters.In other words, the most sensitive variables to harmonic injection in a power system are chosen as measurements.
For N s harmonic source buses or suspected of having harmonic sources, consider the vector of harmonic currents I HS h and the vector of harmonic current limits I Lim h for harmonic order h.The uncertain factors in this study are the real and imaginary parts of harmonic source currents.Let the number of MCS runs be represented by N MC and let HS be the number of harmonic orders under evaluation.Rand(N s ) denotes a uniformly distributed vector with the size of N s and 1 (Ns×1) denotes a vector of ones by the size N s .The m-th MCS sample for harmonic source current injection of order h is calculated by: In (4), • denotes a Hadamard product (element-wise product).The consideration of the harmonic current injection limit as a normalizing factor is to integrate the harmonic current limits into the behavior of MCS samples.
The possible measurements throughout the system could be either harmonic bus voltages or harmonic branch currents, which are calculated by (5): where Y f h is the node-to-branch admittance matrix, G h is the branch admittance matrix, and A h denotes the network incidence matrix [33].T denotes the transpose operator.The sensitivity index (SI) is proposed as: Energies 2022, 15, 9278 6 of 21 where abs(.) is the absolute function.SI is a vector with the size of the sum of the number buses (N b ) and the number of branches (N br ).For HM number of measurements, SI is sorted in descending order and the first HM measurements will be chosen as the optimal subset of measurements.To avoid picking measurements with high cross-correlation, if the Pearson correlation coefficient between the newly chosen measurement and previous ones is higher than a threshold (Thresh), that measurement will be removed, and the algorithm will move to the next measurement.The Thresh chosen was 0.75 for the studies of this paper.

AI System for Harmonic Source Characterization
DL has been very well-developed in image processing and classification.One of the most sophisticated architectures of DL is Convolutional Neural Networks (CNNs) [34].DL, particularly CNNs, can provide sophisticated tools for HSE and harmonic analysis, provided that the problem definition is formatted appropriately.Harmonic limits recommended by the standards are defined based on the short circuit level and the fundamental drawn/injected current by a load/generator.HSE could be challenging in the presence of low harmonic levels that still violate standard limits.This is caused by harmonic sources in a weak grid.In addition, unmonitored low harmonic sources near harmonic sinks (nominal active/reactive power generators) can be undetectable by meters.Furthermore, standard limits are defined as a portion of fundamental loads.Hence, the limits could be violated for buses with low nominal loads.Due to these challenges, traditional HSE techniques may be insufficient in modern power systems, and this is where AI techniques such as DL can provide a decent alternative.In this paper, two types of classifiers are developed for harmonic sources: (1) harmonic source locators and (2) a harmonic current level classifier.The harmonic source locator was developed for either the buses suspected of having harmonic sources or for all buses in the power systems, and it returns 1 if a harmonic source is detected at a bus and 0 otherwise.The harmonic current level classifiers were developed by applying the discretization technique in (2) and (3).To use CNN, an image-based feature engineering technique is proposed that transforms the measurement vectors into 3-D arrays of RGB images.Afterward, CNN architectures are designed for both harmonic source locators and harmonic level classifiers.For each harmonic order at each location, one harmonic level classifier is trained, which results in HS × N s classifiers.

Image Formation for Harmonic Measurements
Let Z h = Z h R + jZ h I be the vector of size HM, measurement vector, including harmonic bus voltages and harmonic branch currents, for h-order harmonics.There are 2 × HM × HS available measurements, considering the real and imaginary parts of all measurements.Let 1 (r×r) denote a matrix of ones that will be multiplied by every measurement to replicate its value in the image matrices and hence to increase its intensity in the image.To form an RGB image, three matrices are required (a 3-D array).Accordingly, the image matrices for harmonic measurements are formed as (7).For each phase, a matrix will be formed corresponding to R, G, B in the images.The images will be of the size 2rHM × rHS × 3. Hence, the method is applicable to three-phase HSE in unbalanced power systems.

Deep Learning for HSE
CNNs refer to strong DL structures that employ mathematical convolution in different layers, so-called convolutional layers.CNNs have revealed magnificent performance in applications for which the data have grid-like topologies such as image processing [35].Convolutional layers are usually followed by an activation layer such as Rectified Linear Unit (ReLU) function as (8) and a pooling layer.A pooling function replaces the output of the net at a certain location with a statistic index of the nearby outputs, such as average or maximum [35].In this paper, average pooling has been used.After the convolutional stages, the inputs are fed to Fully Connected (FC) layers with adjustable weights for CNNs and FCs.Consequently, the FC stage outputs are fed to a SoftMax activation layer for classification tasks and to a regression layer for regression tasks.Since the task here is classification of harmonic source locations and current levels, SoftMax has been employed as ( 9) [36] where d i is the output of the neuron i of the last FC layer, w ji the synaptic weight from neuron i to neuron j in the SoftMax layer, b j denotes the bias terms and finally y j , the output of neuron j in the SoftMax layer.The size of the SoftMax layer is equal to the number of output classes and returns a probability for each class, which is useful as it can represent the certainty degree of the classification.

Deep Learning for HSE
CNNs refer to strong DL structures that employ mathematical convolution in different layers, so-called convolutional layers.CNNs have revealed magnificent performance in applications for which the data have grid-like topologies such as image processing [35].Convolutional layers are usually followed by an activation layer such as Rectified Linear Unit (ReLU) function as (8) and a pooling layer.A pooling function replaces the output of the net at a certain location with a statistic index of the nearby outputs, such as average or maximum [35].In this paper, average pooling has been used.After the convolutional stages, the inputs are fed to Fully Connected (FC) layers with adjustable weights for CNNs and FCs.Consequently, the FC stage outputs are fed to a SoftMax activation layer for classification tasks and to a regression layer for regression tasks.Since the task here is classification of harmonic source locations and current levels, SoftMax has been employed as ( 9) [36] where di is the output of the neuron i of the last FC layer, wji the synaptic weight from neuron i to neuron j in the SoftMax layer, bj denotes the bias terms and finally yj, the output of neuron j in the SoftMax layer.The size of the SoftMax layer is equal to the number of output classes and returns a probability for each class, which is useful as it can represent the certainty degree of the classification.Figure 2 depicts the CNN with the size of different layers used in this paper.The input image size and the output SoftMax layer size should be customized for different cases based on their image size and the number of output classes.In supervised learning, first, CNNs will be trained and validated using two sets of data, the training set and the validation set.The weights of the network will be fixed after training, and then the network will be tested using a test set to evaluate the performance.In supervised learning, first, CNNs will be trained and validated using two sets of data, the training set and the validation set.The weights of the network will be fixed after training, and then the network will be tested using a test set to evaluate the performance.Then, the output for any arbitrary data point can be obtained with high accuracy, provided that the network is trained on comprehensive datasets covering the entire range of system operation.If the training data is comprehensive enough to address different topologies of the power system, the trained classifier can be as accurate on arbitrary data under different topologies.A loss function will be minimized to obtain the optimal weights of the network throughout training.Categorical Cross Entropy function with L2-regularization has been employed in this paper as (10) [36]: Accuracy (Acc), as a prevalent index to access a classifier's performance, is defined as the number of correct predictions (N True ) divided by the total number of predictions (N pred ) as in (11).The truth table as another measure is obtained by arranging true classes as rows and the predicted classes as columns.Each datapoint, based on its true class and its predicted class, will be allocated to one cell in the truth table.Each cell shows the number or the ratio of datapoints allocated to it.
Three other well-known indices applicable to binary classifiers (harmonic source locators) are precision (Precis), recall (Rec) and F 1 -score as in (12).A perfect model has an F 1 -score of 100%.

Principles of the Proposed Method
The proposed CNN-based technique is data-driven, which implies that the data of the harmonic sources including their location and the current level should be available for a temporary period to form the training sets.Owing to this data, the proposed classifiers do not require any information of the power system impedance model.This is an advantage compared to traditional HSE techniques.For example, such techniques as SVD, GALS, and BL require the information of the impedance model (measurement matrix) of the system.Moreover, GALS needs the knowledge of at least one bus with zero injection and BL needs the prior probability of the states to be known.The proposed classifier reaches high accuracy for an arbitrary test data set that is not included in the training sets.However, the training data must be comprehensive enough to account for all operating conditions.Figure 3 depicts the flowchart of the proposed method in the design and operating stages.By using the information available in the training stage including nominal load values, short circuit levels for buses suspected of having harmonic sources, Monte Carlo simulation is performed to obtain the appropriate meter location.This will be done in the planning stage of the network.In the design stage for harmonic source locators/current level classifiers, the data of measurements (based on the harmonic meter location), harmonic source locations, and harmonic source currents are assumed to be known for the training sets.The training sets will be used to train the classifiers and when the desirable accuracy is reached, the CNNs' weights will be fixed.The trained CNNs can then be used to characterize (localize and estimate harmonic current levels of) harmonic sources for any arbitrary measurements that has not been used in the training stage.

Simulation Results and Discussion
The proposed methodology was demonstrated on two power systems, through extensive case studies.Synthetic harmonic sources and measurements are first simulated in the IEEE 14-bus system, with real harmonics measurements from the Tasmanian transmission network then used.The approach was compared with the methods in [8,11,18], demonstrating the robustness of the proposed method.Furthermore, the approach whereby training and developing harmonic classifiers based on randomly generated harmonic data and subsequently testing these classifiers based on detailed models of nonlinear loads was evaluated on the IEEE 14-bus test system.

IEEE 14-Bus System with Synthetic Harmonic Data
In this case study, harmonic source classifiers were developed by using randomly generated harmonic data.The data for the IEEE test system can be found in [37].One of the main concerns in this paper was to develop a harmonic classifier that can operate in the ranges considered by the standards such as IEEE 519-2022 [32].Seven harmonic sources were considered, injecting harmonics at buses 3, 5, 6, 9, 10, 12, and 13 of the test system, as shown in Figure 4, which is a modified version of the IEEE 14-bus system [37].Different numbers of harmonic measurement points were considered, including six, five, four, and three measurements, thus making the HSE problem underdetermined in all cases, without any assumptions regarding sparsity or simultaneity of harmonic sources.

Simulation Results and Discussion
The proposed methodology was demonstrated on two power systems, through extensive case studies.Synthetic harmonic sources and measurements are first simulated in the IEEE 14-bus system, with real harmonics measurements from the Tasmanian transmission network then used.The approach was compared with the methods in [8,11,18], demonstrating the robustness of the proposed method.Furthermore, the approach whereby training and developing harmonic classifiers based on randomly generated harmonic data and subsequently testing these classifiers based on detailed models of nonlinear loads was evaluated on the IEEE 14-bus test system.

IEEE 14-Bus System with Synthetic Harmonic Data
In this case study, harmonic source classifiers were developed by using randomly generated harmonic data.The data for the IEEE test system can be found in [37].One of the main concerns in this paper was to develop a harmonic classifier that can operate in the ranges considered by the standards such as IEEE 519-2022 [32].Seven harmonic sources were considered, injecting harmonics at buses 3, 5, 6, 9, 10, 12, and 13 of the test system, as shown in Figure 4, which is a modified version of the IEEE 14-bus system [37].Different numbers of harmonic measurement points were considered, including six, five, four, and three measurements, thus making the HSE problem underdetermined in all cases, without any assumptions regarding sparsity or simultaneity of harmonic sources.Odd harmonic orders up to 23 were evaluated: h = 3, 5, . . ., 23.The harmonic injection levels used in many previous studies, such as [8,11,[17][18][19], are above the limits defined by IEEE Standards and are therefore usually outside the region of interest for network operators.However, in our work, we considered lower levels of harmonic injection, thus both making the problem of harmonic source location and estimation more challenging while also being MVA, and considering a 200% increase in the fundamental load level owing to the presence of a nonlinear load at a given bus, and for a short circuit level of 300 pu, the maximum permissible levels of injected harmonic currents by harmonic sources were calculated in accordance with IEEE Standard 519-2022, shown in Table 1.
Odd harmonic orders up to 23 were evaluated: h = 3, 5, …, 23.The harmonic injection levels used in many previous studies, such as [8,11,[17][18][19], are above the limits defined by IEEE Standards and are therefore usually outside the region of interest for network operators.However, in our work, we considered lower levels of harmonic injection, thus both making the problem of harmonic source location and estimation more challenging while also being more relevant for practical consideration.With base values of Vb = 138 kV and Sb = 100 MVA, and considering a 200% increase in the fundamental load level owing to the presence of a nonlinear load at a given bus, and for a short circuit level of 300 pu, the maximum permissible levels of injected harmonic currents by harmonic sources were calculated in accordance with IEEE Standard 519-2022, shown in Table 1.For different numbers of harmonic meters, the harmonic source currents are desired to be estimated.For each number of harmonic meters, two scenarios were considered: (1) a base scenario where buses with harmonic injection are accessible and their voltage is directly monitored; and (2) the scenario where harmonic source buses are not monitored, and harmonic meters are optimally placed at other buses and lines of the network.The optimal meter locations were obtained using (4)-( 6), as described in Section 3, with NMC = 2 × 10 4 and Thresh = 0.75.Table 2 shows the base metering and the optimal harmonic meter scenarios for different numbers of harmonic meters.This study helps us to understand whether for unmonitored harmonic source buses, an optimal harmonic metering scenario can compete with the direct monitoring of harmonic source voltages.For different numbers of harmonic meters, the harmonic source currents are desired to be estimated.For each number of harmonic meters, two scenarios were considered: (1) a base scenario where buses with harmonic injection are accessible and their voltage is directly monitored; and (2) the scenario where harmonic source buses are not monitored, and harmonic meters are optimally placed at other buses and lines of the network.The optimal meter locations were obtained using (4)-( 6), as described in Section 3, with N MC = 2 × 10 4 and Thresh = 0.75.Table 2 shows the base metering and the optimal harmonic meter scenarios for different numbers of harmonic meters.This study helps us to understand whether for unmonitored harmonic source buses, an optimal harmonic metering scenario can compete with the direct monitoring of harmonic source voltages.128,000 random cases were simulated with current injection included for all harmonic orders, half of which had operating harmonic sources at a suspicious bus.The harmonic magnitude range and phase angle range were assumed to be [0, 300%] of the permissible current limit and [−π/2, π/2] rad, respectively.The uncertainty in the generated data was modeled similar to [18].The uncertainty was assumed to be ±0.5% maximum for harmonic magnitudes and 6 and 9 crad maximum for phase angles of harmonic voltages and harmonic currents, respectively.The data were randomly divided into training sets and test sets as 85% and 15% of the cases, respectively.A total of 20% of the training data was used for validation through the training process.While validation data participate in the training, the test sets were not used in any stage of the training and developing of harmonic classifiers.They were only utilized for evaluating the performance and comparing to other techniques.For each harmonic metering scenario, seven harmonic locators and 77 = 11 × 7 harmonic level classifiers were trained (84 classifiers in total).A harmonic locator trained for a given bus will return a binary number identifying if there is an operating harmonic source at that bus or not.For harmonic level classifiers, f = 0.5 and K = 6 and by replacing the limits in Table 1 in (2) and (3), six classes were obtained in the intervals C 1 : (0,50%], C 2 : [50%, 100%], . . ., C 5 : [200%, 250%], C 6 : [250%, ∞) as a percentage of the permissible limits, out of which four classes violated the standard limits C 3 -C 6 .

Comparison of the Proposed Technique with Established Methods
To demonstrate the inefficiencies of conventional HSE techniques in solving the case studies of this paper, the Markov chain BL technique in [18] was applied to 100 random cases, for the 3rd harmonic with six harmonic meters and the base scenario (base 6).The harmonic source at bus 3 was excluded to make the task critically determined and thus easier.Table 3 shows the harmonic source locators and estimators' accuracy for the other six harmonic sources.As can be seen, the accuracies of the harmonic locators never exceed 66%, while the accuracies of the harmonic level classifiers are lower than 62% and, in some cases, they never exceeded 20%.This proves that even conventional, well-established methods may be insufficient for the case studies of this paper, which were defined in line with the IEEE standard limits.This is because unlike the assumption in [18], the case studies of this paper assumed lower harmonic source current levels corresponding to the low nominal loads and low short circuit levels.By setting r = 5 in ( 7), images of size 60 × 55 × 3 were generated for the case of six harmonic meters.Figure 5 depicts such an image for a sample datapoint.To prove the robustness of the technique, the proposed method was compared with GALS [11] and SVD [8], techniques that are reported to be appropriate for underdetermined cases.By setting r = 5 in ( 7), images of size 60 × 55 × 3 were generated for the case of six harmonic meters.Figure 5 depicts such an image for a sample datapoint.To prove the robustness of the technique, the proposed method was compared with GALS [11] and SVD [8], techniques that are reported to be appropriate for underdetermined cases.Figures 6 and 7 depict the comparison of accuracies for harmonic source locators and harmonic level classifiers on the test sets for scenario Base 6, respectively.It is notable that the data used here are only test data that have not been used in any stage of developing the classifiers.In the methods of [8,11], harmonic source location and estimation were run for all harmonic orders.Through multiple simulations, the 5th harmonic was considered to locate a harmonic source as it showed the best performance of both techniques.
In Figures 6 and 7, the accuracies of harmonic source locators and harmonic level classifiers for different harmonic order and different harmonic sources are presented using the three methods: P: the proposed method, M1: GALS [11], and M2: SVD [8].As can be seen from Figure 6, the performance of the harmonic locators for the proposed method was almost perfect while the two other techniques were mostly predicting one.Hence, they have high recall but low accuracy and precision.The reason for a very low F1-score of techniques M1 and M2 for the bus 3 locator is the skewedness in the data regarding this bus.Except for Bus 3, which had 187 cases of operating harmonic sources (out of 12,800 test cases), every other location had 6400 cases of operating harmonic sources.There were overlaps between these cases which are correspondent to simultaneously operating harmonic sources.It is observed from Figure 7 that for harmonic level classifiers, the performance of the proposed technique was superior compared to M1 and M2, and mostly accuracies beyond 85% were achieved.Moreover, the underdetermined nature of the problem and simultaneous operation of harmonic sources made the techniques M1 and M2 not competent.Figures 6 and 7 depict the comparison of accuracies for harmonic source locators and harmonic level classifiers on the test sets for scenario Base 6, respectively.It is notable that the data used here are only test data that have not been used in any stage of developing the classifiers.In the methods of [8,11], harmonic source location and estimation were run for all harmonic orders.Through multiple simulations, the 5th harmonic was considered to locate a harmonic source as it showed the best performance of both techniques.
In Figures 6 and 7, the accuracies of harmonic source locators and harmonic level classifiers for different harmonic order and different harmonic sources are presented using the three methods: P: the proposed method, M1: GALS [11], and M2: SVD [8].As can be seen from Figure 6, the performance of the harmonic locators for the proposed method was almost perfect while the two other techniques were mostly predicting one.Hence, they have high recall but low accuracy and precision.The reason for a very low F1-score of techniques M1 and M2 for the bus 3 locator is the skewedness in the data regarding this bus.Except for Bus 3, which had 187 cases of operating harmonic sources (out of 12,800 test cases), every other location had 6400 cases of operating harmonic sources.There were overlaps between these cases which are correspondent to simultaneously operating harmonic sources.It is observed from Figure 7 that for harmonic level classifiers, the performance of the proposed technique was superior compared to M1 and M2, and mostly accuracies beyond 85% were achieved.Moreover, the underdetermined nature of the problem and simultaneous operation of harmonic sources made the techniques M1 and M2 not competent.

Performance for Different Harmonic Metering Scenarios
In this subsection, the harmonic source locators and harmonic level classifiers are evaluated for the test data regarding scenarios of Table 2.The resultant accuracies (Acc1) and the F1-score for harmonic source locators are shown in Tables 4 and 5, respectively.As can be seen, all scenarios even for three measurement points only, revealed excellent performance, with the exception of a few locations only.For indirect monitoring (Scenarios Opt 5 and Opt 6), the locator at bus 6 showed some degree of error, while it performed almost perfectly for base scenarios.This is because harmonic voltages of Bus 6 were monitored in all base scenarios, while they were excluded in optimal scenarios; Opt 5 and Opt 6. Bus 6 was equipped with a synchronous condenser, which provides a low-impedance path to ground for harmonic currents, making it hard to locate operating harmonic sources at this bus based on remote measurements.On the other hand, Bus 13 voltage was not monitored in any scenarios.While Base 3 resulted in 50% accuracy for this bus, optimal scenarios (Opt 3-6) performed perfectly, owing to the monitoring of harmonic voltages at Bus 14.Overall, the performance for all metering scenarios was excellent, demonstrating the efficiency of the AI harmonic source locators.Out of 56 harmonic locators, only five (highlighted in yellow) showed accuracy around 50%.In addition, there are two reasons why base scenarios were outperforming the optimal scenarios at some locations: (1) in the optimal scenarios, harmonic sources were assumed to be unmonitored and their harmonic bus voltages were excluded from the measurements; and, (2) the optimal metering

Performance for Different Harmonic Metering Scenarios
In this subsection, the harmonic source locators and harmonic level classifiers are evaluated for the test data regarding scenarios of Table 2.The resultant accuracies (Acc1) and the F1-score for harmonic source locators are shown in Tables 4 and 5, respectively.As can be seen, all scenarios even for three measurement points only, revealed excellent performance, with the exception of a few locations only.For indirect monitoring (Scenarios Opt 5 and Opt 6), the locator at bus 6 showed some degree of error, while it performed almost perfectly for base scenarios.This is because harmonic voltages of Bus 6 were monitored in all base scenarios, while they were excluded in optimal scenarios; Opt 5 and Opt 6. Bus 6 was equipped with a synchronous condenser, which provides a low-impedance path to ground for harmonic currents, making it hard to locate operating harmonic sources at this bus based on remote measurements.On the other hand, Bus 13 voltage was not monitored in any scenarios.While Base 3 resulted in 50% accuracy for this bus, optimal scenarios (Opt 3-6) performed perfectly, owing to the monitoring of harmonic voltages at Bus 14.Overall, the performance for all metering scenarios was excellent, demonstrating the efficiency of the AI harmonic source locators.Out of 56 harmonic locators, only five (highlighted in yellow) showed accuracy around 50%.In addition, there are two reasons why base scenarios were outperforming the optimal scenarios at some locations: (1) in the optimal scenarios, harmonic sources were assumed to be unmonitored and their harmonic bus voltages were excluded from the measurements; and, (2) the optimal metering

Performance for Different Harmonic Metering Scenarios
In this subsection, the harmonic source locators and harmonic level classifiers are evaluated for the test data regarding scenarios of Table 2.The resultant accuracies (Acc 1 ) and the F 1 -score for harmonic source locators are shown in Tables 4 and 5, respectively.As can be seen, all scenarios even for three measurement points only, revealed excellent performance, with the exception of a few locations only.For indirect monitoring (Scenarios Opt 5 and Opt 6), the locator at bus 6 showed some degree of error, while it performed almost perfectly for base scenarios.This is because harmonic voltages of Bus 6 were monitored in all base scenarios, while they were excluded in optimal scenarios; Opt 5 and Opt 6. Bus 6 was equipped with a synchronous condenser, which provides a low-impedance path to ground for harmonic currents, making it hard to locate operating harmonic sources at this bus based on remote measurements.On the other hand, Bus 13 voltage was not monitored in any scenarios.While Base 3 resulted in 50% accuracy for this bus, optimal scenarios (Opt 3-6) performed perfectly, owing to the monitoring of harmonic voltages at Bus 14.Overall, the performance for all metering scenarios was excellent, demonstrating the efficiency of the AI harmonic source locators.Out of 56 harmonic locators, only five (highlighted in yellow) showed accuracy around 50%.In addition, there are two reasons why base scenarios were outperforming the optimal scenarios at some locations: (1) in the optimal scenarios, harmonic sources were assumed to be unmonitored and their harmonic bus voltages were excluded from the measurements; and, (2) the optimal metering placement proposed here was developed based on harmonic level estimation (and not harmonic location), as it is not the main focus of this paper.That said, the optimal scenarios still performed the same as or better than the base scenarios for 19 harmonic source locators (highlighted in green) out of 28.The locators' performance in three cases (cells highlighted in yellow in Table 5) were not reliable even if the accuracy had been high, due to low F 1 -scores.The harmonic current level classifiers were also compared for the different harmonic metering scenarios of Table 2.For brevity, the accuracies of the classifiers on 3rd harmonic currents, 7th harmonic currents, and the average overall harmonic orders are presented in Figure 8. Overall, the performance of all classifiers was excellent.Optimal scenarios outperformed base scenarios for the majority of cases, except for the scenarios with six harmonic meters.As Bus 6 is a harmonic sink, the performance of the base scenarios where Bus 6 voltage was monitored were better for this bus.At Buses 9 and 10, the average performance of the optimal scenarios was superior to the base scenarios, even though the harmonic source buses were not accessible in the optimal scenarios.The 3rd harmonic at bus 5 was also better estimated by the optimal metering scenarios.In addition, for three meters scenarios, the Opt 3 was outperforming the Base 3 at buses 5, 6, 12, and 10, which implies the advantage of the proposed DL technique in dealing with a limited number of harmonic monitors.The performance of the optimal scenarios was comparable with the performance of the base scenarios and for some cases, the former outperformed the latter.However, harmonic bus voltages were not monitored, which can be the case in private prosumers where harmonic bus voltages are not accessible.

Testing Exact Load Model for Classifiers Trained on Random Data
If harmonic classifiers trained on random data can appropriately classify harmonic sources modeled with exact models, the generality and adaptability of the monitoring system will be highlighted.In other words, cases where the specific pattern of the nonlinear load is not known will be addressed provided that comprehensive measured data was used in the training stage.Five types of nonlinear loads, including 6-pulse rectifiers, 12pulse rectifiers, Static Frequency Converters (SFCs), Thyristor-Controlled Reactors (TCR), and DC motors were considered at Buses 3, 6, 9, 10, and 13, respectively.The nonlinear loads were modeled as current sources, where harmonic magnitudes as a percentage of fundamental currents were obtained by field measurements [38].The simulated fundamental current values were extracted via random distribution between zero and the maximum fundamental load current.A total of 1000 cases for each nonlinear load were simulated, and feature images were extracted based on the scenarios Base 6 and Opt 6.The

Testing Exact Load Model for Classifiers Trained on Random Data
If harmonic classifiers trained on random data can appropriately classify harmonic sources modeled with exact models, the generality and adaptability of the monitoring system will be highlighted.In other words, cases where the specific pattern of the nonlinear load is not known will be addressed provided that comprehensive measured data was used in the training stage.Five types of nonlinear loads, including 6-pulse rectifiers, 12-pulse rectifiers, Static Frequency Converters (SFCs), Thyristor-Controlled Reactors (TCR), and DC motors were considered at Buses 3, 6, 9, 10, and 13, respectively.The nonlinear loads were modeled as current sources, where harmonic magnitudes as a percentage of fundamental currents were obtained by field measurements [38].The simulated fundamental current values were extracted via random distribution between zero and the maximum fundamental load current.A total of 1000 cases for each nonlinear load were simulated, and feature images were extracted based on the scenarios Base 6 and Opt 6.The images were classified by the pre-trained classifiers from the previous subsection.Figure 9 shows the classification accuracy for different nonlinear loads in both metering scenarios.It can be seen that the pre-trained network performed well in classifying nonlinear loads newly introduced to the AI monitoring system.As mentioned previously, Bus 3 and Bus 6 were harmonic sinks due to the presence of synchronous condensers, which led to better performance of the base case for 6-pulse and 12-pulse rectifiers, while Opt 6 outperformed Base 6 for SFC, TCR, and DC motors at buses 9, 10, and 13.Table 6 depicts the truth table for the 7th harmonic current classifier of SFC for both metering scenarios.The first number in each cell represents the number of classifications by Base 6, and the second number represents the number of classifications by Opt 6.It can be seen that high accuracies were obtained for both classifiers, while the classifier of Opt 6 performed slightly better, reaching an accuracy of 87%.
Energies 2022, 15, x FOR PEER REVIEW 16 of 21 images were classified by the pre-trained classifiers from the previous subsection.Figure 9 shows the classification accuracy for different nonlinear loads in both metering scenarios.It can be seen that the pre-trained network performed well in classifying nonlinear loads newly introduced to the AI monitoring system.As mentioned previously, Bus 3 and Bus 6 were harmonic sinks due to the presence of synchronous condensers, which led to better performance of the base case for 6-pulse and 12-pulse rectifiers, while Opt 6 outperformed Base 6 for SFC, TCR, and DC motors at buses 9, 10, and 13.Table 6 depicts the truth table for the 7th harmonic current classifier of SFC for both metering scenarios.The first number in each cell represents the number of classifications by Base 6, and the second number represents the number of classifications by Opt 6.It can be seen that high accuracies were obtained for both classifiers, while the classifier of Opt 6 performed slightly better, reaching an accuracy of 87%.

Demonstration of the Method on Real Data
The proposed method was demonstrated using real harmonic measurements from the Tasmanian transmission network, a single-line drawing of which is shown in Figure 10 [39].The transmission network hosts four wind farms as major sources of harmonics.Measured data, around 1000 datapoints, each consisting of 10-minute average harmonic magnitudes for orders 1 to 50, corresponding to the period from 29 March 2021 to 4 April 2021, were used in this paper.Since the level of harmonics in this network is far below the standard limits, the classes were defined with f = 0.025, resulting in five classes in percentages of permissible harmonic limits at each bus: C1: (0, 2.5%], C2: [2.5%, 5%], C3: [5%, 7.5%], C4: [7.5%, 10%], and C5: [10%, ∞).Using the short circuit levels in [39] and applying IEEE

Demonstration of the Method on Real Data
The proposed method was demonstrated using real harmonic measurements from the Tasmanian transmission network, a single-line drawing of which is shown in Figure 10 [39].The transmission network hosts four wind farms as major sources of harmonics.Measured data, around 1000 datapoints, each consisting of 10-minute average harmonic magnitudes for orders 1 to 50, corresponding to the period from 29 March 2021 to 4 April 2021, were used in this paper.Since the level of harmonics in this network is far below the standard limits, the classes were defined with f = 0.025, resulting in five classes in percentages of permissible harmonic limits at each bus: C 1 : (0, 2.5%], C 2 : [2.5%, 5%], C 3 : [5%, 7.5%], C 4 : [7.5%, 10%], and C 5 : [10%, ∞).Using the short circuit levels in [39] and applying IEEE Standard 519 limits, the maximum permissible harmonic limits for wind farm buses in per-unit were calculated and are depicted in Table 7.There were eight harmonic meters in the power system, M1-M8, from which groups of between one and four meters were used in scenarios according to ( 4)-( 6) as: {M8}, {M6, M8}, {M6, M7, M8} and {M2, M6, M7, M8}.In addition, the data contain harmonic currents of the wind farms, which have been used for training and testing the classifiers.Table 8 depicts the accuracy and F 1 -score of the harmonic source locators of WF2 and WF3.Subsequent to training, the indices were calculated for the test sets, which were not used at all during the training stage.It can be observed that all harmonic locators operated with high accuracy.Even for the case of one measurement point only being used, high accuracy and F 1 -score were achieved.Standard 519 limits, the maximum permissible harmonic limits for wind farm buses in per-unit were calculated and are depicted in Table 7.There were eight harmonic meters in the power system, M1-M8, from which groups of between one and four meters were used in scenarios according to ( 4)-( 6) as: {M8}, {M6, M8}, {M6, M7, and {M2, M6, M7, M8}.In addition, the data contain harmonic currents of the wind farms, which have been used for training and testing the classifiers.Table 8 depicts the accuracy and F1-score of the harmonic source locators of WF2 and WF3.Subsequent to training, the indices were calculated for the test sets, which were not used at all during the training stage.It can be observed that all harmonic locators operated with high accuracy.Even for the case of one measurement point only being used, high accuracy and F1-score were achieved.For brevity, the results for the harmonic level classifier of WF4 for different metering scenarios is presented.Figure 11a,b depicts the accuracies on the test set and the entire dataset for different harmonic orders, respectively.The performance was good for most harmonic orders in this limited dataset.However, accuracy was low for harmonic orders  For brevity, the results for the harmonic level classifier of WF4 for different metering scenarios is presented.Figure 11a,b depicts the accuracies on the test set and the entire dataset for different harmonic orders, respectively.The performance was good for most harmonic orders in this limited dataset.However, accuracy was low for harmonic orders 3, 11, and 13, particularly for the test set.This is due to the limited number of datapoints available for training the networks, which compromised the model generality for these orders.More data would improve generality, or otherwise data techniques such as oversampling may improve performance.Moreover, the performance of all four metering scenarios was close, which is because of the inclusion of meter M8 in all scenarios.It implies M8 is the optimal location to locate harmonic sources.For the case of three harmonic meters being used, the truth table of the 11th harmonic current is presented in Table 9 considering the entire dataset.A total of 181 misclassifications happened for 1005 datapoints.Of those, 101 of the misclassifications were between neighbor classes, which could be improved by a better definition of classes when developing the system.022, 15, x FOR PEER REVIEW 18 of 21 3, 11, and 13, particularly for the test set.This is due to the limited number of datapoints available for training the networks, which compromised the model generality for these orders.More data would improve generality, or otherwise data techniques such as oversampling may improve performance.Moreover, the performance of all four metering scenarios was close, which is because of the inclusion of meter M8 in all scenarios.It implies M8 is the optimal location to locate harmonic sources.For the case of three harmonic meters being used, the truth table of the 11th harmonic current is presented in Table 9 considering the entire dataset.A total of 181 misclassifications happened for 1005 datapoints.
Of those, 101 of the misclassifications were between neighbor classes, which could be improved by a better definition of classes when developing the system.To better illustrate the relation between the classification approach of this paper and the actual measured values of current, Figure 12 shows the true value of the 11th harmonic of WF4 along with the minimum and maximum bounds of its class obtained by the trained classifier.It should be noted that the maximum limit of the upmost class (class 5 here) is infinity; however, a limit of 50% of the permissible harmonic current was considered for  To better illustrate the relation between the classification approach of this paper and the actual measured values of current, Figure 12 shows the true value of the 11th harmonic of WF4 along with the minimum and maximum bounds of its class obtained by the trained classifier.It should be noted that the maximum limit of the upmost class (class 5 here) is infinity; however, a limit of 50% of the permissible harmonic current was considered for illustration.As long as datapoints are located between the upper and the lower limits, they were classified correctly.This goal was mostly achieved.The intuition behind classifying the datapoints was to gain information about the bandwidths instead of the exact operating points.More importantly, the goal was to identify any datapoints that violate the limits significantly, beyond which the network operator is required to act.In this paper, the definition of classes was only for presentation of the technique, based on the available data.This technique highlighted the intervals that are important to network operators.Hence, the upper and lower limits assigned to classes and the definition of the final class beyond the upper permissible limit, can be customized for any application and operator preference.illustration.As long as datapoints are located between the upper and the lower limits, they were classified This goal was mostly achieved.The intuition behind classifying the datapoints was to gain information about the bandwidths instead of the exact operating points.More importantly, the goal was to identify any datapoints that violate the limits significantly, beyond the network operator is required to act.In this paper, the definition of classes was only for presentation of the technique, based on the available data.This technique highlighted the intervals that are important to network operators.Hence, the upper and lower limits assigned to classes and the definition of the final class beyond the upper permissible limit, can be customized for any application and operator preference.

Conclusions
In this paper a methodology was proposed for identifying (locating and characterizing) unmonitored harmonic sources, based on the permissible harmonic limits imposed by IEEE standards.Feature images were extracted from available measurements, and DL was then applied to develop AI harmonic classifiers.The analysis of case studies proved that this method is competent, even when few harmonic measurements are available in a network, and can address the problem for which state-of-the-art methods in the literature are insufficient.This highlights that for HSE, unlike fundamental component state estimation, information regarding harmonic source locations and harmonic classes, as opposed to their exact values, are sufficient for network operators to take action.Identification of whether each harmonic source is classified to be critically above permissible limits can then trigger remedial measures such as filter switching.The approach was shown to yield sufficiently high accuracy, even when the number of meters is considerably fewer than the sources to locate, provided sufficient training data is available.Moreover, direct monitoring of harmonic source buses is the best practice as far as locating and characterizing harmonic sources is concerned.However, if measurements at harmonic source buses are not available, the presented AI system with appropriately located harmonic meters can perform as competently, or even outperform, the direct monitoring of harmonic source buses.In addition, it does not require any knowledge of the power system impedance/admittance model.Finally, if an AI monitoring system is trained on randomly generated but comprehensive datasets, it can successfully locate and characterize harmonic sources that resemble the behavior of real, common nonlinear load types owing to the generality of the proposed method.
Author Contributions: A.E., conceptualization, methodology, software, validation, formal analysis, data curation and analysis, writing-original draft preparation, writing-review and editing,

Conclusions
In this paper a methodology was proposed for identifying (locating and characterizing) unmonitored harmonic sources, on the permissible harmonic limits imposed by IEEE standards.Feature images were extracted from available measurements, and DL was then applied to develop AI harmonic classifiers.The analysis of case studies proved that this method is competent, even when few harmonic measurements are available in a network, and can address the problem for which state-of-the-art methods in the literature are insufficient.This highlights that for HSE, unlike fundamental component state estimation, information regarding harmonic source locations and harmonic classes, as opposed to their exact values, are sufficient for network operators to take action.Identification of whether each harmonic source is classified to be critically above permissible limits can then trigger remedial measures such as filter switching.The approach was shown to yield sufficiently high accuracy, even when the number of meters is considerably fewer than the sources to locate, provided sufficient training data is available.Moreover, direct monitoring of harmonic source buses is the best practice as far as locating and characterizing harmonic sources is concerned.However, if measurements at harmonic source buses are not available, the presented AI system with appropriately located harmonic meters can perform as competently, or even outperform, the direct monitoring of harmonic source buses.In addition, it does not require any knowledge of the power system impedance/admittance model.Finally, if an AI monitoring system is trained on randomly generated but comprehensive datasets, it can successfully locate and characterize harmonic sources that resemble the behavior of real, common nonlinear load types owing to the generality of the proposed method.
Figure 2 depicts the CNN with the size of different layers used in this paper.The input image size and the output SoftMax layer size should be customized for different cases based on their image size and the number of output classes.ReLU(x) = max(0, x)
Energies 2022, 15, 9278 9 of 21 Energies 2022, 15, x FOR PEER REVIEW 9 of 21to characterize (localize and estimate harmonic current levels of) harmonic sources for any arbitrary measurements that has not been used in the training stage.

Figure 3 .
Figure 3. Flowchart of the proposed method.

Figure 3 .
Figure 3. Flowchart of the proposed method.
practical consideration.With base values of V b = 138 kV and S b = 100

Figure 4 .
Figure 4. Modified IEEE 14-bus power system with multiple harmonic sources.

Figure 4 .
Figure 4. Modified IEEE 14-bus power system with multiple harmonic sources.

Figure 5 .
Figure 5.The feature image of a sample datapoint for six harmonic meters.

Figure 5 .
Figure 5.The feature image of a sample datapoint for six harmonic meters.

Figure 8 .
Figure 8. Accuracy of harmonic current level classifiers for different metering scenarios: (a) 3rd harmonic, (b) 7th harmonic, (c) average of all harmonic orders.

Figure 8 .
Figure 8. Accuracy of harmonic current level classifiers for different metering scenarios: (a) 3rd harmonic, (b) 7th harmonic, (c) average of all harmonic orders.

Figure 9 .
Figure 9. Accuracy of harmonic current level classifiers for exact load models using pretrained networks.

Figure 9 .
Figure 9. Accuracy of harmonic current level classifiers for exact load models using pretrained networks.

Figure 10 .
Figure 10.Simplified single line diagram of the Tasmanian transmission network.

Figure 10 .
Figure 10.Simplified single line diagram of the Tasmanian transmission network.

Figure 11 .
Figure 11.Accuracy of harmonic level classifiers at WF4 for different metering scenarios: (a) test set, (b) entire dataset.

Figure 11 .
Figure 11.Accuracy of harmonic level classifiers at WF4 for different metering scenarios: (a) test set, (b) entire dataset.

Figure 12 .
Figure 12.True value, upper estimated bound and lower estimated bound for 11th harmonic current of WF4 by using three meters.

Figure 12 .
Figure 12.True value, upper estimated bound and lower estimated bound for 11th harmonic cur-rent of WF4 by using three meters.

Table 1 .
Permissible harmonic current limits (pu) for harmonic sources in IEEE 14-bus test system based on IEEE Standard 519-2022.

Table 1 .
Permissible harmonic current limits (pu) for harmonic sources in IEEE 14-bus test system based on IEEE Standard 519-2022.

Table 2 .
Base and optimal harmonic meter placement for different numbers of harmonic measurements.

Table 3 .
Harmonic source locators and level classifier accuracies for Bayesian Learning.

Table 4 .
Harmonic source locator accuracies for harmonic metering scenarios of Table2.

Table 5 .
Harmonic source locators F 1 -score for harmonic metering scenarios of Table2.

Table 6 .
Truth table for 7th harmonic classifier of SFC at Bus 9 for both metering scenarios Base 6 and Opt 6 (Base 6/Opt 6).

Table 6 .
Truth table for 7th harmonic classifier of SFC at Bus 9 for both metering scenarios Base 6 and Opt 6 (Base 6/Opt 6).

Table 7 .
Permissible harmonic current limits (pu) for harmonic sources in Tasmanian transmission network.

Table 8 .
Harmonic source locators' accuracy and F1-score for WF2 and WF3 in the Tasmanian transmission network.

Table 7 .
Permissible harmonic current limits (pu) for harmonic sources in Tasmanian transmission network.

Table 8 .
Harmonic source locators' accuracy and F 1 -score for WF2 and WF3 in the Tasmanian transmission network.

Table 9 .
Truth Table of 11th harmonic current classifier for WF4 with three harmonic meters.

Table 9 .
Truth Table of 11th harmonic current classifier for WF4 with three harmonic meters.