Sei sulla pagina 1di 42

Integration and Management of Solar Energy in

Future Grid System Smart Grid

Submitted by
M. Shahmeer Hassan

2012183

M. Asad Ullah Khalid

2012204

Salman Ahmad Bhatti

2012336

Saman Khawar

2012340

M. Asad Ullah Khalid

2012183

M. Shahmeer Hassan

2012204

Salman Ahmad Bhatti

2012336

Saman Khawar

2012340

Advisor: Dr. Husnul Maab

Advisor: Dr. Husnul Maab

Co-Advisor: Mr. Attique Ur Rehman

Co-Advisor: Mr. Attique Ur Rehman

Faculty of Electrical Engineering


GIK Institute of Engineering Sciences and Technology
Topi, District Swabi, Khyber Pakhtunkhwa, Pakistan.www.giki.edu.pk
April 2016

Certificate of Ownership
The report is for the final year project titled: Integration and Management of Solar Energy in
Future Grid System - Smart Grid. The work contained in the report has been brought together by
a collective effort of M. Asad Ullah Khalid, M. Shahmeer Hassan, Salman Ahmad Bhatti and
Saman Khawar; under the guidance of Mr. Attique Ur Rehman, the Co-Advisor and Dr. Husnul
Maab, the Advisor. Research publications, international surveys, and content available on the
internet were referred for the compilation of the project report.

Acknowledgments

We would like to acknowledge the presence of all those people who helped us. It is our pleasure
to thank all the people who guided us, those who were never reluctant to help us through the
process of grasping the much needed concepts for the completion of the project.
We are utterly grateful of the entire Electrical Engineering Department of our institute for guiding
us. In particular we would like to thank Dr. Nisar, Dean of Faculty of Electrical Engineering, our
mentors, Dr. Husnul Maab and Mr. Attique Ur Rehman; without their constant support in all
aspects of the project and continuous supervision we could not have reached to the conclusion.
Mr. Mazhar Javed, Mr. Abdul Basit, Mr. Khan Wali and Mr. Mehran Bashir for their support and
availability at every stage. Lastly, the entire team is extremely thankful of Ms. Hafsa Qamar and
Ms. Halima Qamar, the graduate students at our institute, for taking time out to help us solving the
problems we faced while working on the project.

Abstract
The intent of the project was to develop a user end model of Smart Grid that would have the ability
to dynamically manage energy from the renewable energy sources and the utility in a way that
uninterrupted power supply to the user is ensured. The wireless sensor network receives and
transmits real-time data between grid entities for instantaneous balance in demand and supply. The
central control unit at the distribution grid is responsible for managing these various sources of
power and supply energy in accordance with the power plan of every individual user.
Our prototype integrated solar energy with the utility at the distribution grid and there onwards
streamed a summation of power through different energy sources to the three users. Reception of
real-time data enabled the central control unit to be informed about the usage of power of every
individual user at every instant. By default every user was supplied with grid-tied power. If the
power usage of a user decreased from a particular value, the central control unit switched the
supply to the user from grid-tied power supply to solar only. Therefore giving a leverage to the
consumers with lower power consumption.

Table of Contents
1

Introduction ........................................................................................................................... 9
1.1

Problem Statement ........................................................................................................... 9

1.2

Objectives ......................................................................................................................... 9

Literature Review ................................................................................................................ 11


2.1

Smart Grid ...................................................................................................................... 11

2.2

Progress in Smart Grid around the World ...................................................................... 12

System Model ....................................................................................................................... 14


3.1

Block Diagram ............................................................................................................... 14

3.2

Integration of Solar Energy ............................................................................................ 15

3.3

Single Phase Grid-Tie Inverter ....................................................................................... 15

3.3.1

Control Circuit ........................................................................................................ 16

3.3.2

Power Circuit .......................................................................................................... 19

3.3.3

Gate Drivers ............................................................................................................ 19

3.3.4

Filtering Higher Harmonics .................................................................................... 21

3.4

Control System and Data Management .......................................................................... 21

3.4.1

Wireless Sensor Network ........................................................................................ 21

3.4.2

Wireless Communication ........................................................................................ 22

3.4.3

Sensors and Data Processing .................................................................................. 23

3.4.4

Distributed Control ................................................................................................. 24

3.4.5

Source and Load Modelling .................................................................................... 24

3.4.6

Graphical User Interface (GUI) .............................................................................. 26

Conclusion ............................................................................................................................ 27

Future Improvements and Optimization .................................................................................. 28


4.1

Distributed Generation ................................................................................................... 28


5

4.2

Advancements in Wireless Communication System ..................................................... 28

4.3

Cyber Security ................................................................................................................ 29

4.4

Self-Healing ................................................................................................................... 29

Appendix .............................................................................................................................. 30
5.1

Arduino Source Code ..................................................................................................... 30

5.1.1

Generating PWM signal .......................................................................................... 30

5.1.2

Display Power Usage at User End on LCDs and Send Data to Central Control Unit
32

5.1.3
5.2

Circuit Designs ............................................................................................................... 38

5.2.1

AC Voltage Sensor ................................................................................................. 38

5.2.2

Signal Conditioning Circuit for AC/DC Current Sensor ........................................ 38

5.2.3

Voltage Regulation Circuit ..................................................................................... 39

5.2.4

Relay Switching Circuit .......................................................................................... 40

5.3
6

