Вы находитесь на странице: 1из 43

Monitoring of Harmonics in Real Time

Submitted by:
Jasam Nawab 2016-EE-131

Muhammad Ahmad Iqbal 2016-EE-134

Khaliq Dad 2016-EE-136

Muhammad Anas 2016-EE-138

Supervised by: Prof. Dr. Muhammad Asghar Saqib

Department of Electrical Engineering

University of Engineering and Technology Lahore


Monitoring of Harmonics in Real Time

Submitted to the faculty of the Electrical Engineering Department

of the University of Engineering and Technology Lahore

in partial fulllment of the requirements for the Degree of

Bachelor of Science

in

Electrical Engineering .

Internal Examiner External Examiner

Director
Undergraduate Studies

Department of Electrical Engineering

University of Engineering and Technology Lahore


i
Declaration
I hereby declare that the work mentioned in this report is carried by us our own, except

where explicitly stated otherwise. We solemnly declare that to the best of our knowledge,

no part of this report has been copied or used otherwise.

Signed:

Date:

Signed:

Date:

Signed:

Date:

Signed:

Date:

ii
Acknowledgments
I have taken eorts in this project. However, it would not have been possible without the

kind support and help of many individuals and organizations. I would like to extend my

sincere thanks to all of them. I am highly indebted to Name of your Organization Guide

for their guidance and constant supervision as well as for providing necessary information

regarding the project also for their support in completing the project. I would like to

express my gratitude towards my parents member of (Organization Name) for their kind

co-operation and encouragement which help me in completion of this project.

I would like to express my special gratitude and thanks to industry persons for giving

me such attention and time. My thanks and appreciations also go to my colleague in de-

veloping the project and people who have willingly helped me out with their abilities.. . .

iii
Contents
Acknowledgments iii

List of Figures vi

List of Tables vii

Abbreviations viii

1 Problem Statement 1

2 Introduction 2
2.1 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2.2 Proposed Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

3 Literature Review 3
3.1 Integer Harmonics Categories . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.1.1 Odd Harmonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.1.2 Even Harmonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.1.3 Inter Harmonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.1.4 Sub Harmonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.1.5 Sources Of Harmonics . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.1.5.1 Magnetigation Non-linearities of Transformer . . . . . . . 4

3.1.5.2 Arcing Devices . . . . . . . . . . . . . . . . . . . . . . . . 5

3.1.5.3 Semi Conductors Devices . . . . . . . . . . . . . . . . . . 5

3.1.6 Total Harmonic Distortion . . . . . . . . . . . . . . . . . . . . . . . 5

3.1.6.1 Measurement . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1.6.2 Interpretation . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1.7 Total Demand Distortion . . . . . . . . . . . . . . . . . . . . . . . 7

4 Design and Simulations 8


4.1 Current Transformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4.2 Potential Transformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.3 Precision Rectier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.4 Analog to Digital Converter . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.4.1 Pins Used on ADS131E08 . . . . . . . . . . . . . . . . . . . . . . . 12

4.5 Voltage Regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.5.1 Voltage Regulator Design . . . . . . . . . . . . . . . . . . . . . . . 15

4.5.1.1 Schematic Diagram . . . . . . . . . . . . . . . . . . . . . 15

iv
v

4.5.1.2 PCB Design . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.5.1.3 PCB Hardware Design . . . . . . . . . . . . . . . . . . . . 16

4.5.1.4 Voltage Regulator interference with ADS131E08 . . . . . 16

4.6 RaspBerry Pie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4.7 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5 Applications 27
5.1 Harmonics in SATEC devices . . . . . . . . . . . . . . . . . . . . . . . . . 28

6 Methodology 29
6.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6.2 Gantt Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6.3 Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

7 Deliverables 32
List of Figures
4.1 Current Transformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4.2 Phasor Diagram of Current Transformer . . . . . . . . . . . . . . . . . . . 9

4.3 Potential Transformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.4 Phasor Diagram of Potential Transformer . . . . . . . . . . . . . . . . . . 9

4.5 Precision Rectier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.6 Analog to Digital Converter ADS131E08 . . . . . . . . . . . . . . . . . . . 11

4.7 ADS131E08 Schematic Diagram . . . . . . . . . . . . . . . . . . . . . . . . 12

4.8 ADS131E08 PCB Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.9 ADS131E08 Functional Diagram . . . . . . . . . . . . . . . . . . . . . . . 13

4.10 Pins on ADS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.11 LM7810 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4.12 LM7810 Internal Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4.13 AMS1117 Voltage Regulator . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.14 Schematic Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.15 PCB Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.16 PCB PDF Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.17 PCB Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.18 Voltage Regulator interference with ADS131E08 . . . . . . . . . . . . . . . 17

