A Piecewise Bound Constrained Optimization for Harmonic Responsibilities Assessment under Utility Harmonic Impedance Changes

Considering the effect of the utility harmonic impedance variations on harmonic responsibility, a method based on piecewise bound constrained optimization is proposed in this paper to evaluate the load harmonic responsibilities. The wavelet packet transform is employed to determine the change times of the utility harmonic impedances. The harmonic monitoring data is divided into several segments where the utility harmonic impedances are considered as constants. Then, the problem of harmonic responsibility assessment under utility harmonic impedance changes are settled by the piecewise bound constrained optimization model. Furthermore, the interior point, the sequential quadratic programming and the active set algorithm are respectively adopted to calculate all the instantaneous harmonic responsibilities of harmonic loads. Finally, the weighted summation is used to calculate the total harmonic responsibility. To demonstrate the validity, simulation tests are carried out on an experimental circuit and the IEEE 13-bus distribution system.


Introduction
With the development of smart grids, increasing numbers of power electronic devices have been connected to distribution networks, which inject a large amount of harmonics [1][2][3][4][5].Various electrical power equipment and electronic products have a strong sensitivity to the harmonics in the distribution network, making harmonic elimination of great importance [6].To address the problem of harmonic pollution, appropriate punishment scheme should be executed according to the harmonic limits recommended by the IEEE or IEC standards.To ensure its implementation, it is necessary to quantitatively evaluate the harmonic responsibility of the major harmonic loads at the point of common coupling (PCC) in distribution networks [7][8][9].
In traditional methods, the key of harmonic responsibility evaluation is to determine the utility harmonic impedance.These works can be mainly classified as fluctuation quantity methods [10,11], linear regression methods [12][13][14] and independent component analysis (ICA) [15,16] methods.Fluctuation quantity methods rely on the fluctuation quantity proportion of harmonic voltage to current for calculating the harmonic impedance.The various regression analysis methods, such as the complex linear least squares [12], non-parametric regression [13] and multiple linear regression [14] methods, Energies 2017, 10, 936 2 of 20 formulate an equation and solve the regression coefficient so as to get the utility harmonic impedance.The complex ICA [15] and FastICA [16] are usually used to estimate the utility harmonic impedance when the utility harmonic variations are neglected.Meanwhile, most of the above methods are based upon the supposition that the utility harmonic are invariant.In a real power grid, the utility harmonic voltage fluctuates due to the load fluctuation.The utility harmonic voltage has a certain influence on the amplitude as well as angle of the harmonic current which affects the harmonic voltage [17,18].Under certain condition, the harmonic voltage and current all fluctuate simultaneously.The methods above cannot reflect the variation of harmonic voltage and current while the influence of utility harmonic voltage fluctuation is considered in [19][20][21].In the previous study of the authors, an adaptive assessment approach [19] for harmonic responsibility under utility harmonic voltage variation was proposed.It has been proved that the utility harmonic voltage can be segmented by hierarchical K-means clustering under the condition of the same utility harmonic impedance.Then, regression methods can be effectively used to calculate the harmonic responsibilities.In the study of utility harmonic voltage fluctuation, the utility harmonic impedance is supposed to be invariant, but the switching of the equipment [22], changes in the reactive power compensation, the state of the distributed generators and the adjustment of the interruptible loads [23] can all result in variations in utility harmonic impedance.Under such an unrealistic assumption, a series of errors may be introduced in the assessment results.Therefore, it is of great significance to evaluate the harmonic responsibility in the presence of utility harmonic impedance changes.
Based on the analysis above, and considering the utility harmonic impedance changes, this paper firstly adopts the wavelet packet transform to detect the change points of the utility harmonic impedance.Then, the harmonic measurement data are segmented.Besides, in order to more accurately evaluate harmonic responsibility, the piecewise bound constrained optimization model and nonlinear optimization method are used to calculate the responsibility of each segment.Finally, the total harmonic responsibility of each harmonic load is obtained based on the data segment length.Section 2 describes the basic principles and conventional method of harmonic responsibility assessment.In Section 3, determination method of the change times of utility harmonic impedance is formulated.Section 4 introduces the piecewise bound constrained optimization method for harmonic responsibility assessment.The process of the novel method for harmonic responsibility assessment, numerical experiments and conclusion are provided in Sections 5-7, respectively.

