You are on page 1of 87

ONLINE HYBRID INVERTER

B.E. (EL) PROJECT REPORT


(Batch 2007 2008)
FYP # EL-037
PREPARED BY
Muhammad Faizan Aadil

EL-050

(Group Leader)

Muhammad Haris
Syed Dayab Hussain
Syed Ali Mujtaba
Ali Ahmed Khan

EL-059
EL-058
EL-049
EL-062

PROJECT ADVISORS
PROF. Ghulam Hussain
Professor, U.I.T.

(External Advisor)

SIR. Tariq Rehman


(Internal Advisor)
Lecturer, Depart. Of Electronic Engineering.

Department of Electronic Engineering


N.E.D University of Engineering & Technology,
Karachi -75270

[i]

ACKNOWLEDGEMENT
We like to thank Prof. Ghulam Hussain for helping us in the project and giving us his
priceless advice especially in transformer design issues. Also we like to thank Syed Huzaif
Ali without him our project will never come to an end; we greatly honor his timeless efforts
in the making of this project. We also give credit to Sir Tariq Rehman for his great support
throughout the year and solve our problems that we face in our project. Last but not the
least we also want to thank Miss Madiha Shabbir who manage us all the necessary
equipment and resources which was necessary important in the development of the project.

[ii]

ABSTRACT
Online Hybrid Inverter targets the basic problem of Pakistan -the energy crisis. The scope
of the project covers Maximum Peak Power Tracking of both the sources with the main
feature of flux additivity, delivering a fluctuation free power to the users. The project is one
of a kind in Pakistan that utilizes both the sources at the same time. The system also
involves efficient charging that keeps the battery life long lasting. The user can also
monitor the status of the system from remote location via internet. The whole system is
connected to PC via a dedicated USB interface which is also a prominent feature of the
system.

[iii]

TABLE OF CONTENT
CHAPTER NO. 01 .................................................................................................................... 3
INTRODUCTION ...................................................................................................................................... 3
1.1 CONVENTIONAL STRUCTURE: ............................................................................................................. 3
1.2 MULTIPORT STRUCTURE: .................................................................................................................... 4
1.3 BASIC METHODOLOGIES: .................................................................................................................... 6
1.3.1 TIME SHARING: ....................................................................................................................... 6
1.3.2 FLUX ADDITIVITY:.................................................................................................................. 8

CHAPTER NO. 02 .................................................................................................................... 9


OVERVIEW OF THE SYSTEM ............................................................................................................... 9

CHAPTER NO. 03 ................................................................................................................. 10


MAXIMUM PEAK POWER TRACKING ............................................................................................. 10
3.1 MPPT:............................................................................................................................................... 10
3.1.1 SOLAR MPPT: ......................................................................................................................... 11
3.2 WIND MPPT:..................................................................................................................................... 16
3.2.1 WIND TURBINE MODEL AND CHARACTERISTICS: .......................................................... 16
3.2.2 RESULTS: ................................................................................................................................ 16
3.2.3 PROTOTYPE IMPLEMENTATION: ........................................................................................ 19
3.2.4 CIRCUIT DESCRIPTION: ........................................................................................................ 20
3.2.5 RESULTS: ................................................................................................................................ 22
3.2.6 EFFECTS ON THE EFFICIENCY: ........................................................................................... 23

CHAPTER NO. 04 ................................................................................................................. 24


MULTIPORT HYBRID CONVERTER.................................................................................................. 24
4.1 ARCHITECTURE: ................................................................................................................................ 25
4.2 CIRCUIT DESCRIPTION: ...................................................................................................................... 26
4.2.1 SWITCH SELECTION: ............................................................................................................ 26
4.2.2 TRANSFORMER DESIGN:...................................................................................................... 26
4.2.3 OPTO-COUPLER SELECTION: .............................................................................................. 28
4.2.4 PWM CONTROLLER: ............................................................................................................. 29
4.2.5 MOS GATE DRIVE:................................................................................................................. 30
4.2.6 SOURCE CONTROLLER:........................................................................................................ 30

[iv]

4.3 EXPERIMENTAL RESULTS:.................................................................................................................. 31


4.3.1 SINGLE SOURCE WITH NO FLUX ADDITIVITY: ................................................................ 31
4.3.2 WITH 2 VARIABLE SOURCES (FLUX ADDITIVITY): ......................................................... 33
4.4 CONCLUSION: ................................................................................................................................... 34

CHAPTER NO. 05 ................................................................................................................. 35


CHARGE CONTROLLER DESIGN ...................................................................................................... 35
5.1 BUCK DESIGN AND SUMUALTIONS: ................................................................................................... 35
5.1.1 SCHEMATIC AND SIMULATIONS: ....................................................................................... 35
5.1.2 SALIENT FEATURES OF BUCK CONVERTER..................................................................... 37
5.2 BATTERY BANK SELECTIONS: ............................................................................................................. 37
5.3 CHARGE CONTROLLER: ..................................................................................................................... 39
5.3.1 OBJECTIVE: ............................................................................................................................ 39
5.3.2 SALIENT FEATURES.............................................................................................................. 40
5.4 THE BATTERY BANK CHARGER........................................................................................................... 40
5.4.1 DUAL LEVEL FLOAT CHARGER: ......................................................................................... 41
5.4.2 DESIGN REQUIREMENTS: .................................................................................................... 43
5.4.3 DESIGN OF 12V 12APMS CHARGE CONTROLLER: ............................................................ 44
5.4.4 DESIGN OF 24V 12 AMPS CHARGE CONTROLLER: ........................................................... 45
5.4.5 SELECTION OF PASS ELEMENT: ......................................................................................... 47
5.4.6 REVERSE CURRENT PROTECTION: .................................................................................... 48
5.4.7 FUTURE AMENDMENTS: ...................................................................................................... 48

CHAPTER NO. 06 ................................................................................................................. 49


INVERTER .............................................................................................................................................. 49
6.1 DESIGN REQUIREMENT: .................................................................................................................... 49
6.2 ARCHITECTURE: ................................................................................................................................ 50
6.3 INVERTER DESIGN AND SIMULATION: ............................................................................................... 51
6.3.1 SIMULATION RESULTS:........................................................................................................ 52
6.3.2 SPECTRUM RESULTS: ........................................................................................................... 53
6.4 CIRCUIT DESCRIPTION: ...................................................................................................................... 53
6.4.1 DC-DC CONVERTER: ............................................................................................................. 53
6.4.2 H-BRIDGE: .............................................................................................................................. 54
6.4.3 SWITCH SELECTION: ............................................................................................................ 54
6.4.4 HIGH VOLTAGE MOS GATE DRIVE: ................................................................................... 55
6.5 OVER LOAD DETECTION: ................................................................................................................... 58

CHAPTER NO. 7 ................................................................................................................... 59


INTERFACING, GUI AND BROADCASTING ..................................................................................... 59
7.1 LITERATURE OVERVIEW: ................................................................................................................... 60

[v]

7.1.1 UNIVERSAL SERIAL BUS (USB): .......................................................................................... 60


7.1.2 DEVICE DRIVERS: ................................................................................................................. 67
7.1.3 GRAPHICAL USER INTERFACE AND LABVIEW: ............................................................... 67
7.1.4 PIC 18F4550: ............................................................................................................................ 70
7.2 METHODOLOGY................................................................................................................................ 71
7.2.1 USB DEVICE: .......................................................................................................................... 72
7.2.2 INTERFACING WITH LABVIEW USING NI-VISA: .............................................................. 74
7.2.3 GRAPHICAL USER INTERFACE (GUI): ................................................................................ 76
7.2.4 BROADCASTING: ................................................................................................................... 80
7.3 RESULTS: .......................................................................................................................................... 81

[1]

CHAPTER NO. 01
INTRODUCTION
Hybrid power sources are becoming more and more popular. For example, like the power
coming for the solar PV array are heavily relying on weather condition. Also the wind
power is not reliable especially in Karachi. So to compensate the fluctuations of power
from both the sources hybrid energy system is used. The whole project is concentrated on
multiport converters which is a promising concept. Further the feature of MPPT, inverter,
smart charger, communication with internet is performed.

1.1 CONVENTIONAL STRUCTURE:


In the conventional structure, there usually exists a common high-voltage or low-voltage dc
bus interconnecting multiple sources. Separate dc-dc conversion stages are often used for
individual sources. Those converters are electrically linked together at the dc bus and are
usually controlled separately. The main structural concern of a hybrid power source is the
position of the storage (e.g., batteries). As illustrated in Fig. 1.1(a), storage can be
connected in parallel with the main source. With this configuration, the main source is
effectively a charger for the storage. The current of the main source, however, is not
controlled directly. The mismatch between source and storage impedance also presents a
problem. As shown in Fig. 1.1(b), energy storage can also be on the main power flow path
to define a bus voltage. A dc-dc converter (e.g., boost converter) can be placed between the
main source and the storage. The converter controls the current taken from the main source.
In the scheme shown in Fig. 1.1(c), energy storage is placed outside the main power flow
path and connected to the dc bus through a bidirectional dc-dc converter.[1]

[2]

Figure 1.1: different storage position in hybrid power source (a) In parallel with main source (b) on the main power
flow path and (c) connected to the dc bus through bidirectional dc-dc converter

1.2 MULTIPORT STRUCTURE:


The multiport structure is emerging as an alternative for small generation systems, where
there is often more than one power input. The whole power processing unit may be viewed
as a single power stage. In a black box fashion, a multiport dc-dc converter (shown in
Fig. 1.2) can be used to interface multiple power sources and storage devices. It regulates
the system voltages and manages the power flow between the sources and the storage
elements. The control of the entire system can be centralized in a single processor. A
multiport converter may best satisfy integrated power conversion, efficient thermal
management, compact packaging, and centralized control requirements. In small generation
systems a power electronic converter is needed to provide an interface between power
sources and storage, to supply local ac loads and possibly dc loads with regulated outputs,
as well as to connect to the utility grid.
For instance, Fig. 1.2 shows a possible energy system for domestic application based on the
multiport structure. A single converter manages the power flow between the generator,

[3]

storage, and load. The whole system is able to operate in both stand-alone and gridconnected modes. In case of stand-alone.[2]

Figure 1.2: Multiport Structure

Table 1-1 Comparison of conventional and Conventional

Multiport

multi-port structure

Structure

Structure

Need a common dc bus?

yes

No

Conversion steps

more than one

Minimized

Control scheme

separated control

Centralized control

Power flow management

complicated, slow

simple, fast

Transformer

multiple single,

Multi-winding

Implementation effort

High

low

1.3 BASIC METHODOLOGIES:

[4]

1.3.1 TIME SHARING:


The time-sharing concept can be used to develop multiport converters. As shown in Fig.
1.3(a), the two-input fly back converter uses the coupling of a magnetic component to
enable multiple input. For each input there is a separate winding. To some extent, the
converter can be regarded as two fly back converters operating in parallel, except for the
combined transformer on one core and the shared secondary output rectifier. It is also
possible to have multiple outputs by using multiple secondary windings and rectifiers to
provide multiple isolated output voltage levels for different loads, as shown in Fig. 1.3(b).
This topology is capable of interfacing sources of different voltage-current characteristics
to a common load, while achieving low parts count. The control scheme for this converter
is based on the time sharing concept. The duty cycle within one switching cycle is split up
for the multiple inputs, that is, each input is active for a certain period in a switching cycle.
The typical gating signals for the two-input fly back converter are shown in Fig. 1.3(c).
During Ton1, source V1 transfers power to the load, whereas during Ton2, V2 does.
The idea behind the time-sharing concept is simple. However, this method does not allow
for a simultaneous energy transfer from the multiple inputs. The fly back topology implies
that it is only suitable for low-power applications because of high current stresses. The
input and output currents are both pulsating. This increases the filtering effort. The concept
of time-sharing is implemented on a larger time scale, that is, each port operates in an
intermittent mode. A typical time sharing concept is shown in fig 1.4

[5]

Figure 1.3: Multiport converter using the flyback topology, showing (a) two-input flyback converter, (b) MIMO flyback
converter, and (c) typical gating signals for the two-input flyback converter.

Figure 1.4: Multiport converter based on the time-sharing concept, showing (a) topology and (b) typical gating signals.

1.3.2 FLUX ADDITIVITY:


A Multi input converter based on flux additivity was proposed in Fig. 1.4 shows the
converter topology. It has two power inputs and one output. Instead of combining input dc
sources in electric form, the proposed converter combines inputs in magnetic form by

[6]

adding up the produced magnetic fluxes together in the magnetic core of the coupled
transformer. With phase-shifted PWM control, the proposed converter can draw power
from two different dc sources and deliver it to the load individually and simultaneously,
and output voltage regulation and power flow control can be achieved. Due to the currentfed structure of the converter, the converter has the ability to accommodate voltage
variations of the sources. However, this topology is not bidirectional. Although softswitching is achievable, the current stress of the switches is high. Therefore, its application
is limited to medium-/low-power applications.

Figure 1.5: MI dc-dc converter based on flux additivity.

[7]

CHAPTER NO. 02
OVERVIEW OF THE SYSTEM

ONLINE HYBRID INVERTER ARCHITECTURE


SOLAR
PANNEL

CHARGE CONTROLLER

WIND
GENRATOR

BUCK
CONVERTER

WIND OVER
VOLTAGE
PROTECTION

MPPT

MPPT

MULTIPORT HYBRID
CONVERTER
SOURCE
CONTROLLER

FLYBACK
CONVERTER

EFFICIENT
CHARGER

BATTERY BANK
I
S
O
L
A
T
I
O
N

12VDC

12VDC

INVERTER
DC-DC
CONVERTER

DC-AC
CONVERTER

OVER LOAD PROTECTION

PWM CONTROLLER

DISPLAY UNIT &


BROADCASTING
GUI

DATA
PUBLISHING

[8]

CHAPTER NO. 03
MAXIMUM PEAK POWER TRACKING
3.1 MPPT:
Maximum power point tracking (MPPT) is a technique that grid tie inverters, battery
chargers and similar devices use to get the maximum possible power from the PV array or
wind turbines. Solar cells and wind turbines have a complex relationship between solar
irradiation and wind speeds and total resistance that produces a non-linear output efficiency
known as the I-V curve. It is the purpose of the MPPT system to sample the output of the
system and apply a resistance (load) to obtain maximum power for any given
environmental conditions. Essentially, this defines the current that the inverter should draw
from the PV in order to get the maximum possible power. [1]
The peak power is reached with the help of a dc/dc converter by adjusting its duty cycle
such that the resistance corresponding to the peak power is obtained. Manual tracking of
duty cycle is not possible so automatic tracking is preferred to manual tracking. An
automatic tracking can be performed by utilizing various algorithms (for solar). [2]
a. Perturb and observe
b. Incremental Conductance.
c. Parasitic Capacitance.
d. Voltage Based Peak Power Tracking.
e. Current Based peak power Tracking.

[9]

3.1.1 SOLAR MPPT:


3.1.1.1 PROTOTYPE IMPLEMENTATION:
For the MPPT of solar array we chose voltage based peak power tracking algorithm in
which the maximum power achieve at 75% of the open circuit voltage.
Vmpp = Mv .Voc
Where Vmpp is the maximum power point voltage, Voc is the open circuit voltage of the
PV array and Mv is the voltage factor. The voltage factor has the value between 0.70.8
depending upon the PV array characteristics. For our case 0.75 which is for silicon cells.
3.1.1.2 CIRCUIT DESCRIPTION:
PV
Array

Peak
Power

BUCK CONVERTER

Switch

MOSFET
Driver
PWM
Controller

Controller
DAC

Figure 3.1: Block diagram showing the main parts of Solar MPPT and their interconnections.

By taking the value of open circuit voltage after every 5 seconds the controller multiplies
the value to 0.75 and sends it to the PWM controller which drives the buck regulator and
sets the desired Vmpp.

[10]

3.1.1.2.1 BUCK CONVERTER:


The converter consist of MOSFET IRF 3205 which can draw current upto 110A with low
Rds(on). It has high switching speed. The whole converter is operated at 28 KHz which
require low inductance and capacitance value for filtering. The converter is working in
asynchronous mode.

Figure 3.2: showing the basic structure of Buck converter working in asynchronous mode.

3.1.1.2.2 DRIVER:
The PWM controller itself cannot drive the MOSFET due to its high gate to source
capacitance. So an intermediate stage is required which provide enough current at high
frequency. For driving the MOSFET IR2110 is used. The IR2110 is running in
bootstrapping configuration for driving the high side MOSFET. For more details of
bootstrapping and its calculation see section 6.4.4