4.19 Raspberry Pi 3 Model B Board . . . . . . . . . . . . . . . . . . . . . . . . 17

6.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6.2 Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

vi
List of Tables
5.1 Direct Applications In Industries . . . . . . . . . . . . . . . . . . . . . . . 27

6.1 Gantt Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

vii
Abbreviations
THD Total Harmonics Distortion

FFT Fast Fourier Transform

GUI Graphical User Interference

viii
Chapter 1

Problem Statement
In these days, power quality is big concern in industries, commercial establishments and

in residences. This issue is mainly caused by non-linear and switching loads.

Harmonics refer to voltage and current signals whose frequencies are integer multiple

of fundamental frequency. Adjustable speed drives, power factor improvement devices,

LCD's, switching power supplies and arc furnaces are main causes of production of

harmonics in power system.

Our embedded systems are being damaged by these harmonics. We need to measure the

pollution of harmonics on a power line by a measure which is known as Total Harmonics

Distortion (THD).

1
Chapter 2

Introduction
2.1 Objective
To Develop a prototype which will work at 220V of WAPDA Supply to monitor the har-

monics present in the voltage and current signals which will help us to analyse harmonics

and to calculate the Total Harmonics Distortion(THD).

2.2 Proposed Solution


Harmonics monitoring in real time can be done using advanced microcontroller interfaced

with Analog to digital convertor having high sampling rate nearly double the fundamental

frequency we want to monitor according to Nyquist theorem[1]. After sampling the signal,

we have to show the harmonics waveform and Fast Fourier Transform of the incoming

voltage and current signal on GUI.So, that we can analyze the harmonics present in the

given voltage and current signal. For GUI, we wil use LabView software because of its

advanced features.

2
Chapter 3

Literature Review
Harmonics study and their analysis is very important now a days in eld of power

quality.Many Researches have been made for their study,monitoring and removal.So, that

eciency of power system and power electronics devices can increase.A good sinusoidal

waveform of voltage and current which is supplied by power supply company is hard to

maintain because of harmonics.

The presence of harmonics in electrical systems means that current and voltage are

distorted and deviate from sinusoidal waveforms.[2]Harmonics are signals or waves whose

frequency is an integral (Integer-number) multiple of the frequency of some reference

signal or wave.

3.1 Integer Harmonics Categories


Odd harmonics and even harmonics. Other than integer harmonics there are sub and

inter harmonics where n is fractional.

3.1.1 Odd Harmonics

Integer harmonics having frequencies which are odd integer multiple of fundamental fre-

quency are known as odd harmonics. Odd harmonics may be expressed as

I(t) = I ∗ Sin(2 ∗ pi ∗ n ∗ f ∗ t) (3.1)

Where, n = 3, 5, 7, . . . etc. and In is the amplitude of harmonic component of order n.

3.1.2 Even Harmonics

Integer harmonics having frequencies which are even integer multiple of fundamental

frequency are knows as even harmonics[1].

Even harmonics may be expressed as

I(t) = I ∗ Sin(2 ∗ pi ∗ n ∗ f ∗ t) (3.2)

3
4

Where, n = 2, 4, 6, . . . etc. and In is the amplitude of harmonic component of order n.

3.1.3 Inter Harmonics

Often in non-sinusoidal waveform there are harmonics having frequencies which are

greater than fundamental but not integer multiple of fundamental frequency. These

are known as inter-harmonics.

Mathematically,

I(t) = I ∗ Sin(2 ∗ pi ∗ n ∗ f ∗ t) (3.3)

Where, n greater than 1 but not integer; e.g.: 1.2, 1.5, 2.7 . . . etc

3.1.4 Sub Harmonics

Often in non-sinusoidal waveform there are harmonics having frequencies which are

smaller than fundamental frequency. These are known as sub- harmonics.

Mathematically,

I(t) = I ∗ Sin(2 ∗ pi ∗ n ∗ f ∗ t) (3.4)

Where, n less than 1; e.g.: 0.2, 0.5, 0.7 . . . etc

3.1.5 Sources Of Harmonics

The main sources of harmonics in electric power systems can be categorized as:

• Magnetization nonlinearities of transformer

• Arcing devices

• Semi-conductor based power supply

• Inverter fed A.C drives

• Thyristor controlled reactors

• Phase controllers

• A.C regulators

3.1.5.1 Magnetigation Non-linearities of Transformer

• Normal excitation current of a transformer is non-sinusoidal. The distortion is

mainly caused by zero sequence triplen harmonics and particularly the third present

