You are on page 1of 4

ISSN 2249-6343

International Journal of Computer Technology and Electronics Engineering (IJCTEE)


Volume 2, Issue 3, June 2012

Harmonic Detection using Microcontroller


Jaipreet Kaur Bhatti, Deepak Asati

Abstract--- Harmonic distortion meter is an instruments that This paper is organized as follows:
measure harmonic distortion or phase position or simply has Section 1- Introduction and need of harmonics detection.
been designed for measuring the quality of AC supply. Section 2- Explains Solution based on phase lock loop and
Harmonic distortion is a common problem in power systems,
its drawbacks. Section 3- Detection of harmonics using
data processing equipment and adjustable speed drives. In
communications applications, harmonic distortion meters
DFT and its advantages. Section 4- Hardware and circuit
are used to determine when the original frequency required for its working. Section 5- Gives the conclusions
transmitted is split into multiple frequencies due to of the present work.
irregularities in the line. Harmonic distortion meters are
important for analyzing the quality of power coming into a II. PHASE LOCK LOOP & ITS DRAWBACKS
system and for determining what is causing the problem.

Keywords--- DFT, microcontroller (ATMEGA16), Harmonic The various harmonics in a power system are typically
detection. measured with a heterodyne receiver if we are using
analog methods or by a FFT (Fast Fourier Transform)
when digital methods are being used. The harmonics can
I. INTRODUCTION be analyzed over a wide range of frequencies by means of
these methods. However, since the circuit configurations
This thesis basically employs a device which shows a
that are needed can become very complicated, the
method for finding the amplitude of the fundamental
equipment tends to be too expensive for practical use. This
frequency and the 3rd harmonic of AC voltage signals.
paper presents a novel harmonic meter using a PLL (Phase
The technique is consummate for identifying the
Locked Loop) circuit. By means of the phase feedback
distortions in the AC voltages .For example electronic
loop, a reference sinusoidal wave is locked on to the input
devices having nonlinear characteristics being used at
signal along with the harmonics that we wish to measure,
home and office are mostly computer based equipment
and hence the corresponding harmonic component in the
with a low power factor switch mode power supply. These
input signal is easily detected. The effectiveness of the
power supply sections include charging capacitors which
proposed harmonic meter is confirmed by experiment.
draw current at peak voltages. Thus for a given feeder
having finite impedance there can be a voltage drop near
Disadvantage comes to play in case of wrong manual
the peak voltage resulting in flattened top distortion of AC
tuning for detection of sinusoidal signal for desired
voltage. To identify these distortions we analyze the
frequency. Multiple frequencies just in case of 2 nd order
output signal in the frequency domain by utilizing
and 3rd order require use of separate phase detectors which
efficient digital processing techniques. In this thesis a
makes it complex and needs fine adjustments. In total
feature based method is developed to efficiently perform
harmonics distortion computation a separate logic is
the frequency synthesis and further perform correlation
required hence hardwired circuit here in inapplicable in
between the output signal and a varying sinusoid signal
case of reading manipulations and processing. In this idea
we are using a microcontroller which enrich the above
condition by making soft coding approach and hence can
be used in performing discrete Fourier transform results.
An 8 bit RISC microcontroller ATMEGA16 can provide
us 16MIPS of processing power using 16Mhz of clock
crystal, along with that it contains a 8 channel 10 bit ADC
which suits our application.

III. DETECTION OF HARMONICS USING DFT

Proposed methodology: In the proposed method a


harmonic meter using a microcontroller is designed . The
Fig. 1: Flattened top AC voltage caused by a low meter is built with a microcontroller and the full wave
power factor switch mode power supply. rectifier front-end circuit. The input signal to the 10-bit
ADC is full wave rectified.

106
ISSN 2249-6343
International Journal of Computer Technology and Electronics Engineering (IJCTEE)
Volume 2, Issue 3, June 2012

The software performs DFT calculation finding the


amplitude of the fundamental frequency and the 3rd
harmonic. The distortion is computed by the ratio of the
amplitude of the 3rd harmonic to the fundamental
frequency. The effectiveness of the proposed harmonic
meter is confirmed by experiment.

A. Total Harmonic Distortion, THD

To measure the wave shape distortion, we use the quantity


of the Total Harmonic Distortion, THD (equation 1). THD
is the ratio of the power of harmonic components to the Advantage of DFT:- Since the AC signal has symmetry
power of fundamental frequency. Our concern is the between positive cycle and negative cycle. We can find
voltage distortion we can just find the sum of the RMS of the harmonic component by capturing only half cycle.
the harmonic components, Vn and the RMS of the This reduces computing time by half.
fundamental frequency, V1.

THD = *100, n=2, 3.N

Most of the harmonic problem is caused by the 3rd


component. Since the 3rd harmonic is the 2nd highest
energy from the fundamental component. So we interest to
find only the 3rd harmonic distortion using equation 2.

HD = *100

Discrete Fourier Transform, DFT


Fig. 2: The 32-point sample half period AC input
We may decompose the periodic waveform, f(t) into the signal
summation of a number of sinusoids waveform easily
using the Discrete Fourier Transform (equation 3). A0 is IV. BLOCK DIAGRAM OF PROPOSED DESIGN
the amplitude of DC components. For AC voltage
waveform, A0 is zero.

