A Novel Hybrid GWO-LS Estimator for Harmonic Estimation Problem in Time Varying Noisy Environment

The power quality of the Electrical Power System (EPS) is greatly affected by electrical harmonics. Hence, accurate and proper estimation of electrical harmonics is essential to design appropriate filters for mitigation of harmonics and their associated effects on the power quality of EPS. This paper presents a novel statistical (Least Square) and meta-heuristic (Grey wolf optimizer) based hybrid technique for accurate detection and estimation of electrical harmonics with minimum computational time. The non-linear part (phase and frequency) of harmonics is estimated using GWO, while the linear part (amplitude) is estimated using the LS method. Furthermore, harmonics having transients are also estimated using proposed harmonic estimators. The effectiveness of the proposed harmonic estimator is evaluated using various case studies. Comparing the proposed approach with other harmonic estimation techniques demonstrates that it has a minimum mean square error with less complexity and better computational efficiency.


Introduction
harmonics in EPS is an extremely complex and multimodal problem [5]. Moreover, electrical harmonics are getting more prominent due to the continuous integration of nonlinear power electronics equipment. Time varying noisy environment makes this problem even more complex and dynamic. So, the solution to the harmonic estimation (HE) problem needs to be upgraded [6,7]. The harmonic estimation problem deals with two types of approximations. The first one is the detection of harmonics amplitude and the second one is the detection of the harmonics phase. Amplitude estimation of particular harmonics is a linear problem, while phase and frequency estimation of particular harmonics is a nonlinear problem [8,9]. Frequency estimation of power system harmonics and their transient analysis are also sometimes resolved in harmonic estimation problem [4,10,11].
In literature, researchers solved HE problem via various mathematical, statistical, and heuristic methodologies stated in Figure 1. Initially, mathematical techniques like Fourier transform, fast Fourier transform, and discrete Fourier transform are applied, but their disadvantages, like spectral leakage, picket fence, and those which were only applicable for static signals, lead the researchers to explore more efficient tools for HE problem [12][13][14]. Partial accuracy was achieved by applying Hilbert and wavelet transformation [11,15]. To achieve greater accuracy, artificial intelligence techniques like Fuzzy Logic, Neural Network, Expert systems, and ADALINE are also used [16,17]. Although they had accurate results but their computational efficiency is very low. To enhance computational efficiency, several statistical techniques like Kalman filter (KF), Least square (LS), Least mean square (LMS), Recursive least square (RLS), and Least average value (LAV) were adopted to solve HE problem [18][19][20][21][22]. These techniques had a simple structure, linear behavior, and higher efficiency than mathematical and AI techniques. However, their flaws, like requirement of system information and fine-tuning of the system make them difficult to be utilized.
Recently, hybrid statistical and nature inspired meta-heuristic techniques have acquired huge attention of researchers due to their self-adaptive nature, less computational efficiency, smooth structure, and solving complex engineering problems. Different strategies were reported in literature for addressing HE problem, i.e., Local Ensemble Kalman To enhance computational efficiency, several statistical techniques like Kalman filter (KF), Least square (LS), Least mean square (LMS), Recursive least square (RLS), and Least average value (LAV) were adopted to solve HE problem [18][19][20][21][22]. These techniques had a simple structure, linear behavior, and higher efficiency than mathematical and AI techniques. However, their flaws, like requirement of system information and fine-tuning of the system make them difficult to be utilized.
Recently, hybrid statistical and nature inspired meta-heuristic techniques have acquired huge attention of researchers due to their self-adaptive nature, less computational efficiency, smooth structure, and solving complex engineering problems. Different strategies were reported in literature for addressing HE problem, i.e., Local Ensemble Kalman filter (LETKF) [23,24], Kalman filter and least error square (KFLES) [25], Phase-locked loop (PLL) [24,26], Particle swarm-Passive congregation (PSOPC) [27,28], Genetic Algorithm (GA) [29], Bacterial Foraging-Recursive (BFO-RLS) [30,31], Bacterial Swarming [32], Firefly algorithm (FFALS) [33], Artificial bee (ABCLS) [34], Biogeography-RLS [35], Differential search [36], Gravity search-RLS [37], A modified ABC (MABC) [3], and Frequency shifting-filtering method (FSF) [38]. GWO equipped with evolutionary operators [39] is also implemented for HE problems but it has large computational time due to the addition of tournament, selection, crossover, and mutation operators. Although the accuracy and computational efficiency of the aforementioned techniques are better but they offer complex structures with large controlling parameters. Moreover, above-mentioned studies have not estimated the frequency component of the signals, and the effectiveness of proposed estimators have been validated only on steady state conditions. However, few studies in the literature estimate the frequency component of the electrical signals [40,41], but they have not included transient conditions to authenticate the performance of HE estimator. While there is a dearth of studies [4,10,11] that considered transient conditions in HE problem, the methodologies utilized in the referred studies are based on statistical techniques that provide better accuracy, but their computational efficiency is very low. The accurate estimation of harmonics in an electrical signal (both in steady and transient state) can be further improved with the latest advancements in solution tools.
From the literature survey, it could be observed that each methodology implemented on the HE problem has its own pros and cons. Some techniques had optimal results but poor computational efficiency and some provide great computational efficiency but compromise accuracy. The authenticity of the literature harmonic estimators in the dynamic and composite power system, tends to be lessening. The investigators are advancing towards an updated estimator that can perform well in both steady and transient conditions with less complexity level, more accuracy, and low computational efficiency. So, it still needs a proper solution that can tackle the HE problem with better accuracy, having less computational time than the state-of-the-art techniques. The major contribution of this paper is as follows: • A novel Grey Wolf Optimizer (GWO) and LS-based hybrid estimator is proposed for accurate estimation of harmonics in EPS.