in the excitation current.

• Transformers are designed to make good use of the magnetic properties of the core

material. When such transformers are subjected to a rise in voltage, the cores

face a considerable rise in magnetic ux density, which often causes considerable

saturation. This saturation with symmetrical magnetizing current generates all the

odd harmonics
5

• When a transformer is switched o, sometimes there exists a residual ux density

in the core. When the transformer is re-energized the ux density can reach peak

levels of twice the maximum ux density or more. It produces high ampere-turns

in the core. This causes magnetizing currents to reach up to 510 per unit of

the rated value, which is very high as compared to the normal values of a few

percentage points. This is known as inrush current. This causes generation of

enormous second order harmonic component in the transformer current.

3.1.5.2 Arcing Devices

This category includes arc furnaces, arc welders, and discharge-type lighting (uorescent,

sodium vapor, mercury vapor) with magnetic ballasts.The arc is basically a voltage clamp

in series with a reactance that limits current to a reasonable value.

The voltage-current characteristics of electric arcs are nonlinear. The voltage decreases

as the arc current increases, limited only by the impedance of the power system. This

gives the arc the appearance of having a negative resistance for a portion of its operating

cycle such as in uorescent lighting applications. In electric arc furnace applications, the

limiting impedance is primarily the furnace cable and leads with some contribution from

the power system and furnace transformer. Currents in excess of 60,000 A are common.

3.1.5.3 Semi Conductors Devices

• Semiconductor based power supply systems are the main sources of harmonics.

Harmonics generated in power supply include integer harmonics, inter harmonics

and sub harmonics.

• Application of AC drives has increased to a great extent, most of which are inverter

fed AC drives. They use switching circuits using semiconductor devices like GTO,

IGBT, etc.

• For supply of stable and balanced three phase electric power, phase controller

plays important role in power system. Phase controllers used in power system act

as source of harmonics.

• AC regulators used in power system apply both o line and on line control technique

for voltage regulation which result in harmonic generation. On line regulation

technique distorts wave-shape more than o line regulation along with other power

system disturbances like transients, DC oset, icker etc. Thyristor controlled

single phase or polyphase regulators using half wave, full wave or integral cycle

control technique produce sub-harmonics

3.1.6 Total Harmonic Distortion

The THD is a measure of the eective value of the harmonic components of a distorted

waveform[3]. That is, it is the potential heating value of the harmonics relative to the
6

fundamental. This index can be calculated for either voltage or current:

v
u
u hmax
X
T HD = t M h2/M 1 (3.5)
hgreaterthan1

Where Mh is the RMS value of harmonic component h of the quantity M.The RMS

value of a distorted waveform is the square root of the sum of the squares as shown in

Equations (2.16) and (2.17). The THD is related to the rms value of the waveform as

follows:

The THD is a very useful quantity for many applications, but its limitations must be

realized. It can provide a good idea of how much extra heat will be realized when a

distorted voltage is applied across a resistive load. Likewise, it can give an indication of

the additional losses caused by the current owing through a conductor.

However, it is not a good indicator of the voltage stress within a capacitor because that

is related to the peak value of the voltage waveform, not its heating value. The THD

index is most often used to describe voltage harmonic distortion.

Harmonic voltages are almost always referenced to the fundamental value of the waveform

at the time of the sample[4].

Because fundamental voltage varies by only a few percent, the voltage THD is nearly

always a meaningful number.

3.1.6.1 Measurement

The distortion of a waveform relative to a pure sinewave can be measured either by using

a THD analyzer to analyse the output wave into its constituent harmonics and noting

the amplitude of each relative to the fundamental; or by cancelling out the fundamental

with a notch lter and measuring the remaining signal, which will be total aggregate

harmonic distortion plus noise.

Given a sinewave generator of very low inherent distortion, it can be used as input to

amplication equipment, whose distortion at dierent frequencies and signal levels can

be measured by examining the output waveform.

There is electronic equipment both to generate sinewaves and to measure distortion; but

a general-purpose digital computer equipped with a sound card can carry out harmonic

analysis with suitable software. Dierent software can be used to generate sinewaves, but

the inherent distortion may be too high for measurement of very low-distortion ampliers.

3.1.6.2 Interpretation

For many purposes dierent types of harmonics are not equivalent. For instance, crossover

distortion at a given THD is much more audible than clipping distortion at the same

THD, since the harmonics produced are at higher frequencies, which are not as easily

masked by the fundamental.A single THD number is inadequate to specify audibility,

and must be interpreted with care. Taking THD measurements at dierent output levels
7

