Abstract
The power quality is becoming an extensively addressing aspect of the power system because of the sensitive operation of the smart grid, awareness of power quality, and the equipment of modern power systems. In this paper, we have conceived a new hybrid Quantum inspired particle swarm optimization and least square (QPSO-LS) framework for real-time estimation of harmonics presented in time-varying noisy power signals. The technique has strong, robust, and reliable search capability with powerful convergence properties. The proposed approach is applied to various test systems at different signal to noise ratio (SNR) levels in the presence of uniform and Gaussian noise. The results are presented in terms of precision, computation time, and convergence characteristics. The computation time decreases by 3-5 times as compared to the existing algorithms. The technique is further authenticated by estimating harmonics of real-time current or voltage waveforms, obtained from light emitting diode (LED) lamp and axial flux permanent magnet synchronous generator (AFPMSG). The results demonstrate the superiority of QPSO-LS over other methods such as LS-based genetic algorithm (GA), particle swarm optimization (PSO), bacterial foraging optimization (BFO), artificial bee colony (ABC), and biogeography based optimization with recursive LS (BBO-RLS) algorithms, in terms of providing satisfactory solutions with a significant amount of robustness and computation efficiency.
WITH the development of modern power systems, it has become easy to improve the performance of the system due to the utilization of advanced communication and monitoring technology [
Nowadays, meta-heuristic algorithms are gaining immense attention and are widely presented in the literature to deal with power system problems such as electrical load forecasting [
Similarly, time-varying harmonics and non-stationary signals had paved the path for researchers to apply intelligent and self-adaptable nature-inspired heuristic algorithms to estimate harmonics in slanted waveforms [
With the conception of quantum information, researchers focus on quantum computation and estimation [
1) The development and maiden application of the proposed QPSO-LS algorithm for the estimation of harmonics, including fundamental, integer-, inter-, and sub-harmonics of noisy power signals with different dimensions.
2) Best estimator is searched by giving a comparative performance evaluation of the proposed algorithm with other hybrid algorithms. The comparison is drawn in tabulated form in Section Ⅳ.
3) The estimation of harmonic parameters on the real-time data obtained from axial flux permanent magnet generator (AFPMG) setup and light emitting diode (LED) lamp is applied to evaluate the performance of the algorithm.
The rest of this paper is organized as follows. Section II gives the mathematical modeling of the harmonic estimation problem. Section III explains the algorithm and the proposed approach. In Section IV, the results are discussed, and Section V concludes the paper.
Successive approximation of harmonics for power signals constitutes two components: linear estimation of amplitudes and nonlinear estimation of phases. The time-varying nature of power signals makes harmonic estimation a very cumbersome problem, so it requires proficient and robust algorithms. Mathematically, a signal can be modeled as the sum of sine or cosine functions with higher-order frequencies given by:
(1) |
where H is the total number of harmonic order; is the number of harmonics order; is the amplitude of harmonic; is the angular frequency of higher-order harmonics; is the phase of harmonics; and is DC decreasing offset. It might be possible that the signal is corrupted with additive random noise , so the complete model of the signal can be described as:
(2) |
The processing of the signal becomes easy if it is available in a discrete form. Hence the digital version of the above signal is given by:
(3) |
where and are the sampling time and sample number, respectively. By using the trigonometric identity, the signal can be rewritten as:
(4) |
Further, the decaying DC term can be expanded by applying the Taylor series, and after ignoring the higher-order terms, the signal can be described by:
(5) |
The equation which is to be estimated can be written in the following parametric form:
(6) |
where is an estimated signal in discrete form; is a vector of an unknown parameter which has to be updated using the algorithm for optimal estimation of harmonics; and is a discrete vector of known values derived from the given harmonic frequencies. More explicitly, the vectors and are described as:
(7) |
(8) |
where T is the number of iterations.
Once the unknown parameter vector is updated using QPSO, the amplitudes and phases of fundamental and the harmonics are calculated as:
(9) |
(10) |
If the signal has a DC decaying component, the parameters are computed by the expressions given by:
(11) |
(12) |
The QPSO algorithm proposed and developed in [
Assume that the N dimension of quantum space has a population, which consists of M particles. The location of the
The position of the particle in the dimension, while it gets through stochastic simulation of Monte Carlo measurement, is defined as:
(13) |
where is the particle number; is the dimension of the problem; is the random number in the range of [0,1]; and is obtained by the current position of the particle, whereas the best location is , and is the contraction expansion factor. Thus, we can write the updated equation as:
(14) |
To avoid premature convergence, a parameter in the algorithm is calculated as:
(15) |
where is the average best position of M particles based on the dimension of the variable. Hence, the updated equation becomes:
(16) |
By using quantum behavior, the can be computed as:
(17) |
where is the random number in the range of [0,1] of dimension N. The entire quantum behaved PSO process can be written in a single equation as:
(18) |

Fig. 1 Flowchart of proposed QPSO-LS to estimate harmonics.
1) Initialize QPSO parameters: the number of population size M, the number of dimensions N, T, , .
2) Initialize the population depending on M and N, and initialize the particle best history and global best history .
3) Calculate the average best position value of M particles for N dimensions using (15).
4) Calculate the contraction expansion factor for each iteration t.
(19) |
5) Update particles using QPSO algorithm according to (16) and (17).
6) Compute the fitness value by minimizing RSS value as:
(20) |
7) Update the history of the particle if the current fitness value is less than the previous value.
8) Update the global history of the particle depending on the previous global value recorded.
9) Estimate the desired signal and other performance comparison parameters such as performance index (PER) and mean square error (MSE).
Estimate the amplitudes and phases of the harmonics using (9) and (10).
The harmonic estimation of different test signals has been carried out in this section to validate the performance of the proposed QPSO-LS algorithm. Most of the test signals are taken from the literature for comparative assessment. The algorithm has been applied to estimate the integer-harmonics in the presence of DC decaying offset. The strength of the proposed QPSO-LS has been authenticated by extracting the sub- and inter-harmonics in the power system signal in the presence of uniform and Gaussian noises. The application of the algorithm is extended to real-time examples of axial flux permanent magnet synchronous generator (AFPMSG) and LED lamp.
The difference between the power signal and the estimated signal yields the RSS as:
(21) |
The essential objective function of the problem is to minimize the RSS in a highly non-linear and dynamic search domain [
(22) |
(23) |
The performance of the proposed approach has been evaluated based on the given statistical parameters.
The simulations for each case study are performed on Laptop: DELL Inspiron, Intel core i7 CPU 4610 @ 3.00 GHz processor, 4 GB RAM, and 64-bit operation system (Windows 7). The proposed QPSO-LS is programmed in MATLAB, and simulations are run on MATLAB R2018
The generated signal consists of a DC decaying offset of in the presence of additive random noise at 10 dB (signalto noise) SNR. The harmonic contents of the actual signal are given in
The continuous time signal has been sampled and discretized according to the Nyquist criterion considering 64 samples per cycle. The sampling frequency of the signal is considered to be 3.2 kHz.
The simulation for near-optimal extraction of harmonics has been executed on given signals. The proposed QPSO-LS is applied with 200 populations and a maximum of 600 iterations.

Fig. 2 Convergence characteristics and estimated signals for variable frequency drive. (a) Fitness value without noise. (b) Fitness value at 10 dB SNR. (c) Estimated signal without noise. (d) Estimated signal at 10 dB SNR.
The proposed QPSO-LS is equated with previous techniques presented in the literature for comparative assessment listed in
The results reveal the robustness of proposed QPSO-LS for harmonic estimation in terms of estimating the amplitudes, phases, percentage errors, and computation time. From the numerical results, it is evident that the proposed QPSO-LS algorithm is superior to other techniques for harmonic estimation. Moreover, the proposed algorithm presents the promising results.
The signal of integer-harmonic estimation is further dishonored with sub- and inter-harmonics in the presence of additive random noise. The problem of considering sub- and inter-harmonic estimations yields a complex and non-linear search space. First, the signal is despoiled with a sub-harmonic of (20 Hz), inter-harmonics of (180 Hz) and (230 Hz).
The resulting signal is estimated in the noise-free as well as in the noisy environment of 10 dB SNR. The performance evaluation, with actual and superimposed estimated signals, is demonstrated by

Fig. 3 Inter- and sub- harmonic convergence characteristics along with estimated signals. (a) Fitness value without noise. (b) Error value at 10 dB SNR. (c) Superimposed estimated signal without noise. (d) Estimated signal at 10 dB SNR.
The proposed QPSO-LS algorithm is compared with the existing techniques in literature for estimating the harmonics presented in the signals. The comparative assessment has been listed in
Renewable energy technologies are becoming more popular in recent decades because of ever-increasing energy demand, prices of fossil-based fuels, and the pollution of conventional energy-producing sources [
Among numerous electrical energy production sources, the wind is less costly [
AFPMGs are replacing radial flux permanent magnet generators (RFPMGs) in modern wind turbine technologies because of the unique features unveiled by AFPMG such as higher torque-to-weight ratio, maximum power density, high efficiency, absence of cogging torque losses, compact structure, lightweight and low operation shaft speed [

Fig. 4 Voltage estimation and harmonic analysis of AFPMSG. (a) Measured single-phase voltage waveform of AFPMG model. (b) Fitness characteristics. (c) Superimposed estimated signal. (d) Integer-harmonic magnitude.
The robust QPSO-LS algorithm is applied for harmonic estimation of the voltage signal for the first 15 integer-harmonics. The problem of the estimation is executed by taking 200 particles and running the algorithm for 600 iterations.
Recently, LED lamps are replacing incandescent bulbs and fluorescent lights because of the energy-saving capability. The LED lamps operate on 12 V DC voltage and are connected with power electronic-based circuitry to behave as a non-linear device in the modern power system. The LED lights draw non-linear current from the primary source and thus distort the voltage waveform of the whole system by inoculating the harmonics. For this case study, a digital oscilloscope is used to record and save the output of the current value with 250 samples per cycle. The algorithm is applied for 8 odd harmonics with 200 iterations and 200 particles.
As the actual signal is degraded due to the noise at positive and negative peaks, it was observed that the performance of the algorithm is not up to the mark and needs some signal processing techniques to remove this noise. For this purpose, a concept of decimation followed by the interpolation is employed, which gives the best results, as shown in

Fig. 5 Estimation and harmonic analysis of current drawn by LED lamp. (a) Estimation with decimation. (b) Fitness characteristics. (c) Estimation with MAF. (d) Integer-harmonic amplitude using MAF.
Moving average filter (MAF) may also be employed for smoothing the actual signal before harmonic estimation.
For this case study, the span of MAF is varied from 10-25 points and harmonic estimation is carried out for the minimum value of RSS at the 17-point MAF. The abrupt changes become smooth as gleaned from the graph, after passing through MAF. And the estimation shows promising results. The total time taken by the simulation using MAF is 0.7938 s.
The voltage signal from a full-wave six-pulse bridge rectifier has been considered for the extraction of harmonics in the presence of additive noise [

Fig. 6 Two-bus small power system.
The noisy power signal consisting of the above-mentioned harmonic contents is generated considering 64 samples per cycle at 50 Hz.
The algorithm minimizes the evaluation parameters tremendously up to the order of 1
Harmonic estimation is the problem of accurately computing the amplitudes, phases, and additive random noise in the electrical voltage or current signals using the meta-heuristic approach. Statistical parameters are required to benchmark the estimated signals, and also to measure the goodness of the estimation. For this purpose, two well-known statistical parameters have been selected as given in (20) and (22), respectively [
To prove the validity of the proposed QPSO-LS optimization method, another statistical analysis can also be characterized by giving the boxplot after several simulation runs [

Fig. 7 Boxplot to validate proposed QPSO-LS for sub- and inter-harmonic estimation.
From the boxplot, it is apparent that the optimal solution is located between the minimum and maximum values with the least number of outliers. Thus, the analysis justifies that the proposed QPSO-LS algorithm can estimate the actual signal optimally in the minimum computation time and with the highest accuracy compared to other approaches.
For the detailed analysis, the statistical parameters such as the best cost, worst, mean, and standard deviation are shown in
A QPSO-LS method has been proposed for valid estimation of both phases and amplitudes from noisy power signals. Simulation results demonstrate that the proposed scheme is capable of estimating the effects of substantial distortions by analyzing the accuracy, robustness, and convergence characteristics. Different theoretical and real-time case studies have been explored to evaluate the performance of the approach. Integer-, inter-, and sub-harmonics are extracted from power signals at different uniform and Gaussian noise levels. We have concluded that the proposed QPSO-LS provides accuracy performance superior to the conventional classical approaches with less computation time. Moreover, our simulation study on the robustness against different imperfection has demonstrated that quantum optimization could outperform the conventional methods. This diversity of QPSO-LS exhibits the versatility of algorithms in solving nonlinear and complex optimization problems.
References
S. K. Jain, P. Jain, and S. N. Singh, “A fast harmonic phasor measurement method for smart grid applications,” IEEE Transactions on Smart Grid, vol. 8, no. 1, pp. 493-502, Jul. 2016. [Baidu Scholar]
J. M. Guerrero, “Guest editorial special issue on power quality in smart grids,” IEEE Transactions on Smart Grid, vol. 8, no. 1, pp. 379-381, Jan. 2017. [Baidu Scholar]
T. Lobos, T. Kozina, and H. Koglin, “Power system harmonics estimation using linear least squares method and SVD,” in Proceedings of the 16th IEEE Instrumentation and Measurement Technology Conference, Venice, Italy, May 1999, pp. 789-794. [Baidu Scholar]
S. K. Singh, N. Sinha, A. K. Goswami et al., “Several variants of Kalman filter algorithm for power system harmonic estimation,” International Journal of Electric Power, no. 78, pp. 793-800, Jan. 2016. [Baidu Scholar]
E. A. A. Al-Feilat, I. El-Amin, and M. Bettayeb, “Power system harmonic estimation: a comparative study,” Electric Power System Research, vol. 29, no. 2, pp. 91-97, Mar. 1994. [Baidu Scholar]
M. Bettayeb and U. Qidwai, “Recursive estimation of power system harmonics,” Electric Power System Research, vol. 47, no. 2, pp. 143-152, Mar. 1998. [Baidu Scholar]
M. Mohammadi, F. Talebpour, E. Safaee et al., “Small-scale building load forecast based on hybrid forecast engine,” Neural Process Letter, vol. 48, no. 1, pp. 329-351, Oct. 2017. [Baidu Scholar]
A. Abid, T. N. Malik, and M. M. Ashraf, “Combined emission economic dispatch of power system in presence of solar and wind using flower pollination algorithm,” Mehran University Research Journal of Engineering & Technology, vol. 38, no. 3, pp. 581-598, Jul. 2019. [Baidu Scholar]
M. M. Ashraf and T. N. Malik, “Least cost generation expansion planning in the presence of renewable energy sources using correction matrix method with indicators-based discrete water cycle algorithm,” Journal of Renewable Sustainable Energy, vol. 11, no. 5, p. 056301, Oct. 2019. [Baidu Scholar]
O. Abedinia, M. Bekravi, and N. Ghadimi, “Intelligent controller based wide-area control in power system,” International Journal of Uncertainty Fuzzy, vol. 25, no. 1, pp. 1-30, Feb. 2017. [Baidu Scholar]
S. K. Singh, N. Sinha, A. K. Goswami et al., “Robust estimation of power system harmonics using a hybrid firefly based recursive least square algorithm,” International Journal of Electric Power Energy Systems, vol. 80, pp. 287-296, Sept. 2016. [Baidu Scholar]
P. K. Ray and B. Subudhi, “BFO optimized RLS algorithm for power system harmonics estimation,” Applied Soft Computation, vol. 12, no. 8, pp. 1965-1977, Mar. 2102. [Baidu Scholar]
S. Biswas, A. Chatterjee, and S. K. Goswami, “An artificial bee colony-least square algorithm for solving harmonics estimation problems,” Applied Soft Computation, vol. 13, no. 5, pp. 2343-2355, Jan. 2013. [Baidu Scholar]
M. Bettayeb and U. Qidwai, “A hybrid least squares-GA-based algorithm for harmonic estimation,” IEEE Transactions on Power Delivery, vol. 18, no. 2, pp. 377-382, May 2003. [Baidu Scholar]
S. Mishra, “A hybrid least square-fuzzy bacterial foraging strategy for harmonic estimation,” IEEE Transactions on Evolution Computing, vol. 9, no. 1, pp. 61-73, Feb. 2005. [Baidu Scholar]
Z. Lu, T. Ji, W. Tang et al., “Optimal harmonic estimation using a particle swarm optimizer,” IEEE Transactions on Power Delivery, vol. 23, no. 2, pp. 1166-1174, Apr. 2008. [Baidu Scholar]
B. Subudhi and P. Ray, “A hybrid adaline and bacterial foraging approach to power system harmonics estimation,” in Proceedings of 2010 International Conference on Industrial Electronics, Control & Robotics (IECR), Orissa, India, Dec. 2010, pp. 236-242. [Baidu Scholar]
T. Ji, M. Li, Q. Wu et al., “Optimal estimation of harmonics in a dynamic environment using an adaptive bacterial swarming algorithm,” IET Generation, Transmission & Distribution, vol. 5, no. 6, pp. 609-620, Aug. 2011. [Baidu Scholar]
S. K. Singh, N. Sinha, A. K. Goswami et al., “Optimal estimation of power system harmonics using a hybrid firefly algorithm-based least square method,” Soft Computing, vol. 21, no. 7, pp. 1721-1734, Sept. 2015. [Baidu Scholar]
D. Yumin and Z. Li, “Quantum behaved particle swarm optimization algorithm based on artificial fish swarm,” Mathematical Problems in Engineering, pp. 1-10, Aug. 2014. [Baidu Scholar]
F. P. Mahdi, P. Vasant, M. M. Rahman et al., “Quantum particle swarm optimization for multiobjective combined economic emission dispatch problem using cubic criterion function,” in Proceedings of IEEE International Conference on Imaging, Vision and Pattern Recognition (icIVPR), Dhaka, Bangladesh, Apr. 2017, pp. 1-5. [Baidu Scholar]
J. Sun, W. Fang, V. Palade et al., “Quantum-behaved particle swarm optimization with Gaussian distributed local attractor point,” Applied Mathematics and Computation, vol. 218, no. 7, pp. 3763-3775, Dec. 2011. [Baidu Scholar]
J. A. Rice, “Summarizing data,” in Mathematical Statistics and Data Analysis, Belmont, USA: Thomson Higher Education, 2006, pp. 377-408. [Baidu Scholar]
S. K. Singh, N. Sinha, A. K. Goswami et al., “Power system harmonic estimation using biogeography hybridized recursive least square algorithm,” International Journal of Electric Power, vol. 83, pp. 219-228, Apr. 2016. [Baidu Scholar]
M. M. Ashraf, T. N. Malik, and M. Iqbal, “Peak load sharing based on blade pitch control of wind turbine in the presence of utility supply,” Journal of Renewable and Sustainable Energy, vol. 6, no. 1, pp. 13-110, Jan. 2014. [Baidu Scholar]
M. M. Ashraf, T. N. Malik, S. Zafar et al., “Design and fabrication of radial flux permanent magnet generator for wind turbine applications,” Nucleus, vol. 50, no. 2, pp. 173-181, Jun. 2013. [Baidu Scholar]
M. M. Ashraf and T. N. Malik, “A modified model of axial flux permanent magnet generator for wind turbine applications,” Nucleus, vol. 51, no. 3, pp. 391-395, Dec. 2014. [Baidu Scholar]
M. M. Ashraf, T. N. Malik, and M. Iqbal, “Development of a prototype micro wind energy system with adjustable blade pitch for experimentation purposes at laboratory level,” Nucleus, vol. 51, no. 1, pp. 75-86, Dec. 2014. [Baidu Scholar]
J. F. Gieras, R. Wang, and M. J. Kamper, “Introduction,” in Axial Flux Permanent Magnet Brushless Machines, 2nd ed., Dordrecht, Netherlands: Springer Science & Business Media, 2008, pp. 1-19. [Baidu Scholar]
M. M. Ashraf and T. N. Malik, “Design of three-phase multi-stage axial flux permanent magnet generator for wind turbine applications,” Turkish Journal of Electrical Engineering and Computer Science, vol. 25, no. 1, pp. 520-538, Feb. 2017. [Baidu Scholar]