•
The proposed GWO-LS has the ability to cope with HE problems timely in the modern dynamic and complex smart grid/system. • GWO is utilized for accurate estimation of non-linear part, and LS is used for accurate estimation of the linear part of HE problems. • GWO is also utilized for the accurate estimation of frequency components of integral, sub, and inter harmonics.

•
The transient analysis of the case studies is done to ascertain the effectiveness of the proposed GWO-LS harmonic estimator.

•
The proposed harmonic estimator performed better in dynamic and noisy signals, reduces complexity level, and improves the presented harmonic estimator's computational efficiency and accuracy.

•
The effectiveness of the proposed estimator is evaluated on standard test systems used by various researchers.
The rest of the manuscript is organized as: Section 2 discusses the HE problem formulation; Section 3 describes the proposed harmonic estimator. Various case studies are stated in Section 4, the final conclusion is given in Section 5, and future suggestions are conferred in Section 6.

Problem Formulation of Harmonic Estimation
The estimation of electrical voltage or current signals having electrical harmonics of dynamic nature is computed in two stages. The first stage deals with the non-linear approximation of harmonic's phase and frequency by GWO, while the second stage deals with the harmonic's amplitude approximation. Generally, an electrical signal containing harmonics is represented by the summation of sine-cosine functions having higher frequencies values that are integral multiples of the fundamental frequency and is given as [3], where i represents harmonic order, K i shows harmonic amplitude, ω i indicates angular frequency while ϕ i states harmonic's phase. DC offset is shown by K dc exp(−γ dc t) and ω i is given as, The entire model of a signal having noise is given by [37]: here, N t stands for total noise in a specific signal. The digital representation of the above signal is represented as: where s shows sample number and T s represents sampling time. Applying trigonometric identity on the above equation yields: Expanding decaying offset and neglecting higher frequency terms update the above equation as, The equation to be estimated for the estimated signal becomes: where S(s) T and X is the matrix of known and unknown parameters, respectively, while X is updated successfully to approximate signal ∧ Y(s). The amplitude and phase of an unknown ith harmonic with the decaying dc component after the X matrix is updated can be as: Finally, the objective function for the harmonic estimation problem is formulated as [6]: here, Y(s) is our actual power signal while ∧ Y(s) is the final approximated signal by GWO-LS.

