Evaluating Harmonic Distortions on Grid Voltages Due to Multiple Nonlinear Loads Using Artificial Neural Networks

This paper presents a procedure to estimate the impacts on voltage harmonic distortion at a point of interest due to multiple nonlinear loads in the electrical network. Despite artificial neural networks (ANN) being a widely used technique for the solution of a large amount and variety of issues in electric power systems, including harmonics modeling, its utilization to establish relationships among the harmonic voltage at a point of interest in the electric grid and the corresponding harmonic currents generated by nonlinear loads was not found in the literature, thus this innovative procedure is considered in this article. A simultaneous measurement campaign must be carried out in all nonlinear loads and at the point of interest for data acquisition to train and test the ANN model. A sensitivity analysis is proposed to establish the percent contribution of load currents on the observed voltage distortion, which constitutes an original definition presented in this paper. Initially, alternative transient program (ATP) simulations are used to calculate harmonic voltages at points of interest in an industrial test system due to nonlinear loads whose harmonic currents are known. The resulting impacts on voltage harmonic distortions obtained by the ATP simulations are taken as reference values to compare with those obtained by using the proposed procedure based on ANN. By comparing ATP results with those obtained by the ANN model, it is observed that the proposed methodology is able to classify correctly the impact degree of nonlinear load currents on voltage harmonic distortions at points of interest, as proposed in this paper.


Introduction
The increasing utilization of nonlinear loads in electrical systems is significantly producing harmonic distortions on voltage and currents, which are impacting electrical grid power quality.It is the utility's concern to continuously monitor its electrical grid, aiming at detecting suspicious loads that may be contributing to the voltage harmonic distortion above specified limits, observed at some specific locations of interest.So, procedures that could identify which customers' loads are more significant to the increase of voltage harmonic distortion at specific locations in the grid are important to implement a differenced treatment to these customers, aiming at taking remedial actions to mitigate the possible harmonic distortion transgressions.
Currently, a problem of concern that is not completely solved by power quality norms in all countries is to attribute responsibility to customers due to harmonic distortions observed in the electric Different from the previous approaches that consider the PCC as the point of interest, the second approach to treat this problem, found in references [17][18][19][20][21], developed data-based methodologies to determine the harmonic distortion contribution of multiple individual loads at a specific location in the electrical grid, not necessary the PCC.In [18,19], the impact estimate over the harmonic voltage distortion due to a specific harmonic load current is obtained from a linear regression model, supposing that, during the period of analysis, only one load current is varying while the other harmonic load currents, defined as background harmonic sources, are considered constant.To overcome this limitation, in [21], a non-parametric linear regression model is used in which all load currents can vary simultaneously, but the linear regression model is maintained between two successive data measurements.
With respect to applying artificial neural networks to the problem of identifying the contribution of load currents in the voltage harmonic distortion at a point of interest, few works have been reported [22,23], with the ANN use more targeted to estimate the harmonic distortion content of a specific nonlinear load [22] and identification of harmonic sources, as in [22].In [24], the authors used the same methodology developed in [21], however, the effectiveness of different types of neural networks, such as the multilayer perceptron network (MLP), recurrent neural network (RNN), and echo state network (ESN) were tested.In this study, it was found that for small size training data, the ESN offers better results than the others.
Differently from [18,19,21], what is intended in this paper is to develop a new analysis methodology, based on the ANN model, which can be applied to extract dominant patterns embedded in voltage and current measurement campaign data with the purpose of classifying the correlation degree existing among simultaneously measured harmonic load currents and voltage in the electric grid.By using the ANN model, it is possible to determine the harmonic impact that each nonlinear load has on the voltage harmonic distortion, using a sensitivity analysis that is carried out after the ANN has been adequately trained with the measurement campaign data.The sensitivity analysis, as proposed in this paper, is the key point for the application of the ANN model for the problem of identifying the more impacting harmonic sources in the voltage harmonic distortion at a point of interest of the electric grid.
A unique feature of the proposed methodology consists in the simultaneous consideration of all the nonlinear loads throughout the entire measurement period, which was not considered in [18], where it was necessary to choose a specific period where only one load can vary at a time to apply the linear regression model in this specific period.This problem was also treated in [21], where it the entire measurement period was considered.However, the analysis was performed for each load individually.This fact will not occur in the proposed methodology, since in addition to considering the entire measurement period all nonlinear loads are also considered simultaneously in the study.Therefore, the neural network takes into account the interactions of all loads during the model construction.Additionally, the use of neural networks obtains a non-parametric model for systems with intrinsic nonlinear characteristics, for which linear regression techniques lose accuracy, which is the case of harmonic analysis in electrical networks.
The structure of this paper is as follows: In Section 2, the mathematical model of the electrical network is formulated, the artificial neural network model is presented, and the proposed methodology to estimate the harmonic contribution of multiple harmonic-producing loads is formulated; in Section 3, this methodology is applied as case studies in an industrial electrical test system; in Section 4, the results are discussed; and, in Section 5, the main conclusions of this work are presented.