[11]

3.1.1.2.3 DIGITAL TO ANALOG CONVERTER:


It is an 8 bit DAC which is used to give a reference voltage to the PWM converter.
Basically it is a R-2R ladder, the reason for the usage of R-2R ladder is that it is cheap as
compare to its integrated circuit counterpart i.e. DAC0800. Also there is no issue of loading
because the error amplifier of the PWM controller provides high input impedance.
3.1.1.2.4 PWM CONTROLLER:
The TL494 is a PWM controller which is used to set the scaled reference voltage coming
from the DAC at the output of the buck converter.
3.1.1.3 RESULTS:
The setup was tested on a variable DC power supply due to the unavailability of PV array
on 100 load. The MPPT module maintains 75% open circuit voltage within a tolerable
range of error. The results are as follows:
Input Voltage Vin

Peak power Voltage Vmpp

25.3V

18.8V

24V

18.1V

24.5V

18.3V
Table 3.1: Voc vs. Vmpp

[12]

Solar Maximum Peak Power Tracking


18.9

Peak Power Voltage Vmpp

18.8
18.7
18.6
18.5
18.4
18.3
18.2

18.1
18
23.8

24

24.2

24.4

24.6

24.8

25

25.2

Input Voltage Vin

Figure 3.3: Shows that the output is approximately 75% of the input voltage (Voc).

25.4

[13]

3.2 WIND MPPT:


3.2.1 WIND TURBINE MODEL AND CHARACTERISTICS:

Figure 3.4: Model of the wind turbine used to study the effects of air speed on frequency, power, voltage and current.

3.2.2 RESULTS:
The result shows the effect of wind speed over the output voltage, frequency and other
parameters.

[14]

(a)

[15]

(b)

Figure 3.5: (a) and (b) shows the characteristic curves of different parameters of a wind turbine.

[16]

3.2.3 PROTOTYPE IMPLEMENTATION:


For wind MPPT perturb and observe algorithm is used. In this algorithm a slight
perturbation is introduce system. Due to this perturbation the power of the module varies. If
the power increases due to the perturbation then the perturbation is continued in that
direction. After the peak power is reached the power at the next instant decreases and hence
after that the perturbation reverses. [3]

Figure 3.6: Perturb and observe algorithm

When the steady state is reached the algorithm oscillates around the peak point. In order to
keep the power variation small the perturbation size is kept very small. The algorithm is
developed in such a manner that it sets a reference voltage of the module corresponding to
the peak voltage of the module.

[17]

3.2.4 CIRCUIT DESCRIPTION:


In this module the controller monitors the output power and sets the maximum power by
adjusting the duty cycle of the driver.

BUCK CONVERTER

WIND
TURBINE

Driver

LOAD

Controller

Figure 3.7: Architecture designed for Wind Maximum Peak Power Tracking.

3.2.4.1 CONTROLLER:
For controlling purposes the microcontroller PIC 16f877 is used. The controller receives
the feedback from the load and calculates the output power and sets the duty cycle
according to the following algorithm.

[18]

Start

Read V and I
from turbine

P= V(t) * I(t)

P= P(t)-P(t-1)
At V= V(t)- V(t-1)

No

YES
P>0

V<0
No

V<0
YES

D=D+D

YES

No

D=D-D

D=D-D

Driver

D=D+D

[19]

3.2.4.2 BUCK CONVERTER:


The details of the buck converter were described in 3.1.1.2.1.
3.2.4.3 DRIVER:
The details of the driver were described in 3.1.1.2.2.
3.2.5 RESULTS:
The MPPT module is successfully implemented but the algorithm is not tested completely
due to the unavailability of the wind turbine. It is expected that the results are correct due to
the working of the algorithm.
However the initial experimental results on a variable DC power supply and 100 load are;
Input voltage

Vmpp

18

14

20

16.7

24

19.4

22

18.6

16

11.7

Table 3.2: shows the relation between Input voltage and Vmpp

[20]

Maximum Peak Power Voltage Vmpp

Wind Maximum Peak Power Tracking


20
19
18

17
16
15
14
13
12
11
10
15

16

17

18

19

20

21

22

23

24

25

Input Voltage Vin

Figure 3.8: shows the effect of input voltage on maximum peak power point.

3.2.6 EFFECTS ON THE EFFICIENCY:


Theoretically, by the usage of MPPT the efficiency of the system is increased by 30%. The
MPPT module is 75-80% efficient so the overall efficiency is increased by 5-10%. The
efficiency can be increased by increasing the efficiency of MPPT module.

[21]

CHAPTER NO. 04
MULTIPORT HYBRID CONVERTER
The multiport hybrid converter is MISO (Multiple Input Single Output) system and it is the
backbone of any hybrid energy system. Its function is to combine the power of multiple
sources on a single DC line. The main features of online hybrid inverters multiport hybrid
converter are:
1. Complete Isolation of the sources.
2. A highly efficient 220 volts fly-back regulator.
3. Works on the principle of flux additivity.
4. Draw power from the sources according to the power available.
5. Under-voltage shutdown with hysteresis feature.

[22]

4.1 ARCHITECTURE:

WIND MAXIMUM
PEAK POWER
MODULE

PWM
CONTROLLER

OPTO
ISOLATOR

MOSFET

OPTO
ISOLATOR

SOLAR
MAXIMUM PEAK
POWER MODULE

FILTER

Secondary
Pulse Transformer

Primary1

Primary2

Figure 4.1: Architecture of multiport hybrid converter.

MOSFET

[23]

4.2 CIRCUIT DESCRIPTION:


4.2.1 SWITCH SELECTION:
For this type of application, there are two types of switches to choose from, one being the
Insulated Gate Bipolar Transistor (IGBT), and the other a Metal Oxide Semiconductor
Field Effect Transistor (MOSFET).
Parameter

MOSFET

IGBT

Frequency

>20Khz

<20Khz

Voltage

<250

>1000

Losses

Medium

High

Temperature

Ambient

>100C

Table 4.1: Comparison between IGBT and MOSFET. [1]


BJT is not the option because it leads to greater power loss. The MOSFET switch was
chosen for the DC/DC converter since it will be utilized in a low voltage application
typically 10 to 30v and a low temperature situation. To minimize switching losses 5 or 6
MOSFETs will be placed in parallel for each switch. The MOSFET chosen for the
implementation is IRF3205 which has an On-Resistance of 8m. The MOSFET losses are
calculated as:
P MOSFET, switching losses = I2R= 10.1x8m=0.88w
4.2.2 TRANSFORMER DESIGN:
This is the main part of multiport hybrid converter. The transformer consists of 2 primary
and single secondary winding. It is a high frequency transformer which is highly efficient
due to the negligible hysteresis loss. The main feature of the transformer is as follows:

[24]

1. High frequency operation 50 KHz


2. 200 wattage rating.
3. Pulse transformer.
4. Small in size (4.5x5.5cm)
5. Cheap.
The transformer is designed on special software that is primarily used for inductor and
transformer designing named Magnetics Designer. The core diagram and its technical
specifications are as follows:
Parameter

Primary 1

Primary 2

Secondary

Turns(N)

Wire size(AWG)

24

20

24

Strands

Current(A)

Table 4.2: Transformer specification.

[25]

Figure 4.2: Core of the pulse transformer (the physical windings and turns)

4.2.3 OPTO-COUPLER SELECTION:


In 1st stage of the circuit the OptoCoupler ILQ74 is used. It is a quad optocoupler with
the following specification:
Parameter

Value

Unit

Isolation test Voltage

5300

Vrms

Isolation Resistance

>1012

Switching time

Us

Table 4.3: ILQ74 Specifications.[2]

[26]

In the final prototype we use EL817 optocoupler because of its small size and cheapness
factor. It is 3 times smaller and about 30 times cheaper than ILQ74. It gives excellent
results at the specified frequency with complete isolation.
Parameter

Value

Unit

Isolation test voltage

5000

Vrms

Isolation resistance

5x1010

Switching Time

3.5

Us

Table 4.4: EL817 specifications.[3]