Source code of the Main Control (implemented through LabVIEW) .................... 34

Graphical User Interface ................................................................................................ 40

References............................................................................................................................. 41

Table of Figures
Figure 1: Project Block Diagram .................................................................................................... 9
Figure 2: Single Phase Grid-Tie Inverter ...................................................................................... 15
Figure 3: Flow Chart for Generating PWM Signal ....................................................................... 18
Figure 4: Diagram of a Full H-Bridge with Driver Circuit ........................................................... 20
Figure 5: Algorithm for Graphical User Interface and Decision Making ..................................... 25
Figure 6: Graphical User Interface at Central Control Unit ......................................................... 26
Figure 7: Overall Assembly of the Project ................................................................................... 27
Figure 8: Multisim Simulation of AC Voltage Sensor ................................................................. 38
Figure 9: Multisim Simulation of Signal Circuit for AC/DC Current Sensor .............................. 38
Figure 10: 12V Regulator Circuit Diagram .................................................................................. 39
Figure 11: 18V Regulator Circuit Diagram .................................................................................. 39
Figure 12: Relay Switching Circuit .............................................................................................. 40
Figure 13: Block Diagram of the GUI at Central Control Unit .................................................... 40

Table of Equations
Equation 1: Total number of samples ........................................................................................... 17
Equation 2: Voltage sample .......................................................................................................... 17
Equation 3: Digital value of the voltage sample ........................................................................... 18
Equation 4: Duty Cycle............................................................................................................... 207

1 Introduction
1.1 Problem Statement
The Traditional Grid has performed brilliantly for more than a century but the grid is struggling to
keep up with the rapidly increasing demand of energy. Besides the depletion of our scarce
resources such as coal, emission of carbon dioxide from burning of fossil fuel has also been raised
as an environmental concern. The environmental impact of the energy production methods was
not of primary importance when the conventional grid system was designed but today it is a great
concern. Our carbon foot prints can be reduced only if we incorporate renewable energy sources
into the Traditional Grid.
Environmental concerns aside, advancements in information and communications technology
(ICT) has made integrating information to the grid a necessity. Consumers wish to be their own
power planners; real-time load monitoring and load planning makes it achievable. The two-way
flow of information enables instantaneous demand and supply, balancing and delivering
information of the individual usage to each consumer possible.
The report discusses the technique by which the renewable source, solar energy, was integrated in
to the grid, making the concept of distributed generation viable and how wireless communication
network was incorporated so as to keep the grid entities informed about the power consumption at
all time.

1.2 Objectives
The rationale behind taking up this project is to understand the trending concept of Smart Grids,
which is believed to soon replace the Traditional Grids. Our objective is to develop a user end
prototype demonstrating the core concepts of a Smart Grid, which are:
i. integration of renewable energy sources in the Traditional Grid
ii. decentralized control i.e. grids ability to dynamically manage various sources of power
connected to the load

The goals of the project are to:


i. design a grid-tie inverter that ties the renewable energy source, which in our case is solar
energy, with the utility line
ii. establish bi-directional wireless communication between the central control unit,
distribution unit, utility and consumers so that active participation at every point in the
power transmission system is ensured.

10

2 Literature Review
2.1 Smart Grid
Smart Grid is a multi-dimensional solution to the dilemma of modern energy. It is a long term
promise of evolving the Traditional Grid to a remarkably intelligent and sustainable power
transmission system that is accommodating; accepts energy from virtually any source like sun and
wind, quality focused; free of disturbance, interruptions and delivers power quality; motivating,
enables real-time communication between utility and consumer so the consumers can custom-build
their power consumption based on their personal preference, and green; slows down the
contribution to global climatic changes.
Smart Grid is based on the following fundamental concepts: modern grid components, controlling
devices, sensors and communication network. Its an array of technological approaches that
features sensors throughout the distribution grid to collect data. Real-time two way communication
between utility and consumers to move data and communicate power usage is necessary for
managing and controlling the grid. Decentralization of energy and custom-build power
consumption plan allows for an economic and reliable electricity supply.
The future grids are anticipated to have the ability to determine its operating status, detect faults
and predicts possible outages based on the past events. It has the capability to self-heal and restore
itself ensuring uninterrupted power supply. Instantaneous information of the data usage
encourages users to manage their energy consumption. Smart Grid will provide optimized control
and advanced network facilities, greater consumer participation and improved system reliability.
There will be a significant reduction in peak demand; eradicating the probability of blackouts
minimizing the need to construct back-up (peak load) power plant.
The infrastructure of a complete Smart Grid involves a complex web like structure of sensors with
interconnected nodes. Sudden transformation to Smart Grid is not possible. Its complete
implementation will take years but the effort of moving a step towards Smart Grid is necessary. A
smarter grid will apply the available technologies to the current energy system in order to improve
grids efficiency and quality of service.

11

2.2 Progress in Smart Grid around the World