Bridge
Xin [32]
Rectifier
Capture 32
samples.
Amplitude of
Determining
each
The amplitude for each harmonic can be computed from Bv & Cv for
harmonics-
equation 4. 1st &3rd
Harmonics.

Coefficien 3rd order Result


t Bv & Cv THD= on
for 1st&3rd (V3/V1)* LCD
order 100 will be
The coefficients Bv and Cv for each harmonic are easily harmonics shown.
calculated by multiplying the corresponding sine wave .
and cosine wave to the input signal respectively (equation Fig.3. Block diagram of proposed design.
5 and 6). Where delta t is time between sample, T is
period, Vy is input signal.

107
ISSN 2249-6343
International Journal of Computer Technology and Electronics Engineering (IJCTEE)
Volume 2, Issue 3, June 2012

High quality power supply has a perfect sinusoidal If an electrical quantity is made to vary directly in
signal with constant frequency and amplitude. On the proportion to this value (temperature etc) then what we
other hand, the use of nonlinear devices and the have is Analogue signal. Now we have
time-varying loads in the electric power system is we have brought a physical quantity into electrical
widespread and is growing with even bigger pace. Such domain. The electrical quantity in most case is voltage. To
devices and loads are consuming distorted current from bring this quantity into digital domain we have to convert
the power system grid.To preserve high power quality, the this into digital form. For this a ADC or analog to digital
most important indices, such as harmonics, sags, swells, converter is needed. Most modern MCU including AVRs
short interruptions, imbalances, and flickers, ideally has an ADC on chip. An ADC converts an input voltage
have to be eliminated. Inrecent years, researchers have into a number. An ADC has a resolution. A 10 Bit ADC
been developing tools for accurate power quality has a range of 0-1023. (2^10=1024) The ADC also has a
analysis, as well as devices for mitigation of power Reference voltage (ARef). When input voltage is GND the
supply imperfections. output is 0 and when input voltage is equal to ARef the
output is 1023. So the input range is 0-ARef and digital
output is 0-1023.

V. HARDWARE AND CIRCUIT DESIGN OF PROPOSED METER

Fig.4 Harmonic detection meter using microcontroller

108
ISSN 2249-6343
International Journal of Computer Technology and Electronics Engineering (IJCTEE)
Volume 2, Issue 3, June 2012

Frequency ,Phase, and Amplitude Tracking in Aircraft Electrical


Systems,
VI. CIRCUIT DESCRIPTION
[3] M. Karimi-Ghartemani and A.K. Ziarani, A nonlinear
timefrequency analysis method, IEEE Trans. Signal Process., vol.
From the above design, first of all input signal is applied to
52, no. 6, Jun. 2004, pp. 15851595
the circuit which is 220Vac. The bridge rectifier rectifies
the ac input to the pulsating dc, which would further made [4] Jovan M. KNEEVI1, Vladimir A. KATI2 , The Hybrid Method
constant 5V with the help of filter-capacitor arrangement for On-line Harmonic Analysis, 1Brose Fahrzeugteile GmbH &
and voltage stabilizer so that any change in ac would not CO. Kommanditgesellschaft, Hallstadt, D-96103, Germany
2University of Novi Sad, Faculty of Technical Sciences, Novi
proportionally change dc. The dc output is given to the Sad,21000, Serbia.
variable resistor which is used to select the voltage which
in case of PLL cannot be done because it needs a separate [5] Aboul-Seoud, A.K.; El-Badawy, E.-S.A.; Mokhtar, A.; El-Masry,
phase detector for different frequencies (voltages) this is W.; El-Barbry, M.; Hafez, A.E.-D.S.;, A simple 8-bit digital
microcontroller implementation for chaotic sequence generation,
then applied to the digital oscilloscope which shows the National Radio Science Conference (NRSC), 2011 28th Digital
total coverage of half cycle by capturing 32 samples. The Object Identifier: 10.1109/NRSC.2011.5873617 Publication Year:
output from this is given to the microcontroller where the 2011 , Page(s): 1 9
software performs the DFT calculations and the final
results are displayed on the LCD i.e. the fundamental
frequency, the third order harmonic component and the
harmonic distortion in percentage.
Block diagram of fig.3 shows the step by step procedure of
operation.

TOOL USED FOR SIMULATION -- Proteus


Professional 7

VII. RESULTS & CONCLUSION

Fundamental frequency 234V

3rd order harmonics 20V

harmonic distortion 8.7%

As a matter of fact, the frequency analysis of discrete time


signals is conveniently performed on a digital signal
processor which in our case is designed and programmed
in an embedded microcontroller. The project approach
applies a computational convenient representation of
discrete time signals known as Discrete Fourier transform
to estimate the fundamental and third harmonic frequency
of the signal. The computation of this ratio can identify the
distortion in ac voltage while being drawn through
different nonlinear devices so that after detecting the
harmonic component we can improve the quality of an ac
waveform.

REFERENCES
[1] Isamu Yamamoto, Keiju Matsui, Kazuo Tsuboi , A Harmonic meter
using a phase- lock- loop , Chubu University, Dep. Electrical Eng.
Kasugai ,487-8501, Japan(2001). E-Mail:keiju@isc.chubu.ac.jp.

[2] Francesco Cupertino, Member, IEEE, Elisabetta Lavopa, Pericle


Zanchetta, Member, IEEE, Mark Sumner, Senior Member, IEEE,
and Luigi Salvatore, Running DFT-Based PLL Algorithm for

109

You might also like