Harmonic source localization method for the port distribution system based on the stagewise regularized orthogonal matching pursuit algorithm

The application of power electronic technology which is widely used in large mechanical equipment of ports causes inevitable harmonic pollution issues. Due to the small capacity of the port power system, harmonic interference will bring huge security risks to its normal operation. Therefore, it is necessary to carry out the effective localization of the harmonic sources in the grid. In this paper, a harmonic source localization method based on the stagewise regularized orthogonal matching pursuit (SROMP) is proposed by improving the orthogonal matching pursuit (OMP) in a compressed sensing theory. It can achieve accurate localization of harmonic sources only through measurement information analysis, which is significantly superior to traditional methods. First, according to the grid topology and line parameters, a system equation is constructed that takes the node harmonic voltage as the measurement variable and the harmonic current injected to the node as the state variable. Next, the equation is solved to obtain the harmonic current value injected to each node. The result can reflect the harmonic injection situation of each node, so as to determine the position of each harmonic source. In order to test the localization effect of the algorithm under different measurement configurations, the SROMP method is compared with other algorithms in considerable simulation experiments on the improved IEEE-33 model, which verifies the stability and accuracy of the proposed algorithm.


Introduction
An electrified port is an important transportation hub. The stable operation of the regional power grid plays a vital role in port production efficiency and economic development . With the rapid development of modernization, the capacity of the modern port power system is increasing day by day. Power electronic technologies, such as rectification, frequency conversion, and energy feedback (Wang 2013;Hu et al., 2016;Javaid et al., 2020), are being widely used in port electrical equipment, which include the gantry crane, quayside container crane, car dumper, and motor (Ju et al., 2014;Kanellos 2019). The application of these new technologies improves the efficiency of port equipment, but, on the other hand, causes massive harmonic pollution. The deterioration of power quality has become an inevitable problem. The harmonic current increases the loss of distribution transformers and transmission lines, which leads to problems like equipment heating, equipment aging, and capacitor resonance (Elphick et al., 2017;Ho and Lam 2021), so as to reduce the utilization rate of electric energy, reduce the service life of equipment, and put a huge hidden danger to the safe and stable operation of the power system. The harmonic source location is crucial for timely harmonic monitoring and management to effectively solve this problem. Better division of harmonic responsibility can be made only by mastering the distribution of each harmonic source in the power grid, so as to carry out corresponding punishment measures, eliminate harmonic pollution from the root, and improve the reliability of the power supply in the port (Fernandes et al., 2022).
Currently, the research on harmonic source location is mainly divided into two methods, namely, the equivalent circuit method and the harmonic state estimation (HSE) method. The main harmonic source can be determined by understanding which side the point of common coupling occurs using the equivalent circuit method, but the specific position of the harmonic source cannot be determined (Chen et al., 2019). However, HSE can systematically present the harmonic source position accurately to the node by solving the mathematical model, which is a data-driven harmonic source location technology (Bai et al., 2017). Traditional methods of HSE are the least square (LS) method and its improved algorithm, from the LS method based on the power model proposed by G. T. Heydt (1989) for the first time to the singular value decomposition (Xu 2006), sparse representation (Liao 2007), and total least square method (Li 2015). Due to the high installation cost of the measuring device in the power grid, the system is often in a non-globally observable state, and the problems, such as misjudgment of harmonic source, insufficient accuracy, and poor stability arises when the aforementioned methods are applied. Zhang et al. (2021) proposed the HSE method based on the OMP algorithm, which makes up for the aforementioned defects to a certain extent, but still has a high error risk when the system lacks abundant measurement and calculation complexity. Donoho et al. (2012) added the segmentation filtering process to improve the operation speed of OMP, but its accuracy is easy to float in different situations. Needell and Vershynin (2010) proposed regularized orthogonal matching pursuit to realize high precision of reconstruction, while it leads to a longer operation time.
This paper proposes a new HSE method based on SROMP, which realizes an effective harmonic source location when the system lacks substantial amount of measurement devices compared with the aforementioned methods. Compared with the aforementioned methods, it has higher estimation accuracy, favorable calculating speed, and better robustness.

Harmonic state estimation
In the port distribution network as shown in Figure 1, a quay crane (QC) is used to supply power to inshore ships. The merchandise of the port is stored in refrigerated containers. A gantry crane (GC) is used to handle and stack the containers. Electric vehicles (EV) are used to transport the containers. In