In a worldwide survey conducted by Global Smart Grid Federation (GSGF) [1], to find out about
the initiatives taken by GSGF members in transforming its countrys energy infrastructure to a
more efficient and cleaner electricity system, it was identified that the governments of a number
of countries are taking remarkable initiatives in collaboration with non-government agencies and
foreign investors along with creating awareness in every citizen of this revolution through
campaigns.
Every Australian energy distribution business has Smart Grids on their agenda; great deal of work
is being done on the network modernization which is a critical step in the development of Smart
grids. This project is being tested for fault detection followed by fault isolation and restoration,
autonomous distribution, and power quality monitoring. In future this will enable house hold
energy management system, improved network reliability and efficiency along with distributed
energy generation and storage.
British government commissioned the roll out of smart meters nation-wide in the year 2014 and
is expected to complete it by the year 2019. Many industries are engaged with the British
government for this project; major retailers are closely working on the customer engagement
strategy as it is believed that for a change to succeed the customers must be accepting. A project
was initiated which involved ordinary citizen to come up with an innovative solution to energy
storage in the distribution network as it is a distinct part of Smart Grid technology.
In accordance to the 20:20:20 [2] objective, European Union obliged its member to meet the
following climatic changes by the year 2020: 20% of the energy consumption of the country must
come from renewable energy sources and the greenhouse gas emissions must be reduced by 20%.
These obligations will be met by installing smart metering system and enhancing the capabilities
of the existing grid system. Over $300 million [2] is being invested in the Smart Grid projects.
The government of Canada believes that the key pillar of its economic growth is the incorporation
of green energy and Canada has become the leaders in smart metering deployment. In the world,
Ontario is the largest electricity market with mandated time-of-use rates. Japan has an on-going
project to control the demand and supply of a real user on integration of renewable energy source.

12

Unite States of America has several distribution automation projects in its portfolio that facilitates
the consumers to be able to track their energy consumption through an online web portal.
Under the Load Data Improvement Project (LDIP), a USAID funded project, about 39,000 [2]
smart meters have been installed in more than 700 grid substations in Pakistan. The project was
awarded to Mirco-Tech Industries; launched to minimize the distribution losses and modernize the
electricity metering system and billing operation of residential users, public sector and small
industries; allowing near to real time data collection and data processing. Other than that $400
million will be funded to support the ongoing sustainable energy sector reforms to build a secure
and efficient energy sector. K-Electric Limited (KE) and InfoTech Pakistan Limited (IPL) signed
an agreement to implement the Smart Grid technology platform. The key components are Utility
Network Management System; this will maximize Advance Metering Infrastructure (AMI)
allowing proper monitoring of the electricity network.

13

3 System Model
Two major features of the future grid are considered in the model. These are, distributed generation
and instantaneous data management. The prototype consists of a distribution area with three
residential users, utility and photovoltaic array; the renewable energy source for distributed
generation, and a sophisticated wireless sensor network; for real-time data management. The realtime data handling is made possible by employing wireless sensors between the utility and on the
grid entities.

3.1 Block Diagram


The block diagram below illustrates the major components of our prototype. The final assembly
consisted of a solar panel connected to Maximum Power Point Tracker (MPPT), a grid-tie inverter
that ties the solar energy together with utility at the distribution grid, a central control unit i.e. the
decision making hub and finally the users.

Figure 1: Project Block Diagram


14

Every entity in the prototype was assigned a wireless communication module which enabled them
to communicate with the central control unit instantaneously. Through this wireless
communication device the users transmitted their power consumption at every instant and
informed the central control unit about their power plan. Based upon the information received the
central control unit made decisions such as; if the users consumption decreases from a particular
value, the consumer can be switched to power supply generated from solar energy only rather than
the grid tied.

3.2 Integration of Solar Energy


The term distributed generation refers to decentralizing the energy sources connected to the grid;
energy is generated and stored by a variety of storage modules connected to the power generating
devices. Thus the overall burden on the National Grid decreases and energy generation at microlevel increases. Energy sources are integrated into the grid by means of a grid-tie inverter, making
load sharing possible.
The inconsistent DC voltage produced by the Photovoltaic array module is passed through a
Maximum Power Point Tracker (MMPT), a DC to DC converter that gives a constant output
voltage with maximum current. Implementing maximum power point tracking increases the
efficiency of the system by increasing the output power of the photovoltaic cell. The constant DC
voltage is then passed through an inverter to convert the voltage into AC voltage with the same
frequency and magnitude as the reference AC signal, which is utility.

3.3 Single Phase Grid-Tie Inverter


The inverter consists of a control circuit and a power circuit. Control circuit either uses analog
operational amplifiers or a microcontroller to generate the control signal. This signal is fed to the
power circuit for switching. Power circuit is designed using power MOSFETs or IGBTs,

15

depending on the application. These power transistors are switched in a predesigned sequence to
convert constant DC into an AC signal.

Figure 2: Single Phase Grid-Tie Inverter

3.3.1

Control Circuit

Digital control signal is a sine pulse width modulated (SPWM) signal generated by the
microcontroller, a digital square wave with constant amplitude and varying duty cycle. The grid
voltage is first stepped down from 220 V to 5 V and in the microcontroller it is used as a reference
for generating PWM signal. While encoding sine wave in to a PWM wave, samples of the reference
signal are taken at equal intervals and the corresponding duty cycle is determined.
Performance of the inverter depends on the frequency of these samples. The value of dead time is
the critical variable in determining the accuracy of the inverter. A very short dead time causes
damage to the switches due to the overlapping phenomenon, whereas if the dead time is too long
it increases the total harmonic distortion in the system. Amplitude of the square wave must be the
same as RMS value of the sine wave for accurate pulse width modulation. SPWM technique
produces a high quality signal while suppressing higher harmonics.
The methodology used to generate a pulse width modulated signal was by designing a look-up
table by encoding the sine wave of 50 Hz frequency as a square wave of varying duty cycle. As
the oscillator of microcontroller used, Arduino ATMega 2560, has an oscillating frequency of 10
KHz a maximum of 200 samples could be coded in the look up table for one complete sine wave,
according to the following equation:

16

N=

[equation 1]

where;
N = Total number of samples
fs = Sampling frequency i.e. crystal oscillating frequency (10 KHz)
f = specimen frequency

The sine wave that is to be encoded is fed into the microcontroller through its 10bit ADC (analog
to digital converter). The duty cycle obtained by converting the ADC value is used to set the timer
in order to generate PWM signal. When the voltage value is 5V, the ADC reads 1023 and this
corresponds to 100% duty cycle which is referred to as 255 in the microcontroller. Following
equations were used to generate the look-up table of the duty cycles:

=2.5 sin ( ) + 2.5

[equation 2]

where:
n = nth number of sample
Vsample = voltage sample

(210 1)
5

[equation 3]

where:
VADC = digital value of the voltage sample

255
210 1

[equation 4]

where:
17

Duty cycle = PWM value of the voltage sample

START

Initialize
program
variables and
timers

Define look-up
table

Fetch next value


from look up table

Set the duty cycle


of the timer

Delay of

63ms

Figure 3: Flow Chart for Generating PWM Signal

18

3.3.2

Power Circuit

The PWM signal generated by the control circuit, using sinusoidal from utility as a reference, is
used by the power circuit in actuating the switches. Power circuit of a single phase inverter is a
full H-bridge circuit; it comprises of four switches that are grouped into two pairs. At any instant
one of the pair is switched off and the other pair performs switching, producing positive or negative
output voltage, depending on which group of transistors was forced off by the control signal. This
switching produces an output signal with fundamental frequency 50 Hz i.e. the grid frequency and
few higher harmonics. The proposed power circuit uses power MOSFET, TRFP250 as switches.
Although IGBTs have better thermal operability, high current and voltage handling capabilities,
MOSFETs have superior switching capabilities and do not have current tail losses, as opposed to
IGBTs. When turned off, MOSFETS dissipate current almost instantaneously, avoiding the power
losses that are incurred in case of IGBTs, making them more efficient. Moreover our application
is restrained to 220V DC and small power as the solar panel used is of 80W only, therefore power
MOSFETs were well suited for the prototype.

3.3.3

Gate Drivers

Generating sinusoidal waves centered at zero requires a variable frequency from the
microcontroller to control the voltage applied on to the gate drivers. Gate driver TLP250 is used
to apply PWM signal from the microcontroller to the transistors. The H-bridge inverter has a high
side that switches at the control of a frequency of 10 KHz and a low side that performs switching
at 50 Hz. The H-bridge inverter circuit produces two SPWM signals with one leading the other by
180o i.e. by half a cycle or out of phase of the control signal. The two signals are combined together
and the output voltage of the H-bridge is a periodic varying duty cycle square wave.

19

Following circuit design [3] was used as the power circuit:

Figure 4: Diagram of a Full H-Bridge with Driver Circuit

20

3.3.4

Filtering Higher Harmonics

The converted AC signal contains higher frequency harmonics along with the fundamental
frequency. A low-pass LC filter is employed to filter every harmonic and then leave at the
fundamental frequency (50 Hz) only, hence achieving a pure sine wave. For this purpose a highly
selective design is needed, a third order filter suffices the purpose and offers a good approximation
of a pure sine wave as an output.
Finally a step-up transformer is used, it steps up the generated AC voltage to appropriate voltage.
The output voltage is maintained at relatively higher level than the grid to ensure that the inverter
is able to feed the voltage into the grid.

3.4 Control System and Data Management


3.4.1

Wireless Sensor Network

Wireless Sensor Networks (WSN) are autonomous sensors distributed spatially. These transducers
monitor and record the change in environmental conditions. The data is generally collected from
remote ends and manipulated by the central control unit. In comparison with other wireless
technology, Wireless Sensor Network is simplest of all. It has low power consumption and low
data rates.
Typically a WSN node is equipped with a transceiver, memory device, and a microcontroller to
process the data received. In terms of architecture WSN are defined at Single Hop model, Multiple
Hop model and Mesh model; these models are defined by the interconnection between nodes and
the nodes are formed using a wireless device such as an XBee.

21

3.4.2

Wireless Communication

Wireless communication control and network architecture requirements of the project are based
upon the ZigBee protocol. It is a low power solution that operates between the following frequency
bands: 868.0-868.6M Hz, 902-928M Hz and 2.400-2.484G Hz. The protocol is based upon the
IEEE Standard 802.15.4: IEEE Standard for Local and metropolitan area networks-Part 15.4: LowRate Wireless Personal Area Networks (LR-WPANs).

3.4.2.1 ZigBee Devices


Transmission range of devices based on ZigBee protocol varies from 10-74 meters and operate in
the unlicensed band of radio frequency. The data rate ranges from 250kbps at 2.4 GHz to 20kbps
at 868 MHz. ZigBee operates in a variety of topologies including Star topology, Mesh topology
and Cluster Tree topology. Under the ZigBee standard, nodes are defined as either Coordinator,
Router or End Device.
Network configuration is performed by the Coordinator; as under IEEE 802.15.4 only FFD can
function as the network Coordinator. Routers extend network coverage area and reliability of the
network. End Devices only communicate with Coordinator and router and cannot transfer data
to/from an external device. The key feature of ZigBee protocol is the ability to provide mesh
topology. Mesh topology consists of interconnected node, there are a number of paths to connect
to a node.