Grey Wolf Optimizer
GWO is a nature inspired-heuristic algorithm proposed by Seyed Ali Mirjalili [42] and is widely employed to obtain the optimal solution for various optimization problems. GWO is inspired by the social behavior of grey wolves; naturally, they live in a group form called packs, and the members of each group vary from 5 to 12. Strong social hierarchy is a unique feature of grey wolves. This social hierarchy is based on four ranks of wolves that are termed as alpha (α), beta (β), delta (δ), and omega (ω) wolf. The 'α' is the superior of all because of its leadership quality, managerial skills, and decision-making power, while 'β' wolf is inferior to α and acts as its adviser but discipliner for the rest of the pack. The third level belongs to delta wolves, and they submit themselves to both alpha and beta wolves. They are also helpful in hunting, care-taking of the whole pack. The lowest level of the pack is an omega wolf having lethargic nature.
Another fascinating phenomenon of grey wolves is their unique hunting mechanism, which undergoes five steps: (1) tracking, (2) chasing, (3) encircling, (4) harassing, and (5) attacking. Figure 2 displays the complete hunting process of grey wolves. Figure 2A shows the wolf tracking and chasing, while Figure 2B-D reveals how wolves encircle and harass their prey. Similarly, the attacking behavior of wolves is depicted in Figure 2E. The encircling behavior of the grey wolf is modeled using the following equations.
where y presents the current iteration, D shows the distance between specific wolf and prey while where → a is computed using → a = 2 − 1 * (2/max_iter), and its value decreases from 2 to 0. → C is a control variable having a value in the range of 0-2 while c 1 and c 2 are two random numbers between [0, 1]. The hunting mechanism of the grey wolf is modeled by: Energies 2021, 14, 2587 6 of 26 here, P α and D α represent the position of α from the prey and distance between α and prey, respectively. Similarly, P β , P δ , D β , and D δ describe the position and distance of respective wolves. The grey wolves terminate the hunting step by attacking the prey, and the attacking phenomenon relates to the exploitation phase of the GWO algorithm. The value of a decreases from 2 to 0 to model the attacking behavior. The position vector A is a random value in the range of [−2a, 2a]. When the value of variable A lies in [−1, 1], the new position of the searching agent can be generated at any point between its current location and the prey location. If |A| < 1 (convergence), this value compels the wolf for attacking the prey, while if |A| > 1 (divergence) wolves search more for the better prey (exploration process) as shown in Figure 3. Another coefficient vector C supports the searching mechanism of GWO, and it describes the obstacles which can occur in nature during the hunting step. The value of C allows the wolf to prevent obstacles and approach the prey. Therefore, we can say that A and C are the control variables here.
Energies 2021, 14, x FOR PEER REVIEW 6 of 2 here, and represent the position of from the prey and distance between an prey, respectively. Similarly, , , , and describe the position and distance o respective wolves. The grey wolves terminate the hunting step by attacking the prey, an the attacking phenomenon relates to the exploitation phase of the GWO algorithm. Th value of decreases from 2 to 0 to model the attacking behavior. The position vector is a random value in the range of [−2 , 2 ]. When the value of variable lies in [−1, 1 the new position of the searching agent can be generated at any point between its curren location and the prey location. If | | < 1 (convergence), this value compels the wolf fo attacking the prey, while if | | > 1 (divergence) wolves search more for the better pre (exploration process) as shown in Figure 3. Another coefficient vector supports th searching mechanism of GWO, and it describes the obstacles which can occur in natur during the hunting step. The value of allows the wolf to prevent obstacles and ap proach the prey. Therefore, we can say that and are the control variables here.

Hybrid GWO-LS Harmonic Estimator
In this paper, a hybrid of statistical technique Least square method (LSM) [43] and meta-heuristic technique GWO is proposed to solve the HE problem. The purpose of hy bridizing two different nature techniques is to minimize the computational burden, in creasing computational efficiency and accurate estimation of harmonics. The prominen feature of GWO is its social hierarchy and is well adapted for solving complex problem Energies 2021, 14, x FOR PEER REVIEW here, and represent the position of from the prey and distance betwee prey, respectively. Similarly, , , , and describe the position and dis respective wolves. The grey wolves terminate the hunting step by attacking the p the attacking phenomenon relates to the exploitation phase of the GWO algorit value of decreases from 2 to 0 to model the attacking behavior. The position is a random value in the range of [−2 , 2 ]. When the value of variable lies i the new position of the searching agent can be generated at any point between it location and the prey location. If | | < 1 (convergence), this value compels the attacking the prey, while if | | > 1 (divergence) wolves search more for the be (exploration process) as shown in Figure 3. Another coefficient vector supp searching mechanism of GWO, and it describes the obstacles which can occur i during the hunting step. The value of allows the wolf to prevent obstacles proach the prey. Therefore, we can say that and are the control variables h

Hybrid GWO-LS Harmonic Estimator
In this paper, a hybrid of statistical technique Least square method (LSM) [ meta-heuristic technique GWO is proposed to solve the HE problem. The purpo bridizing two different nature techniques is to minimize the computational bu creasing computational efficiency and accurate estimation of harmonics. The pr

Hybrid GWO-LS Harmonic Estimator
In this paper, a hybrid of statistical technique Least square method (LSM) [43] and a meta-heuristic technique GWO is proposed to solve the HE problem. The purpose of hybridizing two different nature techniques is to minimize the computational burden, increasing computational efficiency and accurate estimation of harmonics. The prominent feature of GWO is its social hierarchy and is well adapted for solving complex problems, and its working methodology is explained in the previous section, while the selection of LSM to develop the proposed harmonic estimator is based on various reasons. Firstly, it reduces the computational time of the GWO. Secondly, it moves to an exact solution as a statistical technique rather than trapping in local optima. So, it provides accurate results in linear estimation (Estimation of harmonic amplitude) of the HE problem. Thirdly it reduces the computational burden of the GWO and improves the convergence characteristics of GWO-LS as a whole. In the proposed hybrid harmonic estimator, LSM is utilized for accurate estimation of the linear part (harmonic amplitude) of the HE problem, while GWO is utilized for a proper approximation of the non-linear part (harmonic phase and frequency) of the HE problem.
For proper estimation of harmonics in the desired signal, H t which is a matrix of grey wolves having t number of searching agents are initialized according to a number of power system harmonics to be estimated. The objective function of the HE problem is to minimize Mean Square Error (MSE). First of all, a matrix of t number of searching agents (Grey Wolves) is defined where the location of a single searching agent consists of t number of harmonics.
Numerous searching agents combine to form an agent matrix H t .
here, t indicates the population size of grey wolves, and i is the total harmonics number in a single search agent. A single searching agent consists of various locations, and these locations are equal to the total number of harmonics in a signal. The location of each search agent is initialized randomly as follows: where B L and B U are the lower and upper bounds specified by the HE problem, respectively. The GWO-LS estimator aims to properly approximate the harmonics' amplitude and phase of the harmonics in a time-varying noisy environment. The error signal, which is obtained by the comparison of the actual signal and approximated signal, is fed to the optimization framework. This framework operates to derogate the estimation error until best result is obtained. The proposed harmonic estimator GWO-LS is said to be the least complex estimator due to the smaller number of control variables. It has only two control variables irrespective of GA-LS having four, PSO-LS having five, BFO having four, F-BFO-LS having six, BFO-RLS having four, BBO-RLS having four, GSA-RLS having five, and MABC having four controlling variables that improve the computational time ultimately. The detail description of GWO-LS tuning parameters is given in Table 1 while the detailed flowchart of GWO-LS is depicted in Figure 4.

Computational Procedure
The proposed methodology to solve the HE problem comprises of following steps: • Load input database. • A signal named "original signal" is formulated by utilizing an input database.

Simulation Results and Discussion
In this paper, two case studies are utilized to validate the effectiveness of the proposed harmonic estimator. These case studies are widely used in literature for the comparative analysis of the HE problem and are given as: 1. Test System I: Estimating integral harmonics without including Sub and Inter harmonics in

Computational Procedure
The proposed methodology to solve the HE problem comprises of following steps:

Simulation Results and Discussion
In this paper, two case studies are utilized to validate the effectiveness of the proposed harmonic estimator. These case studies are widely used in literature for the comparative analysis of the HE problem and are given as:

1.
Test System I: Estimating integral harmonics without including Sub and Inter harmonics in time-varying noisy environments.

2.
Test System II: Estimation of integral harmonics including Sub and Inter harmonics in a time-varying noisy environment.
The signal-to-noise ratio levels are selected as 10 dB, 20 dB, and 40 dB for a fair comparison of the proposed estimator with literature available estimators. In addition to creating time varying noisy environment, the constructed signals are made more complex for estimation by including transients at different time intervals. Moreover, three different performance indicators are utilized to examine the performance of the proposed GWO-LS estimator in comparison with the state-of-the-art estimator available in the literature. The selected performance indicators are given as:

•
Residual Sum of Squares (RSS) and is calculated as: • Performance Index (PER) is another evaluation indicator used in this study for the comparison of GWO-LS with the state of art techniques and is determined as: The simulation work is carried out in MATLAB 2019a programming environment on a personal computer having Windows 8 operating system with a 2.30 GHz processor and 6GB RAM.

Test System I: Estimation of Integral Harmonics without Including Sub and Inter Harmonics in Time-Varying Noisy Environment
The test signals generated by variable frequency drives (VFDs), electric arc furnaces, and power electronics devices are used for the estimation of integral harmonics in the current study. These signals are extensively used in literature for the comparative analysis of various harmonic estimators. The data of frequency, phase, and amplitude required for these signals is given in Table 2. The original test signal, which is a continuous signal, is generated using data provided in Table 1 [3,39]. The test signal is modeled and discretized by a renowned Nyquist criterion having 64 samples in one cycle, and the sampling frequency is set to be 3.2 kHz. The GWO-LS framework has been applied to estimate harmonics in this test signal having multiple levels of adaptive noise with the inclusion of decaying DC offset. The time-varying noisy environment is created by adding the different random noises and DC offset values in the original signal. To validate the performance of presented estimator in approximating dynamic parameters, a short transient is produced in 5th harmonic from 0.12 s to 0.26 s. The simulation parameters for the HE problem and GWO-LS are stated in Table 3. These values are taken from the literature harmonic estimators [3,39,43]. Moreover, the parametric values of Table 3 are selected in such a way so that a fair comparison between the proposed and literature harmonic estimator can be performed. The searching agent is an important simulation parameter. Its value is selected as 50 because the MSE comes out to be least for this value. The variation of Evaluation parameters with respect to searching agents is shown in Figure 5.   Two signals are generated using the proposed harmonic estimator; the first one is the actual original signal made from input data with five integral harmonics. The second signal is an approximated one that is obtained by GWO-LS containing the approximated harmonics amplitudes and phases. These two signals are compared via MSE. The actual and approximated harmonics are then compared with respect to the percentage error. The simulation is carried out on four signals which are actual signals with no noise, a signal having 40 dB, 20 dB, and 10 dB noises (SNRs). The output values of best and worst harmonics amplitudes and phases with their percentage errors from actual harmonic values are tabulated in Table 4.

Model Parameters
Parametric Value Two signals are generated using the proposed harmonic estimator; the first one is the actual original signal made from input data with five integral harmonics. The second signal is an approximated one that is obtained by GWO-LS containing the approximated harmonics amplitudes and phases. These two signals are compared via MSE. The actual and approximated harmonics are then compared with respect to the percentage error. The simulation is carried out on four signals which are actual signals with no noise, a signal having 40 dB, 20 dB, and 10 dB noises (SNRs). The output values of best and worst harmonics amplitudes and phases with their percentage errors from actual harmonic values are tabulated in Table 4. The comparison of actual and estimated signals is shown in Figure 6 at different SNRs. It is evident from Figure 6a that the estimated signal using GWO-LS exactly matches the original signal. However, it can be observed from Figure 6c,d that the signals become corrupted with the addition of different noise levels and decaying DC offset. In the presence of a 40 dB noise level, the proposed GWO-LS estimator accurately approximates the original signal while small deviations are observed in the original and the approximated signal when added noise is 20 dB. The estimation of the signal is more difficult in the presence of a 10 dB noise level, but a comparison of results from Table 5 indicates that the GWO-LS estimator outclasses the state of art techniques in such complex signal estimation.    The convergence characteristics of the proposed GWO-LS estimator using selected indicators at different noisy signals are shown in Figure 7. The proposed estimator converges in less than 120 iterations for a non-noisy signal estimation. Similarly, GWO-LS takes 145, 162, and 184 iterations to converge for the 40 dB, 20 dB and 10 dB signal, respectively. Figure 7 indicates that the number of iterations to converge increases as the signal's noise level increases. It is evident from this Figure that the proposed harmonic estimator takes a higher time for the convergence of signal having a higher noise level.  Table 6. It can be observed that the computational efficiency of the proposed harmonic estimator is much higher.   The convergence behavior of GWO-LS for estimation of integral harmonic's amplitude and phases is shown in Figure 8. It can be seen from Figure 8a that the proposed harmonic estimator speedily converges for the first harmonic, whereas a large number of iterations are required to converge for the seventh harmonic. Figure 8b depicts that the proposed GWO-LS framework requires almost the same number of iterations for all harmonics. The estimation of amplitude and phase of the seventh harmonic is much more complex than the rest of the harmonic contents under a non-noisy and noisy environment within the framework of time-varying nature. The convergence behavior of GWO-LS for estimation of integral harmonic's amplitude and phases is shown in Figure 8. It can be seen from Figure 8a that the proposed harmonic estimator speedily converges for the first harmonic, whereas a large number of iterations are required to converge for the seventh harmonic. Figure 8b depicts that the proposed GWO-LS framework requires almost the same number of iterations for all harmonics. The estimation of amplitude and phase of the seventh harmonic is much more complex than the rest of the harmonic contents under a non-noisy and noisy environment within the framework of time-varying nature.  Table 5. The percentage error of GWO-LS for the 1st, 3rd, 5th, 7th, and 11th harmonic phase are 7.70×10 −3 , 1.48×10 −2 , 6.60×10 −2 , 2.7×10 −3 , and 8.33×10 −2 , respectively. The minimum error is achieved for 1st, 3rd, 5th, 7th, and 11th using GWO-LS in comparison with other harmonic estimators. The comparison between the proposed and literature harmonic estimator in case of harmonics amplitude and phase can be better seen in Figures 9 and 10. It is clear from both the Figures that the proposed GWO-LS estimator has the least percentage error for all the harmonic contents. The behavior of the proposed estimator for approximating frequency components of integral harmonics is demonstrated by Figure 11. It can be clearly seen from Figure 11 that GWO-LS takes a greater number of iterations for estimating frequency than the harmonics amplitude and phase estimation. The proposed harmonic estimators approximate the fundamental frequency in 284 iterations, frequency of 3rd, 5th, 7th, and 11th harmonic in 266, 257, 261, and 276 number of iterations, respectively. It indicates that estimation of fundamental frequency takes higher iterations in case of integral harmonics approximation. It can be concluded form the pictorial and tabular analysis that GWO-LS accurately estimates the frequency components of integral harmonics along with the amplitude and phase of the harmonics. 021, 14, x FOR PEER REVIEW estimator for approximating frequency components of integral harmonics is d strated by Figure 11. It can be clearly seen from Figure 11 that GWO-LS takes a number of iterations for estimating frequency than the harmonics amplitude and estimation. The proposed harmonic estimators approximate the fundamental fre in 284 iterations, frequency of 3rd, 5th, 7th, and 11th harmonic in 266, 257, 261, a number of iterations, respectively. It indicates that estimation of fundamental fre takes higher iterations in case of integral harmonics approximation. It can be con form the pictorial and tabular analysis that GWO-LS accurately estimates the fre components of integral harmonics along with the amplitude and phase of the harm    Frequency (Hz) Iteration Figure 11. Frequency estimation for case study I. Figure 12 demonstrates the GWO-LS behavior for estimating the amplitude of the harmonics in both steady and transient conditions. It is evident from Figure 12 that GWO-LS gives accurate estimation results in steady-state cases while a slight variation is observed for the transient case. The proposed estimator shows estimation variation from 0.17 s to 0.20 s clearly visible in Figure 12b. Similarly, the computational time of GWO-LS to accurately estimate a signal is 0.572 s. It can be observed from Table 5 that the time required to estimate a signal in a noisy environment is minimum for GWO-LS in comparison with all other techniques and it estimates the harmonic amplitudes and phases accurately in the least computational time.

Test System II: Estimation of Integral Harmonics Including Sub and Inter Harmonics in a Time-Varying Noisy Environment
In this test system, the power signal is made more complex and distorted by the inclusion of sub and inter harmonics. These sub and inter harmonics have amplitude magnitudes of 0.505, 0.25, and 0.35, respectively, while their phase are 75, 65, and 20, having the frequency of 20, 180, and 230 Hz, respectively [3,38]. The resultant power signal is simulated under both noisy and non-noisy environments. All the other harmonic contents (Amplitudes and phases of integral harmonics) and model evaluation setup remains the same as presented in the previous case study. However, to validate the performance of the presented estimator in approximating dynamic parameters, a short transient is produced in 1st inter harmonic from 0.38 s to 0.5 s.
The numerical values obtained after simulation for this case study are presented in Table 7. If we compare this Table with Table 4 we can see that all values of MSE become higher after considering sub and inter harmonics which indicates that consideration of such harmonics is difficult to estimate. The variation of MSE for the case study for different values of searching agents is presented in Figure 13. It can be seen that the minimum value of MSE is achieved for the 50 number of searching agents. The MSE for this case study is greater than that of case study I due to the inclusion of sub and inter harmonics. ent values of searching agents is presented in Figure 13. It can be see value of MSE is achieved for the 50 number of searching agents. Th study is greater than that of case study I due to the inclusion of sub a  The pictorial form of the original and estimated signal for the GW be seen in Figure 14. It can be observed that the power signal is comp the inclusion of sub and inters harmonics. The GWO-LS estimates th dB signal exactly with great accuracy, as shown in Figure 14. The pow dB noise is much difficult to estimate than the others due to higher n proposed estimator provides better results than estimators presented The pictorial form of the original and estimated signal for the GWO-LS estimator can be seen in Figure 14. It can be observed that the power signal is completely changed after the inclusion of sub and inters harmonics. The GWO-LS estimates the non-noisy and 40 dB signal exactly with great accuracy, as shown in Figure 14. The power signal having 10 dB noise is much difficult to estimate than the others due to higher noise. However, still proposed estimator provides better results than estimators presented in the literature.
The convergence characteristics for this case study are shown in Figure 15. Figure 15 indicates that the number of iterations to converge increases as the signal's noise level increases. It is evident from this Figure that the proposed harmonic estimator takes a higher time for the convergence of signal having a higher noise level. Moreover, the presented harmonic estimator takes greater time to converge when compared to case study I. The GWO-LS takes fewer iterations, i.e., 136, to converge for non-noisy signal, but the number of iterations increases with the addition of sub and inter harmonics. GWO-LS takes maximum iterations for 10 dB noisy cases that are 190 iterations. The convergence characteristics for this case study are shown in Figure 15. Figure 15 indicates that the number of iterations to converge increases as the signal's noise level increases. It is evident from this Figure that the proposed harmonic estimator takes a higher time for the convergence of signal having a higher noise level. Moreover, the presented harmonic estimator takes greater time to converge when compared to case study I. The GWO-LS takes fewer iterations, i.e., 136, to converge for non-noisy signal, but the number of iterations increases with the addition of sub and inter harmonics. GWO-LS takes maximum iterations for 10 dB noisy cases that are 190 iterations. The convergence behavior of GWO-LS estimator for the approximation of sub and inter harmonics over the course of iterations is described in Figure 16. The amplitude and phase of subharmonic take more iteration to converge and more difficult than the amplitude and phase of inter harmonics. Sub and inter harmonics are hard to approximate due to their fractional frequency nature. The amplitudes of subharmonics and second inter harmonic converge in 314 and 323 iterations, while first inter harmonic takes 289 iterations to converge. The phase of sub and inter harmonics converge in 300, 272, and 288 iterations, respectively. The presented estimator takes more iterations to converge for approximating sub and inter harmonics amplitudes and phases than the integral harmonics under time varying noisy environment but still it gives better results than the state of art techniques. The convergence behavior of GWO-LS estimator for the approximation of sub and inter harmonics over the course of iterations is described in Figure 16. The amplitude and phase of subharmonic take more iteration to converge and more difficult than the amplitude and phase of inter harmonics. Sub and inter harmonics are hard to approximate due to their fractional frequency nature. The amplitudes of subharmonics and second inter harmonic converge in 314 and 323 iterations, while first inter harmonic takes 289 iterations to converge. The phase of sub and inter harmonics converge in 300, 272, and 288 iterations, respectively. The presented estimator takes more iterations to converge for approximating sub and inter harmonics amplitudes and phases than the integral harmonics under time varying noisy environment but still it gives better results than the state of art techniques. The behavior of the proposed estimator for approximating frequency components of sub and inter harmonics is demonstrated by Figure 17. It can be clearly seen from Figure  17 that GWO-LS takes a greater number of iterations for estimating frequency than the harmonics amplitude and phase estimation. The proposed harmonic estimators approxi-  The behavior of the proposed estimator for approximating frequency components of sub and inter harmonics is demonstrated by Figure 17. It can be clearly seen from Figure 17 that GWO-LS takes a greater number of iterations for estimating frequency than the harmonics amplitude and phase estimation. The proposed harmonic estimators approximate the sub frequency in 317 iterations, frequency of first and second inter harmonics in 298 and 264 number of iterations, respectively. It reveals that estimation of sub harmonic frequency takes higher iterations while considering all harmonics. Figure 18 demonstrates the GWO-LS behavior for estimating the amplitude of the harmonics in both steady and transient conditions. It is evident from Figure 18 that GWO-LS gives accurate estimation results in steady state cases while a slight variation is observed for the transient case. The proposed estimator shows estimation variation from 0.45 to 0.5 s clearly visible in Figure 18b. The behavior of the proposed estimator for approximating frequency components of sub and inter harmonics is demonstrated by Figure 17. It can be clearly seen from Figure  17 that GWO-LS takes a greater number of iterations for estimating frequency than the harmonics amplitude and phase estimation. The proposed harmonic estimators approximate the sub frequency in 317 iterations, frequency of first and second inter harmonics in 298 and 264 number of iterations, respectively. It reveals that estimation of sub harmonic frequency takes higher iterations while considering all harmonics. Figure 18 demonstrates the GWO-LS behavior for estimating the amplitude of the harmonics in both steady and transient conditions. It is evident from Figure 18 that GWO-LS gives accurate estimation results in steady state cases while a slight variation is observed for the transient case. The proposed estimator shows estimation variation from 0.45 to 0.5 s clearly visible in Figure  18b. The comparison of the GWO-LS framework with the literature techniques in terms of percentage error between original and approximated harmonic amplitudes and phases is plotted in Figures 19 and 20. Both the Figures demonstrate that the proposed estimator has the minimum percentage error while estimating integral, sub and inter harmonics. Moreover, the comparison of the results of the GWO-LS estimator is also stated in tabular form as Table 6. It is evident from the Table 6 analysis that GWO-LS harmonic estimator is computationally far better than literature estimators by taking 1.17976 s for the approximation of power signal having a sub and inter harmonics. The percentage error between the original harmonic amplitude and phase and the GWO-LS also proved the proposed methodology's effectiveness. The performance comparison of the presented harmonic estimator with the state of art techniques in terms of performance index also proved the effectiveness of the GWO-LS in the estimation of the sub, inter, and integral harmonics demonstrated in Figure 21 and Table 8. It can be derived from Table 8 and Figure 21 that the proposed estimator has 3.11×10 −4 , 2.61×10 −2 , 1.83×10 −1 performance indexes for the 40 dB, 20 dB, and 10 dB cases; respectively, which are better than the literature results. Hence, we can conclude that the given harmonic estimator gave promising results in harmonic parameters estimation (sub, inter, and integral harmonics) under a highly noisy and time-varying environment. The comparison of the GWO-LS framework with the literature techniques in term of percentage error between original and approximated harmonic amplitudes and phas is plotted in Figures 19 and 20. Both the Figures demonstrate that the proposed estimato has the minimum percentage error while estimating integral, sub and inter harmonic Moreover, the comparison of the results of the GWO-LS estimator is also stated in tabul form as Table 6. It is evident from the Table 6 analysis that GWO-LS harmonic estimato is computationally far better than literature estimators by taking 1.17976 s for the appro imation of power signal having a sub and inter harmonics. The percentage error betwee the original harmonic amplitude and phase and the GWO-LS also proved the propose methodology's effectiveness. The performance comparison of the presented harmonic e timator with the state of art techniques in terms of performance index also proved th effectiveness of the GWO-LS in the estimation of the sub, inter, and integral harmoni demonstrated in Figure 21 and Table 8. It can be derived from Table 8 and Figure 21 th the proposed estimator has 3.11 × 10 , 2.61 × 10 , 1.83 × 10 performance indexes fo the 40 dB, 20 dB, and 10 dB cases; respectively, which are better than the literature result Hence, we can conclude that the given harmonic estimator gave promising results in ha monic parameters estimation (sub, inter, and integral harmonics) under a highly nois and time-varying environment. Inter-2 Inter-1 Sub Figure 19. Comparison of amplitudes erros for case study II.

Conclusions
In this paper, a hybrid harmonic estimator GWO-LS is proposed to estimate harmonics in a power signal. In the proposed harmonic estimator, GWO and LS estimate the non-linear part (phase and frequency) and linear part (amplitude) of a power signal, respectively. For validation of the proposed estimator, two test systems are adopted, among which the first test system contains power harmonics while the second test system considers sub and inter harmonics. Moreover, three different performance indicators are utilized to examine the effectiveness of the proposed approach. The obtained results were compared with recently developed harmonic estimators BFO, F-BFO-LS, ABC-LS, BBO-RLS, GSA-RLS, and MABC. Comparative evaluation of results in terms of percentage error, performance index, and computational time depicts that the proposed GWO-LS estimator estimates the harmonics in a power signal more accurately. The proposed estimator provides less computational complexity, which is essential for the detection of harmonics timely to maintain power quality. The proposed GWO-LS estimator requires 43.5% and 20.6% less time to accurately estimates harmonics in comparison with MABC. Moreover, the obtained percentage error for phase and amplitude indicates that GWO-LS estimates harmonics in a power signal with better accuracy. Furthermore, the proposed estimator accurately estimates harmonics having transient at different time intervals. In addition, the proposed estimator's PER values are much smaller than the state of art techniques, which clearly verifies that the developed methodology performs the HE problem more accurately and rapidly with a simple structure having fewer controlling parameters.

•
Practical and industrial implementation of proposed research for accurate estimation of electrical harmonics amplitude and phase. • Proposed harmonic estimator can be helpful in designing active filters to nullify the effects of harmonics thus improving power quality.