would expose whether the distortion is clipping (which increases with level) or crossover

(which decreases with level).

THD is an average of a number of harmonics equally weighted, even though research

performed decades ago identies that lower order harmonics are harder to hear at the

same level, compared with higher order ones. In addition, even order harmonics are said

to be generally harder to hear than odd order.[citation needed] A number of formulas

that attempt to correlate THD with actual audibility have been published, however none

have gained mainstream use.

3.1.7 Total Demand Distortion

Current distortion levels can be characterized by a THD value but this can often be

misleading. A small current may have a high THD but not be a signicant threat to the

system.

For example, many adjustable-speed drives will exhibit high THD values for the input

current when they are operating at very light loads. This is not necessarily a signicant

concern because the magnitude of harmonic current is low, even though its relative cur-

rent distortion is high.

Some analysts have attempted to avoid this diculty by referring THD to the fundamen-

tal of the peak demand load current rather than the fundamental of the present sample.

This is called total demand distortion and serves as the basis for the guidelines in IEEE

Standard 519-1992, Recommended Practices and Requirements for Harmonic Control in

Electrical Power Systems. It is dened as follows:

s
hmax
P
Ih2
h=2
T DD = (3.6)
Il
IL is the peak, or maximum, demand load current at the fundamental frequency compo-

nent measured at the point of common coupling (PCC). In Pakistan, the frequency used

by power supply company is 50Hz which is fundamental frequency.Harmonic related to

this fundamental frequency which causes high distortion is 3rd order harmonic having

frequency 150HZ and magnitude 3 times lesser than fundamental component magnitude.

As the frequency of the harmonics goes on increasing their magnitude goes on decreas-

ing hence their eect in distorting the waveform decreases.So, our major concern is to

monitor the lower order harmonics which in return help us to improve the power quality

of our power system.


Chapter 4

Design and Simulations


Details of devices are given below in the order they have to be used in monitoring these

harmonics.

4.1 Current Transformer


Current transformer is an instrument transformer which is used along with measuring de-

vices because its secondary current is proportional to the primary current (under normal

conditions of operation) and diers from it by approximately zero angle.The measur-

ing devices cannot be directly connected to the high magnitude supplies hence current

transformers are used to supply those devices with currents of magnitude proportional to

those of power,are shown in Figure 4.1 and 4.2 . A current transformer also isolates the

Figure 4.1: Current Transformer

measuring instruments from high voltage circuits.Principle of the current transformer

is the same as that of the power transformer. Like the power transformer, the current

transformer also contains a primary and a secondary winding. Whenever an alternating

current ows through the primary winding, alternating magnetic ux is produced, which

then induces alternating current in the secondary winding. In the case of current trans-

formers, the load impedance or burden is very small. Therefore the current transformer

operates under short circuit conditions. Also the current in the secondary winding does

not depend on load impedance but instead depends on the current owing in the primary

winding.

8
9

Figure 4.2: Phasor Diagram of Current Transformer

4.2 Potential Transformer


Potential transformer is dened as an instrument transformer which is used for transfor-

mation of voltage from a higher value to lower value.The phasor diagram and potential

transformer are shown in Figure 4.3 and 4.4.

This transformer steps down the voltage to a safe limit value which can be easily mea-

Figure 4.3: Potential Transformer

sured by ordinary low voltage instrument like a voltmeter, wattmeter and watt-hour me-

ters .Potential transformer has high-quality core operating at low ux density so that the

Figure 4.4: Phasor Diagram of Potential Transformer


10

magnetising current is small. Primary winding has a large number of turns and Secondary

winding has small number of turns.To reduce the leakage reactance, co-axial winding is

used in it.Potential transformer is connected in parallel with the circuit.Primary windings

of the potential transformer are directly connected to the power circuit whose voltage is

going to be measured.Secondary terminals of the potential transformer are connected to

the measuring instrument like voltmeter.

4.3 Precision Rectier


The precision rectier also called as a super diode.It is obtained by conguring an oper-

ational amplier in order to have a circuit behave like an ideal diode and rectier.It is

useful for high-precision signal processing.

Precision rectier using LT1078 circuit as shown in Figure 4.5. First section of negative

Figure 4.5: Precision Rectier

inputs operates as a closed-loop inverter (A=-1) and the second section is just a buer

for the positive output.When the input signal is positive, then the output of rst op-amp

remains saturated near GND, and the diode turn into high-impedance, letting the signal

to ow straight to the buer stage non-inverted.Complex result is a full-wave rectied

waveform at the output of the buer.

4.4 Analog to Digital Converter


The ADS131E08 are a family of multichannel, simultaneous sampling, 24-bit, delta-