3.4.2.2 IEEE standard 802.15.4


The standard specified by IEEE is the basis of the ZigBee protocol and other devices based on
Low-rate Wireless Personal Area Network. It contains protocol structure for PHY (physical) and
MAC (Media Access Control) sub layer only, application layer is defined by the user. The standard
identifies network topologies, operating frequency bands and states characteristics such as data
security, low power consumption and low data rate.

22

Network nodes either function as Full Functional Device (FFD) or Reduced Function Device
(RFD). FFD node acts as personal area network coordinator (PAN) i.e. it can communicate with
any device in the network, whereas RFD devices can only communicate with PAN. RFD are lower
power consuming nodes.
The possible network topologies are peer-to-peer and star (mesh) model. In peer-to-peer model,
nodes can only communicate with the central PAN coordinator (FFD device) and vice versa
whereas the inter-nodes communication is not possible, even with in transmission range. While in
star model, all nodes are interconnected; the nodes do not only communicate with central node but
to every other node within the transmission range.
The network can operate within 27 different channels as identified by the standard IEEE 80.15.4.
Upon the request of higher/ application layer, PHY layer tunes the transceiver in to a channel. The
PHY layer is responsible for data management services; while the MAC sub layer provides a link
between PHY layer and application layer. This layer is responsible for providing a secure
connection between two peers; it supports PAN coordinator with network association and
disassociation.

3.4.3

Sensors and Data Processing

Data from remote sensors is processed through microprocessors. Microcontrollers are


programmed to receive inputs from wireless sensors by means of XBee devices. Series1 XBee
devices were used for communication, each followed by a microcontroller Arduino ATMega2560
to manipulate and store the data of voltage and current received from the wireless sensors. It has
an oscillator frequency of 16 KHz, runs on 5V DC and has 4 serial ports.
The sensors include AC and DC voltage sensors, current sensors and their conditioning circuit
(refer Appendix for details for the circuits). DC voltage is measured using a voltage divider circuit
while AC voltage sensor uses a full wave rectifier followed by RC circuit to measure voltage; the
process of conditioning reduces small variations in the values. AC/DC current was measured using
ACS712 fully integrated hall-effect based current sensor, followed by its conditioning circuit that

23

confines the current values within the handling capacity of the microcontroller. These sensors and
conditional circuits were calibrated to achieve the desired output.

3.4.4

Distributed Control

The distributed control is achieved by employing microcontrollers and other controlling devices
at several locations throughout the grid. Our model uses a microcontroller at the distribution area
where the renewable energy is integrated into the grid by means of the grid-tie inverter. The
microcontroller is responsible for monitoring the grids status, and the renewable energy supply
through the sensors and take decisions of the data received by sensors through wireless
transmitters. This data is further sent to the central control unit. The central control unit is
responsible for monitoring the system and taking decisions such as source selection on the basis
of the data received.
The relay setup at the modeled distribution grid is responsible for switching between power
sources according to the scenarios already programmed in the microcontroller and/or graphical
user interface. For each of the user, a pair of relay was used i.e. one for switching the live
connection and the other for ground; the relays used were four pole double throw. A voltage
regulation circuit was used to convert high voltages to 12V/18V; a fuse was incorporated so that
if the supply current overshoots from a particular value, the supply is disconnected, avoiding
damaging the system.

3.4.5

Source and Load Modelling

In case of power outage the algorithm developed is such that a backup source is turned on. This
backup source allows critical load only, i.e. overall load not exceeding 80W, therefore saving
energy till the system is operational again. Whereas at normal state, the power supplied to the user
is a summation of utility and photovoltaic array and is able to drive maximum load. This requires
smart switching of sources and loads. Loads are driven based upon the consumers custom built
power plan. Source and load switching is dependent upon the actuating signal fed to the relays.

24

START

INPUT: DC
source voltage,
current;
WAPDA source
voltage, current

WAPDA
voltage >200

Calculate powers
from the input
data

NO

Switch power
supply to back-up

YES

Supply power
through solar
panel

Display DC
source and
WAPDA source
power

YES

User Power Plan

Users power
plan == solar

NO

Supply power
from grid-tie
inverter

Figure 5: Algorithm for Graphical User Interface and Decision Making

25

3.4.6

Graphical User Interface (GUI)

A human machine interface is provided to the user and the central control unit, it displays the
complete information of the overall power consumption through solar energy and utility. The
interface also gives the user the leverage to tailor his power plan based upon the power usage and
personal preference. The GUI generates the actuating signal in the microcontroller based on the
grids condition and users power plan. Hence the interface is not only a display for users and
central control unit but it also has the decision making abilities.

Figure 6: Graphical User Interface at Central Control Unit

26

Figure 7: Overall Assembly of the Project

4 Conclusion
This report is a detailed explanation of our approach to the solution by which the energy crisis,
prevailing not only in Pakistan but world-wide, can be eradicated i.e. through integration of
renewable energy sources in the grid and autonomous management of these various sources to
power connected to the load at the distribution grid.
The stages of developing this prototype involved an extensive literature review on the evolution
of the concept Smart Grid and the methodology being adopted by different countries to implement
Smart Grids. We thoroughly studied the key concepts needed to design the grid-tie inverter for
integration of renewable energy in the grid, and how wireless communication can be established
between various entities in order to achieve autonomous grid control, while distributing different
sources of power to every user based upon their custom power plan. This was followed by the
design and implementation phase; a detailed explanation of the approach we used, has been given