Frontiers in Energy Research
frontiersin.org addition, there are some distributed renewable energy like wind power and photovoltaic (PV) power. These can bring harmonic current injection into the grid anywhere, resulting in serious problems.

Fundamental principle of HSE
HSE is constructed on the basis of harmonic measurement information, and its technical basis is a wide area measurement system (WAMS) that can monitor the state of the power grid in real time (Xiao et al., 2021). In WAMS, the synchronous phasor measuring unit (PMU) is installed at the node to obtain its operation parameters. Combined with the network topology and component parameters, the system equation including measurement variables and state variables is established. In case that the system is not globally observable, this equation becomes an underdetermined equation, and the following method can be used to obtain the optimal solution.

Least square
The LS method is a general method to solve the HSE equation.

FIGURE 2
Flow chart of harmonic source localization based on SROMP.

Frontiers in Energy Research
frontiersin.org 03 Assuming that the harmonic information of s nodes is measured by the PMUs in the power grid and there are t state variables in the system, the following mathematical model is established: where F is the s dimensional column vector, X is the t dimensional column vector to be solved, H is the measurement matrix, and e is the error vector. When e is ignored, then, equation1) can be transformed into F HX.
( 2 ) Then, the equation has the LS solution as follows: where H T is the conjugate transpose matrix of H. When s < t, H T H is a singular matrix so that the LS method becomes not suitable for solving the underdetermined equation.

Orthogonal matching pursuit
Compressed sensing is an important theory in signal processing. Traditional data transmission methods follow the Nyquist sampling theorem, which means that the data sampling frequency must be twice higher than the frequency of the original signal in order to make the characteristic of the original signal to be described without distortion, resulting in limited large-scale data transmission. The emergence of the compressed sensing theory breaks through the limitation of the Nyquist sampling theorem. It believes that the sampling theorem is only a sufficient and unnecessary condition for maintaining signal integrity. If the signal is sparse and compressible, the data can be compressed to become a low-dimensional observation signal for transmission, which can replace the original signal. Finally, the signal is reconstructed from the observation signal so that the storage space and transmission quantity of data are reduced and the data transmission speed is improved. At present, the common compressed sensing reconstruction algorithms are divided into the convex optimization algorithm, greedy algorithm, combination algorithm, and statistical algorithm. A greedy algorithm is the most widely used reconstruction algorithm in the field of compressed sensing. This method has less calculation and a fast operation speed. OMP is a greedy algorithm in the theory of compressed sensing. The premise of this method is that the elements in the measurement matrix are independent and uncorrelated, and the state vector is sparse. In that case, equation 2) can be transformed into where X 0 is the 0-norm of X, which represents the number of nonzero elements in X. The principle of OMP is to treat all the columns in the measurement matrix as atoms, calculate the inner product of each atom and the current residual, and find the atom with the strongest correlation with the residual to form a reconstructed measurement matrix, so as to transform the original underdetermined equation to the non-underdetermined equation. The optimal solution is obtained by continuous iteration. Each atom selected by this method is orthogonal to the residual of the next iteration to avoid repeated selection. The OMP method has higher estimation accuracy compared with the LS method. Harmonic order Using the OMP method to locate the harmonic source in the non-globally observable system improves the estimation accuracy to a certain extent. However, since only one atom can be selected in each iteration process, the operation efficiency is slow, and the estimation error of the algorithm increases greatly when the system lacks more measurement devices. Based on the original algorithm, this paper proposes the SROMP algorithm. The segmented screening process refers to the simultaneous selection of multiple atoms in one iteration process. The regularized screening process further filters the selected atom group, which not only accelerates the operation speed of the algorithm, but also ensures the estimation accuracy. This chapter describes in detail the process of applying the improved algorithm to the harmonic source location of the port distribution network. Section 3.1 describes the establishment process of the system equation. Section 3.2 contains the application of the improved algorithm to solve the system equation and the signal reconstruction process. Section 3.3 introduces the evaluation index system.

Establishment of the system equation
It is assumed that the voltage data of M nodes can be obtained in the N-node power grid (M ≤ N). The hth harmonic voltage phasor is taken as the research object. The hth harmonic voltage phasor is obtained using the Fourier decomposition of the voltage data, and the M-dimension column vector is formed as U h . The harmonic voltage vector U h is selected as the measurement variable and the column vector I h composed of the harmonic injection current of N nodes is the state variable. They are associated with the system impedance matrix, which is where Z h is the submatrix of the hth system impedance matrix, composed of rows corresponding to M nodes in the system impedance matrix. Generally, the harmonic sources in the power system have the characteristics of sparse distribution, so I h is a sparse vector which can be solved using the SROMP algorithm. The nodes corresponding to the non-zero elements in I h contain hth harmonic sources, and the other nodes contain no harmonic source.