Basic Principle and Conventional Method of Harmonic Responsibility Assessment
The Norton equivalent circuits can be applied for harmonic modelling of utility and loads [19,24].Figure 1a shows a typical distribution system with two major harmonic loads, where h stands for the harmonic order; Z h s and impedance.The complex ICA [15] and FastICA [16] are usually used to estimate the utility harmonic impedance when the utility harmonic variations are neglected.Meanwhile, most of the above methods are based upon the supposition that the utility harmonic are invariant.In a real power grid, the utility harmonic voltage fluctuates due to the load fluctuation.The utility harmonic voltage has a certain influence on the amplitude as well as angle of the harmonic current which affects the harmonic voltage [17,18].Under certain condition, the harmonic voltage and current all fluctuate simultaneously.The methods above cannot reflect the variation of harmonic voltage and current while the influence of utility harmonic voltage fluctuation is considered in [19][20][21].In the previous study of the authors, an adaptive assessment approach [19] for harmonic responsibility under utility harmonic voltage variation was proposed.It has been proved that the utility harmonic voltage can be segmented by hierarchical K-means clustering under the condition of the same utility harmonic impedance.Then, regression methods can be effectively used to calculate the harmonic responsibilities.In the study of utility harmonic voltage fluctuation, the utility harmonic impedance is supposed to be invariant, but the switching of the equipment [22], changes in the reactive power compensation, the state of the distributed generators and the adjustment of the interruptible loads [23] can all result in variations in utility harmonic impedance.Under such an unrealistic assumption, a series of errors may be introduced in the assessment results.Therefore, it is of great significance to evaluate the harmonic responsibility in the presence of utility harmonic impedance changes.
Based on the analysis above, and considering the utility harmonic impedance changes, this paper firstly adopts the wavelet packet transform to detect the change points of the utility harmonic impedance.Then, the harmonic measurement data are segmented.Besides, in order to more accurately evaluate harmonic responsibility, the piecewise bound constrained optimization model and nonlinear optimization method are used to calculate the responsibility of each segment.Finally, the total harmonic responsibility of each harmonic load is obtained based on the data segment length.Section 2 describes the basic principles and conventional method of harmonic responsibility assessment.In Section 3, determination method of the change times of utility harmonic impedance is formulated.Section 4 introduces the piecewise bound constrained optimization method for harmonic responsibility assessment.The process of the novel method for harmonic responsibility assessment, numerical experiments and conclusion are provided in Sections 5-7, respectively.

Basic Principle and Conventional Method of Harmonic Responsibility Assessment
The Norton equivalent circuits can be applied for harmonic modelling of utility and loads [19,24].Figure 1a shows a typical distribution system with two major harmonic loads, where h stands for the harmonic order; ( 1,2) are the h-th harmonic voltage and current at the PCC, respectively.According to the superposition principle, the h-th harmonic voltage at the PCC is: According to the superposition principle, the h-th harmonic voltage at the PCC is: .
where dots represent the phasors of the voltages or currents, .
V h pcc,1 and .V h pcc,2 denote the harmonic voltage at harmonic load 1 and 2 at the PCC, respectively; Z h pcc.1 and Z h pcc,2 are the equivalent harmonic impedance but harmonic load 1 or 2, respectively; . V h pcc,0 is the harmonic voltage from the utility at the PCC, also known as the utility harmonic voltage.The phasor diagram of the h-th harmonic voltages is shown in Figure 1b.
The harmonic responsibility of harmonic load i (i = 1, 2) at the PCC can be calculated as: where β i is the phase angle between .
V h pcc,i and .
V h pcc .Linear regression is a common assessment method for harmonic responsibilities [12,13], which is based on monitoring the harmonic voltage and current at the PCC.
The normalized h-th harmonic voltage and current at the PCC are related by: .
Figure 1 indicates the harmonic voltage at the PCC is: .
V h pcc can be expressed as: .
It can be seen from Equations (3)-( 5) that in the application of linear regression methods, the harmonic data should meet that the change of the utility harmonic voltage cannot influence the change of the harmonic current.Furthermore, if either the harmonic voltage, current or impedance changes, the accuracy of the regression analysis will be affected.Therefore, the variations of utility harmonics are the main error sources when the regression methods are employed.