27

in the report. Trouble shooting involved modifying our initial approach in order to get the desired
results.

Future Improvements and Optimization

Following are some of the extensions that can be made to our proposed model to further enhance
its capabilities.

4.1 Distributed Generation

Renewable energy resources arent only restricted to solar energy. A module that has the ability to
tie energy from other renewable sources, such as wind and biogas, to the grid can be designed.
Such a system would further reduce the burden on the National Grid. The module can be followed
by designing an energy storage that has the capability to store surplus energy produced by the
renewable sources such as super capacitors.

4.2 Advancements in Wireless Communication System

XBee is not the ideal choice of wireless communication device in implementing the model in real
life. Realizing this model requires a sophisticated wireless communication system that support
wide area network (WAN) such as Enhanced Data for Global Evolution (EDGE), Code Division
Multiple Access (CDMA), Internet Service Provider (ISP).

28

4.3 Cyber Security

With the integration of communication network into the grid, the grid becomes susceptible to
cyber-crime. Without proper network security and data encryption, the information flow can be
tapped very easily. Incorporation of communication network to the grid in reality needs a much
more sophisticated communication infrastructure and data security system.

4.4 Self-Healing

In an interconnected system the probability of fault occurring at any point in the system increases.
The grid system must be made sufficiently smart that in case a series fault occurs, it bypasses the
fault and takes an alternate route, ensuring uninterrupted power supply to the consumer and
minimal power outages.

29

5 Appendix
5.1 Arduino Source Code
5.1.1

24, 22, 20, 18, 16, 14, 12,


10, 9, 8,
6, 5, 4, 3, 2, 2, 1, 1, 0, 0,

Generating PWM signal

0, 0, 1, 1, 2, 2, 3, 4, 5, 6,
8, 9, 10, 12, 14, 16, 18, 20,

#define SPWM 11
22, 24,

#define PWM 8

27, 29, 32, 35, 37, 40, 43,


46, 49, 53,
const int sine_table[] = {127, 131, 135, 139,
143, 147, 151, 155, 159, 163,

81, 84, 88,

167, 171, 174, 178, 182,


185, 189, 192, 196, 199,

92, 96, 100, 10, 108, 112,


116, 120, 124, 128

202, 206, 209, 212, 215,


218, 220, 223, 226, 228,
231, 233, 235, 237, 239,
241, 243, 245, 247, 248,
249, 250, 251, 252, 253,
253, 254, 254, 255, 255,
255, 255, 254, 254, 253,
253, 252, 251, 250, 249,
248, 247, 245, 243, 241,
239, 237, 235, 233, 231,
228, 226, 223, 220, 218,
215, 212, 209, 206, 202,
199, 196, 192, 189, 185,
182, 178, 174, 171, 167,
163, 159, 155, 151, 147,
143, 139, 135, 131, 127,

56, 59, 63, 66, 70, 73, 77,

};

//table of 200 values of

duty cycle
void setup() {
pinMode(SPWM,OUTPUT);
pinMode(PWM,OUTPUT);

ICR1 = ICR1 & 0x00;


ICR1 = ICR1 | 0x64;
TCCR1A = TCCR1A & 0x00;
TCCR1A = TCCR1A | 0xF0; //invert
mode
TCCR1B = TCCR1B & 0x00;
TCCR1B = TCCR1B | 0x12;

128, 124, 120, 116, 112,


108, 104, 100, 96, 92,
88, 84, 81, 77, 73, 70, 66,
63, 59, 56,

ICR3 = ICR3 | 0x4E20;


53, 49, 46, 43, 40, 37, 35,

32, 29, 27,

ICR3 = ICR3 & 0x0000;

TCCR3A = TCCR3A & 0x00;


30

TCCR3A = TCCR3A | 0xF0; //invert


mode
TCCR3B = TCCR3B & 0x00;
TCCR3B = TCCR3B | 0x12;
}

void loop() {
analogWrite(8,127); //50% pwm signal
for (int j=0;j<200;j++) {
analogWrite(SPWM,sine_table[j]);
//SPWM signal at 10kHz base triangular
wave
delayMicroseconds(63);
}
}

31

5.1.2

Display Power Usage at User End on


LCDs and Send Data to Central
Control Unit

Serial2.begin(9600);
Serial3.begin(9600);

/*

pinMode(A0,INPUT);

* LCD RS pin to digital pin 8

pinMode(A1,INPUT);

* LCD Enable pin to digital pin 9

pinMode(A2,INPUT);

* LCD D4 pin to digital pin 30

pinMode(A3,INPUT);

* LCD D5 pin to digital pin 28

pinMode(A4,INPUT);

* LCD D6 pin to digital pin 26

* LCD D7 pin to digital pin 24


* LCD R/W pin to ground

void loop(){

* LCD VSS pin to ground

a=analogRead(A0); //cs u1

* LCD VCC pin to 5V

float k=(a-60)*0.2;

* 10K resistor:

Serial.print(a);

* ends to +5V and ground

Serial.print('\n');

* wiper to LCD VO pin (pin 3)


*/

