International Journal of Soft Computing

Year: 2010
Volume: 5
Issue: 3
Page No. 93 - 97

Simple and Fast Algorithm for Estimating Total Harmonic Distortion

Authors : Layth M. Aljfout

Abstract: Now a days, harmonic problems have attracted more attention in engineering systems. Fast, accurate and simple in programming algorithm for estimation of the total harmonic distortion and analysis of the harmonic components in signals is presented in this study. The proposed algorithm is based on Fourier series analysis. Computation of different test examples is carried out using C++ language and showed satisfactory results.

How to cite this article:

Layth M. Aljfout , 2010. Simple and Fast Algorithm for Estimating Total Harmonic Distortion. International Journal of Soft Computing, 5: 93-97.

INTRODUCTION

Harmonics affect the secretary operating a computer, the electrician trouble shooting equipment failure, the electrical contractor having to withstand the cost of equipment replacement, the inspector who must examine the cause of fires to the facilities management interested in efficient equipment operation and the avoidance of downtime.

However, in the past most equipment operated on ideal waveforms but in the past three decades, there has been an extension in the use of solid-state electronics. This technology provides improved product quality with increased productivity. These solid-state electronics require clean supply and are highly sensitive to any distortions.

The heating effects of harmonics can cause damage of equipment and conductors. The results can be unpredictable financial ramifications. Moreover, distortions can lead to overheating of equipment, equipment failure, expensive downtime and maintenance difficulties. Harmonics are becoming the most severe and complex challenge for the industry.

EPRI estimates that in 1992, 15-20% of the total load was nonlinear and by the year 2000 it was expected to reach 50-70% (Holt, 2001) thus the problems of harmonics will be growing with the expanded used of electronics. Harmonic distortion standards and guidelines are needed to ensure that consumers are provided with a suitable supply, limit distortion to levels that system components can tolerate and to prevent the system from interfering with the operation of other systems. IEEE standard 519 specifies limits for harmonic distortion. In order to compare levels of conducted harmonic distortion in a system, the Total Harmonic Distortion (THD) or the Distortion Factor (DF) is used.


Table 1: Harmonic distortion limits expressed in percent of the fundamental-frequency magnitude according to IEEE standard 519

However, the specified harmonic distortion limits expressed in percent of the fundamental-frequency magnitude are shown in Table 1.

However, harmonics distortion is here to stay. Ongoing preventative maintenance programs that include harmonic monitoring can detect problems and eliminate failures in the system. Knowing the system harmonic levels is a valuable piece of information that is attainable from modern quality monitoring equipment.

These equipments are based on mathematical methods that developed to analyze complex signals composed of many components of different frequencies. One of the more popular is called the Fourier transform. However, duplicating the mathematical steps required in a microprocessor or computer-based instrument is undesirable. So more compatible processes called the Fast Fourier Transform (FFT) or Discrete Fourier Transform (DFT) are used.

Recently, many research studies are devoted to the development of new mathematical methods for harmonic distortion monitoring. In (Yang et al., 2005) a new method composed of a frequency and phasor estimating algorithm, a finite-impulse-response comb filter and a correction factor is developed. In (Du et al., 2005) an aliasing compensation method to reduce aliasing in Discrete Wavelet Transform (DWT) for harmonic detection is described. Carpinelli et al. (2004) presents a complete modelling of the VSI-fed drives when energized by nonsinusoidal sources based on the analytical form of the harmonics injected in the supply system where the equations of the harmonics are obtained for both the continuous and discontinuous modes and are derived by Fourier analysis of steady-state response time evolution.

A method using back propagation neural network algorithm for dynamic harmonic distortion analysis in noisy environments is developed by Lin (2004). An algorithm for harmonic estimation based on numerical differentiation and central lagrange interpolation of multipoint is presented by Wu et al. (2003).

Wajiha and Rahul (2003) by presented a novel harmonic detection and measurement device is presented where the device consists of A/D unit, FFT unit, LCD display unit and network communication unit in which the system adopts FPGA and DSP processor.

Guihong et al. (2005) presents a method to characterize the total harmonic distortion for inverters which is based on the performance of the inverters along two different types of days: clear sky and partially cloudy sky days.

In (Kumar and Kannan, 2007), an in-depth discussion on harmonic and inter-harmonic distortion taking place on the low-voltage side of the wind generator as well as in the power grid side is presented. However, all the above mentioned methods and others for the harmonic distortion estimation are mainly differentiated by the followings:


Accuracy


Computational time

Simplicity in programming, thus simplicity of the measuring device construction

In the current study, the objective is to develop a fast, accurate and simple in programming algorithm for estimating the total harmonic distortion. This algorithm is based on Fourier series analysis.

MATERIALS AND METHODS

Algorithm for THD estimation: This algorithm is based on Fourier series analysis. In addition to the offset, the number of the harmonics is suggested to be 36 including the fundamental component and since the minimum number of samples required per cycle to insure that the error will not exceed 5% is 10 times the harmonic order (Wildi, 2006), it is suggested to obtain 360 samples per cycle for all harmonic orders thus the lower the harmonic order is the less the error will be. This suggestion allows computation of sine and cosine matrices as follows:

(1)

(2)

Since these matrices do not depend on the frequency or the harmonic order, they can be computed and saved by the manufacturer in the memory of the hand-held harmonic meter thus the time of computation required to analyze a signal is decreased. The offset can be calculated as the average value of all samples given per one cycle as follows:

(3)

where, vi is the ith sample of the analyzed signal. The amplitude and phase-shift of the harmonic components including the fundamental can be calculated as follows:

(4)

(5)

If the dominator in Eq. 5 is negative, the phase-shift should be corrected by adding π to the calculated value. And finally the THD can be calculated as follows:

(6)

Thus, the described above algorithm is simple in programming, since it is composed only of four equations. It is accurate because the order of the harmonics is up to 36 in addition to the offset and because the number of samples per cycle is more than the minimum number required. This minimum number of samples is encountered only through the computation of the 36th harmonic component.

The increase of number of samples increases the time of computation but on the other hand the suggestion of fixed sine and cosine matrices saved by the manufacturer in the memory of the hand-held harmonic meter decreases this time of computation.

RESULTS AND DISCUSSION

Test examples: The algorithm described in the previous section is developed in a program using C++ language (see the appendix). Two test examples with known components are to be computed to insure that the suggested algorithm and developed program are properly working and two examples with unknown components are to be analyzed.

Analysis of a signal composed of offset, fundamental and two harmonic components: A signal that composed of an offset, fundamental, 3rd and 5th harmonic components is assumed to be given as:

(7)

Applying this time-domain function to the program developed in the previous section, the signal analysis can be obtained as shown in Table 2 where the THD is 5.099% and the offset is 15%. Results shown in Table 2 confirm that the suggested algorithm is properly working.

Analysis of a signal composed of offset, fundamental and four harmonic components: A signal that composed of an offset, fundamental, 3rd, 11th, 24th and 36th harmonic components is assumed to be given as:

(8)

Applying this time-domain function to the developed program, the signal analysis can be obtained as shown in Table 3 where the THD is 3.276% and the offset is 2.143%. Results shown in Table 3 also confirm that the suggested algorithm is properly working.


Table 2: Analysis of the signal given by Eq. 7


Table 3: Analysis of the signal given by Eq. 8


Fig. 1: Simple signal versus time with zero offset

Analysis of a simple signal with unknown components: A signal composed of unknown components is assumed to be given as shown in Fig. 1.

This signal is considered simple because each half cycle vertically is symmetrical and it horizontally has a mirror reflection.

Applying this function to the program, the signal analysis can be obtained as shown in Table 4 where the THD is 15.525%.

Figure 2 shows the percentage error caused by analyzing the signal of Fig. 1 using the Fourier series analysis explained in the previous section where the maximum error is 2.65% and it is encountered at the intercept of the signal with the abscissa. An error of 1.22% is noticed at the angles of the studied signal.

Analysis of a complex signal with unknown components: A signal composed of unknown components is assumed to be given as shown in Fig. 3.


Table 4: Analysis of the signal given by Fig. 1


Fig. 2: Percentage error versus time of the analyzed signal of Fig. 1


Fig. 3: Complex signal versus time with zero offset

This signal is relatively considered complex because each half cycle vertically is asymmetrical and it horizontally has a reversed mirror reflection.

Applying this function to the program, the signal analysis can be obtained as shown in Table 5 where the THD is 34.581%.

Figure 4 shows the percentage error caused by analyzin the signal of Fig. 3 where the maximum error is 5.42% and it is encountered once at the intercept of the signal with the abscissa.


Table 5: Analysis of the signal given by Fig. 3


Fig. 4: Percentage error versus time of the analyzed signal of Fig. 3

An error of 2.92% is noticed at the maximum values of the studied signal.

CONCLUSION

A fast, simple and accurate algorithm for calculation of the THD is developed. This algorithm is based on Fourier series analysis. Accuracy is obtained by obtaining 360 samples per cycle that allows computation of 36 harmonic components including the fundamental and the offset ones with a maximum error of 5% in the 36th harmonic component and the lower the frequency is the less the error will be. The later fact increases the time of computation but on the other hand the suggestion of having fixed sine and cosine matrices for all harmonic orders decreases this computational time, since these matrices can be calculated once and saved by the manufacturer in the memory of the hand-held harmonic meter.

The simplicity of the algorithm described above allows limiting the resources of this harmonic meter and thus its cost. Two test examples with known components are calculated to prove the validity of the algorithm where the percentage error is zero. Two signals with unknown components are analyzed. One of these signals is vertically and horizontally symmetrical while the second one is relatively complex, since half cycle of which is vertically asymmetrical with horizontal reversed mirror reflection.

APPENDIX

Design and power by Medwell Web Development Team. © Medwell Publishing 2024 All Rights Reserved