Maximum of the absolute instantaneous error of all techniques after convergence of the algorithms.

## 1. Introduction

The increasing use of power electronic devices in power systems has been producing significant harmonic distortions, what can cause problems to computers and microprocessor based devices, thermal stresses to electric equipments, harmonic resonances, as well as aging and derating to electrical machines and power transformers [1–3]. The most important problems that have been reported in the literature concerns to the difficulty of the frequency control within the micro-grids and the increase of the total harmonic distortion. These two factors may negatively impact on the protection system, power quality analysis and intelligent electronic devices (IEDs), in which digital algorithms assume that the fundamental frequency is constant. Based on this fact, there has been an increasing interest in signal processing techniques for detecting and estimating harmonic components of time-varying frequencies. Their correct estimation has become an important issue in measurement equipment and compensating devices. Although many methods have been proposed in the literature, it still remains difficult to detect and estimate harmonics of time-varying frequencies [4, 5]. The harmonic components (voltage or current) can change its frequencies due to continuous changes in the system configuration and load conditions, to the rapid proliferation of distributed resources, and to possibilities of new operational scenarios (e.g., islanded microgrids). Also the need for massive monitoring of networks is unquestionable within the concept of * smart grids*. An important line of research in the

*context is to identify and estimate time-varying harmonics that may appear in the current and voltage signals, and from this information, correct and adjust the digital algorithms that are part of protection equipments, power quality monitors and IEDs.*smart grids

The concept of time-varying harmonics came recently to the vocabulary of power systems engineers, because more and more nonlinear loads, with dynamic behavior, are being connected to power systems and the fundamental frequency is experiencing a large range of variation. These factors have putting in check the traditional stationary spectral analysis methods, and many techniques for improving harmonics measurement have been proposed in recent years. Parametric and nonparametric methods that commonly have been used by the community of signal processing have been applied to power system harmonic estimation. These methods have in common that they need to estimate the fundamental frequency to adjust some internal parameters, like filter coefficients. The challenge is producing a harmonic estimator with high convergence ratio, high accuracy, low computational burden and immunity to the presence of interharmonic: conditions that are not ease to simultaneously deal with. The most used technique for harmonics estimation is based on the discrete Fourier transform (DFT) [8, 10]. The DFT algorithm is attractive because of its low computational complexity and its simple structure. However, DFT does not perform well if power system frequency varies around the nominal value. Several other techniques have been proposed in the literature for harmonic estimation. However, the DFT still appear to be the preferred algorithm mainly due to its simplicity.

## 2. Power quality and smart grid

The term “* smart grid*” has different definitions in the literature. Regardless of the precise definition, the term smart grid can be seen as a new paradigm, covering from conception to operation of the power systems, that makes intensive use of information and communication technologies, decentralized control approaches, powerful signal processing and computational intelligence techniques, renewable and distributed generation and storage energy facilities, self-generation, etc [11] to offer flexibility, robustness, and efficiency regarding generation, transmission, distribution, and consumption of electrical energy.

One of the promises of the * smart grid*is to improve the power quality. Therefore, the reliability or continuity of service is one of the consequences that will result from the implementation of the self-healing aspects of the Smart Grid. However power quality issues should not form an unnecessary barrier against the development of

*or the introduction of renewable sources of energy. The smart properties of future grids should rather be a challenge for new approaches in an efficient management of power quality [11].*smart grids

An adequate power quality should guarantees electromagnetic compatibility between all equipment connected to the grid. Then, an important issue for the successful and efficient operation of smart grids is the introduction of advanced, flexible, robust, and cooperative set of signal processing and computational intelligent techniques for power quality analysis. With this set of techniques, an effective and extensive smart monitoring system can be devised and deployed. Such a monitoring system have to allow for the monitoring of such as voltage, current, bidirectional energy consumption at distribution transformers, substations transformers, smart meters, distribution feeders, distribution switching devices, and strategically installed power quality monitors in the power systems.

## 3. Harmonic estimation techniques: Before and after smart grid

Consider the monitored power line signal, after processed by the analog anti-aliasing filter, be expressed by

where * m*-th harmonic,

*-th harmonic can be defined as*m

Assuming * m*-th harmonic is equal to