4.2.4 PWM CONTROLLER:
The main purpose of the PWM controller is to control and adjust the duty cycle of the pulse
transformer and sets the desired output voltage irrespective (within limits) of the input
voltage. For Pulse width modulation 1 st SG series PWM controller were used but due to its
limited output current(25mA) and cost the TL494 is used which provides output current
upto 200mA and it is also cheap.
The main features of this IC are:
1. Dead time control which is necessary for the operation of the pulse transformer.
2. Frequency range up to 500 KHz.
3. High output current eliminating the need of any intermediate driver.
4. High operating duty cycle range 3%-97%.

[27]

4.2.5 MOS GATE DRIVE:


The gate driver consist of TIP 41 and TIP 42 transistor in the totem pole configuration, the
driver works fine at frequency less than 10KHz but as frequency increase, the driver does
not able to charge the increasing MOS gate to source capacitance also power losses in the
totem pole configuration increases due to the bipolar junction.
To compensate the drawbacks an expensive IR2110 driver is used. The IR2110 is working
in low side configuration and accurately drive the MOSFET at 50 KHz frequency and it
dissipates negligible power. The details of this driver are given in Section 6.4.4.
4.2.6 SOURCE CONTROLLER:
The source controller monitors the voltage of the source and turn it on or off according to
the limits. The source controller provides chatter free output otherwise the source may be
damaged due to unnecessary switching. The source controller is a hysteresis comparator
which works on two voltages a higher voltage for turning the source on and a lower voltage
which is to turn the source off.

Figure 4.3: Simulation results of the source controller indicating the two voltage levels.

[28]

4.3 EXPERIMENTAL RESULTS:


4.3.1 SINGLE SOURCE WITH NO FLUX ADDITIVITY:
The results are obtained using a 16 watt resistive load.
Vin

Vout

Iin

Iout

Efficiency

Inferences

12

222

2.1

0.07

63%

The DC to DC converter fairly

15

222

1.59

0.07

65%

maintains a constant output with

18

221

1.28

0.07

67%

high efficiency.

24

221

0.96

0.07

67%

Table 4.5: Experimental results with single source.


4.3.1.1 GRAPHICAL APPROACH:

V-I characteristic curve of MPHC


2.35
2.15

Current I(A)

1.95
1.75
1.55
1.35
1.15
0.95
0.75
11

13

15

17

19

Source Voltage (V)

21

23

25

[29]

(a)

Efficiency
68%

67%

66%
Efficiency
65%

64%

63%
0

10

15

20

25

30

(b)
Figure 4.4:(a) V-I characteristic curve of multiport hybrid converter at 16W load.(b) Efficiency analysis of the multiport
hybrid converter (Note the efficiency is increasing as increasing in voltage)

[30]

4.3.2 WITH 2 VARIABLE SOURCES (FLUX ADDITIVITY):


The results are obtained using a 16 watt resistive load.
Source1

Source2

Multiport Hybrid
Converter

Vin1

Iin1

Vin2

Iin2

Vout

Iout

12

0.53

18

0.86

222

0.07

14

0.92

15

1.27

222

0.07

15

1.24

14

0.93

221

0.07

18

0.95

12

0.50

222

0.07

Table 4.6: Experimental results with 2 sources.


4.3.2.1 GRAPHICAL APPROACH:

Flux additivity
1.3
1.2

Current (A)

1.1
1
0.9
0.8
0.7
0.6
0.5
0.4
10

11

12

13

14

15

16

17

18

19

Voltage (V)

Figure 4.5: Shows the principle of flux additivity. The power is fed to the load by the combination of both the sources.

[31]

4.4 CONCLUSION:
The flux additivity is successfully performed which indicates that higher the voltage the
higher the flux generated which in turns produces more power at the output.

[32]

CHAPTER NO. 05
CHARGE CONTROLLER DESIGN
In this chapter we will discuss the buck regulator, charge controller and the battery bank
design according to the requirements of ONLINE HYBRID INVERETER.

5.1 BUCK DESIGN AND SUMUALTIONS:

The output voltage (200V) of multiport hybrid converter cannot be fed directly to the
charging circuit. To overcome this problem a buck converter is designed which maintains
an output voltage of 30 volts to drive the charging circuit. The complete description of this
converter has been discussed in section 3.1.1.2.1.

5.1.1 SCHEMATIC AND SIMULATIONS:

Figure 5.1: Schematic of buck converter

[33]

Figure 5.2: Load current and load voltage simulations:

Figure 5.3: Diode and MOSFET current simulations:

[34]

5.1.2 SALIENT FEATURES OF BUCK CONVERTER

It can regulate 100- 300 V into 30V precisely.

The efficiency of the designed buck regulator is 82 percent.

A gate driver IC IR2110 has been used in this converter in bootstrap mode to
minimize the heating and effecting switching of pass device.

IRF840 is used as a pass element which can easily pass 13A of current and having
drain to source voltage tolerance up to 600 volts.

An inductor of 30mH is used which gives fine current regulation.

5.2 BATTERY BANK SELECTIONS:


The battery bank should be selected in such a way that a single charge controller is
sufficient enough to efficiently charge the bank. The DC-DC converters to provide the
inverter with different voltage levels are to take the DC voltage either from the battery bank
or from the converter at the input of the charge controller. In this way the charger and the
DC converters along with inverter are connected in parallel.
We are using 24V, 80Ahr batteries to ensure a longer backup time. We cannot use a large
combination of series connected batteries as:
1. UC3906 can hold input voltage up to 40V, so the bank voltage with batteries in series
should also be less than 45v
2. More series connected batteries increases the minimum requirement of batteries to be
used for the proper working of the system i.e. if we connect 4 batteries in series then we

[35]

always require at least 4 batteries to make the system work, and to increase the backup
time we would have to add 4 more batteries, no less is useful.
Large number of batteries in parallel increases the amount of current in the system, thereby
increasing the power losses. Hence, we have to select battery bank in such a way so as to
minimize losses as well as the number of batteries required by the system for its
performance. We have proposed the following design after optimizing the power losses and
the battery requirement.

Figure 5.4: 24V 80Ahr battery bank

The proposed design meets all the requirements:


1. It provides a maximum backup time of 6 hrs.
2. UC3906 charges this bank efficiently.
3. The system needs two batteries to start performing
4. Backup time can be increased just by adding pairs of series connected batteries.

5.3 CHARGE CONTROLLER:

[36]

The charging of batteries is always an issue of debate when we are talking about the usage
of batteries in any power backup or alternate energy systems. Batteries must be charged in
such a way that minimum of the system power is lost while they are charging and the
charging time also needed to be as small as possible. Furthermore, overcharging the
batteries and letting them to be discharged below a particular point DOD (Depth of
Discharge) point also decreases the battery life.
To overcome all of these problems, and for increasing the efficiency of the system, the need
of a charge controller is evident. A charge controller, also known as charge regulator or
battery regulator limits the rate at which electric current is added to or drawn from electric
batteries. It prevents overcharging and may prevent against over voltage, which can reduce
battery performance or lifespan, and may pose a safety risk. It may also prevent completely
draining ("deep discharging") a battery, or perform controlled discharges, depending on the
battery technology, to protect battery life. The accepted design will provide this output with
the least amount of total losses. The design is to be tested with batteries of different ratings
for the verification that it meets all the needs.
5.3.1 OBJECTIVE:
Alternate Energy Systems comprise of batteries for increasing the backup time, in the
absence of the sources of power (wind & solar energy). We are using 12V 20Ahr batteries
connected in series and parallel to provide the maximum backup time of 6hrs. The battery
bank acts a unit of 24V 80Ahr battery. We need to charge the 24V 80Ahr battery bank in
minimum time without trading off for the battery life for our 1kw system. The batteries can
be charged by a current ranging from 6-8 Amps taking the charging time from 8 hr to a

[37]

minimum of 2 hrs for one battery. The battery life is reduced by over charging and also by
discharging it below the DOD (Depth of Discharge) point. We have connected the batteries
in series, so the battery equalization also needed to be maintained for a longer battery life.
The primary objective for charge controller designing was to develop efficient charging
mechanism for the rated battery bank of 24V 80Ah, along with providing sufficient
protection circuitry.
5.3.2 SALIENT FEATURES
Intelligent charging of the battery bank

No PWM based charging required as the Charge Controller provides the appropriate
analogue voltage to control the pass element.

Reverse current protection

Over charge protection

Over discharge protection (Deep discharge)

Temperature monitor and control of the battery bank

Charge Equalization of series connected batteries.

