Fyp G-10
Fyp G-10
Fyp G-10
Project Advisors:
“In the name of Allah, the most Beneficent, the most Merciful”
Mighty thanks to Almighty Allah for this learning opportunity and for making us able to
prove our talents in regards with this project.
“The best teacher are those who show you where to look, but don’t tell you what to see”
(Alexandra K. Trenfor)
The above quotation is true for both our internal project advisor, Sir Shariq Sheikh, and for
our external project advisor, Mr. Jahangir Hasan not only because they solved the problems
we stumble upon in the project but because they channeled us to be able to solve them by
ourselves. They ignite a passion of learning time to time. Their knowledge and the
understanding of subject has really helped us in developing an understanding of our own.
We would like to convey our special thanks to Dr. Muhammad Ali Memon (Chairman, EED,
NEDUET), electrical engineering department, and would like to appreciate all the efforts by
lab staff of Electrical department for supporting us and letting us utilize the labs so we could
perform all necessary task and properly test our hardware.
PREFACE
Electrical energy impart a great proportion in our everyday life from our house hold use
to industrial and commercial applications. It will be of no doubt that electricity is the prime
tool for the development of a state but continuous increase in demand for electrical energy
increases the cost of fuel. This increment in cost of fuels is a great matter of concern and
taking advantage of this increase in demand the utility companies are steadily rising. There
is no check and balance enforced in Islamic Republic of Pakistan, where electricity tariffs
are comparable to USA and maintenance of system is even not comparable with Nigeria.
It takes hours for company to restore feeders if any fault occurs. More-over generating
electrical power from fossil fuel is adding huge amount of pollution in our atmosphere
which act as slow poison.
Now being electrical engineer, our team has come forward with a solution that will help
to minimize these problems by generating electricity through renewable energy sources as
well as thermal energy to tackle the problem of continuously increasing demand as well
as it will allow the consumers to install their standalone generation unit at small scale to
avoid the monopolies of utility company. This system will allow the user to perform on
grid as well as off grid synchronization.
According to this concept the consumer will initially receive the power from cheap
renewable source (such as solar power) but as the load will exceed the generation capacity
of renewable plant our smart grid hybridization unit will combine the energy from generator
and PV as a result only overloaded demand will run on generator while remaining load will
be served cheaply due to self-production.
ABSTRACT
Our task is to design such a proto type that effectively decrease the cost of power
consumption by synchronizing the power produced through cheap source and the power
produced through generator. It is important to know that both power producing sources are
of different nature and similarly the behavior of both types of electrical power will be
different therefore real-time voltage and current monitoring will be required.
In our prototype, we will use solar power to generate 1KW electrical energy, then we will
increase the load above 1KW and now the over-all load will be served through a combination
of power produced through Gen-set and Solar panels. Our hardware will analyze the out
puts from current transformer and potential transformer and then it is required to convert
this data in digital form by using an ADC. It is necessary to convert the analog data from
current transformers and potential transformer into digital data as it can be easily interpreted
by our hard ware. When the set point from solar energy will be achieved the power from
utility will be incorporated. The main challenging task of this project is the synchronization
of two different types of energies i.e. solar and the other from diesel so for this purpose we
have to design such type of inverter which can perform this specific task. The smart
communication between utility and PV is mandatory for which we are designing fuel save
controller to leverage the full hybrid potential. The solar panel system will be installed by
user and the output from this wave form will be a pure sine wave of 50 Hz frequency.
CONTENTS
Figure 1: Solar radiations for Germany (left) and Pakistan (right)[2] .......................................... 11
Figure 2: Off grid residential solar power system ........................................................................ 12
Figure 3: Grid Tied residential solar power system ..................................................................... 12
Figure 4: Hybrid solar power system ........................................................................................... 13
Figure 5: Insides of a Photovoltaic Cell ....................................................................................... 16
Figure 6: Schematic of a PV Cell ................................................................................................. 17
Figure 7: I-V Curves ..................................................................................................................... 18
Figure 8: MPP I-V Curve [7]........................................................................................................ 19
Figure 9: PV On-Grid Synchronization block diagram ................................................................ 23
Figure 10: Square vs Modified vs Sine wave ............................................................................... 27
Figure 11: H-Bridge Inverter Topology ....................................................................................... 28
Figure 12: Sinusoidal Pulse Width Modulation (a) Comparison between reference and carrier
waveform (b) control signal for Q2 & Q3 (c) Gate signal of Q1 & Q4 (d) Sinusoid RMS
Equivalent output waveform ........................................................................................................ 29
Figure 13: Simulation diagram of variable frequency inverter .................................................... 32
Figure 14: Output waveform from inverter .................................................................................. 35
Figure 15: Synchronization of grid with output of PV ................................................................. 37
Figure 16: Working of phase lock loop ........................................................................................ 40
Figure 17: Simulation of phase lock loop in MATLAB ............................................................... 43
Figure 18: Conversion into stationary frame of reference ............................................................ 44
Figure 19: Calculation of theta from alpha and beta .................................................................... 44
Figure 20: Simulation results for ideal grid conditions ................................................................ 45
Figure 21: Zoomed image of phase lock loop response ............................................................... 46
Figure 22: Simulation results for Non-ideal grid conditions ........................................................ 46
Figure 23: Zoomed image of phase lock loop response ............................................................... 47
LIST OF TABLES
Chapter 1
INTRODUCTION
9
Chapter 1 INTRODUCTION
1 CHAPTER 1 – INTRODUCTION
Pakistan is suffering through Electrical power crises now a day. Power outages are more
frequent as there is shortfall of 5000MW in the country. The total production of electricity in
the country has been cut down to 9400MW whereas the total demand is about 14,700MW. To
cope up with this deficit between demand and supply of electricity we have to shrink our
reliance on conventional energy resources rather we should focus on renewable energy sources.
Fortunately, Pakistan is among those countries which has strong potential of producing 2.9
Megawatts form solar energy and is ideal for solar power generation having eight to nine hour
of sunshine every day.
According to facts and figures by FAKT, Pakistan spends about 12 Billion US dollars on annual
basis for import of crude oil. About 70% of this crude oil is used in power generation which
results in per unit cost of Rs18 where as if solar energy is used it will cost only Rs. 6-8 per unit.
Moreover, due to climatic changes and global warming it is necessary to invest on clean energy
sources to reduce the carbon footprint. That’s why developed countries are moving towards
renewable energy to save their people from unhealthy environment.
In order to fix our problems regarding load shedding, heavy bills, climatic changes we have to
rely more on non-conventional sources of energy. For this problem, solar power is the best fitted
solution to all our problems related to electricity. Germany covers 357,021 km2 on land and
generates about 26GW of solar power on average per day, whereas Pakistan having an area of
about 796,096Km2 has very high potential for solar energy. Solar maps of Pakistan reveals that
even the areas receiving the least average annual irradiance are much better than Germany’s
best region for solar power production. Weather of Germany is mostly cloudy whereas in
Pakistan we have much rich and bright Sun [1].
10
Chapter 1 INTRODUCTION
Figure 1: Solar radiations for Germany (left) and Pakistan (right) [2]
When there is no national grid available for example in remote areas, then off grid solar power
systems are used as shown in [Figure#2]. In such systems solar energy is the only source of
electricity, during daytime sunlight generates solar power while at night and during bad weather
conditions the loads are supplied by the battery that is charged by solar during the day. In such
type of systems national grid is not available and the need for electricity is merely satisfied by
solar energy. The diagram of off grid solar power system will illustrate the idea of such type of
system
11
Chapter 1 INTRODUCTION
This system generate photo voltaic power during day time to drive the load and charges the
battery. During non-sunlight hours the electricity is supplied by the utility, but in the absence
of utility battery supplies the power. So in case of absence of utility there will be no blackout.
Hybrid power systems are best suited for places where power outages of utility are more
frequent and where there is no concept of reverse metering as shown in [Figure#4][3].
1.2.4 OBJECTIVE
This project is intended to design a system which synchronizes the power of utility and the solar
system and to provide power to the loads in such a way that maximum of the load power is
supplied by solar and the excessive load runs on utility. As a result the dependence of customer
on utility decreases.
1.2.5 LIMITATION
This system is designed for houses and offices. We cannot run industrial loads on it because of
the system cost. Moreover the involvement of power electronic circuits decreases the efficiency
of the system to some extent. Making prototype for synchronization circuitry is difficult because
13
Chapter 1 INTRODUCTION
of the unavailability of highly efficient components required for the high speed synchronization
process.
Chapter 1 - Inspiration for the proposal of this project and scope of this thesis is covered in this
chapter.
Chapter 3 - In this chapter the structural design and specifications of the systems are discussed
in detail. Also, the method for charging lead acid battery and calculation for system installation
is also mentioned.
Chapter 4 - Introduction, designing and working of pure sine wave inverter is given. Also the
SPWM technique which is used for pulse width modulation is described.
Chapter 5 - Procedure for synchronization of grid and inverter is simulated and discussed with
respect to the hardware constraints.
14
Chapter 2 THE PHOTOVOLTAIC MODULE
Chapter 2
15
Chapter 2 THE PHOTOVOLTAIC MODULE
The energy conversion efficiency is the performance measure of the amount of sunlight that the
solar panel is able to convert into electrical energy. The efficiency is always measured in
percentage. Solar panels have low efficiency from 15% to 20%. Sun solar power currently holds
a record of about 44.7% cell conversion efficiency that is made by Fraunhofer Institute of Solar
Energy Systems.
The particles of photon, strikes the surface of cell, enters the outer most layer of semi-conductor
and thus either it converts into heat or produces ions in pair. The photon which enters into the
outer most layer, must have sufficient energy space between both the bands that is Valance band
16
Chapter 2 THE PHOTOVOLTAIC MODULE
and conductor. The newly produced pair of ions reduced the barrier at junction. This all results
in the current flow through exterior circuit [4].
The behavior of PV cell depends upon the size and the type of the load as well as the sunlight
falling on the surface of PV cell, thus we can determine PV characteristics by different current
and voltage values under different conditions.
2.2.1.1 OPEN CIRCUIT VOLTAGE
Open circuit voltage is defined as the voltage that appears across the terminals of the solar panel
when the panel is exposed to light and there is no load connected across its terminals.
2.2.1.2 SHORT CIRCUIT CURRENT
When the terminals of PV panel are shorted then it cause maximum flow of current which a PV
panel can generate, in this condition the voltage across the terminals falls to zero value.
17
Chapter 2 THE PHOTOVOLTAIC MODULE
Thus from the above curves we conclude that small change in irradiance results in large change
in output voltage of PV as compared to change in temperature. Irradiance is directly
proportional to the output voltage whereas temperature is inversely related to the output of PV
module.
18
Chapter 2 THE PHOTOVOLTAIC MODULE
point will reduces the power. This point is known as maximum power point as shown in
[Figure#8]
Since 1839 a deal of researches have been done for development of PV cells in order to increase
their efficiency and to make them inexpensive. Nowadays variety of materials are used for
manufacturing of these cells, some of which are listed in [Table#1] however the reduction in
cost is tradeoff between efficiency and area of the PV panel. Some of the latest low cost solar
panels comes with the additional advantage of flexibility like thin film coatings [5].
19
Chapter 2 THE PHOTOVOLTAIC MODULE
2.4 SUMMARY
In this segment, we have studied solar panels in detail. First, we discussed that PV cells are
PN junction diodes have the capability to convert electromagnetic energy of light into
electrical energy. As the photon strikes the surface of PV it generates an ion pair which results
inflow of the majority carrier. The energy conversion efficiency of photovoltaic cell is around
20 to 26%.
The characteristics of PV cells are discussed in the above chapter and the relationship
between output voltage , irradiance and temperature has been analyzed which shows that the
output of a PV module is directly proportional to irradiance but there exists an inverse
relationship between temperature and output of the solar cell. The point at which maximum
power is achieved is known as maximum power point and the voltage corresponds to MPP
20
Chapter 2 THE PHOTOVOLTAIC MODULE
is maximum power point voltage and the current corresponding to MPP is known as
maximum power point current.
In the Last section of this chapter we observed different materials that are commercially
available. Researcher are working to make PV technology less expensive, however the
selection of material is a tradeoff between the conversion efficiency, cost and area required.
21
Chapter 3 SOLAR ENERGY ON GRID MODULE
Chapter 3
22
Chapter 3 SOLAR ENERGY ON GRID MODULE
23
Chapter 3 SOLAR ENERGY ON GRID MODULE
3.1.2 STORAGE
Battery banks are used to store energy coming from solar panels because the output coming
from PV panels is not constant and it fluctuates due to change in level of irradiance, so it is
necessary to use a battery as a buffer for smooth operation. For this purpose super capacitors
can also be used instead of using battery banks.
3.1.4 FILTER
As the distorted non-sinusoidal wave form from inverter is not appropriate for grid
synchronization so a low pass filter is use to get a sinusoidal wave output. Also if the voltage
waveform is not smooth then we will get harmonics i.e. the power at the output will be of poor
quality.
3.1.5 CONTROLLER
For the synchronization of utility and the solar module it is necessary to use some
microcontroller. In our project we use Arduino which is an 8 bit microcontroller. Controller acts
as a brain of the system which controls all the switching and sensing elements. Microcontrollers
are a good option to keep the cost of the system low while providing enough power to the control
system [7].
3.2 SUMMARY
In this section we have discussed that how maximum power is received from solar panel using
MPPT strategy and then it is made to store in a battery using a bidirectional converter. After
this a dynamic inverter is us to convert the DC signal from solar panel into AC signal in such a
way that output frequency and voltage is similar to that of the grid. The shape of the output
wave form is improved using a passive low pass filter.
24
Chapter 4 DESIGNING OF AN INVERTER
Chapter 4
DESIGNING OF AN INVERTER
25
Chapter 4 DESIGNING OF AN INVERTER
4 CHAPTER 4- DESIGNING OF AN
INVERTER
4.1 INTRODUCTION TO INVERTER
One of the most essential task of our project is the conversion of DC current from solar cell into
the alternating current which will be used to synchronize with grid in-order to energize the load.
This conversion is performed by an inverter which is also referred as DC to AC converter, it
decides the voltage level, frequency, phase angle and shape of the waveform. Here we use
Sinusoidal Pulse Width Modulation (SPWM) technique to operate the gate switch of Mosfets
which are in return use to generate variable output voltages. The performance parameter of
inverter is defined by the waveform it produces, generally the low-cost inverters have a non-
sinusoidal wave form which contain large amount of harmonic. These harmonics are
responsible for the low efficiency, unwanted vibrations and pre-mature failure of electrical
appliances. To avoid these issues, it is desirable to use pure sine wave inverter as it only have
fundamental frequency signal thus no harmonic components. Apart from this modified sine
wave inverters are also available in market which are intended to provide square waveform.
In this project, we have divided the inverting operation into two parallel systems, namely power
system and control system. Here the power system is responsible for the conversion of DC
power into AC power, however the control system will bear the responsibility to supervise the
switching order of Mosfets. These two systems are discussed in detail in the given below topics.
26
Chapter 4 DESIGNING OF AN INVERTER
Here H-bridge inverter topology is adopted to switch IRF530 MOSFETs in a specific manner
to generate pure 50 Hz sinusoidal waveform. The semiconductor switches are connected in a
fashion of Alphabet-H, this allow the load to always be the path for flow of current even if the
direction of current changes. If we consider the following [figure#10] then for the first positive
half cycle Q2 and Q3 will be in closed state in accordance to the gate signal that are provided
by the PWM to MOSFET GATE DRIVER circuit, after 165th pulse all the four MOSFETs will
be in open state and no current will pass through the load this is known as zero crossing state.
From 166th pulse to 332th pulse the Mosfet Q1 and Q4 will operate as per the signals from
PWM to MOSFET GATE DRIVER circuit giving rise to the first negative half cycle. This is
the periodic switching of MOSFETs which give rise to the signals of desired parameters. We
have also used Schottky diodes (denoted by D1, D2, D3 and D4) in parallel to each Mosfet (Q2,
Q1, Q4 and Q3 respectively) to truncate any chance of reverse current flow [8].
27
Chapter 4 DESIGNING OF AN INVERTER
This system is specifically related to the logic on behalf of which the signal of desired frequency
is generated, since our system requirement is to continuously change the inverter output signal
frequency in accordance with the grid frequency so it is very necessary to design a control
system that could instantaneously change the gate switching signals to MOSFETs by analysing
the feedback from synchronizing unit. Till now we have successfully secured the task of
modulating a pulsated signal for a 50 HZ sinusoidal wave by calculating the number of pulses
required to sample the 50 Hz analog signal and then calculating the sampling period, then using
a microcontroller to perform Sinusoidal Pulse Width Modulation based on mapped Algorithm,
which is provided in detail in appendix . Since the grid frequency can only varies from a rage
of ±2Hz, so it will not be a difficult task to generate an algorithm for producing signal of 48 Hz
to 52 Hz.
Microcontroller). This high rate of sampling allows us to generate fine quality sinusoidal wave
at output of our inverter. The calculation for duty cycle and delay sequence array for bit settings
is given in appendix Following figure depicts the SPWM phenomena [9].
Figure 12: Sinusoidal Pulse Width Modulation (a) Comparison between reference and
carrier waveform (b) control signal for Q2 & Q3 (c) Gate signal of Q1 & Q4 (d) Sinusoid
RMS Equivalent output waveform
This part of chapter specifically deals with the parameters that are calculated and the resulted
values are used to select the best available components in market. The process of selection
accompanied of the following steps which were used to bring our simulation work into physical
form,
It was very necessary to have some set points that could work as target before starting our
project, these assumptions will help to calculate many other parameters throughout our project.
The assumed parameters are stated below,
29
Chapter 4 DESIGNING OF AN INVERTER
The next most important task was the selection of appropriate switching device, that could be
able to bear the current of 17 Amps with in its safe limits and should have an operating voltage
of around 12 to 24 Volts. With these design parameters in our mind we figured out that Mosfet
IRF530 is the best switching transistor as per our need. Since it was not possible to directly
operate the Mosfet through the microcontroller so we use Mosfet driver so that it could easily
accept low power input from Arduino and convert it into high current to drive the gate of high
power Mosfet. As per our specifications we choose to use FRM050 PICAXE IC which can be
easily be understood due to its user-friendly interface. Here we also manage to reduce the cost
of inverter since each Mosfet driver could simultaneously operate two Mosfets, so only two
drivers were enough to operate all four Mosfets.
The most difficult part in the designing of inverter was the development of logic or algorithm
that could easily operate the switches to give out a pure sinusoidal waveform. Initially we
calculate out the number of pulses with the help of desired frequency and assumed switching
frequency which comes out to be 22 pulses then duty cycle for each pulse was calculated, then
an array was generated. Along with duty cycle array it was very much essential to form an array
of same order which could provide settings for Mosfet. The working is simple we use a loop to
first call the delay time from duty cycle array then the respective bit setting is called out to made
the Mosfet high or low as per requirement. Here the we have total of 332 each of the two arrays
namely DARRAY for delay time and PARRAY for bit setting, since there are 22 pulses that
will make up to 90 degrees of the wave form so we generated the 22 pulses four times, first 2
sets were to form the high side or positive side of sinusoidal waveform and remaining two sets
30
Chapter 4 DESIGNING OF AN INVERTER
were to form low side or negative side of sinusoidal waveform. We also had to follow the
stuffing rule which eradicate any chance of “shoot through” i.e. turning on all the Mosfets at
same time, thus a small amount of dead time was added. ‘Dead time’ is the time period between
the consecutive pulses generated by Arduino. So, after each delay time a small dead time of 1
microsecond was added after each on time and off time in this way we have a total of 332 bit
setting sequences and 332 delay time elements [10].
To write the program we use the Arduino’s own language setup. The first function we decide
to choose was a predefined function in Arduino library which was named as ‘ANALOG
WRITE’. This function serves to generate a square wave whose width is varied in a void loop,
as discussed in our above paragraph two values namely bit setting and value to set duty cycle
are required to vary the square wave in a void loop. We can easily calculate the analog write
value with help of the given formulae;
The only reason we intended to reject this method was the fixed 490 Hz output, while we needed
a 50Hz output for our inverter. Since this method is not used in our final prototype but it was a
great step in our improved understanding for the generation of SPWM signal using Arduino.
Now we headed towards ‘DIGITAL WRITE’ which is another predefined function of Arduino
but this function only allows the programmer to set the bit setting as high or low and we must
write an extra command for delay each time the bit setting is changed. This make setting the
pulse width modulation more complex since delay time for both high and low side should be
calculated separately each time, the formula for this is stated below,
Here DTH refers to delay time high and DTL refers to delay time low, now the point to ponder
is that, even if the pulse change the frequency must remain constant and hence the inverse of
sum of duty cycle on and off time should give the switching frequency and this had to be
applicable for all 22 pulses. This method failed to operate the Mosfets as on recalculating and
adding the delay the time exceeds so much that the boots trap capacitor losses all its charge
before the pulse width modulation signal had dropped to the low voltage.
31
Chapter 4 DESIGNING OF AN INVERTER
The method we finally sought out to use for programming was computationally very efficient,
this method is commonly known as port manipulation method and proves to be the fastest
method for our task. The greatest advantage of using this method was the simultaneous changing
of multiple pin or switches in a single instruction, moreover it helps us to greatly reduce the
length of the code by allowing the programmer to form a matrix for delay time and another
separate matrix for dead time along with an array to call out bit setting. This is the method which
we have used throughout our project [11].
Let Fa be the frequency required at the output of the inverter, which in our case is 50 Hz
and Fs be the sampling frequency which we assumed to be 5.4 KHz to avoid any types
32
Chapter 4 DESIGNING OF AN INVERTER
of aliasing and to regenerate a fine shape with the help of samples. Then to calculate the
number of pulses
Now we will divide these pulses by 180 degree since we are working for half cycle so,
180
= 8.18
22
Now the value of each step is 8, by using this step value the delay time for each pulse
can be evaluated. This delay time refers to duty cycle as it is the on time of the pulse,
since our carrier frequency is 5.4 KHz so the total sampling time will be 200 micro
second. Then to calculate the duty cycle,
Here T1 is the first element of D-ARRAY, 190 refers to maximum duty cycle value we
choose for microcontroller to generate, the count 1 refers to first pulse. Then for
remaining pulses
33
Chapter 4 DESIGNING OF AN INVERTER
T9 = 190 * COS(9 * 8) = 89 ;
34
Chapter 4 DESIGNING OF AN INVERTER
Now to these values are pull out according to their iteration number to hold the bit setting for
specific duration of time.
35
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
Chapter 5
36
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
5 CHAPTER 5- SYNCHRONIZATION OF
GRID AND INVERTER OUTPUT
5.1 INTRODUCTION OF PHASE LOCK LOOP
This part of project serves to keep a real-time basis track of grid conditions. As discussed earlier
that synchronization cannot be achieved until the voltage level, frequency and phase angle of
all the sources that are to synchronize is nearly same. To do so a system should be design that
can calculate the voltage level, frequency and phase angle of the grid on real time basis and then
a feedback loop will regulate the inverter outputs that are required to achieve synchronization.
A well-known technique for this operation of phase tracking is Phase Lock Loop (PLL) which
is a procedure in which the voltage and frequency are coordinated to give a standard AC
waveform. There are three types of systems used for phase tracking namely; Zero crossing,
Stationary reference frame, Synchronous Rotating reference Frame (SRF). The one which we
will be going to use in our project is SRF based PLL. Through this technique we will calculate
37
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
the grid frequency by locking the grid voltage on the estimated direct voltage axis, as a result
both values will oscillate at same rate and the frequency of grid can be evaluated [12].
The reason behind adoption of SRF based PLL is its efficiency to work for both balance and
unbalance grid conditions, while unbalance grid conditions are beyond the scope of this project.
5.1.1 THEORY
If we study in detail the working criteria of Phase Lock Loop system, then it will become clear
that it is a feedback controlled system, which uses Proportional Integral Controller to adjust the
direct axis voltage to calculate the phase angle. The sample for frequency calculation will be
collected at zero crossing, this means if grid is having sinusoidal wave of 50 Hz then the output
of PLL at zero crossing will be zero otherwise some value of phase angle will be obtained. In
order to calculate the frequency of grid, the reader must understand the fact that here we will
first collect a sample when grid is being operated on 50 Hz and mark it as rated value, then
during operation PLL will continuously take samples at the zero crossing and mark them as
routine samples. In next phase our algorithm will continuously relate the rated samples with
routine samples to evaluate the current grid frequency. This concept will be discussed in detail
later under the topic of Frequency extraction [13].
Since the grid is a three-phase system so before explain the conversion process it is wiser to
assume that the all three voltages are 120 degrees a part from each other and we will only
examine the one phase after which same results will be applied to other phases by just shifting
first phase by 120. It is important to realize that this assumption is only permissible for ideal
grid conditions later we will perform this phenomenon for non-ideal grid conditions. The first
step will be to convert alternating three phase voltages to a new frame which is stationary and
provide ease to analyze one of the three phases, let us say that the new stationary axes are αβ to
form two signals providing information only about the one phase, then this voltage space vector
is synchronized along quadrature axis to determine the phase angle.
38
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
are converted into a set of stationary system of two phases Vα and Vβ. The grid voltages are
given as ,
Va = Vm 𝑠𝑖n Ө……………………………………… 1
Vb = Vm 𝑠𝑖n (Ө + 120)……………………………2
Vc = Vm 𝑠𝑖n (Ө + 240)……………………………3
Here the angle Ө is the phase angle that can be evaluated using 2πf*t. to perform αβ
transformation using Clarks method the matrix formed by using equation 1, 2 and 3 is multiplied
by matrix Tαβ which is given below,
1 1
1 −2 −2
Tαβ = [ . . . ]………………………………………...4
√3 √3
0 − 2 2
Vqd = TqdVαβ
𝑉𝑞 . 𝑉𝑚 𝑠𝑖n (Ө − Ө ∗) .
[ ]=[ ]……………………….8
𝑉𝑑 . 𝑉𝑚𝑐𝑜𝑠 (Ө − Ө ∗) .
39
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
Here we can calculate angle θ with the help of θ* which can be in return estimated by taking
the integral ω’, by adding PI-output and ωff the estimated frequency is calculated. Here we
have designed the gain of PI regulator in such a manner that Vd follows the reference value Vd*
equals to zero. When Vd becomes zero the axis of SVV becomes parallel along quadrature axis,
thus both systems frequencies will be locked and ω’ becomes equal to ω. Now by using proper
calculations angular speed will be converted to angular displacement and frequency will be
obtained [14].
Fs = 2000 Hz
Ts = 1/2000 sec
Kp = 0.3848
40
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
τ = 0.0203
Kp(z−1+(Ts/τ))
T/f =
𝑧−1
0.3848z−0.3753
T/f = ……………………….9
𝑧−1
5.3 SIMULATION
Software which we are going to use is SIMULINK. It is a very user friendly platform which
allow its user to perform electrical simulation for signal processing and electrical controls. A
special feature of this software is that it can integrate its library files with MATLAB through
which we can introduce our data in coding form, data can be input on real time basis by
communicating the software on real time basis where simulation still can be performed and
analyzed at SIMULINK.
Before initializing the simulation, there are some parameters which are important to remember
and are stated below,
As far as procedure is concerned we designed the system in Simulink software but the input
signals are generated in MATLAB command window then a block of simin was used to export
the input signals to Simulink software where the algorithm was implemented and the generated
results under different scenarios can be observed. The output is communicated to workspace in
form of matrix using the simout block. The resulting configuration is given below,
41
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
Here we can observe that the input block of Simin is use to import data from the Matlab. These
input signals are basically the phase voltages each of the three phases are 120 degrees a part
from each other and the fourth signal is just the same value as voltage V A and is used to make
plotting phase angle.
In schematic given below the box abc/Alphabeta is using Clarks criteria which is used to
convert phase values to to stationary frame values providing information only about one phase.
Then Alphabeta/dq block is implemented which transform stationary frame signals to
synchronous rotating frame signals using Parks Transformation. The box ‘a’ given below shows
the gains of block abc/Alphabeta and figure ‘b’ shows the Alphabeta/dq block [15].
42
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
43
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
50 𝐻𝑧
a= x R ……………………….10
360˚
44
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
Here the variable ‘a’ is use to represent the estimated frequency of grid signal and variable ‘R’
represent the angular distance covered by grid signal. The value R is basically the output of
PLL at 41th sample value, furthermore it is in radians so value of R should be converted in
degree. It is important to discuss that as the grid frequency exceed the limit of 50 Hz the angular
distance will be in negative axis and therefore if the calculated value of ‘a’ lies between 0 to 5
Hz then it has to be compensated in order to get exact results.
In the above plot which is generated by scope number 4 , it can be clearly be observed that as
a result of operation performed by PLL and by analysing the phase angle (by yellow triangular
wave) the sine wave from VA (blue colour) is locked on the scaled value of VA (pink colour).
45
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
The above response is taken from scope number 4 and it shows the zoomed image of the how
the pink and blue signals overlap on each other to lock the phase of both the waves.
46
Chapter 5 SYNCHRONIZATION OF GRID AND INVERTER OUTPUT
The above plots shown in Figure 21 and Figure 22 are taken by scope 4 on different zoom levels
and they successfully shows how the quadrature voltage is locked over grid voltage but the due
to difference in frequency the cross over value is not equal to zero and thus equation 10 can be
used to determine the current frequency of grid, for better understanding please refer to
algorithm designed by our team to evaluate the actual grid frequency.
47
CHAPTER 6 CONCLUSION
Chapter 6
CONCLUSION
48
CHAPTER 6 CONCLUSION
6 CONCLUSION
During the simulation of phase lock look, SO method is used for the implementation of transfer
function. This performance of this system shows that it works really fine during ideal grid
conditions. During the ideal grid condition the system developed by above simulation works
twice faster as compared to the working on PLL in non-ideal grid conditions, which means
during ideal grid condition angle tracking is faster. Different non-ideal grid conditions were
being tested and the system withstand with those tests. As the amplitude of the wave changes
the sensitivity of the phase lock loop get reduced.
In this project, the PLL system as designed were only tested with simulations. To really put the
system to test it has to be implemented in some control system and tested with grid voltages as
input signals. Further the system needs to be implemented in a substation together with the
inverter control system to see how well it operates.
More simulations could still be made, there are more non-ideal to be simulated for such as
flicker, dip and notch. Also, a combination of the non-ideal conditions simulated in this report
could be simulated for. Grid voltage signals could be sampled and then imported to MATLAB
and simulated for in SIMULINK and in this way testing with real signals without implementing
the PLL. The theoretical investigation of the transfer functions of the PLL could be taken further
and other designing methods then the SO method could be tested and compared to these resul
49
REFERENCES
7 REFERENCES
[1] Dawn News. (April 29, 2017). Power Shortfall exceeds 5,000MW.
Available at: http://www.dawn.com/news/1102945
[2] Zakharchenko, R., Licea-Jimenez, L., Pérez-Garcıa, S. A., Vorobiev, P.,
Dehesa-Carrasco, U., Pérez-Robles, J. F., ... & Vorobiev, Y. (2004).
Photovoltaic solar panel for a hybrid PV/thermal system. Solar Energy
Materials and Solar Cells, 82(1), 253-261.
[3] Sahir, M. H., & Qureshi, A. H. (2008). Assessment of new and renewable
energy resources potential and identification of barriers to their significant
utilization in Pakistan. Renewable and Sustainable Energy Reviews, 12(1),
290-298.
[4] Kanase-Patil, A. B., Saini, R. P., & Sharma, M. P. (2010). Integrated
renewable energy systems for off grid rural electrification of remote
area. Renewable Energy, 35(6), 1342-1349.
[5] Kim, J. Y., Kim, S. H., Lee, H. H., Lee, K., Ma, W., Gong, X., & Heeger,
A. J. (2006). New Architecture for high‐efficiency polymer photovoltaic
cells using solution‐based titanium oxide as an optical spacer. Advanced
materials, 18(5), 572-576.
[6] Esram, T., & Chapman, P. L. (2007). Comparison of photovoltaic array
maximum power point tracking techniques. IEEE Transactions on energy
conversion, 22(2), 439-449.
[7] Mihnea and Sergiu, “Practical Guide to Implementing Solar Panel MPPT
Algorithm”, Microchip Technology Inc., Application note AN1521
[8] Culp Jr, A.W., Principles of energy conversion. 1991.
50
REFERENCES
[9] Kwang, T. K., & Masri, S. (2010, November). Single phase grid tie inverter
for photovoltaic application. In Sustainable Utilization and Development in
Engineering and Technology (STUDENT), 2010 IEEE Conference on (pp.
23-28). IEEE.
[10] M.H.Rashid, Power Electronics, Second Edition, India: Pearson Education
[11] Nilssen, O. K.,.Variable frequency inverter for ac induction motors with
torque, speed and braking control,2014
[12] Yazdani, D., Bakhshai, A., Joos, G., & Mojiri, M. (2008). A nonlinear
adaptive synchronization techniquefor grid-connected distributed
energy sources. IEEE Transactions on power electronics, 23(4), 2181-
2186.
[13] Takehara, Nobuyoshi, and Kimitoshi Fukae. Inverter apparatus and solar
power generation apparatus., 1999.
[14] Ciobotaru, M., Teodorescu, R., & Agelidis, V. G. (2008, February). Offset
rejection for PLL based synchronization in grid-connected converters.
In Applied Power Electronics Conference and Exposition, 2008. APEC
2008. Twenty-Third Annual IEEE (pp. 1611-1617). IEEE.
[15] Rani, B. I., Aravind, C. K., Ilango, G. S., & Nagamani, C. (2012). A three
phase PLL with a dynamic feed forward frequency estimator for
synchronization of grid connected converters under wide frequency
variations. International Journal of Electrical Power & Energy
Systems, 41(1), 63-70.
51
APPENDIX
8 APPENDIX
%Extracting output signals from PLL send by the "To Workspace" box
%in SIMULINK
for(i=0,inc)
x= simout.signals;
52
APPENDIX
y=x.values;
z=y(41,2);
a=(50/360)*(z*180/pi);
if{45<=a<=50}
f_new=a
end
if{0<=a<=5}
f_new=a+50
end
else
exit
end
53
54
55
56
57