sigma, analog-to-digital converters (ADCs) with a built-in programmable gain amplier

(PGA), internal reference, and an onboard oscillator. The ADC wide dynamic range,

scalable data rates, and internal fault detect monitors make the ADS131E08 attractive in

industrial power monitoring and protection as well as test and measurement applications.

True high-impedance inputs enable the ADS131E0x to directly interface with a resistor-

divider network or a voltage transformer to measure line voltage, or a current transformer

or Rogowski coil to measure line current. With high integration levels and exceptional

performance, the ADS131E08 family enables the creation of scalable industrial power

systems at signicantly reduced size, power, and low overall cost.

• Outstanding Performance

• Dynamic Range: 118 dB at 1 kSPS

• Crosstalk: 110 dB
11

• THD: 90 dB at 50 Hz and 60 Hz

• Analog Supply Range Options: 3 V to 5 V (Unipolar),-2.5 Vto +2.5V (Bipolar,

Allows DC-Coupling)

• Digital: 1.8 V to 3.6 V

• Low Power: 2 mW per Channel

• Data Rates: 1, 2, 4, 8, 16, 32, and 64 kSPS

• Programmable Gains: 1, 2, 4, 8, and 12

• Fault Detection and Device Testing Capability

• SPI Data Interface and Four GPIOs

• Package: TQFP-64 (PAG)

• Operating Temperature Range: 40 to +105 degree

As shown in Figure 4.6,4.7,4.8 and 4.9

Figure 4.6: Analog to Digital Converter ADS131E08


12

Figure 4.7: ADS131E08 Schematic Diagram

Figure 4.8: ADS131E08 PCB Design

4.4.1 Pins Used on ADS131E08

As shown in Figure 4.10


13

Figure 4.9: ADS131E08 Functional Diagram

Figure 4.10: Pins on ADS

4.5 Voltage Regulator


In our we are using two voltage regulators LM7810 and AMS1117 reason is that there

are rectier voltage uctuation due to the change in AC voltages we use these Voltage

Regulators to give supply to ADS131E08 (Analog-Digital Converter)


14

1. LM7810 the LM78XX series of three terminal positive regulators are available in

the TO-220 package and with several xed output voltages, making them useful in

a wide range of applications. As shown in Figure 4.11

Figure 4.11: LM7810

• Output Voltages:10V with 2 percent tolerance

• Input Voltages:12-35V

• Operating Temperature:0 to 125 degree

As shown in Figure 4.12

Figure 4.12: LM7810 Internal Circuit

2. AMS1117 is a popular SMD package 3-pin voltage regulator that is available in

many models for xed and adjustable voltage requirements. The IC can deliver a

maximum current of 1A and the output voltage can vary from 1.5V to 5V. It also

has a low drop out voltage of 1.3V when operating at maximum current. As shown

in Figure 4.13

• Output Voltages:10 to 12V

• Input Voltages:6-12V

• Operating Temperature:-40 to 125 degree Celcius


15

Figure 4.13: AMS1117 Voltage Regulator

4.5.1 Voltage Regulator Design

4.5.1.1 Schematic Diagram

As shown in Figure 4.14

Figure 4.14: Schematic Diagram

4.5.1.2 PCB Design

As shown in Figure 4.15 As shown in Figure 4.16

Figure 4.15: PCB Design


16

Figure 4.16: PCB PDF Design

4.5.1.3 PCB Hardware Design

As shown in Figure 4.17

Figure 4.17: PCB Hardware

4.5.1.4 Voltage Regulator interference with ADS131E08

As shown in Figure 4.18


17

Figure 4.18: Voltage Regulator interference with ADS131E08

4.6 RaspBerry Pie


• Processor Broadcom BCM2387 chipset,1.2GHz Quad-Core ARM Cortex-A53 (64Bit),802.11

bgn Wireless LAN and Bluetooth 4.1

• IEEE 802.11 bgn Wi-Fi. Protocol: WEP, WPA WPA2, algorithms AES-CCMP

(maximum key length of 256 bits), the maximum range of 100 meters. IEEE 802.15

Bluetooth, symmetric encryption algorithm Advanced Encryption Standard (AES)

with 128-bit key, the maximum range of 50 meters.As shown in Figure 4.19

• GPU Dual Core Video Core IV Multimedia Co-Processor. Provides Open GL ES

2.0, hardware-accelerated Open VG, and 1080p30 H.264 high-prole decode. Ca-

pable of 1Gpixel per sec, 24GFLOPs with texture ltering and DMA infrastructure

Figure 4.19: Raspberry Pi 3 Model B Board