b=analogRead(A1); //cs u2

#include <LiquidCrystal.h>

float l=(b-65)*0.2;

LiquidCrystal lcd1(6,7,30,28,26,24);

Serial.print(b);

LiquidCrystal lcd2(8,9,39,35,37,33);

Serial.print('\n');

LiquidCrystal lcd3(10,11,46,44,42,40);
int a,b,c,d,e;

c=analogRead(A2); //cs u3
float m=(c-85)*0.2;

void setup(){
lcd1.begin(16,2);

Serial.print(c);
Serial.print('\n');

lcd2.begin(16,2);
lcd3.begin(16,2);

d=analogRead(A3); //vs solar panel ac


float n=(d)*0.00488*48.9795;

Serial.begin(9600);

Serial.print(d);

Serial1.begin(9600);

Serial.print('\n');
32

e=analogRead(A4); //vs grid tie

lcd3.print(f);

float o=(e)*0.00488*48.9795;

lcd2.clear();

Serial.print(e);

lcd2.print("Power in VA");

Serial.print('\n');

lcd2.setCursor(5, 1);

Serial.print('\n');

lcd2.print(g);
lcd1.clear();

if(o>=190 & n<190){

lcd1.print("Power in VA");

float f=k*o;

lcd1.setCursor(5, 1);

float g=l*o;

lcd1.print(h);}

float h=m*o;
lcd3.clear();

Serial1.print('a'); //cs u1

lcd3.print("Power in VA");

Serial1.print(a);

lcd3.setCursor(5, 1);

delay(500);

lcd3.print(f);

Serial2.print('b'); //cs u2

lcd2.clear();

Serial2.print(b);

lcd2.print("Power in VA");

delay(500);

lcd2.setCursor(5, 1);

Serial3.print('c'); //cs u3

lcd2.print(g);

Serial3.print(c);

lcd1.clear();

delay(500);

lcd1.print("Power in VA");

Serial3.print('d'); //vs solar ac

lcd1.setCursor(5, 1);

if(n<190){

lcd1.print(h);}

Serial3.print(4);
}