Charge status indication

5.4 THE BATTERY BANK CHARGER


WHAT MAKES THE CHARGER IMPORTANT?
Capacity and life are critical battery parameters that are strongly affected by charging
methods. Capacity, C, refers to the number of ampere-hours that a charged battery is rated
to supply at a given discharge rate. A batterys rated capacity is generally used as the unit

[38]

for expressing charge and discharge current rates, i.e., a 2.5 amp-hour battery charging at
500mA is said to be charging at a C/5 rate. Battery life performance is measured in one of
two ways; cycle life or stand-by life. Cycle life refers to the number of charge and
discharge cycles that a battery can go through before its capacity is reduced to some
threshold level. Standby life, or float life, is simply a measure of how long the battery can
be maintained in a fully charged state and be able to provide proper service when called
upon. The measure which actually indicates useful life expectancy in a given application
will depend on the particulars of the application. In general, both aspects of battery life will
be important.
During the charge cycle of a typical lead-acid cell, lead sulfate, PbSO4, is converted to lead
on the batterys negative plate and lead dioxide on the batterys positive plate. Once the
majority of the lead sulfate has been converted, overcharge reactions begin. The typical
result of over-charge is the generation of hydrogen and oxygen gas. In unsealed batteries
this results in the immediate loss of water. In sealed cells, at moderate charge rates, the
majority of the hydrogen and oxygen recombine before dehydration occurs. In either type
of cell, prolonged charging rates significantly above C/500, will result in dehydration,
accelerated grid corrosion, and reduced service life.
5.4.1 DUAL LEVEL FLOAT CHARGER:
Charging Algorithm:
For efficient charging to the battery bank the charging cycle of dual level float charger is
divided into four stages. The charging sequence is illustrated by the charger state plot in
figure 5.5.

[39]

1. Trickle-charge If the battery voltage is below a predetermined threshold, indicative of a


very deep discharge or one or more shorted cells, a small trickle current is applied to bring
the battery voltage up to a level corresponding to near zero capacity (typically 1.7V/cell@
25 degrees C). Trickle charging at low battery voltages prevents the charger from
delivering high currents into a short as well as reducing excessive out-gassing when a
shorted cell is present. Note that as battery voltage increases, detection of a shorted cell
becomes more difficult.
2. Bulk-charge Once the trickle-charge threshold is exceeded the charger transitions into
the bulk-charge state. During this time full current is delivered to the battery and the
majority of its capacity is restored.

Figure 5.5: charger state diagram

3. Over-charge Controlled over charging follows bulk-charging to restore full capacity in a


minimum amount of time. The over-charge voltage is dependent on the bulk-charge rate as
illustrated by figure 1. Note that on unsealed batteries minimal over-charging should be
employed to minimize out-gassing and subsequent dehydration. Initially overcharge current
is the same as bulk-charge current. As the over-charge voltage is approached, the charge

[40]

current diminishes. Over-charge is terminated when the current reduces to a low value,
typically one-tenth the bulk charge rate.
4. Float-Charge To maintain full capacity a fixed voltage is applied to the battery. The
charger will deliver whatever current is necessary to sustain the float voltage and
compensate for leakage current. When a load is applied to the battery, the charger will
supply the majority of the current up to the bulk-charge current level. It will remain in the
float state until the battery voltage drops to 90% of the float voltage, at which point
operation will revert to the bulk charge state.
5.4.2 DESIGN REQUIREMENTS:
For charging the battery bank of 24V 80A, we need a charger that meets all the following
design requirements:

Over charging of battery and prolonged charging rates significantly above C/10 will
result in dehydration, accelerated grid corrosion, and reduced service life.

At charge rates of >C/5, less than 80% of the cells previously discharged capacity
will be returned as the over-charge reaction begins. For over-charge to coincide
with 100% return of capacity, charge rates must typically be reduced to less than
C/100.

To accept higher rates the battery voltage must be allowed to increase as overcharge is approached. The over-charge reaction begins when the cell voltage rises
sharply, and becomes excessive when it levels out and starts down again

[41]

The charger needs to provide the battery with the correct float charge level by
applying a constant voltage to it. This should be large enough to compensate for
self-discharge without degrading the battery from excessive overcharging.

With the proper float charge, sealed lead-acid batteries are expected to give standby
service for 6 to 10 years. Errors of just five percent in a float chargers
characteristics can halve this expected life.

5.4.3 DESIGN OF 12V 12APMS CHARGE CONTROLLER:

Before design and implementation of the charge controller of the battery bank, we designed
a low power charge controller of 12v 12Ahrs batteries to check the design and
performance.
We have used UC3906 designed as a dual level float charger. It starts charging the battery
in bulk charge mode, until it reaches the overcharge voltage where charger decreases it
current and over charge the battery up to an extent while working in over charge mode.
After the charging of battery, it enters float charge mode to protect battery from low self
discharge.
CALCULATIONS:
Overcharge Voltage, VOC = 14.7v
Float Voltage, VF = 13.9v
Trickle Bias Voltage, VT = 10v
IMAX = 2.5A (charging current in bulk charging mode)
R c = 44.2k
RD = 732k
RA = 205.5k
RB = 17.4k
Rs = 0.33 (Current sensing resistance) ; for 12h battery
RT = 140 (Trickle Bias resistance) ; for IT = 100mA (Trickle bias current)

[42]

IOCT = 200mA (Trickle bias current)

OBSERVATIONS:
MODES
TRICKLE CHARGE
BULK CHARGE
OVER CHARGE
FLOAT

VOLTAGE (V)
CURRENT (A)
LESS THAN 7V
.1 - .2
10.2 12.2
2.3
14.0 14.7
2.3 1.5
13.9
.23
Table 5.1: Modes of charging of 12V 12Ahr battery

3
2.5

CURRENT

2
1.5
1
0.5
0
0

10

12

14

16

VOLTAGE
Figure 5.6: Dual level float charging curve

5.4.4 DESIGN OF 24V 12 AMPS CHARGE CONTROLLER:


When large series strings of batteries are to be charged, a dual step current charger has
certain advantages over the float charger.
CALCULATIONS:
Overcharge Voltage, VOC = 14.7v
Float Voltage, VF = 13.9v

[43]

Trickle Bias Voltage, VT = 10v


IMAX = 2.5A (charging current in bulk charging mode)
R c = 30.66k
RD = 1441.32k
RA = 303.8k
RB = 9.45k
Rs = 0.30 (Current sensing resistance) ; for 12h battery
RT = 77 (Trickle Bias resistance); for IT = 400mA (Trickle bias current)
IOCT = 400mA (Trickle bias current)

OBSERVATIONS:
MODES
TRICKLE CHARGE
BULK CHARGE
OVER CHARGE
FLOAT

VOLTAGE (V)
CURRENT (A)
LESS THAN 14V
.2 - .3
20.2 24.2
2.7
28.0 28.7
2.8 1.9
26.9
.25
Table 5.2: Modes of charging of 24V 12Ahr battery

3.5
3

CURRENT

2.5
2
1.5
1
0.5
0
0

10

15

20
VOLTAGE

Figure 5.7: Dual level float charging curve

25

30

35

[44]

5.4.5 SELECTION OF PASS ELEMENT:


Some considerations must be followed when choosing a pass device for charging circuit.
These are:

The pass element must have sufficient current and power to easily facilitate
maximum charging rate at the maximum input to output differential.

The device must have high current gain at maximum charge rate to keep the drive
current required to less than 25mA.

The open loop gain of both the voltage and the current control loops are dependent
on the pass element and its configuration.

Switching loses must be negligible in pass element in order to maintain the modes
of charging.

We are using BJT TIP 127 as pass transistor in composite common emitter configuration.
The configuration holds the following characteristics:
VCBO = 100 V
VCEO = 100 V
VEBO= 5 V
IC = 5A DC & 8A pulse
IB= 120 mA
Output Capacitance = 300pF

[45]

Figure 5.8: composite common emitter configuration

5.4.6 REVERSE CURRENT PROTECTION:


By using a diode in series with the pass element, and referencing the divider string to the
power indicate pin reverse current into the charger, (when the charger is tied to the battery
with no input power), can be eliminated.
5.4.7 FUTURE AMENDMENTS:
A problem which has come across during working with UC3906 charge controller is that its
input voltage limits to 40V only that prevents designing of higher values of series battery
bank. To overcome this problem we have proposed to scale down the input voltages of
charge controller by using a switch mode PWM controller and pass transistor will be used
with this controller to easily steer the current from the buck regulator.