Equation solving and signal reconstruction
The specific operation process of SROMP is as follows: (1) Each column of Z h is as an atom. Initialize Ω, Ω 0 , and Λ as the null set, where Ω is the primary screening sequence to store the selected atoms' column numbers selected during the segmented screening process. Ω 0 is the secondary screening sequence to store the selected atoms' column numbers in the regularized screening process. Λ is the reconstructed sequence to store all the final selected atoms' column numbers. Let the number of iteration be k = 1. The initialization residual vector e satisfies e(1) U h . (2) The correlation between each atom of Z h and the current residual vector e is calculated by using Eq. 6: where τ is threshold coefficient, usually 2-3. Conduct preliminary screening of atoms using Eq. 7.
(3) Filter the atom sequence satisfying equation8) from the one generated in Step 2: Secondary screening requires the inner product of all atoms in the set and the residual to be less than twice the inner product of other atoms. There are many groups of such sequences, and the group with the largest energy is selected as Ω 0 . The sequence generated by this iteration is added to the final reconstruction sequence.
(4) Approximate the signal by the LS method using the following equation: where Z Λ is the reconstructed measurement matrix, composed of the atoms in Z h corresponding to Λ. Update the residual as (5) If Eq. 12 is satisfied, perform the next step. Or let k k + 1 and return to Step 2. Set σ 10 −6 .
(6) Signal reconstruction based on the final iteration result I h (k) and the reconstructed sequence Λ produces the sparse harmonic injection current estimation vector

Evaluation index
The estimated value of harmonic injection current needs to be compared with the real situation of the power grid. Therefore, it is necessary to simulate the algorithm many times and establish a set of index systems to evaluate the accuracy of the algorithm. The first step is whether the algorithm can identify the actual harmonic source. Set chl as the correct recognition rate. The second step is whether the algorithm will misjudge the nonharmonic source node as the harmonic source. Set whs as the average misjudgment quantity. Finally, the relative error between the estimated value and the actual value is set as rms, which refers to the root mean square percentage error, as shown in the following equations:

Measurement device optimization
Considering the economic cost, the number of PMUs that can be installed in the port distribution network is limited. It is necessary to optimize the location of PMUs to monitor as many nodes as possible with fewer PMUs before the establishment of the measurement equation. The node installed a PMU that can measure the voltage of the node and the current of the branch connected to the node. When the line parameters are known, the voltage of adjacent nodes can be obtained using the circuit theory. First, to obtain a globally observable PMU configuration scheme for the N-node power grid, the following objective function is set: where L represents the number of PMUs. θ i represents the PMU state information at node i. Set b ij as the element of the correlation matrix, the necessary and sufficient condition for the global observability of the system is N j 1 b ij θ j ≥ 1, ∀i 1, 2, ..., N.
The optimal solution is obtained according to the constraint condition and the objective function. PMUs are installed on the corresponding nodes according to PMU status information. After obtaining the optimal measurement configuration scheme for the globally observable system, the PMUs of certain nodes are deleted to form the measurement configuration scheme for the non-globally observable system.

Simulation analysis
Based on the PSCAD\EMTDC v4.6.2 environment, the improved IEEE-33 node model is built, to which 5th and 7th harmonic sources are added. According to the measurement device optimization algorithm mentioned in Chapter 4, the corresponding objective function and constraint conditions of the IEEE-33 system are established, and the optimal configuration scheme of PMU under global observability of the system can be obtained as shown in Figure 3. PMUs are installed in the 11 nodes with asterisk in the figure. Figure 3 shows the distribution of harmonic sources, where 5th harmonic current of 10∠45°A and 20∠-30°is injected into Node 14 and 19, respectively, and 7th harmonic current of 20∠120°A and 30∠-135°A is injected into Node 19 and 29, respectively. The LS, OMP, and SROMP methods are used to

