Download Document 8855567

Document related concepts

Power factor wikipedia , lookup

Ohm's law wikipedia , lookup

Spectral density wikipedia , lookup

Electrical ballast wikipedia , lookup

Electric power system wikipedia , lookup

Electrification wikipedia , lookup

Heterodyne wikipedia , lookup

Audio power wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Current source wikipedia , lookup

Electrical substation wikipedia , lookup

Integrating ADC wikipedia , lookup

Distributed generation wikipedia , lookup

Triode wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Rectifier wikipedia , lookup

Stray voltage wikipedia , lookup

Power engineering wikipedia , lookup

History of electric power transmission wikipedia , lookup

Voltage regulator wikipedia , lookup

Three-phase electric power wikipedia , lookup

Metadyne wikipedia , lookup

Surge protector wikipedia , lookup

Amtrak's 25 Hz traction power system wikipedia , lookup

Distribution management system wikipedia , lookup

Power MOSFET wikipedia , lookup

Solar micro-inverter wikipedia , lookup

Voltage optimisation wikipedia , lookup

Variable-frequency drive wikipedia , lookup

Islanding wikipedia , lookup

Alternating current wikipedia , lookup

Opto-isolator wikipedia , lookup

Mains electricity wikipedia , lookup

Power inverter wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Buck converter wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Transcript
The American University in Cairo – AUC
EENG 599
Integrating Renewable Energy with Conventional Power Grid
By
Mobarak Saeed
Supervisor: Prof. Yehea Ismail
Co-Supervisor: Dr. Amr Helmy
2012/2013
1
Abstract
This study is manly introducing a modified integrating method which is much suitable for smart grids. In
smart grid the integration between the outputs of the renewable energy sources, such as solar energy,
wind energy and the conventional power sources takes place. This integration may affect the power
quality negatively; therefore, some considerations should be taken into account, i.e., the power
magnitude, phase, and frequency should be synchronized, and be identical during the entire time of
integration between the two different sources of power, the renewable energy source and the
conventional power grid. To ensure this matching, Matlab/Simulink simulation and prototype were
proposed to produce the optimum values of the previous parameters (power magnitude, phase, and
frequency). M file was written to choose the optimum value for the Boost converter component. The
verification of DC to AC model and parameters was accomplished by Matlab /Simulink simulation.
PWM codes were written to drive the Boost converter and the DC to AC inverter. Moreover, a prototype
was implemented and tested.
2
Table of Contents
Chapter 1: Introduction ................................................................................................................................ 5
1.1
Background ................................................................................................................................... 5
1.2
Background and Literature Review ............................................................................................... 7
1.2.1 DC to DC converter: ..................................................................................................................... 7
1.2.3 Integration methods: ................................................................................................................... 8
1.2.4 Inverter: ....................................................................................................................................... 8
1.3
Scope of Work ............................................................................................................................. 11
Chapter 2: Methodology and Primary Results ............................................................................................ 13
2.1 Block Diagram: .................................................................................................................................. 13
2.2 System analysis and simulation ........................................................................................................ 14
2.3 Results: .............................................................................................................................................. 17
Chapter 3: Prototype .................................................................................................................................. 19
Chapter 4: Conclusion and Prospective ...................................................................................................... 43
References .................................................................................................................................................. 45
Appendix A: M file to calculate the value of L and C of the boost converter ............................................ 46
Appendix B: Code for Microcontroller of the Boost convert ...................................................................... 47
Appendix C: Code for Microcontroller of the DC to AC .............................................................................. 50
Appendix D: Parts List ................................................................................................................................. 54
Appendix E: Schematics .............................................................................................................................. 55
Appendix F: Layouts and pictures ............................................................................................................... 57
3
List of Figures
Figure 1: The effect of solar irradiance and temperature on PV I-V and P-V characteristics [1].................. 6
Figure2: Modified Sine Wave [5] .................................................................................................................. 9
Figure 3: Level PWM Signals [5]. ................................................................................................................. 10
Figure4 Structure of an Hbridge (highlighted in red)[6] ............................................................................. 11
Figure5: the system block diagram. ............................................................................................................ 13
Figure 6: the system Simulink model .......................................................................................................... 14
Figure 7: Three pure sine wave ................................................................................................................... 15
Figure8: Three current signals with a phase shift 120. ............................................................................... 16
Figure9: A constant DC 750 voltage ............................................................................................................ 17
Figure 10: The three inverted voltages in the shape of 6 steps signals. ..................................................... 17
Figure 11 and 12 illustrate the three inverted voltage and the current signals obtained after the
inversion phase respectively. In both cases, the three voltage and current signals have the same
frequency of the desired signal which 50 Hz. ............................................................................................. 18
Figure 11: The three inverted voltage after the resistive load are in the form of pure sine wave. ........... 18
Figure 12: The three current signals after the LPF are the form of pure sine wave with lower amplitude.
.................................................................................................................................................................... 18
Figure 13: Circuit Diagram.......................................................................................................................... 19
4
Chapter 1: Introduction
1.1 Background
Considerable concerns have been raised regarding the Peak oil hypothesis: the amount
of petroleum extraction should reach its peak somewhere between 2025 and 2040. Beyond
that, the amount of extracted oil will start to decline. The growing concerns for nuclear safety
after the Japanese disaster will decrease the usage of nuclear energy as a power source. On the
other hand, the demand for electricity is increasing exponentially due to the rapid increase in
the world population and the spread of power hungry devices among citizens. Seeking to fill the
gap between the conventional limited power sources and the increasing power demand, the
integration between the conventional power sources and the renewable energy sources is
inevitable. In fact, certain countries have already widely implemented such hybrid power
generation systems. In December 2012, Germany’s electricity production from photovoltaic
systems has reached 32.2 GW. Several European countries have taken the same direction:
France, Spain, and Netherlands to mention a few.
One of the major challenges facing this integration is the unconventional fluctuating nature of
electricity generated from photovoltaic systems. Such nature harms the power quality. Another
impediment in the way of such integration is that the photovoltaic sources produce direct
current (DC) and the power produced by conventional grids is usually in alternating current
(AC). Therefore, a smart DC to AC conversion method is required. This method must treat the
power produced from the photovoltaic source and make it compatible with the power resulting
from conventional power sources such as; power stations that generate electricity depending
on combustible fuels, such as coal, and natural gas. Both constituents must be synchronized in
phase and magnitude.
The power generated from photovoltaic system is highly influenced by the surrounding
environment. Figure 1 illustrates the I-V characteristics of electricity generated from
photovoltaic and the effect of solar irradiance as well as ambient temperature.
5
Figure 1: The effect of solar irradiance and temperature on PV I-V and P-V characteristics [1]
Maximum Power Point Tracking (MPPT) is the process that guarantees attaining the maximum
power from a Photovoltaic (PV) panel. Nowadays, all MPPT controllers have Pulse Width
Modulation (PWM) internally to control the energy flow. The controller changes the duty cycle
of PWM to control the current flow. There are several maximum power point tracking (MPPT)
algorithms which changes the equivalent resistance seen by the PV panel in order to fool it into
generating the maximum possible power. The MPPT system samples the output of the Solar
cells and applies the MPPT algorithm to achieve maximum power despite the variation in
environmental conditions. MPPT devices are usually integrated into a system that provides
voltage or current conversion, filtering, and regulation for driving various loads, including
power grids, batteries, or motors.[1]
The Duty Cycle (D) is the portion of time that a device spends in the active state as a fraction of
the total cycle time (period). The term is usually used pertaining to electrical devices, for
example, switching power supplies (Boost converter and DC to AC inverter). In an electrical
device, a 60% duty cycle means the power is on 60% of the time and off 40% of the time. One
period is the length of time it takes for the device to go through a complete on/off cycle.
Changing the duty cycle by modifying the PWM code would increase the extracted power from
such system. [2]
6
1.2 Background and Literature Review
The integration process between solar generated energy and grid energy must passes by two
conversion steps: DC to DC conversion and DC to AC conversion. The first step consists of
converting the lower DC voltage produced by the solar harvesting system into a higher voltage
value. The second step uses this boosted DC voltage to convert it to AC. We will start by
exposing the DC-to-DC conversion phase followed by the DC-to-AC conversion step.
1.2.1 DC to DC converter:
Two main types of DC to DC converters exist: boost and buck converters. The former enhances
the DC voltage presented at its input while the latter steps its down.
1.2.1.1 Boost converter:
Boost converters are widely used as a DC to DC step up converter that generates an output
voltage higher than input voltage. The boost converter mainly consists of an inductor, a diode,
a capacitor, and a transistor. The transistor is controlled by a microcontroller instrumenting the
algorithm. The algorithm is adjusted to guarantee the maximum power [3]. A novel DC to DC
converter with a single inductor multi-output boost (MOB) converter with a chain of regulated
output voltages has been recently introduced. A significant advantage of the MOB converter is
its outstanding dynamic response versus the input voltage variation. However, MOB has a
highly complex design [4].
1.2.1.2 Buck converter:
The buck converter is a step down DC to DC converter. There is a similarity between the buck
and boost converter in terms of components. The buck converter consists of an inductor, diode,
capacitor, and a switch. However, there is a difference in the design between the boost
converter and buck converter. Moreover, changing the duty cycle in the microcontroller code
plays a significant role in the capturing of the maximum power. [5] One step down regulator
topology with one fixed switching frequency, pulse width modulation (PWM) and operation in
the continuous-current mode (CCM). The principles discussed can be applied to other
topologies, but the equations do not apply directly to other topologies. Four design parameters
are required: input-voltage range, regulated output voltage, maximum output current and the
converter’s switching frequency. The use of the fixed topology has the advantage of the simple
design; however there is a limited room for changing the input-voltage range and output
voltage [6]. Another way is to apply the switched Capacitor principle that increases power
efficiency and decreases output ripple of an embedded switched-capacitor based DC/DC Buck
Converters. The usage of current pump based circuit limits transition current of the switched7
capacitors and hence, improves power efficiency and reduces output ripple. However, the
design of the switched Capacitor buck converter is complex. [7]
1.2.1.3 Transformers:
A transformer is a static electronic device that step energy either up or down by the usage of
inductive coupling between winding circuits, the primary and secondary windings. The main
disadvantages of using transformer are the large amount of power losses and the difficulty to
match the MPPT requirements. [8]
1.2.3 Integration methods:
There are two methods to integrate renewable energy with grid energy.
1.2.3.1 Inversion first:
First, the energy from the DC source is converted into AC at low voltage levels. Afterwards, the
AC low voltage level is stepped up by the means of a transformer. However, the transformer is
less efficient in terms of the overall size and the cost of the system, as well as the power losses.
Moreover, the analog system by nature has the disadvantage of fixed design which limits its
ability to adjust the values of the inputs and the outputs.
1.2.3.2 Boosting first:
First, a boost converter is used to a gain a much higher DC voltage. Second, this high DC voltage
is converted into AC voltage by the means of pulse width modulation (PWM). The inverter
could implemented either analogy or digitally. However, the digital implementation is the best
choice for the adjustable and universal projects.
1.2.4 Inverter:
The device inverts the DC current to AC current. The inverters are classified into two types
according to the total harmonic distortion (THD) of the inverted wave.
THD is means to measure the quality of the inverter output waveform. It is defined as the ration
between the sums of the power of the various harmonic components to that of the
fundamental frequency..
8
1.2.4.1 Modified sine wave:
Figure2: Modified Sine Wave [5]
A modified sine wave or modified square wave is a wave in the middle between the square
wave and the pure sine wave with a total harmonic distortion between 35 to 40%. We can
notice in the above figure (in the red curve) the sudden sharp change from zero to one or from
one to zero. The modified sine wave inverter functions well with several devices except
those which contain motors. The modified sine wave inverter is an easy and cheap solution.
However, it comes with a hidden cost: the harmonics. Harmonics are integer multiples of the
fundamental power frequency. For example, if the operating frequency is 60 Hz another
harmonics would appear in the third harmonic 120Hz and the fifth harmonic 300Hz. Sensitive
devices such as medical equipment cannot run of a modified sine wave. The most common
negative effect of harmonics is amplified current flow which leads to the burn out of
components as well as the overall failure of the system. [9]
1.2.4.2 Pure sine wave:
A pure sine wave inverter is another common method of generating AC power by the means of
PWM with total harmonic distortion of 5%. The inverter can guarantee maintaining the worst
case 5% total harmonic distortion by changing the duty cycle PWM and using effective low pass
filter. The electricity that is provided by the service provider in our home is in the pure sine
waveform. The inverter could be implemented either analogy or digitally. However, the digital
implementation is the best choice for the adjustable and universal projects. The core of the
inverter device is the PWM signal that controls the switching operation mode. The switch is
usually used in the DC to DC converter and the DC to AC converter. There are many approaches
to generate the PWM signal, such as specific PWM integrated circuits, analog component, and a
digital microcontroller. [9]
9
1.2.4.2.1 Analog circuit
The PWM signal is generated by feeding a reference and a carrier (triangle) signal through a
comparator which generates the output signal according to the difference between the two
inputs. The reference is a sine wave signal has the same frequency of the desired output signal
(50 Hz in Egypt). The carrier wave is a triangle wave and should be chosen at a much greater
frequency than the reference signal. In addition, the designer should take into consideration
the inverse relationship between the carrier frequency and the value of the components of the
low pass filter (inductors and capacitors). There are two scenario:
1) The carrier (triangle signal) is greater than the reference signal (50 Hz in Egypt): the
output high state.
2) the reference signal (50 Hz in Egypt) is greater than The carrier (triangle signal): the
output low state
Therefore, hardware implementation for the sine wave generator (oscillator) and triangle wave
generator is needed. [10]
Figure 3: Level PWM Signals [5].
1.2.4.2.2 Digital microcontroller:
Several solutions exist to implement a digital PWM controller. In a first step, for most solutions,
a PWM algorithm is written in Assembly, C, or even Basic language to control the switches. For
example, PIC 18f4431 uses the C language, Atmel 90s52 uses C and Assembly, and PIC 16f77A
uses Basic. The main criterion to choose the optimum microcontroller is the microcontroller’s
instructions’ execution speed. The microcontroller is used to control a switch. The switch is
either an IGBT or a MOSFET.
The insulated-gate bipolar transistor (IGBT) is a three-terminal transistor primarily used as an
electronic switch. In newer devices, it is used for combining high efficiency and fast switching.
10
The metal–oxide–semiconductor field-effect transistor (MOSFET) is a transistor used for
amplifying or switching electronic signals.
Rich and Chapman [6], use a microcontroller to control a three level PWM DC to AC inverter.
The microcontroller is used to control an H-bridge which is consisted of four MOSFET switches.
IR2110 driver is used to derive the four switches. Some designers prefer to use the MOSFET as a
switch in an inverter design due to its wide availability in the market as well as the different
available options in terms of voltage, current, and price. However, the MOSFET is not
guaranteed to work at a power higher than 1000Watts. [11]
Figure4 Structure of an Hbridge (highlighted in red)[6]
Inveters in the market:
Most of the inverters in the Egyptian market are either made in China or Taiwan. They are
expensive and unreliable. Moreover, they are known for their imprecise or even fake
decrpiction in terms of the device efficiency and capability to deliver such power and voltage.
One can easily find a modified sine wave inverter that delivers a power of 2000 W while taking
a 12V input delivering 220 V. The price for such a system ranges between 3000 and 3500 LE.
The pure since wave inverters on the market cost between 2200 and 2800 LE. They operate at
the same voltages as the previous type while delivering 1000W.
1.3 Scope of Work
The aim of this study is to integrate the renewable energy with the conventional power grid
without affecting the power quality. Since the quality of the conventional grid is very sensitive
11
to any fluctuation, many issues should be taken in consideration. Three important parameters
should be identical from the two sources, renewable energy and the conventional power grid.
These three parameters were the amplitude, phase, and frequency. Taking into consideration
the fluctuating nature of renewable energy sources, measuring and comparing the values of
these parameters once is not enough. The goals of this project were to create a working three
phases DC to AC sine wave inverter that could efficiently provide three kilowatt of power using
PWM and comparing it to other methods currently on the market in terms of price and
affiance. M file and Matlab/ Simulink simulation were used to test the model of a Boost
converter and a pure sine wave DC to AC inverter monitoring. PWM codes were used to
control the DC to DC converter (Boost converter) and DC to AC inverter.
In the following chapters, we expose the different steps to accomplish the objectives of our
study. In the following chapter we discuss the implementation of the project as well as the
primary results obtained. In chapter 3, we illustrate the prototype design, and components
selection. Chapter 4 concludes this study and pinpoints some important improvements and
possible future research axis.
12
Chapter 2: Methodology and Primary Results
This study proposes an integration method between the conventional electricity grid and
renewable energy. In a first step, the system was designed and simulated by the means of
Matlab/Simulink simulation. A prototype was then built and tested. In order to better
understand this process, we have broken it down in the following sections where we detail the
function of each part, how it was constructed, and its interaction of other system constituents.
2.1 Block Diagram:
The following figure5 shows the entire system’s block diagram. The figure traces the
consecutive steps followed by the signal from end to end. The first step is extracting the low DC
voltage signal from the solar cells (PV). The second section takes the low DC voltage from the
PV and steps it up by the means of Boost converter. The high DC voltage is then inverted into
AC voltage by the means of DC to AC inverter which consists of an IGBT module. Finally the
inverted signal is treated by an inductive low pass filter to remove the undesired harmonics.
The signal is then fed to the resistive load. The resistive load used is three standard light bulbs.
PV
Boost
MC
IGBT
LPF
Drivers
Figure5: the system block diagram.
13
Load
2.2 System analysis and simulation
Matlab simulation was used In order to design this project. The optimum values in terms of
frequency, amplitude and phase were chosen based on the Matlab simulation. The various
parts were simulated in MATLAB, to predict an accurate output. Figure 4 illustrates the Matlab
model used and its interconnection.
Figure 6: the system Simulink model
In order to obtain the required DC voltage of our system (from 220V to 380V), we found that
we must use a DC source of 750V. This is the DC Link Voltage component that is shown in figure
6. A voltage Source Inverter model was built. Since we are building a system to integrate the
harvested energy with the standard grid energy, the system must generate electricity with 3
phases. Three voltage constituents exist: Va, Vb, and Vc. The three voltages have different
phases with 120⁰ phase shift between each of them. The equations below, used in the
modeling, guarantee a 120⁰ phase shift between the three voltages. E is the input DC source
[12]. W is the angular frequency of the voltage constituents.
14
Va= E/3(2Sa-Sb-Sc)
(1)
Vb= E/3(2Sb-Sa-Sc)
(2)
Vc=E/3(2Sc-Sa-Sb)
(3)
Sa=
(4)
Sb=
(5)
Sc=
(6)
To build the voltage source inverter (VSI) control, three pure sine waves were assigned with a
frequency of 50 HZ (314 rad/sec) the same as the desired frequency that is used in the
electricity grid in Egypt, a modulation index of .85, and phase of 120 between each phase. The
360 were divided into three sections each with 120 .
Figure 7: Three pure sine wave
In Figure 7 the three current signals are separated by 120 a phase shift. However, they have the
same frequency.
15
Figure8: Three current signals with a phase shift 120.
The next step was to design the L Filter. Equation 7 governs the selection of the appropriate
value of the inductor L. Vdc is the input DC source (750 V) while ΔiLmax is the maximum
expected value the ripples would have which is assumed to be 10% of the desired output
current. The desired current for output current is 10 Amperes leading to a ΔiLmax of 1 Ampere.
ΔiLmax = 1/8* Vdc / L* fs (7)
The switching frequency (Fs) is set to 10 Khz. The value of the Fs has been chosen as much
bigger as possible taking into consideration the inverse relationship between the switching
frequency and the inductor (L) value as in the equation below. L is set to 10 mH.
L=
(8)
The next step was the transfer function choice. We chose the transfer function (equation 9)
because if provides the lowest harmonics and ripples during the simulation.
The transfer function= 1/ (L*S) +1 (9)
To calculate the optimal load equivalent resistance at which the system would deliver the
highest current in a given voltage setup we substitute in equation 10. The desired values of
power that system should deliver 3000W. The expected output voltage which is varies between
220V and 380V. In case of 220V, the maximum current that can be drawn out of the system is
13,6 at a maximum load equivalent resistance of 16.17 ohms. In case of 380 V, We obtain a
current I equal to 7.9A. In this case R is equal to 47.5 ohms.
16
I= output power/ output AC voltage (10)
2.3 Results:
Input DC voltage:
A DC source of 750V was assigned with respects to the expected value the of the output voltage
which should be between 220 and 380 according to our design. Figure 8 shows the output
signal of the source.
Figure9: A constant DC 750 voltage
The three inverted voltages:
Figure 10 shows the three inverted voltages obtained from the inversion phase. We can see 6
steps. We can see inside of each of these steps the PWM signal.
Figure 10: The three inverted voltages in the shape of 6 steps signals.
17
Three output inverted voltage and current after the resistive load:
Figure 11 and 12 illustrate the three inverted voltage and the current signals obtained after the
inversion phase respectively. In both cases, the three voltage and current signals have the same
frequency of the desired signal which 50 Hz.
Figure 11: The three inverted voltage after the resistive load are in the form of pure sine wave.
Figure 1: The three current signals after the LPF are the form of pure sine wave with lower
amplitude.
In this chapter we presented the block diagram and the primary results used for the
implementation of our system. the system is formed from the interconnection of PV, Boost
Converte. IGBT modules as Inverter, Drivers, Microcontrolers, Lowpass filter, andResistive Load
in the following chapter we show the prototype of our full system as well asits compoments.
18
Chapter 3: Prototype
In the previous chapter, we showed the primary design and calculations for the various
components of the system. The system was modeled in Matlab/Simulink. In this chapter, we
illustrate the prototype building phase. The prototype was built, tested and was found to be
fully operational.
3.1 Circuit Diagram:
Figure 12 shows the complete circuit diagram of the system. The values of the components
were calculated through the Matlab/Simulink simulation. We use those values for all the
components in the system.
Figure 13: Circuit Diagram.
In the early stage, 60 DC voltages were delivered from the power supply in the Lab during the
testing phases. In a second stage, four solar panels were used each delivering 20V. However,
19
it was necessary to check the value of the output of each solar panel before and after the serial
connection. Moreover, the solar irradiance fluctuation plays a negative role that would lower
the voltage value of the solar panel.
The boost converter was used to step up the 60(v) to become 300 (v) according to the following
equation:
Vo/Vi= 1/(1-D)
(11)
Where D is the duty cycle, Vi the input DC voltage, and Vo is the out voltage after the step up
operation by the Boost converter. The duty cycle was set to 0.5 (50%) to avoid the components
damage due to the electric spark that may occur due to the improper switching. In other
words, choosing high duty cycle, for example, 75% would increase the probability of improper
switching to take place thus increasing the probability of components damage.
The maximum voltage (Vi) that we can obtain from combining the two channels of the power
supply is 60V. By substituting these values equation (10) we get an output voltage Vo of 300V.
The calculation of the inductor (L) proper value for boost converter:
R=V/I
(12)
R=30 ohms
L [R*D
]/2Fs (13)
Where L is the inductor and Fs is the switching frequency.
Let Fs=10000
By apply the same concept that used in the simulation phase that we should keep in our mind
that there is an inverse relationship between the switching frequency and the inductor (L)
Value as mention in equation (13)
L 1 mH
The next component in the circuit diagram is the diode. Any diode that can pass 1200V and 10A
safely could be used. To illustrate, the diode has a significant role that in the Off-state, the
switch is open and the only path offered to the inductor current is through it. Moreover, the
diode prevents the current from returning to the voltage source and damaging it. Therefore,
the selection of the diode that capable to pass 15 A and 1200V has been made.
We now inspect the capacitor used in the circuit. Choosing the Capacitor as big as possible is
recommended according to equation 13. The capacitor would able to operate the load alone in
20
case of assigning low duty cycle for the switch. Moreover, choosing Capacitor with high value
makes it possible for the capacitor to operate the load during the instantaneous failure in the
input voltage source. Equation 13 is shown below. Vo is the change that may take place in the
output voltage. In our case, Vo is 5% of Vo, then Vo equal 15V. By substituting in the
equation we obtain: C=470 mF.
C (Vo*D)/(Fs* Vo*R) (13)
The extracted 300V DC power from the Boost Converter was fed to the FP10R12YT3 IGBT
module that works as Dc to AC inverter. AC voltage is almost always quoted in RMS values, and
not peak values.
Vdc= Vrms (14)
Vpeak=Vrms*0.707 (15)
Let Vdc=300(v)
Vpeak=212 (V)
Vpeak to peak= 424
Our next step consisted of building the low pass filter (LPF). There inductors have been chosen;
one for each phase. The desired inductor value was not available in the local market. Therefore,
we bought four used power supply of PCs( personal computer) and we extracted their inductors
to be used in the low pass filter as well as in the Boost Converter (three for LPF+ one for Boost
Converter). We built our own inductor by measuring the inductor value then removing turns till
we reached the desired value of 1 mH .
Three standard light bulbs were used to test the output signal of each of the three phases. The
testing process is started by three 15W standard light bulbs. After that three 40W standard light
bulbs were used and finally, three 100W standard light bulbs. Our system can operate a higher
load than the ones selected.
After comparing our system’s components vis-à-vis other commercial systems, we found that
ours is more efficient. It has a lower. The overall cost of the system is cheaper when compared
to its peers in the local market. The total cost of the project was 1500 LE. The most expensive
components were the IGBT modules at the price of 500 LE and the rest of the money was
divided among the other components.
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
In this chapter we presented the entire system prototype and the components selection used
for its implementation. The system was built from the interconnection of between Boost
Converter, inverter, LPF, and Resistive Load. We showed our system is better than the
commercially available ones in the market in terms of probability of failure as well as cost.
41
42
Chapter 4: Conclusion and Prospective
This study proposes a partial of the entire system for integrating renewable energy
especially solar energy with a conventional power grid. The study analyzed, measured, and
compared the values of significant parameters. According to the change in the values of these
key parameters, certain adjustments were made to obtain the optimal efficiency and power
quality. This was implemented by Matlab/Simulink simulation and prototype. Boost converter
and DC to AC inverter were connected together. The goals of this project were to create a
working three phases DC-AC sine wave inverter that could efficiently provide three kilowatt of
power using PWM and comparing it to other methods currently on the market in terms of
price and affiance. A full working system was built and tested. However, further improvements are
required to reach a fully functional product ready for marketing.
A great concern should be raised regarding modeling and implementing such types of
projects. As many electronic engineers are focusing on one of the two converters: the DC to DC
converter or the DC to AC inverter. To illustrate, many papers are proposing and implementing
new DC to DC designs (3, 4, 5, 6, 7, and8). Many papers propose new DC to AC designs (9, 10,
11, and12). However, combining the DC to DC converter and DC to AC inverter together would
raise some technical issues. As a result implementing a model which contains the two
converters together would introduces some solutions to these issues instead of encountering
these issues during the actual operating time which may result in a negative impact on the
power quality. More advanced techniques should be included, such as