else if(n>=190 & o<190){

else if(n>=190){

float f=k*n;

Serial3.print(8);

float g=l*n;

float h=m*n;

delay(400);

lcd3.clear();

Serial3.print('e'); //vs grid tie ac

lcd3.print("Power in VA");

if(o<190){

lcd3.setCursor(5, 1);

Serial3.print(4);
33

pinMode(45,OUTPUT); //Relay U3 live

else if(o>=190){
Serial3.print(8);

pinMode(47,OUTPUT); //Relay U3
Neutral
Serial.begin(9600);

Serial1.begin(9600);

delay(400);
}

void loop() {
5.1.3

Source code of the Main Control


(implemented through LabVIEW)

while(!Serial1); //write code for receive and


display in labview here

int a,b,c,d,e,l,m,n;
float f,g,h,i;
a=analogRead(A0); //Read DC source
voltage
void setup() {
pinMode(A0,INPUT); //DC source voltage
pinMode(A1,INPUT); //DC source current
pinMode(A2,INPUT); //Wapda source
voltage
pinMode(A3,INPUT); //Wapda source
current

b=analogRead(A1); //Read DC source


current
c=analogRead(A2); //Read Wapda source
voltage
d=analogRead(A3); //Read Wapda source
current
f=a*2.67*0.0049;
g=b*0.2;

pinMode(30,INPUT); //U1 switch

h=(c-115)*0.0054*49.287;

pinMode(32,INPUT); //U2 switch

i=d*0.2;

pinMode(34,INPUT); //U3 switch


if(h<200){
pinMode(37,OUTPUT); //Relay U1 live
pinMode(39,OUTPUT); //Relay U1
Neutral
pinMode(41,OUTPUT); //Relay U2 live
pinMode(43,OUTPUT); //Relay U2
Neutral

Relays_setup();}
else if(h>=200){
l=digitalRead(30);
m=digitalRead(32);
n=digitalRead(34);
Relays_setup2(l,m,n);}
34

digitalWrite(45,HIGH);
}

delay(250);
digitalWrite(49,HIGH);}

void Relays_setup(){
else if(u==0 & v==0 & w==0){
the loads on Grid Tied

digitalWrite(37,HIGH);
delay(250);

//All

digitalWrite(37,LOW);

digitalWrite(39,HIGH);

delay(250);

delay(250);

digitalWrite(39,LOW);

digitalWrite(41,HIGH);

delay(250);

delay(250);

digitalWrite(41,LOW);

digitalWrite(43,HIGH);

delay(250);

delay(250);

digitalWrite(43,LOW);

digitalWrite(45,HIGH);

delay(250);

delay(250);

digitalWrite(45,LOW);

digitalWrite(49,HIGH);

delay(250);

digitalWrite(49,LOW);}
void Relays_setup2(int u, int v, int w){
//Utility preferences

if(u==1 & v==1 & w==1){


loads on Solar only
digitalWrite(37,HIGH);
delay(250);
digitalWrite(39,HIGH);
delay(250);
digitalWrite(41,HIGH);
delay(250);
digitalWrite(43,HIGH);
delay(250);

//All the

else if(u==0 & v==0 & w==1){


//U1=Grid Tied U2=Grid Tied U3=Solar
Only
digitalWrite(37,LOW);
delay(250);
digitalWrite(39,LOW);
delay(250);
digitalWrite(41,LOW);
delay(250);
digitalWrite(43,LOW);
delay(250);
digitalWrite(45,HIGH);
delay(250);
35

digitalWrite(49,HIGH);}

else if(u==0 & v==1 & w==0){


//U1=Grid Tied U2=Solar Only U3=Grid
Tied

else if(u==1 & v==0 & w==0){


//U1=Solar Only U2=Grid Tied U3=Grid
Tied
digitalWrite(37,HIGH);

digitalWrite(37,LOW);

delay(250);

delay(250);

digitalWrite(39,HIGH);

digitalWrite(39,LOW);

delay(250);

delay(250);

digitalWrite(41,LOW);

digitalWrite(41,HIGH);

delay(250);

delay(250);

digitalWrite(43,LOW);

digitalWrite(43,HIGH);

delay(250);

delay(250);

digitalWrite(45,LOW);

digitalWrite(45,LOW);

delay(250);

delay(250);

digitalWrite(49,LOW);}

digitalWrite(49,LOW);}

else if(u==0 & v==1 & w==1){


//U1=Grid Tied U2=Solar Only U3=Solar
Only

else if(u==1 & v==0 & w==1){


//U1=Solar Only U2=Grid Tied U3=Solar
Only
digitalWrite(37,HIGH);
delay(250);

digitalWrite(37,LOW);

digitalWrite(39,HIGH);

delay(250);

delay(250);

digitalWrite(39,LOW);

digitalWrite(41,LOW);

delay(250);

delay(250);

digitalWrite(41,HIGH);

digitalWrite(43,LOW);

delay(250);

delay(250);

digitalWrite(43,HIGH);

digitalWrite(45,HIGH);

delay(250);

delay(250);

digitalWrite(45,HIGH);

digitalWrite(49,HIGH);}

delay(250);
digitalWrite(49,HIGH);}
36

else if(u==1 & v==1 & w==0){


//U1=Solar Only U2=Solar Only U3=Grid
Tied

delay(250);
digitalWrite(43,HIGH);

digitalWrite(37,HIGH);

delay(250);

delay(250);

digitalWrite(45,LOW);

digitalWrite(39,HIGH);

delay(250);

delay(250);

digitalWrite(49,LOW);}

digitalWrite(41,HIGH);

37

5.2 Circuit Designs


5.2.1

AC Voltage Sensor

Figure 8: Multisim Simulation of AC Voltage Sensor

5.2.2

Signal Conditioning Circuit for AC/DC Current Sensor

Figure 9: Multisim Simulation of Signal Circuit for AC/DC Current Sensor

38

5.2.3

Voltage Regulation Circuit

Figure 10: 12V Regulator Circuit Diagram

Figure 11: 18V Regulator Circuit Diagram

39

5.2.4

Relay Switching Circuit

Figure 12: Relay Switching Circuit

5.3 Graphical User Interface

Figure 13: Block Diagram of the GUI at Central Control Unit

40

6 References
[1] Smart Grid Around the World: Selected Country Overviews: Energy Information
Administration, SAIC, 1st ed. October 3, 2011.
[2] Asianetpakistan.com, 'K-Electric Limited and InfoTech Pakistan sign agreement to implement
Smart Grid Technology Platform KE', 2015.
[3] K. Tan and S. Masri, "Grid Tie Photovoltaic Inverter for Residential Application", Modern
Applied Science, vol. 5, no. 4, 2011.
[4] U.S. Department of Energy, "The Smart Grid: An Introduction.", Litos strategic
communication.
[5] The International Renewable Agency (IRENA), "Smart Grids and Renewables A Guide for
Effective Deployment", Irena, 2013.
[6] C. Sajib, "Design of a Transformer-less Grid-Tie Photovoltaic Inverter Using Dual-stage Buck
and Boost Converters", vol. 1, no. 1, p. 1, 2013.
[7] U.S. Department of Energy, "Smart Grid System Report.", 2009.
[8] I. Crowley, H. Leung, "PWM Technique: A Pure Sine Wave Inverter", vol. 1, no. 1, p. 1, 2013.
[9] Energy Information Administration, "Smart Grid Around the World", SAIC, 2011.
[10] R. Andre, L. Erwin van der, K. Wolfgang and V. Konstantina, "Transitioning from the
traditional to the smart grid: Lessons learned from closed-loop supply chains", vol. 1, no. 1, 2016.
[11] M. Ghalib, Y. Abdalla and R. Mostafa, "Design and Implementation of a Pure Sine Wave
Single Phase Inverter for Photovoltaic Applications", 2016.
[12] E. Coster, Kerstens and Berry, "Self-Healing Distribution Network Using Smart Controllers",
0196, vol. 22, 2013.
[13] R. Brown, "Impact of Smart Grid on distribution system design", 2008 IEEE Power and
Energy Society General Meeting - Conversion and Delivery of Electrical Energy in the 21st
Century, 2008.

41

[14] P. McDaniel and S. McLaughlin, "Security and Privacy Challenges in the Smart Grid", IEEE
Security & Privacy Magazine, vol. 7, no. 3, pp. 75-77, 2009.
[15] H. Farhangi, "The path of the smart grid", IEEE Power and Energy Magazine, vol. 8, no. 1,
pp. 18-28, 2010.

42

Potrebbero piacerti anche