*times the fundamental frequency), from (2) we have*m

The goal of harmonic estimation techniques is to provide estimates of the parameters

Basically, we can say that before * smart grid*s, the most used techniques for harmonic estimation assumed that

*s, new harmonic estimation techniques will be very needed and essential.*smart grid

## 4. Methods for estimating steady-state harmonics

Methods for estimating steady-state harmonics are more simple than time-varying ones, and its algorithms do not use information of the fundamental frequency of the signal under estimation. In what follows, we describe four algorithms.

### 4.1. Discrete fourier transform

The most common and the most used technique for steady-state harmonic estimation is the discrete Fourier transform (DFT) [8-10]. The DFT method is simple and easy to be implemented in monitoring systems, but its application for time-varying harmonics is not recommended.

Given the discrete signal * k*-th harmonic component can be straightforwardly estimated by the recursive equations:

and

respectively, where,

and

in which * N*is the number of samples within a integer number of cycles of the fundamental power signal.

The DFT algorithm is very simple and its implementation is easy for real-time application. However, if the fundamental frequency is not nominal and constant, then the estimates can carry significant errors.

### 4.2. Demodulation

The demodulation technique presented in [15] can be used to estimate the parameters of harmonics as point out in [16]. In similar way to the DFT technique the demodulation technique can give erroneous results if its filter is fixed.

The k-th harmonic parameters can be estimated by

and

in which

and

respectively, where

### 4.3. Goertzel

The Goertzel technique uses a second-order infinite impulse response filter to estimate the parameters of the * k*-th harmonic [17]. The Goertzel algorithm is more efficient than the Fast Fourier Transform (FFT) when the number of harmonics to be calculated is low.

The amplitude and phase of the k-th harmonic is estimated, respectively, by

and

in which

and

where

### 4.4. Linear least squares

The linear least squares (LS) algorithm estimates several harmonics in one evaluation instead of a unique estimate [18]. Its advantage is the acquisition of several harmonics in only one evaluation. However the computational burden is high.

Basically, the LS algorithm has as a result the vector given by