PHASE LOACKED LOOP (PLL) to synchronize with the grid.
PID CONTROL: to keep the capacitor voltage constant and inject a sinusoidal current into
the grid.
DSP CARD: to execute the whole control algorithm with a suitable sampling time
sufficient to connect to the grid.
43
44
References
[1]
Tan C.W, Green T.C, and Hernandez-Aramburo C.A, “Analysis of Perturb and Observe Maximum
Power Point Tracking Algorithm for Photovoltaic Applications,” IEEE International Conference on
Power and Energy, Dec. 2008.
[2] Brunton,S.L., Clarence Rowley,W., and Sanjeev R., Maximum Point Tracking for
Photovoltaic Optimization Using Extremism Seeking, Princeton University, Princeton, NJ 08544.
[3] Denneau , M., Duty Cycle Measurement and Correction Using a Random Sampling Technique.
[4] Change, C., Simple PWM Boost Converter with I/O Disconnect Solves Malfunctions Caused
when VOUT<VIN, Semtech Corporation.
[5]. Ebrahim ,B., and Ali,N., Flexible Multilevel Boost DC-AC Converter
CFP121IJ-ART.
in IEEE Catalog Number:
[6] Dilidine, B., Buck Converter Basics.
[7] Schelle,D.and Castorena,J., Buck-ConverterDesign Demystified,.
[8] Das*,T., MandaP., Switched-Capacitor based Buck Converter Designusing Current Limiter for better
Efficiency and Output Ripple, 2009.
[9] Rajesh, c., Kishor,M. ,Poorna , and N.,Chandra, Reduce switching Topology of Power
Electronic Transformer, International Journal of Engineering Research and applications,
3/5/2012.
[10] Blooming, T., Carnovale , D., Application of IEEE STD 512-1992 Harmonic Limits.
[11] Doucet, J., Eggleston, D., and Shaw, J., Dc/Ac Pure Sine Wave Inverter, 2007.
[12] Rich,O., and Chapman, W., Three Level PWM Dc/Ac Inverter using a Microcontroller, 2011.
[13] Younis,M., Full Cell Model for Three Phase Inveter,2006.
45
Appendix A: M file to calculate the value of L and C of the boost
converter
D=0.5;
fs=15e3;
R=600;
vo=600;
Dvo=0.01;
Lb=1*(R*D*(1-D)^2)/(2*fs);
Cb=1*(vo*D)/(fs*Dvo*R);
46
Appendix B: Code for Microcontroller of the Boost convert
void main ()
{int d;
unsigned short duty_ratio;
unsigned long freq;
char vd [4],id[6], pd[4], dpd[4], dd[5];
float x,y,v,i,p,v0,p0,dp,dv, v1;
TRISA=0xff;
//Port A as input port to use A0, A1 as Analogue inputs
TRISB=0x00;
//Port B as output port for the LCD
TRISE.F1=0;
// configure E1 as output pin for PWM test
TRISC.F2=0;
//RC2 as output for PWM output
PORTE.F1=PORTC.F2;
// TO SEE THE LED FLASHS
Lcd_Config(&PORTB, 0, 2,1, 7,6, 5, 4);
// LCD
configuration based on the help as per its H/W connection
Lcd_Cmd(Lcd_Clear);
Lcd_Cmd(LCD_CURSOR_OFF);
ADCON1=0x84;
//Configuration of the register ADCON1
Pwm_Init(30000);
p0=0; // initial condition
v0=0; // initial condition
d=50; // initial condition: Duty cycle = 30 %
start:
// Volatge Measurment
x=Adc_Read(0);
v=(x/204.8)*20; // voltage equation
floatToStr(v,vd);
// Current Measurment
y=Adc_Read(1);
i=(y/204.8)*1000;
floatToStr(i,id);
// Power calculation
p=v*i/1000;
floatToStr(p,pd);
// Power and volatge differences calculation
dp=p-p0;
dv=v-v0;
p0=p;
v0=v;
// Display on LCD
Lcd_Out(1, 1, vd);
Lcd_Out(1, 6, "V
");
Lcd_Out(2, 1, id);
Lcd_Out(2, 6, "mA
Lcd_Out(1, 10, pd);
Lcd_Out(1, 15, "W ");
// Display Voltage
// Display Current
");
// Display Power
47
floatToStr(dp,dpd);
Lcd_Out(2, 10, dpd);
Lcd_Out(2, 15, "W ");
//P & O program
if (dp>1)
// power dead band
{
if (dv>=0)
// d=d+(dv/100)*d;
d=d++;
// Increase Voltage d=d++; (0.5 V) Voltage dead band
if (d>=92)
d=92;
if (dv<= -0)
//d=d-(dv/100)*d; //
d=d--;
// Decrease Voltage d=d--;
if (d<=10)
d=10;
}
if (dp<-1)
{
if (dv>=0)
//d=d-(dv/100)*d;
//
d=d--;
// Decrease Voltage
if (d<=10)
d=10;
if (dv<= -0)
//d=d+(dv/100)*d; //
d=d++;
// Increase Voltage
if (d>=92)
d=92;
}
if (0<=dp<=1)
d=d;
//no change
/* Display Duty ratio on LCD
intToStr(d,dd);
Lcd_Out(2, 9, dd);
Lcd_Out(2, 15, "% ");
*/
// PWM operation
duty_ratio=(d*255)/100;
Pwm_Change_Duty(duty_ratio);
Pwm_Start();
delay_ms(1000);
/* Temp program
duty_ratio=(d*255)/100;
Pwm_Change_Duty(duty_ratio);
Pwm_Start();
delay_ms(1000);
48
d=d++;
if (d>=85)
{
pwm_stop();
d=20;
}
*/
goto start;
}
49
Appendix C: Code for Microcontroller of the DC to AC
#include <built_in.h >
#include "PWM_table.c "
char i;
unsigned int y;
void interrupt() {
PWMCON1.UDIS=1 ;
i=i+1;
y=md8[i];
PDC0L=Lo(y);
PDC0H=Hi(y);
y=md8[i+14];
PDC1L=Lo(y);
PDC1H=Hi(y);
y=md8[i+7];
PDC2L=Lo(y);
PDC2H=Hi(y);
if(i==20){i=0;}
PWMCON1.UDIS=0 ;
PORTD.f0=~PORTD.f0; // test interrupt
PIR3.PTIF=0; // clear interrupt flag
}
void main(void)
{
char x;
TRISC=0x00;
TRISB=0x00;
TRISD=0x00;
TRISA=0x00;
TRISE=0x00;
PORTD=0x00;
PORTB=0x00;
i=0;
INTCON.GIE=1;// enable Global interrupt
INTCON.PEIE=1;// enable all peripheral interrupt
PIE3.PTIE=1; // enable PWM timer interrupt
IPR3.PTIP=1; /// PWM Timer interrupt hig periority
PTCON1.PTEN=0;
// stop PWM timer
50
PTCON1.PTDIR=0;
// PWM Timer 0 up direction
PTCON0=0b00000000;
// event postscallar (xxxx) timer prescaller (xx)
Timer mode (xx) free runing
PWMCON0=0b01000000;
complementary)
PWMCON1.UDIS=0 ;
DTCON=0b01000110;
FLTCONFIG=0b00000000;
//
PWM enable (0xxx) PWM mode (xxxx3210 and 0
// update disable bit 1=disable
// dead time
PTPERL=0xB7;
PTPERH=0x03;
// PWM periode low 8 bit
// PWM periode High (0x0x 4 bit only)
y=md10[0];
PDC0L=Lo(y);
PDC0H=Hi(y);
// Duty low 6 bits xxxxxx00
// duty high 6 bit 00xxxxxx
y=md10[14];
PDC1L=Lo(y);
PDC1H=Hi(y);
// Duty low 6 bits xxxxxx00
// duty high 6 bit 00xxxxxx
y=md10[7];
PDC2L=Lo(y);
PDC2H=Hi(y);
// Duty low 6 bits xxxxxx00
// duty high 6 bit 00xxxxxx
PTCON1.PTEN=1;
// PWM TImer start
// chek for program operation
xx:
PORTC=0xff;
delay_ms(1000);
PORTC=0x00;
delay_ms(1000);
goto xx;
}
**********************PWM_TABLE.C PROGRAM****************
const unsigned int
md10[35]={0x0770,0x09A0,0x0BA0,0x0D40,0x0E58,0x0ED8,0x0EAC,0x0DE0,0x0C7C,0x0A
A8,0x088C,0x0654,
0x0434,0x0260,0x0100,0x0030,0x0018,0x0084,0x01A0,0x0340,0x053C,0x0770,0x09A0,
0x0BA0,
0x0D40,0x0E58,0x0ED8,0x0EAC,0x0DE0,0x0C7C,0x0AA8,0x088C,0x0654,0x0434,0x0260}
;
51
const unsigned int md9[35]={
0x0770,0x0968,0x0B34,0x0CA8,0x0DA8,0x0E1C,0x0DF4,0x0D38,0x0BFC,0x0A54,0x086C,
0x0670,
0x0488,0x02E0,0x01A4,0x00E8,0x00C4,0x0134,0x0234,0x03AC,0x0574,0x0770,0x0968,
0x0B34,
0x0CA8,0x0DA8,0x0E1C,0x0DF4,0x0D38,0x0BFC,0x0A54,0x086C,0x0670,0x0488,0x02E0}
;
const unsigned int
md8[35]={0x0770,0x0930,0x0AC8,0x0C14,0x0CF8,0x0D5C,0x0D3C,0x0C94,0x0B7C,0x0A0
4,0x0850,0x068C,
0x04DC,0x0364,0x0248,0x01A4,0x0180,0x01E4,0x02C8,0x0414,0x05B0,0x0770,0x0930,
0x0AC8,
0x0C14,0x0CF8,0x0D5C,0x0D3C,0x0C94,0x0B7C,0x0A04,0x0850,0x068C,0x04DC,0x0364}
;
const unsigned int
md7[35]={0x0770,0x08F8,0x0A5C,0x0B80,0x0C48,0x0CA0,0x0C80,0x0BF0,0x0AF8,0x09B
0,0x0834,0x06A8,
0x052C,0x03E4,0x02EC,0x025C,0x0240,0x0298,0x035C,0x0480,0x05E8,0x0770,0x08F8,
0x0A5C,
0x0B80,0x0C48,0x0CA0,0x0C80,0x0BF0,0x0AF8,0x09B0,0x0834,0x06A8,0x052C,0x03E4}
;
const unsigned int
md6[35]={0x0770,0x08C0,0x09F0,0x0AEC,0x0B94,0x0BE0,0x0BC8,0x0B4C,0x0A78,0x096
0,0x0818,0x06C4,
0x0580,0x0468,0x0394,0x0314,0x02FC,0x0348,0x03F4,0x04EC,0x0620,0x0770,0x08C0,
0x09F0,
0x0AEC,0x0B94,0x0BE0,0x0BC8,0x0B4C,0x0A78,0x0960,0x0818,0x06C4,0x0580,0x0468}
;
const unsigned int
md5[35]={0x0770,0x0888,0x0988,0x0A58,0x0AE4,0x0B24,0x0B10,0x0AA8,0x09F4,0x090
C,0x07FC,0x06E0,
0x05D0,0x04E8,0x0438,0x03D0,0x03BC,0x03F8,0x0488,0x0558,0x0658,0x0770,0x0888,
0x0988,
0x0A58,0x0AE4,0x0B24,0x0B10,0x0AA8,0x09F4,0x090C,0x07FC,0x06E0,0x05D0,0x04E8}
;
const unsigned int
md4[35]={0x0770,0x0850,0x091C,0x09C0,0x0A34,0x0A64,0x0A54,0x0A00,0x0974,0x08B
8,0x07E0,0x06FC,
0x0624,0x0568,0x04DC,0x0488,0x0478,0x04AC,0x051C,0x05C4,0x0690,0x0770,0x0850,
0x091C,
0x09C0,0x0A34,0x0A64,0x0A54,0x0A00,0x0974,0x08B8,0x07E0,0x06FC,0x0624,0x0568}
;
const unsigned int
md3[35]={0x0770,0x0818,0x08B0,0x092C,0x0984,0x09A8,0x099C,0x095C,0x08F4,0x086
8,0x07C4,0x0718,
0x0678,0x05EC,0x0580,0x0544,0x0534,0x055C,0x05B0,0x062C,0x06C8,0x0770,0x0818,
0x08B0,
0x092C,0x0984,0x09A8,0x099C,0x095C,0x08F4,0x0868,0x07C4,0x0718,0x0678,0x05EC}
;
52
const unsigned int
md2[35]={0x0770,0x07E0,0x0844,0x0898,0x08D0,0x08EC,0x08E0,0x08B8,0x0870,0x081
4,0x07A8,0x0738,
0x06C8,0x066C,0x0624,0x05FC,0x05F4,0x060C,0x0644,0x0698,0x0700,0x0770,0x07E0,
0x0844,
0x0898,0x08D0,0x08EC,0x08E0,0x08B8,0x0870,0x0814,0x07A8,0x0738,0x06C8,0x066C}
;
const unsigned int
md1[35]={0x0770,0x07A8,0x07D8,0x0804,0x0820,0x082C,0x0828,0x0814,0x07F0,0x07C
0,0x078C,0x0754,
0x071C,0x06EC,0x06C8,0x06B4,0x06B0,0x06BC,0x06D8,0x0704,0x0738,0x0770,0x07A8,
0x07D8,
0x0804,0x0820,0x082C,0x0828,0x0814,0x07F0,0x07C0,0x078C,0x0754,0x071C,0x06EC}
;
53
Appendix D: Parts List
 3 PIC18f4431
 2 LCD display
 4 IR2110 deriver
 2 IGPT Module FP10R12YT3
 capacitors 470 micro Farad
 three inductor 1mH
 diode
 leds for measurement
 three light bulbs
 Three resistor 30 ohms
54
Appendix E: Schematics
Power supply
Boost
55
Inverter
56
Appendix F: Layouts and pictures
Power supply
57
Inverter
58
Boost
59