The Proposed Methodology
Figure 1 illustrates a generic electrical system network, representing, schematically, a distribution or transmission grid, four electrical buses, and p nonlinear loads.
In this formulation bus, x is selected as the interest bus at which it is desired to determine how each nonlinear load is affecting the respective voltage harmonic distortion of order, h.For this purpose, an ANN model is proposed to capture and reproduce the intrinsic characteristics of the electrical system under analysis.More specifically, the identified ANN model will represent relationships among the nonlinear loads' harmonic currents and the harmonic voltage at the point of interest, as schematically illustrated by Figure 2.These relationships are similar to harmonic transfer impedances among the output harmonic voltage, Vx h , and the input harmonic currents, Ij h , where h denotes the harmonic order of interest [21].As stated previously, the load currents and the voltage at the bus of interest, as presented in Figure 2, represent time series formed by simultaneous measurements, which are obtained from a measurement campaign, usually carried over a week with data acquisition at each 10 min integration interval, as stated in Brazilian and international standards [1,3].A 10 min integration interval means that a sample of the measured variables, for example, voltage or current, is stored in the measurement database.As the ANN output reference is well known, the input-output relationship can be adequately modeled by a Multilayer Perceptron ANN, whose learning process is achieved by comparing the ANN output with the reference or desired output in each iteration until the A generic electrical power system, adapted from [18].
In this formulation bus, x is selected as the interest bus at which it is desired to determine how each nonlinear load is affecting the respective voltage harmonic distortion of order, h.For this purpose, an ANN model is proposed to capture and reproduce the intrinsic characteristics of the electrical system under analysis.More specifically, the identified ANN model will represent relationships among the nonlinear loads' harmonic currents and the harmonic voltage at the point of interest, as schematically illustrated by Figure 2.These relationships are similar to harmonic transfer impedances among the output harmonic voltage, V x h , and the input harmonic currents, I j h , where h denotes the harmonic order of interest [21].
In this formulation bus, x is selected as the interest bus at which it is desired to determine how each nonlinear load is affecting the respective voltage harmonic distortion of order, h.For this purpose, an ANN model is proposed to capture and reproduce the intrinsic characteristics of the electrical system under analysis.More specifically, the identified ANN model will represent relationships among the nonlinear loads' harmonic currents and the harmonic voltage at the point of interest, as schematically illustrated by Figure 2.These relationships are similar to harmonic transfer impedances among the output harmonic voltage, Vx h , and the input harmonic currents, Ij h , where h denotes the harmonic order of interest [21].As stated previously, the load currents and the voltage at the bus of interest, as presented in Figure 2, represent time series formed by simultaneous measurements, which are obtained from a measurement campaign, usually carried over a week with data acquisition at each 10 min integration interval, as stated in Brazilian and international standards [1,3].A 10 min integration interval means that a sample of the measured variables, for example, voltage or current, is stored in the measurement database.As the ANN output reference is well known, the input-output relationship can be adequately modeled by a Multilayer Perceptron ANN, whose learning process is achieved by comparing the ANN output with the reference or desired output in each iteration until the As stated previously, the load currents and the voltage at the bus of interest, as presented in Figure 2, represent time series formed by simultaneous measurements, which are obtained from a measurement campaign, usually carried over a week with data acquisition at each 10 min integration interval, as stated in Brazilian and international standards [1,3].A 10 min integration interval means that a sample of the measured variables, for example, voltage or current, is stored in the measurement database.As the ANN output reference is well known, the input-output relationship can be adequately modeled by a Multilayer Perceptron ANN, whose learning process is achieved by comparing the ANN output with the reference or desired output in each iteration until the convergence tolerance criteria are met.It is worth mentioning that, for each harmonic frequency of interest, a specific ANN must be trained to accomplish the desired input-output estimation.
In a real electrical system, it is intuitive to understand that it is extremely complex to identify precisely all possible harmonic sources that can be contributing to the harmonic distortions of grid voltages at specific points of interest.So, the configuration presented in Figure 2 must be understood as a set of suspicious harmonic sources that must be analyzed to discover which ones are impacting more with respect to the harmonic distortions on the voltage of interest.So, among all the input nonlinear loads currents, it is intended to determine those that may deserve special attention of the distribution utility.

