# Novel harmonic analysis method for smart metering

With wider deployments of smart metering, smart grids and distributed generation, power quality monitoring has become of great importance. Harmonic analysis of current and voltage signals allows several key power quality indicators. For example, an energy meter with harmonic analysis functions can characterize the state of the load or supply, enabling predictive maintenance or system optimization.

The presence of harmonics is an ever increasing concern for providers and consumers of energy alike. Excessive harmonic currents can lead to overheating of power transformers and reactive power compensators and neutral conductors. False tripping of protective relays can also be caused by harmonic currents.

Harmonic voltage and currents can also interfere with sensitive equipment operating in proximity to large harmonic generators. Traditionally, developers would use a digital signal processor to implement some version of the Fourier algorithm or bandpass filtering to perform harmonic analysis.

This article presents a new approach, titled Adaptive Real Time Monitoring (ARTM), and compares it against other possible methods: FFT algorithms and bandpass filtering. ARTM will be featured in the next generation Analog Devices (ADI) products for energy applications.

**Fourier based methods **

In energy metering or power quality monitoring systems, when the harmonic analysis is performed, phase currents and voltages are simultaneously sampled and then processed to compute the following power quality measurements on the fundamental and harmonic components: active, reactive and apparent powers, rms values, power factors, and harmonic distortions. Fast Fourier Transform (FFT) analysis comes immediately to mind. The procedure requires the following steps as in **figure 1**.

**Fig. 1: Steps required to implement FFT algorithm.**One must determine the period of the fundamental component. This can be a time consuming process that is typically realized by low pass filtering the phase voltages to isolate the fundamental and measuring the time between consecutive zero crossings. Any error in determining the period propagates to the error in amplitude and phase of the harmonics.

The sampling frequency must be modified to obtain 2N samples per period. This implies using analog to digital converters that allow variable sampling frequencies. Then one must acquire 2N samples corresponding to one or more periods. The last step is to execute the FFT algorithm. Samples taken across multiple periods increase the accuracy of the computations. But this means a heavier burden on the DSP and a slower overall response.

One can see that modifying the sampling frequency function of the fundamental period affects other calculations usually executed in an energy meter. Energy computations include a lot of filters that have coefficients computed function of the sampling frequency. Implementing an entire metering program with dynamic adjustment of such coefficients may be avoided if the Goertzel algorithm is adopted. This approach computes the DFT using a number of samples per period different than 2N, allowing for a constant sampling frequency independent of the fundamental period. The steps to implement such algorithm are as in

**.**

*figure 2*

Fig. 2: Steps to implement the Goertzel algorithm.Fig. 2: Steps to implement the Goertzel algorithm.

The period of the fundamental component still needs to be determined as already presented for the FFT implementation. The sampling frequency is now constant and a certain number of samples per period are acquired. The coefficients used in the Goertzel algorithm are computed based on the number of samples per period. The Fourier transform is then executed.