[46]

CHAPTER NO. 06
INVERTER
The dc-ac converters and commonly known inverters aim to efficiently transform Dc power
source to a high voltage Ac source similar to the power that is available at the electrical
wall outlet. Inverters are used in many applications as in situations where low voltage DC
sources such as batteries, solar panels or fuel cells and wind turbine must be converted so
that devices can run of AC power. The method, in which the low voltage DC power is
inverted, is completed in two steps. The first being the conversion of the low voltage DC
power to a high voltage DC power source, and then being the conversion of the high DC
source to an AC waveform using pulse width modulation. Another method to complete the
desired outcome would be to first convert the low voltage DC power to AC, and then use a
transformer to boost the voltage to 220volts.
Of the different DC-AC inverters on the market today there are essentially two different
forms of AC output generated: modified sine wave, and pure sine wave. A modified sine
wave can be seen as more of a square wave than a sine wave; it passes the high DC voltage
for specified amounts of time so that the average power and rms voltage are the same as if
it were a sine wave. These types of inverters are much cheaper than pure sine wave
inverters and therefore are attractive alternatives.

6.1 DESIGN REQUIREMENT:


1. Small in size.
2. Deliver up to 200 watts of power.
3. Highly efficient.

[47]

4. Modified sinusoid output.


5. Over load protection.
6. Short circuit protection.

6.2 ARCHITECTURE:

Battery
bank

MOSFE
T

Transfo
rmer

H-Bridge

Driver
Driver

PWM controller

12v-311v DC/DC converter

Short Circuit
Protection

Figure 6.1: Architecture of online inverter.

Control Signal

DC/AC converter

Overvoltage
Protection

[48]

6.3 INVERTER DESIGN AND SIMULATION:


The inverter architecture is constructed and simulate on SIMULINK which provides a real
time and in depth analysis of the system. It also allows us to analyze the spectrum of
different parameters. Following figure shows the model of inverter.

Figure 6.2: Model of a AC-DC and DC-AC converter used to study different parameter of inverter.

[49]

6.3.1 SIMULATION RESULTS:


The parameters include Vdc, Vab, Vout and modulation index m.

Figure 6.3: shows the effect of Vdc on different parameter such as load voltage current and modulation index.

[50]

6.3.2 SPECTRUM RESULTS:

Figure 6.4: FFT analysis of the load Voltage. It shows the THD of 2% at the modulation index of 0.8.

6.4 CIRCUIT DESCRIPTION:


6.4.1 DC-DC CONVERTER:
The DC-DC converter is similar to the dc-dc converter used in multiport hybrid converter
(section 4.2) except the fly-back regulator is made in such a way that it maintains a
constant 311V dc at its output. The whole circuit is working at 22 KHz frequency with the
dead time of the pulses sets to 20% for the limited duty cycle operation of pulse
transformer. The whole system is 10x15cm in size which is quite a big achievement.

[51]

6.4.2 H-BRIDGE:
For transforming 311Vdc to 220Vrms sinusoidal output an h-bridge is implemented. It
works on 50Hz frequency. The technique of modified sinusoid is adopted due to the
following reason:
1. Less switching power loss.
2. Works fine on inductive load.
3. Requires simple circuitry.
4. Cheap as there is no feedback component.

Figure 6.5: Typical H-bridge configuration (A DC to AC converter)

6.4.3 SWITCH SELECTION:


For switching purposes of high voltage dc IRF840n is used, the reason to use N-channel is
that it dissipates less power as compared to its P-channel counter-part. However N channel
MOSFET creates the issue of high siding. The specification of IRF 840n is given below:

[52]

Parameter

Value

Units

Drain to Source voltage

500

Drain Current

Pulse Drain Current

13

Rds(on)

0.85

Table 6.1: Specification of IRF840n. [1]


6.4.4 HIGH VOLTAGE MOS GATE DRIVE:
The discussed inverter design requires a medium speed high side MOSFET gate drives.
Since, the inverter comprises of floating switches at each side of the input dc-voltages
therefore, a cheaper solution has to be devised. There were variety of options available in
terms of both discrete and ICs.
We employed both type of solution depending on the feasibility. When switch mode
operation of the MOSFET is considered, the goal is to switch between the lowest and
highest resistance states of the device in the shortest possible time. Now by considering the
circuit as shown in Figure 3.6 that the unclamped inductance or stray inductance and the
packaging source inductance slow down the rate of charging Cgs.

[53]

Figure 6.6: MOSFET with stray inductances at its terminal.

Similar considerations apply to the turn-off interval. Figure shows theoretical waveform for
the MOSFET during the turn-off interval.

Figure 6.7: shows the waveforms for turn on and turn off MOSFET.

[54]

Now, while designing a suitable MGD for the H-bridge, we employed an IC namely
IR2110.International Rectifiers IRS2110 integrate most of the functions required to drive
one high-side and one low-side power MOSFET or IGBT in a compact, high performance
package. With the addition of few components, they provide very fast switching speeds and
low power dissipation. Used in the bootstrap mode, they can operate in most applications
from frequencies in the tens of Hz up to hundreds of kHz.
The bootstrapping principle is used due to its ease and symmetry from the previous stage.
In Figure 3-14, the block diagram of the IR2110 shows the typical IC structure. It
comprises a drive circuit for a ground referenced power transistor, another for a high-side
one, level translators and input logic circuitry.

Figure 6.8: Block diagram of IR2110. [2]

Also, the precise application of the circuit is visible in the diagram. We have used the IC in
same configuration. The calculation of bootstrap capacitor was done using equation.

[55]

where:
Qg = Gate charge of high-side FET
f = frequency of operation
ICbs (leak) = bootstrap capacitor leakage current
Iqbs (max) = Maximum VBS quiescent current
VCC = Logic section voltage source
Vf = Forward voltage drop across the bootstrap diode
VLS = Voltage drop across the low-side FET or load
VMin = Minimum voltage between VB and VS.
Qls = level shift charge required per cycle (typically 5nC for 500 V) [3]
By choosing appropriate values the value come out to be CBOOST 1uF and the max peak
current for charging is 1A so 1N4007 diode is used as bootstrap diode.

6.5 OVER LOAD DETECTION:


The over load protection is done by measuring the output current of the inverter. It involves
placement of a small value resistor in series with the load measure the voltage drop. The
voltage drop is measured by a normal step up transformer which transforms small voltage
drop across the resistor into larger value. This voltage is compare at the secondary side with
a specific voltage a buzzer is beeped which informs the user about overloading.

[56]

CHAPTER NO. 7
INTERFACING, GUI AND BROADCASTING
The human interface and display should be very much attractive and user friendly so that
lay man can easily understand it and can realize the whole process with in seconds and the
user requires no manual to analyze his power consumption.
To make an eye-catching GUI we used LABVIEW but to make our data reachable to
LABVIEW for display and broad casting we have to make an interface, the interface that
will transfer our data to computer for display. The best and most latest way of communicate
or transfer data to computer is Universal Serial Bus (USB).
The figure 7.1 clearly demonstrates the main blocks of interfacing and broadcasting of data;

BROADCASTING

CHARGE
CONTROLLER
USB
INTERFACE
(PIC 18F4550)

LABVIEW

INVERTER
USB INTERFACING AND BROADCASTING

[57]

Figure 7.1: USB Interfacing And Broadcasting unit.

7.1 LITERATURE OVERVIEW:


7.1.1 UNIVERSAL SERIAL BUS (USB):
Universal Serial Bus or commonly known as USB is a very famous and standard PC
connection peripheral. Each PCs, Laptops, PDAs and electronic devices are equipped with
the USB port for easy connection between the devices. Intel Corporation stated that,
Universal Serial Bus (USB) is a set of connectivity specifications developed by
Intel in collaboration with industry leaders. USB allows high-speed, easy
connection of peripherals to a PC. When plugged in, everything configures
automatically. USB is the most successful interconnect in the history of personal
computing and has migrated into consumer electronics (CE) and mobile
products.
USB allowing the devices to be connected and
disconnected easily without rebooting or restarting
the PC, just using plug-and-play capabilities.
Devices such as mice, keyboard, printers, flash
drives and many more devices have come with a
built in USB plug and user just needs to connect
them with any USB port available at the PC.
Figure 7.2: USB Plug