18

• Memory 1GB LPDDR2

• Operating System Boots from Micro SD card, running a version of the Linux op-

erating system or Windows 10 IoT Dimensions 85 x 56 x 17mm

• Power Micro USB socket 5V1, 2.5A

• Connectors Ethernet 10/100 BaseT Ethernet socket

• Video Output HDMI (rev 1.3 and 1.4) Composite RCA (PAL and NTSC)

• Audio Output Audio Output 3.5mm jack HDMI USB 4 x USB 2.0 Connector

• GPIO Connector 40-pin 2.54 mm (100 mil) expansion header: 2x20 strip Providing

27 GPIO pins as well as +3.3 V, +5 V and GND supply lines

• Camera Connector 15-pin MIPI Camera Serial Interface (CSI-2)

• Display Connector Display Serial Interface (DSI) 15 way at ex cable connector

with two data lanes and a clock lane

• Memory Card Slot Push/pull Micro SDIO


19

4.7 Software
Laboratory Virtual Instrument Engineering Workbench is a software development envi-

ronment and language developed by National Instruments. Its innovation is that it uses

graphical diagrams rather than lines of text which makes it more intuitive for engineers

and excellent for parallel programming.It is written in C++ programming language.

Keil MDK is the complete software development environment for a wide range of Arm

Cortex-M based microcontroller devices. MDK includes the MicroVision IDE and de-

bugger, Arm C/C++ compiler, and essential middleware components.ULINK debug

adapters allow you to program, debug, and analyze your embedded applications. Here

at present we are in testing phase so we test it on STM Board.Following is the code for

STMBoard

/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
#include "main.h"
#include "stm32f4xx_hal.h"

/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Private variables ---------------------------------------------------------*/


SPI_HandleTypeDef hspi1;
int a=0;
/* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/

/* USER CODE END PV */

/* Private function prototypes -----------------------------------------------*/


void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_SPI1_Init(void);
int c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0;
/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
uint8_t WSPI[2],RSPI[19],WSPI1[3],WSPI2[2],WSPI3[2],WSPI4[2],WSPI5[2],WSPI6[2];
/* USER CODE END PFP */
20

/* USER CODE BEGIN 0 */

/* USER CODE END 0 */


const uint8_t nof_bytes = 2*8+3;
//uint8_t data[nof_bytes];
long resp[nof_bytes];
//memset(data, 0x00, sizeof(data));

// * @brief The application entry point.


// *
// * @retval None
// */
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_SPI1_Init();

/* USER CODE BEGIN 2 */


HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_0,GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_2,GPIO_PIN_SET);
//HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_RESET);
HAL_Delay(1);
// SIR This commented Code is for writting the config1 register and to write some other
// HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_RESET);
// HAL_Delay(10);
// HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_SET);
// WSPI[0]=0x11;
//HAL_SPI_Transmit(&hspi1,WSPI,1,10);
// WSPI1[0]=0x41;
// WSPI1[1]=0x00;
// WSPI1[2]=0x90;
//HAL_SPI_Transmit(&hspi1,WSPI1,3,10);
// WSPI2[0]=0x01;
// WSPI2[1]=0x00;
//HAL_SPI_Transmit(&hspi1,WSPI2,2,0);
//HAL_SPI_Receive(&hspi1,RSPI,1,0);
21

HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_RESET);
while (1)
{
//HAL_SPI_Receive(&hspi1,RSPI,19,1);
a=HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_10);
if (a==0)
{
HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_RESET);
HAL_Delay(1/1000);
for (int i = 0; i < 19; i++)
{
resp[i] = HAL_SPI_Receive(&hspi1,RSPI,19,1);
}
HAL_Delay(1/1000);
HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_RESET);
}
for (int ch = 1; ch <= 8; ch++)
{
long val = 0;
long value = 0;
val= (((RSPI[(3*(ch))+0]&0xff) << 16) | ((RSPI[(3*(ch))+1]&0xff) << 8) | (RSPI[(3*(ch))
if( ((val & 0xffffff) & (0x800000)))
{
value = val|0xff000000;
}
else
{
value = val;
}
float volt = (value*2.4/8388607);
if (ch == 1)
{ c1=volt;}
if (ch == 2)
{ c2=volt; }
if (ch == 3)
{ c3=volt; }
if (ch == 4)
{ c4=volt; }
if (ch == 5)
{ c5=volt; }
if (ch == 6)
22

{ c6=volt; }
if (ch == 7)
{ c7=volt; }
if (ch == 8)
{ c8=volt; }
}

}
}

/**
* @brief System Clock Configuration
* @retval None
*/

void SystemClock_Config(void)
{

RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;

/**Configure the main internal regulator output voltage


*/
__HAL_RCC_PWR_CLK_ENABLE();

__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);

/**Initializes the CPU, AHB and APB busses clocks


*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = 16;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}
23

/**Initializes the CPU, AHB and APB busses clocks


*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;

if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)


{
_Error_Handler(__FILE__, __LINE__);
}

/**Configure the Systick interrupt time


*/
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);