Characterizing the Individual Loads' Harmonic Impacts
Consider A as the input matrix containing the time series of measured rms values of harmonic currents of bus j, at each specific harmonic order, h; that is, I j h , for j = 1, 2, . . ., p, and h = 1, 2, 3, . . ., m.Also, consider C as the ANN output vector containing the time series of measured rms values of the harmonic voltage at the bus of interest, V x h .Both values for I j h and V x h represent simultaneous measurements time series for the period, T, of the measurement campaign.For a specific harmonic order, h, A and C can be written according to Equations ( 1) and ( 2): Once the ANN is well trained, it can be used to estimate the output voltage, V x h , with an acceptable accuracy for any input vector belonging to the test dataset; that is, input current measurement data that were not used in the ANN training, which result in estimated voltages, V xe h , for measured voltages, V x h .
To determine which individual nonlinear loads are impacting more on the harmonic voltage distortion, the trained ANN is now submitted to new input vectors, which are modified to include small variations in the harmonic currents with respect to the measured values.The objective is to determine how the ANN output voltage is sensitive to the variation of each load current individually.This way, maintaining the other load currents as unchanged, each harmonic load current time series is varied, at a time, by the same amount, ∆I%, and the corresponding resulting harmonic voltage is estimated by the ANN.In doing so, a sensitivity factor can be defined to express the variability of the harmonic voltage with respect to load currents individually.Mathematically, this procedure can be expressed according to Equations (3)-( 5): Energies 2018, 11, 3303 6 of 13 where, A jnew -New input matrix having all current time series unchanged except the one corresponding to I j h new ; V xj h new (k)-New output voltage time series estimated by the ANN with A jnew as input.
Comparing V xj h new (k) with V xe h (k), it can be determined that the V xj h new (k) response presents the biggest variation with respect to the estimated time series, V xe h (k), and, consequently, the nonlinear load current associated with this response can be classified as the most impacting one among the loads considered in the analysis, with respect to the voltage harmonic distortion at the point of interest.
To measure the relative contribution of each nonlinear load to the harmonic voltage distortion, a percent impacting factor, IF VIj h (%), is proposed, as presented in Equation ( 7).These impacting factors may be interpreted as relative percent values that are calculated for each current individually, for the set of nonlinear loads considered in the analysis.
To obtain the percent impacting factor, the mean absolute error (MAE) [25] is calculated between the initial estimated voltage time series and the estimated voltage time series when each current is varied at a time, as presented in Equation ( 6).Other metrics as root mean square error (RMSE), and Euclidian distance (ED), for example, could be used.Using the MAE formulation, it can be written that: And: According to the impact factors definition in Equation (7), they sum 100%, as shown in Equation (8): Figure 3 presents a simplified flowchart diagram describing the main processing tasks involved in the proposed methodology.