Nowadays, any electronic device that uses PC


connection will be equipped with the USB module.
USB is a master/slave, half duplex, timed communication bus system that can connect close
peripherals and hubs to a compatible PC. The device connected on the USB bus will be sent

[58]

a data packets created by the device drivers by a PCs software programs. It supports every
peripheral that can be connected to PC .
7.1.1.1 USB ARCHITECTURE:
The USB is based on a 'tiered star topology' in which there is a single host controller and up
to 127 'slave' devices. The host controller is PC and the slaves are the USB devices which
can be connected to USB port or USB hubs. The USB hubs are used when there is not
enough USB port for the USB connection. The hub can be plugged into another hub and so
on however the maximum number of tier allowed is six.
All the communications on the USB bus are initiated by the host (PC) meaning that, only
PC can enumerate the communication with its USB device connected to it. The USB device
cannot initiate a transfer, but must wait to be asked by the host PC to transfer data. The only
exception to this is when a device has been put into 'suspend' (a low power state) by the
host then the device can signal a 'remote wakeup'.
7.1.1.2 DATA TRANSACTIONS:
Transactions are simple transfer of data which are built using packets. The packets are the
smallest element of data transmission. The packet can be categorized by its format. There
are four types of packet format which are token packet, data packet, handshake packet and
SOF (Start of Frame) packet. Each of the packets has its own function and the difference
between them is based on the PID (Packet Identifier) the packet starts with.
A successful transaction is a sequence of three packets which perform a simple but secure
data transfer. There are three types of transactions which are OUT transaction, IN
transaction and SETUP transaction with four different ways to transfer the data (data flow

[59]

types). OUT is always mean from host to device while IN means from device to host. All of
the transactions are met at the endpoints. The endpoints are the source or sink of data. A
device can have up to 16 IN and 16 OUT endpoints. Each of endpoints is connected to
pipes to transfer the data.

Figure 7.3: Type Of data packets.

7.1.1.3 DATA FLOW TYPES:

[60]

There are four types of data transfer and each of the data flow (transfer) types is made by
more than one or more transaction type. They are bulk transfer, isynchronous transfer,
interrupt transfer and control transfer.
Bulk transfer is used to transfer large amounts of data, as fast as possible. The host will
schedule bulk transfer after the other transfer types has been allocated. If an OUT endpoint
has been defined to use bulk transfer then the host will transfer the data through it.
Similarly for IN transaction, if the IN endpoint is defined to use bulk transfer.
Isynchronous transfer is used for applications such as audio data transfer where it is
important to maintain the data flow. Compared to bulk transfer, isynchronous transfer has a
guaranteed bandwidth. Isynchronous packet may contain up to 1023 bytes at full speed or
1024 bytes at high speed and it is not allowed at low speed data transfer.
Interrupt transfer is used when we need to regularly update any changes in the device
status. For application example is mouse or a keyboard. It is regularly scheduled the IN and
OUT transactions and typically the host will fetch only one packet at an interval. Interrupt
packets can have any size from 1 to 8 bytes at low speed, 1 to 64 bytes at full speed and 1
to 1024 bytes at high speed.
The last data flow type is control transfer which is a bi-directional transfer because it uses
both IN and OUT endpoints. Each of USB devices must have this type of transfer as the
control transfer will be used for initial configuration of the device (enumeration). It uses
special endpoints which are Endpoint 0 that is made of the combination of Endpoint 0 OUT
and Endpoint 0 IN. They may be used (on the same endpoints) after configuration as part of
the device-specific control protocol, if required.

[61]

During record process, the host will retrieve vendor ID, product ID and other information
using control transfer. This data is retrievable as a group of standard requests for testing
whether communication is working or not. The standard request can be found in the USB
specifications.

TRAMSFER TYPE
Control

CHARACTERISTICS

Upto 15.8MB/s.

Every device must

APPLICATIONS
Everything

support these.

Used for enumeration.

Extendable: custom
functions.

Interrupt

Upto 49 MB/s.

Asynchronous.

Guaranteed
throughput.

HID (mouse, key board)

[62]

Isochronous

Upto 49MB/s.

High speed.

No error correction.

Guaranteed

Audio , Video

bandwidth.
Bulk

Upto 53MB/s.

Test & measurement, Mass

High speed (on

Storage.

unused bus).

Error correction.

Low priority on bus.

Table 7.1: USB transaction types and their applications.

7.1.1.4 CONNECTIONS OF USB:


There are several types of USB connector but
the common plug used are the standard type A
and type B as in Figure. A USB cable consists of
a four-wire cable to connect the device with the
PC host. One pair of twisted-pair wire is the differential data lines (D+ and D-) while the
other two lines are 5V supply (VCC) and GND.

[63]

CONTACT

SIGNAL NAME

NUMBER

DESCRIPTIO

TYPICAL CABLE

COLOUR

1.

Vcc

5VDC

Red

2.

D-

Data-

White

3.

D+

Data+

Green

4.

GND

Ground

Black

Table 7.2: connections of USB plug.

When a device is connected to a USB port, the port will immediately determine the speed
of the device by looking at the data lines D- and D+. The high speed device will pull the
data line D+ to high and if the data line D- goes high, the port knows that the connected
device is a low-speed device. If both voltages fall below 0.8V for more than 2.5
microseconds, the port will assume the device is being disconnected. If both voltages rise
up to 2.5V for more than 2.5 microseconds, the device is being plugged in.

7.1.2 DEVICE DRIVERS:

Every device that has the USB interface needs to have a device driver that will load into a
PC. It is a software interface between the external USB device and the application software,
the USB software driver and the host hub controller driver. A device driver simplifies
programming by acting as translator between the hardware device with the applications or
operating system.

[64]

The application software will read or receive the signals or data from the USB device
through the device driver. The device driver needs to be created together with the USB
device on its operating system.
However, to create a device driver needs a deep understanding of the device and both of its
hardware and software operations. Thus the task of writing drivers usually falls to software
engineers who work for hardware-development companies. This is because they have better
information than most outsiders about the design of their hardware.
7.1.3 GRAPHICAL USER INTERFACE AND LABVIEW:

Graphical User Interface or GUI is a friendly user interaction with software


programs/applications such as computers, PDAs, MP3 players, household appliances and
office equipments. It is more to graphical and visual indicators rather than typing or text
commands.
There are many software that can develop a GUI with whatever function needed to be
implemented such as Visual Basic, Qt Creator and also LabVIEW. These software offer the
GUI design by full visual programming language or half visual programming language and
half programming code language. Other software such as Basic C and C++ offer full
programming code writing of GUI design that is usually used by a programmer.
LabVIEW is a short form for Laboratory Virtual Instrument Engineering Workbench which
used a full virtual programming language. This software is common software used for data
acquisition, instrument control and automation control because of its key feature such as
simple network communication, turnkey implementation of common communication

[65]

protocols (RS232, GPIB, etc.), powerful toolsets for process control and data fitting, fast
and easy user interface construction and an efficient code executive environment.

ONLINE HYBRID INVERTER GUI

Figure 7.4: GUI of the Hybrid System.

7.1.3.1 NI-VISA:
NI-VISA stands for National Instrument-Virtual Instrument Software Architecture. It is one
of the National Instrument software together with LabVIEW software. NI-VISA is a highlevel API mainly used to communicate with a USB device.

[66]

It is platform, bus and environment independent which means the same API (Application
Programming Interface) is used regardless the operating system used to communicate the
USB device with LabVIEW.
NI-VISA provides some functions such as NI-VISA Read and Write to be used as
commands for interfacing. There are two types of classes resources supported by VISA
which are USB INSTR and USB RAW. These classes will determine the type of USB
device that we want to communicate with LabVIEW software and each type will use
different protocols. USB INSTR resource class is for instrument control while USB RAW
is a USB device that uses its own communication protocol defined by the manufacturer. For
the USB device used in this project, the type of resource class is USB RAW device.
It is more complicated to communicate with USB RAW device as it has its own protocol.
As mentioned earlier, USB used four types of communications which are control, interrupt,
bulk and isynchronous endpoints. However, NI-VISA only supports for three types of
communication that are control, bulk and interrupt transfer types.
When NI-VISA detects the USB device, it automatically scans for the lowest available
endpoint for each type.