Determination of the Change Time of Utility Harmonic Impedance Using Wavelet Packet Transform
In the distribution system, the changes of the operation mode, load or reactive compensation can all lead to changes of the utility harmonic impedance.To accurately calculate the harmonic responsibility, harmonic monitoring data must be properly segmented according to the identified utility harmonic impedance.In this article, the roughly estimates of utility harmonic impedance are used to segment the data.
Due to the complexity of the actual distribution system and the existence of transient processes, the actual utility harmonic impedance changes in a gradual manner.Therefore, it is necessary to choose an effective method to adaptively detect the change.In view of the good performance of wavelet package transform in signal singularity detection, this paper employs the wavelet package transform to detect the change points of the utility harmonic impedance.
In wavelet packet transform, the input signal can be decomposed into low frequency and high frequency components level by level to represent the approximations and details of signal respectively [25]. Figure 2 shows a wavelet packet transform tree with three decomposition levels.The wavelet packet coefficients at each level can be obtained by: where G and H represent a low-pass filter and a high-pass filter, respectively; t is the sampling point; ω is the displacement factor; D n j−1 represents the component at the level j − 1, D 2n j and D 2n+1 j represent the low frequency and high frequency components at the level j, respectively.
Energies 2017, 10, 936 4 of 21 where G and H represent a low-pass filter and a high-pass filter, respectively; t is the sampling point;  is the displacement factor;      The main idea of identifying the variation of utility harmonic impedance using wavelet packet transform is described in the following paragraphs.Since the boundary of the utility harmonic impedance change is not obvious, this paper transforms the identification of change point into the identification of change time window by adding windows, in order to reduce the identification error.The window length is denoted by L. According to Equation (3), if the values of the load harmonic impedances and injected harmonic currents can be considered as constants, the slope of the fitting curve is then a rough estimate of the utility harmonic impedance, and the slopes are approximately equal in this period.If mutation exists in the utility harmonic impedance, the slope of the fitting curve will change sharply compared with the adjacent window.
With regard to small samples, the window length L = 3 can be used to carry out the regression analysis.In the harmonic responsibility assessment, the data points in the time window, which correspond to the mutational utility harmonic impedance, are deleted.The sampling data points in the segments on both sides of the deleted time window can be considered as the data points under the same utility harmonic impedance.
For large samples, a long window length, such as L = 30, should be used to carry out the regression analysis, and the utility harmonic impedance change time can be directly determined through the wavelet packet decomposition curve.
Since high frequency components can reflect the mutational point of the signal, the high frequency band , where M is the sampling number,  is the standard deviation of the high frequency band signal, represents the wavelet packet The main idea of identifying the variation of utility harmonic impedance using wavelet packet transform is described in the following paragraphs.Since the boundary of the utility harmonic impedance change is not obvious, this paper transforms the identification of change point into the identification of change time window by adding windows, in order to reduce the identification error.The window length is denoted by L. According to Equation (3), if the values of the load harmonic impedances and injected harmonic currents can be considered as constants, the slope of the fitting curve is then a rough estimate of the utility harmonic impedance, and the slopes are approximately equal in this period.If mutation exists in the utility harmonic impedance, the slope of the fitting curve will change sharply compared with the adjacent window.
With regard to small samples, the window length L = 3 can be used to carry out the regression analysis.In the harmonic responsibility assessment, the data points in the time window, which correspond to the mutational utility harmonic impedance, are deleted.The sampling data points in the segments on both sides of the deleted time window can be considered as the data points under the same utility harmonic impedance.
For large samples, a long window length, such as L = 30, should be used to carry out the regression analysis, and the utility harmonic impedance change time can be directly determined through the wavelet packet decomposition curve.
Since high frequency components can reflect the mutational point of the signal, the high frequency band D 1 1 , D 3 2 and D 7 3 and obtained by wavelet packet transform are used.Set the threshold value T = σ 2 ln(M), where M is the sampling number, σ is the standard deviation of the high frequency band signal, σ = 2 , S wp represents the wavelet packet coefficients of a high frequency band and its mean is µ.The value below the threshold T is considered to be noise, and the value above T that is the mutation of the signal.Set A, B, and C as the sampling point sets of the change time window in the high frequency band D 1 1 , D 3 2 and D 7 3 respectively.According to the importance of the three high frequency components, in this article, the change time window of the utility harmonic impedance determined by:

The Piecewise Bound Constrained Optimization Model of Harmonic Responsibility Assessment and Its Solution Algorithms
In order to accurately calculate the single sampling point harmonic responsibility and the total harmonic responsibility of harmonic loads, upon the segmentation of the harmonic monitoring data, the harmonic responsibility is then assessed by the piecewise bound constrained optimization in this paper.According to the law of cosines [26], for the triangle XYZ: where ϕ represents the angle contained between sides of lengths x and y and opposite the side of length z.
For Figure 1b, the following equations can be obtained for each measurement at time t i : .
For simplicity, let , and cos θ 2 = γ 5 .In order to estimate the independent variables γ = [γ 1 , γ 2 , γ 3 , γ 4 , γ 5 ], the absolute value of square error can be used as the objective function.The bound constrained optimization model is established as: Energies 2017, 10, 936 6 of 20 where T is the number of sample points; .
. I h b1 (t i ) and .I h b2 (t i ) are the measured values of harmonic voltage and currents respectively.Once the estimated γ = [γ 1 , γ 2 , γ 3 , γ 4 , γ 5 ] is obtained, according to Equation (2), the harmonic responsibility from two major harmonic loads, for each sampling point at t i can be calculated as: Assuming that the monitoring data is divided into N segments and each segment S j (j = 1, 2, • • • , N) corresponds to different utility harmonic impedance, the harmonic responsibility at each segment can be determined by: where is the number of data points in the segment S j .Total harmonic responsibility can be calculated by: ) where µ S j pcc,i is the harmonic responsibility of segment j; ω j is the weight of each segment.Numerous methods have been developed to figure out the bound constrained optimization problem.In this article, the interior-point (IP), the sequential quadratic programming (SQP) and the active set (AS) algorithm, which are all regarded as effective tools for solving nonlinear optimization problems, are selected.
A typical constrained programming problem can be expressed as: The interior-point [27] for constrained optimization is mainly used to solve a variety of approximate optimization problem.For each η > 0 the approximate model can be expressed as: Energies 2017, 10, 936 where s i denotes the slack variable.As η decreases to 0, the minimum of f η approaches to the minimum of f.
The SQP [28] is a kind of approximate Newton's method for solving constrained optimization problems.In each major iteration, the quasi-Newton updating method is firstly used to approach the Hessian of the Lagrangian function.The result is then employed to solve the QP (17) sub-problem: where For the constrained optimization problem, the following equation can be derived by Newton's method: min∇ f (γ where λ is the multiplier; L(γ, λ) denotes the Lagrangian expression for (17); and ∇ 2 γγ L(γ, λ) represents the Hessian of the Lagrangian.
The active set [29] solves the constrained optimization problem by determining the constraints that impact the results.Equation ( 15) can be rewritten as: where A(γ) is a n-dimensional vector containing the evaluated values γ.
In the AS algorithm, the solutions of the Karush-Kuhn-Tucker (KKT) equations can be used to calculate the Lagrange multipliers (L i , i = 1, 2, ..., n).For Equation (19), the KKT equations can be expressed as: Equation ( 20) demonstrates a cancelling of the gradients between the objective function and the active constraints at the solution point.Since the cancelling operation only involves active constraints, the Lagrange multipliers are therefore equal to 0.

The Proposed Harmonic Responsibility Assessment Approach
The working process of the proposed method for harmonic responsibility assessment is illustrated in Figure 3, where ε c and ε t represent the calculation error and the termination tolerance.Firstly, the utility harmonic impedance is roughly calculated by least squares linear regression.Second, the change time windows of the utility harmonic impedance are identified by the wavelet packet transform.Then, the harmonic responsibility of each segment is evaluated by the piecewise bound constrained optimization method.Finally, the total responsibilities of harmonic loads can be obtained by the weighted summation, based on the point numbers of segments.
( ) The process of the proposed approach.

Numerical Experiments
For the distribution system with two major harmonic loads as shown in Figure 1(a), a Norton equivalent circuit model is established in MATLAB [30].Taking the fifth harmonic as example, Table 1 presents the setting of parameter values.The harmonic impedance is modelled as the resistance R and reactance L in series.The system parameters and the injected harmonic currents are set and modified on the basis of [24].In order to simulate practical engineering data, stochastic fluctuations are added to the harmonic data.For harmonic load 1 and 2, the means of the injected harmonic current data are 2.0788 + j0.1356 (A) and 3.8849 − j0.8549 (A) respectively, while the variances are 0.0018 and 0.0061 respectively.For the utility side, the mean of the injected utility harmonic current is 1.0243 − j0.3233 (A).The variances of all the harmonic impedances are 0.001.A total of 1440 harmonic sampling points of harmonic voltage and current data are generated.The change time of utility harmonic impedance are set as 501 and 1001.

Numerical Experiments
For the distribution system with two major harmonic loads as shown in Figure 1a, a Norton equivalent circuit model is established in MATLAB [30].Taking the fifth harmonic as example, Table 1 presents the setting of parameter values.The harmonic impedance is modelled as the resistance R and reactance L in series.The system parameters and the injected harmonic currents are set and modified on the basis of [24].In order to simulate practical engineering data, stochastic fluctuations are added to the harmonic data.For harmonic load 1 and 2, the means of the injected harmonic current data are 2.0788 + j0.1356 (A) and 3.8849 − j0.8549 (A) respectively, while the variances are 0.0018 and 0.0061 respectively.For the utility side, the mean of the injected utility harmonic current is 1.0243 − j0.3233 (A).The variances of all the harmonic impedances are 0.001.A total of 1440 harmonic sampling points of harmonic voltage and current data are generated.The change time of utility harmonic impedance are set as 501 and 1001.For all the measured harmonic data, the least squares are used to carry out linear regression when the value of significance level is 0.05, and the regression coefficient is: where α0 , α1 , α2 are the estimated values of α 0 , α 1 , α 2 in Equation ( 5), that is, .The R 2 statistic, the F statistic and its p value can be calculated as R 2 = 4.44781 × 10 −4 , F = 0.3219 and p = 0.7248, respectively.From the above results, the R 2 statistic and the F statistic are insignificant, and p > 0.05.It is indicated that the regression should be rejected, and the harmonic responsibilities cannot be accurately calculated by the linear regression method under the changes of utility harmonic impedance.Thus, identifying the change times of the utility harmonic impedances is considered in this paper.It is solved by the wavelet packet decomposition method.
The wavelet packet decomposition results of the rough estimation of utility harmonic impedance using the Haar wavelet bases function are shown in Figure 4a,b.In order to select the appropriate wavelet basis, the Haar wavelet 'haar (db1)', Daubechies wavelet 'db4', Symlet wavelets 'sym1' and 'sym4', Coiflet wavelet 'coif4', and Demy wavelet 'dmey' [31] are used respectively to perform analysis and compared in this paper.The identification results of the change time window of utility harmonic impedance under different wavelet bases are shown in Table 2.As the sampling window length is 3, the sampling points of utility harmonic impedance changes set preciously (501 and 1001) are all included in the change time windows determined by wavelet packet transform.It can be seen from Table 2, the various wavelet basis functions can all deliver good performances in identifying the change time window, especially for haar (db1) and sym1 wavelet.
According to the change time window of the utility harmonic impedance [167, 168, 333, 334, 335, 336] determined by wavelet packet transform with haar wavelet, the sampling points (499-504) and (997-1008) are deleted.Then, the harmonic data are divided into three segments, that is (1-498), (505-996) and (1009-1440).On the basis of data segmentation, the piecewise bound constrained optimization methods with three algorithms are used respectively to assess the harmonic responsibility.To accelerate convergence, the least square is adopted to solve the regression coefficients, which are taken as the   On the basis of data segmentation, the piecewise bound constrained optimization methods with three algorithms are used respectively to assess the harmonic responsibility.To accelerate convergence, the least square is adopted to solve the regression coefficients, which are taken as the initial values of the load harmonic impedances Ẑh pcc,1 and Ẑh pcc,2 .Then, the boundary constraints of the load harmonic impedances are set as 0, 2 Ẑh In order to ensure the fairness of algorithm comparison, the parameter settings of the three algorithms in Matlab are modified as follows.The maximum number of iterations is 1000, the maximum number of function evaluations is 5000, the termination tolerance ε t is 1 × 10 −10 , and the values of other parameters are the default values of the 'fmincon' function [30].
For each segment, the theoretical harmonic responsibilities and calculated values obtained by the three algorithms, as well as the means and variances of the relative error between the calculated value and the theoretical value are presented in Table 3.For the two harmonic loads, the harmonic responsibilities for each sample point obtained by the three algorithms are shown in Figure 5.
From the tables and figure above, the calculated values of harmonic responsibility are basically consistent with the theoretical values.For the three algorithms, the mean and the variance of the relative error are all below 0.05 and 4 × 10 −4 respectively.It is evidenced that the piecewise bound constrained optimization model with the three algorithms can assess the harmonic responsibility of harmonic load accurately.In addition, compared with the AS algorithm, the results of IP and SQP algorithms are closer to the theoretical values.
In order to examine how the fluctuation of the harmonic data can affect the three algorithms, the harmonic responsibilities are evaluated while the variances of the load harmonic impedances are set within the range of 0.005 to 0.1.The calculated values of the harmonic responsibilities obtained by the three algorithms are shown in Table 4.In comparison, the SQP algorithm can provide the most accurate and stable results.From the tables and figure above, the calculated values of harmonic responsibility are basically consistent with the theoretical values.For the three algorithms, the mean and the variance of the relative error are all below 0.05 and 4 × 10 −4 respectively.It is evidenced that the piecewise bound constrained optimization model with the three algorithms can assess the harmonic responsibility of harmonic load accurately.In addition, compared with the AS algorithm, the results of IP and SQP algorithms are closer to the theoretical values.
In order to examine how the fluctuation of the harmonic data can affect the three algorithms, the harmonic responsibilities are evaluated while the variances of the load harmonic impedances are set  To compare the calculation times of the three optimization algorithms, the statistic results of calculated time including the maximum values, minimum values, mean values and standard deviations of 100 consecutive runs are shown in Table 5.The results show that the AS algorithm is the fastest, while the IP algorithm is the slowest.Since the harmonic responsibility is usually assessed over a period of time, such as 24 h, the computation times of all three algorithms are acceptable.In order to further reflect the complexity of the actual distribution system, this article also carries out simulations on the IEEE 13-bus distribution system [19,32] as shown in Figure 6.The introduction of IEEE 13-bus distribution system can be seen in Appendix A. The system parameters are referred to [32] and Table A1.In this work, the parameters of the IEEE 13-bus system are converted into the per unit values.In addition, all loads are modeled as the resistance R and reactance L in series.We take bus 3 as the bus of interest, and set load 8 and 10 as the harmonic load 1 (HL1) and harmonic load 2 (HL2), respectively.To simulate the harmonics at the utility side, the harmonic source (HS) is also injected into bus 3.In this work, the change of the The system parameters are referred to [32] and Table A1.In this work, the parameters of the IEEE 13-bus system are converted into the per unit values.In addition, all loads are modeled as the resistance R and reactance L in series.We take bus 3 as the bus of interest, and set load 8 and 10 as the harmonic load 1 (HL1) and harmonic load 2 (HL2), respectively.To simulate the harmonics at the utility side, the harmonic source (HS) is also injected into bus 3.In this work, the change of the reactive power compensation which can lead to the utility harmonic impedance change is analyzed.
The reactive power compensation of the system is set as 4500 kvar, 5500 kvar, and 6500 kvar.As mentioned above, the variances of the injected harmonic currents are set to be 0.005 and 0.1 so as to evaluate how different data fluctuations influence the harmonic responsibility assessment.The injected harmonic currents of each bus for the two cases are shown in Table 6.The simulations of harmonic responsibility assessment are performed in MATLAB.In the simulation process, the harmonic loads are regarded as known PQ constant loads.The Newton-Raphson method [33] is used to calculate the fundamental power flow, and the injected harmonic currents are calculated according to the typical harmonic current frequency spectrum in [32].The fifth harmonic is taken as the example for simulation.A total of 14,400 sampling points are generated, and the reactive compensation quantity is changed for every 4800 points.The results of harmonic load flow are assumed as the measured harmonic data.In consideration of the data fluctuations in the actual system, the window length of wavelet packet transform is set to L = 30.Figure 7 presents the wavelet packet decomposition curves for the harmonic data of the two cases when a Haar wavelet is applied.Referring to Figure 7, the change time window can be approximatively identified as 160 and 320.As the sampling window length is 30, the sampling time of the utility harmonic impedance changes is approximatively to 4800 and 9600, which is consistent with the settings of change times.Thus, the harmonic data are divided into three segments (1-4800), (4801-9600) and (9601-14,400).Then, the piecewise bound constrained optimization model, the three algorithms and the weighted summation are also utilized to compute the total harmonic responsibility for the two cases.The setting of parameters for the three algorithms, as well as the initial values and the boundary constraints have been described previously.Tables 7 and 8 present the theoretical values and calculated values of the harmonic responsibilities obtained by the three algorithms for Case 1 and Case 2, as well as the corresponding means and variances of the relative error between the calculated value and the theoretical values.Referring to Figure 7, the change time window can be approximatively identified as 160 and 320.As the sampling window length is 30, the sampling time of the utility harmonic impedance changes is approximatively to 4800 and 9600, which is consistent with the settings of change times.Thus, the harmonic data are divided into three segments (1-4800), (4801-9600) and (9601-14,400).Then, the piecewise bound constrained optimization model, the three algorithms and the weighted summation are also utilized to compute the total harmonic responsibility for the two cases.The setting of parameters for the three algorithms, as well as the initial values and the boundary constraints have been described previously.Tables 7 and 8 present the theoretical values and calculated values of the harmonic responsibilities obtained by the three algorithms for Case 1 and Case 2, as well as the corresponding means and variances of the relative error between the calculated value and the theoretical values.For the segment 1 of Case 2, the harmonic responsibilities for each sample point of harmonic load 1 obtained by the three algorithms are shown in Figure 9, where Figure 9a shows the results of all the 4800 sampling points, and Figure 9b shows the results of the first 480 sampling points.In order to compare with the conventional regression analysis methods, the harmonic responsibilities obtained by the least square method [12] and the robust least square method [24] are also shown in Figure 9.As shown in Figure 9, the computational accuracy of the proposed method is superior to that of least square method and robust least square method.For the segment 1 of Case 2, the harmonic responsibilities for each sample point of harmonic load 1 obtained by the three algorithms are shown in Figure 9, where Figure 9a shows the results of all the 4800 sampling points, and Figure 9b shows the results of the first 480 sampling points.In order to compare with the conventional regression analysis methods, the harmonic responsibilities obtained by the least square method [12] and the robust least square method [24] are also shown in Figure 9.As shown in Figure 9, the computational accuracy of the proposed method is superior to that of least square method and robust least square method.
all the 4800 sampling points, and Figure 9b shows the results of the first 480 sampling points.In order to compare with the conventional regression analysis methods, the harmonic responsibilities obtained by the least square method [12] and the robust least square method [24] are also shown in Figure 9.As shown in Figure 9, the computational accuracy of the proposed method is superior to that of least square method and robust least square method.The results above illustrate that the proposed approach can get accurate and stable assessment results as the means and variances of the relative error are small.In addition, the calculated values obtained by the three algorithms in Case 2 are similar and close to the theoretical values, which indicate that the impacts of harmonic data fluctuation are insignificant to the three algorithms.In accordance with the test results, the IP and the SQP algorithm are recommended with the priority.

Conclusions
In existence of the utility harmonic impedance variations, the harmonic responsibility cannot be calculated directly using the linear regression method.Thus, this article proposes a technique for  The results above illustrate that the proposed approach can get accurate and stable assessment results as the means and variances of the relative error are small.In addition, the calculated values obtained by the three algorithms in Case 2 are similar and close to the theoretical values, which indicate that the impacts of harmonic data fluctuation are insignificant to the three algorithms.In accordance with the test results, the IP and the SQP algorithm are recommended with the priority.

Conclusions
In existence of the utility harmonic impedance variations, the harmonic responsibility cannot be calculated directly using the linear regression method.Thus, this article proposes a technique for harmonic responsibility assessment by combining wavelet packet transform with piecewise bound constrained optimization approach on the condition of utility harmonic impedance changes.The first contribution lies in the determination of change times of the utility harmonic impedance by the wavelet packet transform, which aims to accurately segment the measured harmonic data according to different utility harmonic impedances.Secondly, the piecewise bound constrained optimization model is established to evaluate the harmonic responsibility of each data segment, which can provide accurate assessment results.Furthermore, the interior point, the sequential quadratic programming and the active set algorithms are utilized to solve this optimization model.Based on the results, the interior point and the sequential quadratic programming can deliver better performance compared with the active set.In the simulation process, the time variation characteristics of the harmonics have been considered.The proposed method has good robustness against the harmonic data fluctuation.Except for the measurement data of harmonic voltage and current, no additional data is required by the proposed method.The future works may focus on the adaptive modeling method for the piecewise bound constrained optimization model, which can conveniently calculate the harmonic responsibility of multiple harmonic loads.

s
are the equivalent harmonic impedance and injected current at the utility side, respectively, while Z h k and .I h k (k = 1, 2) are the equivalent harmonic impedance and injected current of each nonlinear load; .I h bk (k = 1, 2) is the branch harmonic current;.h-th harmonic voltage and current at the PCC, respectively.Energies 2017, 10, 936 2 of 21

I
 are the equivalent harmonic impedance and injected current at the utility side, respectively, while h k Z and ( 1,2) h k I k   are the equivalent harmonic impedance and injected current of each nonlinear load;

Figure 1 .
Figure 1.A typical distribution system with two major harmonic loads and its harmonic voltage phasors: (a) The Norton equivalent circuit; (b) Phasor diagram of the h-th harmonic voltages.

Figure 1 .
Figure 1.A typical distribution system with two major harmonic loads and its harmonic voltage phasors: (a) The Norton equivalent circuit; (b) Phasor diagram of the h-th harmonic voltages.

DD
 represents the component at the level j − 1,  represent the low frequency and high frequency components at the level j, respectively.

Figure 2 .
Figure 2. Wavelet packet decomposition tree with three decomposition levels.

2 D and 7 3 D
and obtained by wavelet packet transform are used.

Figure 2 .
Figure 2. Wavelet packet decomposition tree with three decomposition levels.

Figure 3 .
Figure 3.The process of the proposed approach.

Figure 4 .
Figure 4. Wavelet packet decomposition curves: (a) Wavelet packet decomposition curves of the utility harmonic impedance rough estimation values; (b) The three concerned high frequency components.

Figure 4 .
Figure 4. Wavelet packet decomposition curves: (a) Wavelet packet decomposition curves of the utility harmonic impedance rough estimation values; (b) The three concerned high frequency components.

2 ., 1 .
The initial values for the cosine of phase angle value are set to be 0. Since .and the boundary constraint values are (0, 0, −1, 0, −1) The implementation of IP, SQP and AS are based on the 'fmincon' function in MATLAB.

Figure 5 .
Figure 5.The harmonic responsibilities for each sample point of harmonic loads: (a) The harmonic responsibilities of load 1; (b) The harmonic responsibilities of load 2.

Figure 5 .
Figure 5.The harmonic responsibilities for each sample point of harmonic loads: (a) The harmonic responsibilities of load 1; (b) The harmonic responsibilities of load 2.

Figure 7 .
Figure 7.The wavelet packet decomposition curves for the harmonic data of the two cases: (a) The Case 1; (b) The Case 2.

Figure 7 .
Figure 7.The wavelet packet decomposition curves for the harmonic data of the two cases: (a) The Case 1; (b) The Case 2.

Figure 8 .
Figure 8.The convergence curves of the three algorithms.

Figure 8 .
Figure 8.The convergence curves of the three algorithms.

Figure 9 .
Figure 9.The harmonic responsibilities for each sample point of harmonic load 1: (a) The results of all the 4800 sampling points; (b) The results of the first 480 sampling points.

Figure 9 .
Figure 9.The harmonic responsibilities for each sample point of harmonic load 1: (a) The results of all the 4800 sampling points; (b) The results of the first 480 sampling points.

Table 1 .
Parameter values of the distribution system Norton equivalent circuit.

Table 2 .
Identification results of the change time windows of utility harmonic impedance under different wavelet bases.

Table 2 .
Identification results of the change time windows of utility harmonic impedance under different wavelet bases.

Table 3 .
The harmonic responsibilities obtained by the three algorithms and error statistics.

Table 4 .
The harmonic responsibilities under different variances of the load harmonic impedances.

Table 5 .
The calculated time statistic results of the three optimization algorithms.

Table 6 .
The injected harmonic current for the two cases.

Table 7 .
The harmonic responsibilities and error statistics (Case 1).

Table 8 .
The harmonic responsibilities and error statistics (Case 2).For the segment 1 of Case 1, the convergence curves of the three algorithms are shown in Figure8.It can be observed that the minimum objective function values obtained by IP and SQP algorithms are approximately 173, while the minimum objective function value obtained by AS algorithm is around 184.Compared to IP and SQP, the calculation error of AS algorithm is slightly larger due to the fact it is subject to the premature convergence.

Table A1 .
The main parameters of IEEE 13-bus distribution system.