Validating the Proposed Methodology
The methodology validation consists in the comparison of the results obtained by the ANN model with reference values calculated by a harmonic load flow program.The alternative transient program (ATP) software [26] was used in this work to validate the methodology, with its built-in Harmonic Frequency Scan (HFS) method chosen for the calculation of harmonic load flows for the harmonic frequencies of interest.The ATP software is a widely used simulation environment in the area of electric power systems, which offers well elaborated and validated models to represent the electric network and its components, as well as numeric and analytical built-in tools for the problem's solutions.
Figure 4 shows the simulation diagram built by ATP Draw for the IEEE 13-bus industrial distribution system used in this work for the methodology validation [27].In this system, four nonlinear loads were specified, which are located at buses B11, B29, B49, and B51.It is worth noting that the methodology also applies to other types of systems, such as transmission and distribution systems.The nonlinear loads are represented by current harmonic sources, power transformers are represented by models with saturation, and linear loads are represented by impedances.
According to the impact factors definition in Equation ( 7), they sum 100%, as shown in Equation ( 8): Figure 3 presents a simplified flowchart diagram describing the main processing tasks involved in the proposed methodology.

Validating the Proposed Methodology
The methodology validation consists in the comparison of the results obtained by the ANN model with reference values calculated by a harmonic load flow program.The alternative transient program (ATP) software [26] was used in this work to validate the methodology, with its built-in Harmonic Frequency Scan (HFS) method chosen for the calculation of harmonic load flows for the harmonic frequencies of interest.The ATP software is a widely used simulation environment in the area of electric power systems, which offers well elaborated and validated models to represent the electric network and its components, as well as numeric and analytical built-in tools for the problem's solutions Figure 4 shows the simulation diagram built by ATP Draw for the IEEE 13-bus industrial distribution system used in this work for the methodology validation [27].In this system, four nonlinear loads were specified, which are located at buses B11, B29, B49, and B51.It is worth noting that the methodology also applies to other types of systems, such as transmission and distribution systems.The nonlinear loads are represented by current harmonic sources, power transformers are represented by models with saturation, and linear loads are represented by impedances.

Database Creation
The database is built from simulation of the time series representing load curves for the nonlinear loads obtaining the respective harmonic voltages.With this procedure, it is intended to simulate in a computer environment (ATP) the measurement campaign that would be performed in the real system by means of synchronized measurements of harmonic currents in each nonlinear load

Database Creation
The database is built from simulation of the time series representing load curves for the nonlinear loads obtaining the respective harmonic voltages.With this procedure, it is intended to simulate in a computer environment (ATP) the measurement campaign that would be performed in the real system by means of synchronized measurements of harmonic currents in each nonlinear load and harmonic voltage at a given bus of interest.As the computing application is a controlled simulation environment, it is possible to calculate accurately the impacts of each load on the harmonic voltage distortion at the bus of interest.
The phase angles of currents representing the nonlinear loads were calculated from a load flow study on fundamental frequency.The nonlinear loads' harmonic currents' magnitudes were obtained simultaneously by a measurement campaign in a real distribution system in the metropolitan area of Manaus City (AM), Brazil, for a period of a week with 1-min integration intervals, summing up 10,080 samples.
These measurement data were inserted to represent the nonlinear loads in the IEEE 13-bus system with the purpose of reflecting a real harmonic generating profile in the simulation studies to calculate the harmonic voltages of interest.It should be noted that these currents form the array expressed in Equation ( 1) to be used in ATP simulation to obtain the array C expressed in Equation ( 2), which emulates the simultaneous harmonic voltages measurements at the point of interest.
A harmonic load flow is run to each of the 10,080.ATP files in the harmonic frequency of interest to obtain the corresponding harmonic voltage magnitudes at the bus of interest.Finally, the harmonic voltages' magnitudes calculated in successive simulations are extracted from the harmonic load flow results as .LIS files.
It is worth mentioning that this whole process is carried out automatically by means of auxiliary programs developed in java, allowing performance of various ATP simulations in loop, providing a faster way to build the database.