[67]

7.1.4 PIC 18F4550:

The PIC 18F4550 supports USB interface


directly which contains a full speed and low
speed compatible USB interface that allows
communication between the host PC and the
devices that contain the microcontroller. This
PIC only support USB 2.0 features only. The
addition of the USB module, with its unique
requirements for a stable clock source, makes it
necessary to provide a separate clock source that

Figure 7.5: Connections of USB connector.

is compliant with both USB low-speed and full-speed specifications. When the

Figure 7.6: Architechture of PIC 18F4550.

[68]

PIC18F4550 is used for USB connectivity, it must have either a 6 MHz or 48 MHz clock
for USB operation, depending on whether Low-Speed or Full-Speed mode is being used.
From the figure 7.5, the pins 23 and 24 are used for USB transactions. Pin 23 is connected
to D- data line and pin 24 is connected to D+ data line.

7.2 METHODOLOGY
The main purpose of this block is to take the voltage, current and power values from the sources,
charge controller, battery bank and from inverter and make a graph of voltages from the solar and
wind, display the output power of the system and voltages and currents of battery bank. The
methodology approach of this block is present in the flow chart;

USB DEVICE
Building of USB Firm ware

Burning of program to PIC18f4550

INTERFACING
Interface the USB with NI-VISA software

LABVIEW APPLICATION
Build a Labview User Application

Send data from USB device to the labview


application using control transfer

[69]

7.2.1 USB DEVICE:


The main task of this hardware or usb device is to take analogue voltages and currents and after
converting it to digital form it will forward to the PC for display on LABVIEW.

USB DEVICE BLOLCK


Analogue
voltages
and
currents

PIC 18F4550
Scale voltages
and currents to
5VDC

USB
connector

Figure 7.7: USB device Architectuer.

1- ANALOGUE INPUTS:
The analogue inputs are coming from sources, charge controller and inverter.
2- SACALE VOLTAGE BLOCK:
Since PIC or any other controller will work on 5VDC maximum so we have to scaled down
the analogue voltages and current to 5VDC.
3- PIC 18F4550:
The type of PIC used in this project is 18F4550 40Pin PDIP. There are four ports for

analog or digital input and output which defined as Port A, Port B, Port C, Port D.
All of these ports had been used for the data acquisition of the voltages and current.
Hence, this project did not concern on the input output port of the device instead of
the data lines only.

[70]

Figure 7.8: Pin daigram of PIC18F4550.

7.2.1.1 USB FIRMWARE:


To run any device or to make it compatible to generate the desired result software plays great and
important role. The firmware required to take analogue data from the circuit and convert it to digital
form or make it compatible so that it can transfer via USB to the computer. The firmware for this is
written on PROTONIDE software that uses BASIC language to program the PIC micro controller.
The figure shows the programming of that firm ware on PROTON IDE.

[71]

Figure 7.9: Proton IDE (Coding Of USB firm ware).

7.2.2 INTERFACING WITH LABVIEW USING NI-VISA:

After a USB device has been successfully created, it needs to be interfaced with LABVIEW
software so that they can communicate with each other. In order to interface the device with

[72]

LABVIEW software, NI-VISA software was used. There are two steps taken in order to
configure the USB device with NI-VISA.
1- Create INF file using Driver development Wizard.
2- Install INF file and USB device

The INF file is created by using Driver Development Wizard. This step is to tell the
operating system (Windows) to use NI-VISA as the default driver for the device. The
wizard gathers the information that is necessary to allow NI-VISA to control the USB
device. The wizard will generate an INF file for use with the compatible Windows.
Once the INF file is generated at the specific path, the file was installed followed by
installing the device driver. In order to install the device driver, once the USB device is
connected to the USB port, Windows will automatically search for the device driver and
will suggest the default driver to be used with the device. By default, the device driver used
for the USB device was the driver provided by Microchip Inc. The Microchip Inc. driver is
for general used meaning that any USB device created by using PIC microcontroller can
use the driver provided by the manufacturer.
Hence, in order to use NI-VISA as the default driver, the device driver was updated in the
Device Manager window. Now, the USB device is ready to communicate with LABVIEW
application.

[73]

Figure 7.10: NI Driver Wizard.

7.2.3 GRAPHICAL USER INTERFACE (GUI):

Once the USB firmware has been completely done, the LABVIEW design process was took
place. In order to design the LABVIEW GUI, we need to determine the type of USB
transfer to be used. For this project, the type of transfer used is control transfer because all
of the USB device use control transfer during enumeration process.
The LABVIEW application was designed to communicate between the USB device and
LABVIEW software and receive the values of current and voltages from USB device. A
host PC will retrieve vendor ID, product ID and other information via control transfer

[74]

during the enumeration. This data is retrievable as a group of standard requests. Each and
every USB device will respond to the standard requests in order to test whether the
communication is working or not.
A flowchart has been designed to understand the flow of the LABVIEW application design
process;

[75]

The block of VI shows in figure 7.11 is used to take the data from the USB device and
make decisions according to the logic circuitry in the VI to display the power, voltages and
current values. As we are transmitting four signals so we use case structure to display their
values according to it (as mentioned in Figure 7.12).

Figure 7.11: data acquisition block to take data from USB.

Figure 7.12: case structure block to display 4 signals one by one.

[76]

Complete VI of the process is as follow;

Figure 7.13: complete VI to generate GUI After recieving data from USB.

In LabVIEW software, there are two windows to be used for the design process. First
window is the Front Panel window and the second window is the Block Diagram window.
Both of the windows have different functions. The front panel window shows the actual
GUI and actual user application once the design is complete while the block diagram shows
the behind code that controls the program. The GUI of the whole online hybrid system are
shown in Figure 7.14.

[77]

ONLINE HYBRID INVERTER GUI

Figure 7.14: Graphical User Interface (GUI) of Online Hybrid Inverter.

This GUI clearly shows the graph of input sources i.e. voltages from solar and wind and the meters
are used to display the power coming from wind and solar.

7.2.4 BROADCASTING:

The GUI that displays the whole process conditions will b broadcast over internet so that a
person can check his power consumption and progress of his energy system from anywhere
in the world.
We used the lab view Web publishing tool for this purpose the final web page that a person
can access from anywhere from the world is shown in Figure 7.15.

[78]

Figure 7.15: web page of the GUI.

7.3 RESULTS:

The data from USB port is successfully retrieve and their graphs and power values has been
displayed in the GUI.

The webpage of the GUI is successfully published and checked by opening this page on
LAN.

[vi]

REFERENCES
CHAPTER NO. 01: INTRODUCTION
[1] Multiport hybrid converters for hybrid power sources, Haimin Tao, Joerge L.Duarte and
Macrel A.M. Hendrix.
[2] Integration of sustainable energy sources through power electronic converters in small
distributed electricity generation systems, Haimin Tao.

CHAPTER NO. 03: MAXIMUM PEAK POWER TRACKING


[1] en.wikipedia.org/wiki/Maximum_power_point_tracking
[2] Automatic peak power tracker for solar PV modules using spacer software by Vikrant
A. Chaudry.

CHAPTER NO. 04: MULTIPORT HYBRID CONVERTER


[1] Power electronics; Circuits, devices and application by Haroon Rashid.
[2] Datasheet of ILQ74.
[3] Datasheet of EL817.

CHAPTER NO. 06: INVERTER


[1] Datasheet of IRF840.
[2] Datasheet of IR2110.
[3] Application note IR2110- AN978.

[vii]

CHAPTER NO. 07: INTERFACING, GUI AND BROADCASTING

data sheet of PIC 18F4550.

System of radiation monitoring with LabVIEW and a microcontroller is the USB


interface
Jorge M. Jaimes Ponce, Alberto S. Moreno Montoya Roberto A. Alcntara Ramrez,
Irma I. Siller Alcal.

Interfacing of usb device with labview


Nur syifa bt zainal abiding.

Labview forums.

[viii]

NOMENCLATURE
V

Voltage V

Vout

Output voltage V.

Vin

Input voltage V.

vd

Voltage across diode V.

Current A.

Id

Current through diode A.

Il

Load current A.

Resistance .

Rl

Load resistance .

Capacitance F.

Inductance H.

Duty cycle ratio.

Change in duty cycle ratio.

Power W.

frequency of the converter kHz.

Vmpp

Voltage at peak power V.

You might also like