Case 1
When the system is globally observable, all 33 nodes can be measured. Table 1 shows the estimation results of non-zero harmonic injection current, and Table 2 shows the relative error of the estimated value.
From Tables 1, 2, it can be seen that the three methods can correctly determine the location of the four harmonic sources with no harmonic source misjudgment, and the relative errors are all within 5%. The positioning results are relatively accurate.

Case 2
When lacking PMU at Node 8 and Node 7-9 cannot be observed. In this case, the estimation results and relative errors are shown in Tables 3, 4.
It can be seen from Table 3, 4 that although the LS method can judge the position of the four harmonic sources, it misjudges Node 11 as the 5th harmonic source and Node 5 as the 7th harmonic source, resulting in a significant increase in the estimation error, while the OMP method and the SROMP method still maintain high accuracy.

Case 3
When lacking PMUs at Node 11 and Node 27, Node 10-12 and Node 26-28 cannot be observed. The results are shown in Tables 5, 6.
It can be seen that the LS method misjudges Node 10 and 17 as the 5th harmonic sources, Node 23 and 28 as the 7th harmonic sources, and the harmonic current estimation error is too large. The OMP method misjudges Node 23 as the 5th harmonic source, and the estimation error is slightly improved, which is generally not greatly affected. The SROMP method still performs well, with accurate identification of harmonic sources and no misjudgment and the estimation error within 5%, which shows its favorable robustness.

Research on the influence of the quantity of measured nodes on the location effect
The method proposed in this paper has excellent stability. Only a small amount of measurement information is needed to achieve high-precision harmonic source location. The location effect is not affected by the number and position of measurement nodes to a certain extent. In order to verify this point, the number of measurement nodes is reduced one by one from the initial quantity in the situation of global observation. For each quantity level, the observed nodes are randomly selected in 100 simulations, and the estimation results are evaluated using Eqs 13-15. The analysis results are shown in Figures 4, 5. Figures 4A, Bshow the recognition rate of the 5th harmonic source at Node 14 and 19. Figures 5A, B show the recognition rate of the 7th harmonic sources at Node 19 and 29. Figure 4C and Figure 5C are the average number of misjudged harmonic sources of the 5th and 7th harmonic in each simulation. Figure 4D and Figure 5D are the root mean square percentage errors of the 5th and 7th harmonic estimation. It can be seen that three methods are affected by the number of measurement nodes, but the degree of influence is different. When there is a lack of five measurement nodes, the three methods can still maintain a high chl, but the whs and rms of LS rise rapidly, while the indicators of OMP and SROMP remain relatively stable. SROMP is slightly superior to OMP. As the number of measurement nodes gradually decreases, the performance of LS is greatly reduced. When the system lacks half of the measurement nodes, which means there are 16 measurement nodes, the chl of Node 14 and 19 by LS falls to 30% around, whs rises to 17.66 of 5th and 13.84 of 7th, rms arrives at 232.74% of 5th and 149.57% of 7th. Obviously, LS has failed to reflect on the real harmonic source distribution of the system. OMP also creates many problems in the subsequent lack of measurement, with its chl fluctuating within the range of 40%-50%, whs rises to 3.77 of 5th and 4.05 of 7th, rms arrives at 50.12% of 5th and 54.86% of 7 th , when measurement nodes are reduced to half. Only SROMP performs the best, of which the chl remains above 60%, whs is controlled within the two, and rms is limited at about 20% in the aforementioned cases. When measurement nodes are reduced to below 10, the performance of the three methods all deteriorates rapidly, which suggests that favorable harmonic source localization still needs fundamental basis of measurement. In general, SROMP surpasses OMP and LS in the whole performance, which can maintain a highprecision estimation level when the system lacks a large amount of measurement.

Conclusion
This paper proposes a harmonic source location method for the port distribution network based on SROMP, which realizes the determination of the number and location of harmonic sources in the system and the injection of the harmonic current. The algorithm improves the atom screening process on the basis of OMP to acquire a higher operating speed and accuracy. The results show that the proposed algorithm solves the problem of harmonic source localization in the non-globally observable state of the system. It only needs a few measurements to obtain a favorable location effect with no limitation on the configuration scheme of measurement devices. Compared with the OMP and traditional LS method, it has higher practical application and excellent robustness.

Data availability statement
The original contributions presented in the study are included in the article/Supplementary Material: further inquiries can be directed to the corresponding author.

Conflict of interest
RD and CL are employed by the Shinan Power Supply Company and Shanghai Electric Power Company.
The remaining author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Publisher's note All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.