Results
For designing the ANN model, the database was divided into a training set, validation set, and test set, with 20% of samples used for testing, and 80% for the ANN training/validation step, which is divided into 80% for training and 20% for validation.Cross-validation was used in the training/validation step to avoid overfitting.During the ANN training step, it the cross-validation method was used, with the Levenberg-Maquardt algorithm chosen for training the MLP type ANN.

Case Study Considering All Four Nonlinear Loads
The ANN designed for this case study consists of four neurons in the input layer, representing the four nonlinear loads' harmonic currents, a hidden layer containing five neurons and one neuron in the output layer, representing the harmonic voltage at the bus of interest, that, in this case study, is Bus 03 (B03).It is worth noting that the ANN structure was obtained by an experimental procedure, with the ANN structure that presented the smallest error chosen.Table 1 shows the ANN results for several ANN configurations, where it can be seen that the lowest average absolute error was achieved using five neurons in the hidden layer.Table 2 presents the activation functions and the ANN training parameters as found in the MatLab, where mu is an adaptive value to assist in the calculation of the ANN performance.These results correspond to the test set only, which contains 2016 voltages samples, and demonstrate that the ANN response tracks fairly well the ATP results as presented in Figure 5a.Also, in Figure 5b, the percent impacts calculated by the proposed methodology compared with reference values obtained by ATP are presented.It can be seen in Figure 5b that the ANN calculated impact factors (IFVIj h (%)) are good estimates for the exact values calculated by ATP.A more detailed description as to how well the ANN model fits the ATP reference model is presented in Table 3 for each nonlinear load or harmonic source (HS1, HS2, HS3, HS4).It is observed that the impact factors calculated by the ANN model are good estimates of the reference values calculated by ATP.These results correspond to the test set only, which contains 2016 voltages samples, and demonstrate that the ANN response tracks fairly well the ATP results as presented in Figure 5a.Also, in Figure 5b, the percent impacts calculated by the proposed methodology compared with reference values obtained by ATP are presented.It can be seen in Figure 5b that the ANN calculated impact factors (IF VIj h (%)) are good estimates for the exact values calculated by ATP.A more detailed description as to how well the ANN model fits the ATP reference model is presented in Table 3 for each nonlinear load or harmonic source (HS1, HS2, HS3, HS4).It is observed that the impact factors calculated by the ANN model are good estimates of the reference values calculated by ATP.Table 3 also presents an Impact Strength Classification (ISC), which denotes the relative importance of each nonlinear load on the harmonic voltage distortion.That is, the bigger the impact factor, is the more the respective nonlinear load contributes to the voltage harmonic distortion at the point of interest.ATP classified load 2 (HS2) as the most impacting, load 4 (HS4) as second, load 3 (HS3) as third, and load 1 (HS1) as the least impacting.The ANN classification obtained the same results as ATP for HS2 and HS4, but has classified HS1 as third and HS3 as fourth.It can also be noted that the ATP's calculated impact factors for HS1 and HS3 are very similar, which indicates they have almost the same impact on the voltage harmonic distortion, which for practical applications, validates the ANN classification.

Case Study Considering Only Three Nonlinear Loads Measured Simultaneously
In this study, it is supposed that only three nonlinear loads from the four system loads will be measured simultaneously with the voltage at the point of interest (B03).The results of impact factors calculated by ATP for the four system loads will be kept as a reference, i.e., one wishes to evaluate if the ANN model identifies correctly the most impacting source (HS2), even when measurement data from some harmonic sources are missing.Different combinations of the three harmonic sources, including source HS2, will be simulated as follows: Case 1 Nonlinear loads HS1-HS2-HS3; Case 2 Nonlinear loads HS1-HS2-HS4; and Case 3 Nonlinear loads HS2-HS3-HS4.
According to the results depicted in Table 4, the ANN model has succeeded in all cases analyzed, classifying correctly HS2 as the most impacting harmonic source.It is worth mentioning that as only three harmonic sources are considered, their relative percent participations sum up 100%.harmonic distortion in a point of interest, now using the smallest simultaneous measurement data set, which corresponds to two nonlinear loads measurements.The following combinations of two loads, including HS2, will be analyzed: Case 4 Nonlinear loads HS1-HS2; Case 5 Nonlinear loads HS2-HS3; and Case 6 Nonlinear loads HS2-HS4.
In all cases analyzed in Table 5, the ANN model confirmed HS2 as the most impacting harmonic source for voltage distortions at bus B03.Again, as only two loads are analyzed at a time, their relative percent impacts sum up 100%.