Thus, the amplitude and phase of the k-th harmonic (k ∈ [1, 2,...,

and

The vector

where

and

In this kind of technique, the number of harmonic has to be known a priori. Otherwise, the performance can be considered reduced, also, the computational complexity is higher due to the matrix operations.

## 5. Methods for estimating time-varying harmonics

Methods for estimating time-varying harmonics consider that not only the amplitudes and phases of harmonics change, but also the fundamental frequency, and consequently, the harmonics frequencies. Thus, the frequency estimation is generally required to improve the algorithms.

### 5.1. Discrete fourier transform with sampling frequency control

The main weakness of the DFT is to estimate the harmonics when the sampling frequency is not synchronous with the fundamental frequency. In order to guarantee this synchronism we can control the sampling frequency as shown in Fig. 1. This method reduces and can also eliminate the errors caused by the mismatch between the fundamental frequency and the sampling frequency, however, it requires a robust and controllable ADC converter and a frequency estimation algorithm. As a result, its use is not recommended.

### 5.2. Discrete fourier transform with signal resample

An alternative to the problem of synchronization of the sampling frequency when the sampling frequency is constant and not controllable is resampling the original signal before the harmonic estimation with the DFT. The drawback of this approach is the high computation complexity required by the resample process. Also, a frequency estimation technique is required to control the resampling process. Fig. 2 shows the block diagram of this strategy.

### 5.3. Discrete fourier with window

An interesting way of improving the DFT algorithm is using a window in each block of data before the evaluation of the DFT. The windowing of the data can deal with the spectral leakage of the DFT caused by the frequency deviation by adding some computational burden to the algorithm. Some windows generally used are the triangular and Hanning. The coefficients of a Hanning window are computed from the following equation:

The triangular window has its coefficient given by

for * N*even, and

for * N*odd.

### 5.4. Demodulation

An interesting method based on demodulation technique for estimating time-varying harmonics is presented in [16]. This technique can provide very accurate estimates with a reasonable computational complexity.

The block diagram of the demodulation technique is depicted in Fig. 3. The LP blocks implement identical low-pass filters and the blocks COS and SIN implement the demodulation signals expressed by

and

respectively. The term

where

The blocks AMP and PHAS implement, respectively, the expressions

and

respectively, where

In this technique, it is applied a approach to control the demodulation signals (blocks COS and SIN) and the frequency response of the low-pass filters (blocks LP) by the power frequency estimate, which is implemented by the block FREQ. The low pass filters are finite impulse response (FIR) filters which are controlled by a frequency estimator.

### 5.5. Non linear least squares

The nonlinear least squares (NLS) uses the same expressions of the linear least squares for evaluate the harmonics [18]. The advantage of this approach is the improving of the estimates related to the linear version, however, the additional searching of the optimal frequency introduces additional delay in the technique and computational burden.

The NLS algorithm test several values of

Thus, with the optimal

## 6. Performance analysis

In order to analyze the performance of the described techniques the following signal is considered:

where

Fig. 4 shows time estimations of the amplitude of the 3rd harmonic considering a 50% drop in the amplitude of signal when the fundamental frequency is equal to 60 Hz. Estimation delays of 2 cycles of the fundamental component are noted because the twocycles version of each technique was considered. However, when the fundamental frequency is set to 60.5 Hz such techniques exhibit significant errors in the estimates (time variations), as can be seen in Fig. 5. Otherwise, the time-varying techniques significantly improve the estimates. These results are depicted in Fig. 6. Table 1 shows the maximum of the absolute instantaneous error of all techniques after convergence of the algorithms (after the 50% drop in the amplitude of signal).

The best results are achieved with the demodulation and NLS techniques. Considering only these last two techniques, the errors were evaluated when the fundamental frequency varies between 59.5 Hz to 60.5 Hz for the 25th harmonic (See Fig. 7). Also, it is important to note that the improvement achieved by the DFT with hanning and triangular windows is significant compared with the standard DFT method as can be seen by Figs. 5 and 6. In order to better show this improvement, the errors, considering the DFT, DFT with triangular window and DFT with hanning window, were evaluated when the fundamental frequency varies between 59.5 Hz and 60.5 Hz for the 25th harmonic (Fig. 8).

DFT | 4.7655 |

Goertzel | 4.7655 |

LS | 4.7655 |

Demodulation (steady-state) | 4.7655 |

DFT with hanning window | 0.7479 |

DFT with triangular window | 0.2296 |

NLS | 0.0842 |

Demodulation (time-varying) | 0.0660 |

## 7. What is next and needed?

Most existing end-user equipment (computer, television, lamps, etc) emit almost exclusively at the lower odd integer harmonics, but there are indications that modern devices including certain types of distributed generators emit a broadband spectrum [11–14]. The measurement of these low levels of harmonics at higher frequencies will be more difficult than for the existing situation with higher levels and lower frequencies. This might require the development of new measurement techniques including a closer look at the frequency response of existing instrument transformers. Consequently, harmonic estimation of higher order harmonics will be very important and needed. In this case the sampling frequency should be increased to satisfy the Nyquist criterion and faster * analog to digital converter*(ADC) must be used to deal with this requirement.

Power electronic based photovoltaic solar and wind energy equipment may emit disturbances causing voltage fluctuations and unbalance. These types of electric sources will have large presence in the future grids very large. In order to deal with this new scenario, the harmonic estimation algorithms must be immune to higher voltage fluctuations and interharmonics.

An important issue associated with smart grid in regarding to harmonic estimation is the real time estimation of several harmonics instantaneously, including higher-order harmonics. Higher-order harmonics will be more and more important to estimate due its influence in sensitive electronics devices. Also, the dynamic and diversity of smart grid will demand different set of techniques to analyze the behavior of the time-varying harmonics. For deal with these issues, the use of reconfigurable hardware that allow the exchange of features between existing monitoring devices is of ultimate importance.

## 8. Concluding remarks

Several methods and techniques were developed so far for estimating steady-state and timevarying harmonics. Although several techniques can deal with time-varying harmonics, the implementation of them is incipient. However, the needs and demands related to * grids*is pushing forward the development of new techniques as well as discussion of new measurement standards for time-varying harmonics.

Although * smart grids*offers the opportunity to improve the quality, efficiency and reliability for power systems, the increase of disturbances levels is inevitable. Thus, new challenges related to the power quality will be introduced.