/**Configure the Systick


*/
HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

/* SysTick_IRQn interrupt configuration */


HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
}

/* SPI1 init function */


static void MX_SPI1_Init(void)
{

/* SPI1 parameter configuration*/


hspi1.Instance = SPI1;
hspi1.Init.Mode = SPI_MODE_MASTER;
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
hspi1.Init.NSS = SPI_NSS_SOFT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
24

hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi1.Init.CRCPolynomial = 10;
if (HAL_SPI_Init(&hspi1) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}

/** Configure pins as


* Analog
* Input
* Output
* EVENT_OUT
* EXTI
*/
static void MX_GPIO_Init(void)
{

GPIO_InitTypeDef GPIO_InitStruct;

/* GPIO Ports Clock Enable */


__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();

/*Configure GPIO pin Output Level */


HAL_GPIO_WritePin(CS_GPIO_Port, CS_Pin, GPIO_PIN_SET);

/*Configure GPIO pin Output Level */


HAL_GPIO_WritePin(Start_GPIO_Port, Start_Pin, GPIO_PIN_SET);

/*Configure GPIO pin Output Level */


HAL_GPIO_WritePin(GPIOB, Reset_Pin|PWDN_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin : CS_Pin */


GPIO_InitStruct.Pin = CS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(CS_GPIO_Port, &GPIO_InitStruct);
25

/*Configure GPIO pins : Start_Pin Reset_Pin PWDN_Pin */


GPIO_InitStruct.Pin = Start_Pin|Reset_Pin|PWDN_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

/*Configure GPIO pin : DRDY_Pin */


GPIO_InitStruct.Pin = DRDY_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(DRDY_GPIO_Port, &GPIO_InitStruct);

/* USER CODE BEGIN 4 */

/* USER CODE END 4 */

/**
* @brief This function is executed in case of error occurrence.
* @param file: The file name as string.
* @param line: The line in file as a number.
* @retval None
*/
void _Error_Handler(char *file, int line)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
while(1)
{
}
/* USER CODE END Error_Handler_Debug */
}

#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
26

* @param line: assert_param error line source number


* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}

#endif /* USE_FULL_ASSERT */

/**
* @}
*/

/**
* @}
*/

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/


Chapter 5

Applications
Higher harmonics of the fundamental frequencies in the AC Power Systems is a prob-

lem faced by many Electrical Industries and Power Houses. Due the presence of these

harmonics, life of many electronic components has been shortened. For example, the ca-

pacitors inside these components may draw excessive current and prematurely fail from

increased dielectric loss and heating[5]. Induction motors may refuse to start or may

run at subsynchronous speeds. Circuit breakers may fail to interrupt currents due to

improper operation of blowout coils. Overvoltages and excessive currents in the system

happen due to resonances of harmonics in the network and consequent dielectric insta-

bility of insulated cables.

Table 5.1: Direct Applications In Industries

Name Applications and Uses


Electricity Bills Accuracy of calculating Bill is increased

Electrical Installation Optimize the selection of your electrical instal-


lation

Energy Quality Improve energy quality

Increase Continuity of service By eliminating risks of stoppages due to nui-


sance tripping

Eliminate Malfunctions Your electrical equipment by reducing over-


heating increasing its lifetime by up to 30 per-
cent.

Inorder to overcome this problem rst we much identify these harmonics and their sources

in the AC Power System. Identifying the generation or injecting source is not much of

a problem, since any device with nonlinear characteristics that derive their input power

from a sinusoidal electrical system may be responsible for injecting harmonic currents

and voltages into the electrical system.

The real challenge lies in identifying the order and amplitude of these harmonics[6].This

will be done through a micro-controller(STM32, most probably), acquiring data in real

27
28

time. This data and analysis will help Electrical Engineers in future to remove these

harmonics, once their order and amplitudes are identied correctly, through active or

passive lters.

5.1 Harmonics in SATEC devices


All SATEC meters from PM130EH and up provides details about the harmonics, includ-

ing:

• Measurement of THD as well as TDD with local display and via communication

• Measurement of K Factor for transformer performance monitoring and design

• Measurement of individual harmonics for depth analysis (up to 40th in the basic

meters, 50th in mid range and 63rd in high end)

• Automatic comparison to International power quality and harmonics standards,

such as IEEE 519

• Programmable controller logic on harmonics such as in cases of high harmonic level,

PF control application or high losses detection


Chapter 6

Methodology
We are working on 220V wapda supply. As its voltage and current are beyond the ratings

of our controller. So we have to step down both voltage and current so that they can

meet our controller ratings. For this purpose, we have to use current transformer and

potential transformer. They step down the voltage and current to our desired level After

this, we have to use a precision rectier so that the negative cycle can be converted to

positive without the loss of information because controller cannot operate on negative

cycle. LT1078 is used to develop precision rectier circuit.

The analog to digital converter present in the controller is interfaced to convert analog

signal into digital signal so that the controller may process the information.

To operate controller Labview software is used to command controller and to show the

harmonics signals in real time in its GUI. Then, analysis part begins in which we take

Fast Fourier Transform (FFT) and Total Harmonics distortion (THD) of the coming

signal from Wapda Supply which is to be monitored[7].

29
30

6.1 Block Diagram


as Shown in Figure 6.1

Figure 6.1: Block Diagram

6.2 Gantt Chart


Table 6.1: Gantt Chart

Task Name Assigned To Start Date Due Date Phases


Theory 26/09/2019 28/10/2019 Phase1

Simulation 26/10/2019 28/11/2019 Phase2

Hardware Components 26/11/2019 28/12/2019 Phase3

Hardware Simulations 26/12/2019 28/01/2020 Phase4

Hardware Simulations 26/01/2019 28/02/2020 Phase5

Completion of Project 26/02/2019 28/03/2020 Phase6

Thesis Report 26/03/2019 28/04/2020 Phase7

Final Evaluation 26/04/2019 29/05/2020 Phase8


31

6.3 Flowchart
as Shown in Figure 6.2

Figure 6.2: Flowchart


Chapter 7

Deliverables
• A harmonic analyser is a device which is used to measure frequencies, amplitudes,

dierent phases and various components of a non-sinusoidal waveform. It mainly

consists of multipliers, an input device, and integrators.

• The harmonic analyser is used to check harmonics in electrical systems. Harmonics

are electrical voltages and currents that can result in power problems in the electri-

cal system. The high harmonic voltage causes failure in machinery and equipment.

Harmonic distortion is a concern among various industrial sectors in India. The

impact of the harmonic distortion depends on how much the electrical power sys-

tem can withstand and the susceptibility of the equipment to harmonic voltage.

• The harmonic analyser is the best equipment to carry out a detailed power quality

analysis in the facility in order to determine the wave shapes of the current and

voltage on their frequency spectrums.

• A harmonic analysers are helpful in providing a thorough analysis of the suspected

source of harmonic voltage. This data is used to calculate the harmonic ratio

function at a value that ranges from 0 percent to 100 percent. This indicates the

deviation of both the sinusoidal and sinusoidal waveforms. The resulting values

indicate the presence of harmonic voltage. Electricians use a harmonic analyser to

detect harmonic voltage, thereby preventing any further damage to the equipment

and saving repair costs.

• Using a harmonic analyser, industries can signicantly improve their energy e-

ciency by adopting all possible measures. With the early detection of harmonic

32
33

voltage, industries can replace their older equipment, reducing the risk of any fur-

ther damage or complete shutdown of the equipment.


References
J. S. Subjak and J. S. Mcquilkin, Harmonics-causes, eects, measurements, and anal-

ysis: an update, IEEE transactions on industry applications, vol. 26, no. 6, pp. 1034

1042, 1990.

R. Barrass, Scientists must write: a guide to better writing for scientists, engineers and

students. RoutledgeFalmer, 2002.

I. of Electrical and E. E. S. P. C. Committee, IEEE Guide for Harmonic Control and

Reactive Compensation of Static Power Converters. IEEE, 1981.

S. Easterbrook, Power Quality in Electrical Systems, Last accessed on May 19, 2010.

D. D. Shipp, Harmonic analysis and suppression for electrical systems supplying static

power converters and other nonlinear loads, IEEE Transactions on Industry Applica-

tions, no. 5, pp. 453458, 1979.

A. Kusko and M. T. Thompson, Power quality in electrical systems. McGraw-Hill New

York, 2007, vol. 23.

R. Chandrasekhar,  How to Write a Thesis: A Working Guide , http://ciips.ee.uwa.edu

.au/pub/HowToWriteAThesis.pdf , Last accessed on May 19, 2010.

34

Вам также может понравиться