Discussion
The results presented in Section 3 have shown clearly that the proposed ANN technique is an appropriate tool for identifying the contribution that multiple nonlinear loads have on voltage harmonic distortion at points of interest in the electric grid.The controlled simulation environment, created by the ATP, was a key point to calculate the values of harmonic voltages at the point of interest, and thus obtain the harmonic impacts (exact values), caused by nonlinear loads, HS1, HS2, HS3, and HS4.
In a real electric system operation environment, it is normal to have many nonlinear loads, which makes it very difficult to carry out a simultaneous measurement campaign in all these loads.So, it is very common to have situations in which only a few loads are measured simultaneously.In these cases, with incomplete measurement, it is important to assess whether the ANN is still classifying correctly the most impacting load.This situation was considered in case studies (Sections 3.2 and 3.3), Section 3, demonstrating the ANN model efficacy, which ranked correctly load HS2 as most impacting, which agrees with the classification of case study (Section 3.1), corresponding to the complete measuring system.
The good performance shown by the ANN model in this specific problem makes it a good alternative analysis tool, even when compared to the analytical approach via the harmonic load flow solution, because in this case, it is necessary to model the electric network harmonic impedances, which is not always a simple task.Also, it is expected that future work be done to compare the ANN technique performance to other potential techniques, such as linear multiple regression, regression trees, and others, applied to this specific problem.

Conclusions
This paper presented a practical method to analyze the influence of multiple nonlinear loads over the harmonic distortion measured at points of interest in the electrical grid.The methodology is based on simultaneous measurements of voltage and current, and the application of artificial neural networks models to express the correlation between measured voltage at the grid and the corresponding nonlinear load current at the customer's installation.

Figure 2 .
Figure 2. General representation of the ANN input-output relationship.

Figure 2 .
Figure 2. General representation of the ANN input-output relationship.

Figure 2 .
Figure 2. General representation of the ANN input-output relationship.

Figure 5a presents the
Figure 5a presents the fifth harmonic voltages magnitudes calculated by the ATP simulation, which are considered as reference values, and those calculated by the designed ANN.

Figure 5a presents theFigure 5 .
Figure 5a presents the fifth harmonic voltages magnitudes calculated by the ATP simulation, which are considered as reference values, and those calculated by the designed ANN.

Figure 5 .
Figure 5. (a) Comparing ATP calculated fifth harmonic voltage magnitudes (in blue) at bus B03 with their estimates obtained by the ANN using the test set (in red); (b) comparing percent impacts obtained by ATP and ANN.

Table 1 .
Results for different ANN structures.

Table 3 .
Percent impacts on voltage harmonic distortions due to harmonic sources, HS1, HS2, HS3, and HS4, and respective impact strength classification.

Table 3 .
Percent impacts on voltage harmonic distortions due to harmonic sources, HS1, HS2, HS3, and HS4, and respective impact strength classification.

Table 4 .
Percent impacts on voltage harmonic distortions due to combinations of three harmonic sources and respective impact strength classification.It is supposed now that only two nonlinear loads will have simultaneous measurements with voltage at the point of interest (B03).The results of impacts calculated by ATP for the four system loads are kept as a reference for comparison with the ANN model results.Again, one wishes to evaluate the ANN model performance in classifying the most impacting harmonic source to voltage

Table 5 .
Percent impacts on voltage harmonic distortions due to combinations of two harmonic sources and respective impact strength classification.