MAXIMUM POWER POINT TRACKING SYSTEM of solar panel

Published on February 2017 | Categories: Documents | Downloads: 18 | Comments: 0 | Views: 232
of 149
Download PDF   Embed   Report

Comments

Content

AMERICAN UNIVERSITY OF BEIRUT

MAXIMUM POWER POINT TRACKING SYSTEM: AN ADAPTIVE ALGORITHM FOR SOLAR PANELS

 by

MOHAMMED ALI SERHAN

A thesis submitted in partial fulfillment of the requirements for the degree of Master of Engineering to the Department of Electrical and Computer Engineering of the Faculty of Engineering and Architecture at the American University of Beirut

Beirut, Lebanon January 2005

AMERICAN UNIVERSITY OF BEIRUT

MAXIMUM POWER POINT TRACKING SYSTEM: AN ADAPITIVE ALGORITHM FOR SOLAR PANELS

 by

MOHAMMED ALI SERHAN

Approved by:

 _________________________  _____________ _________________________ _________________________ _________________________ ____________________ _______ Dr. Sami Karaki, Professor Advisor Electrical and Computer Engineering

 _________________________  _____________ _________________________ _________________________ _________________________ ____________________ _______ Dr. Fouad Morad, Professor Member of Committee Electrical and Computer Engineering

 _________________________  _____________ _________________________ _________________________ _________________________ ____________________ _______ Dr. Riad Chedid, Professor Member of Committee Electrical and Computer Engineering

Date of thesis defense: January 7, 2005

AMERICAN UNIVERISTY OF BEIRUT

THESIS RELEASE FORM

I, Mohammed Ali Serhan

authorize the American University of Beirut to supply copies of my thesis to libraries or individuals upon request.

do not authorize the American University of Beirut to supply copies of my thesis to libraries or individuals for a period of two years starting with the date of the thesis defense.

 ____________________  ___________ _________ Signature

 ____________________  ___________ _________ Date

ACKNOWLEDGMENTS

I would like to thank my advisor Dr. Sami Karaki for the enlightening advice and guidance he provided during the elaboration of this work. Many thanks go to Dr. Fouad Mrad and Dr. Riad Chedid, who were in my committee, for providing a lot of insightful comments during the presentation of this thesis. I'm also very grateful to the dearest Dr. Lana Al Chaar, who proposed the topic in the first place, for her support. All respect and admiration go to Mr. Antoine Al Asal, a true brother, partner and friend. Warm love and support from my parents is the main factor of success throughout all years of study. Lastly, praise goes to Almighty Allah whose help and guidance has given me the strength needed to complete this work.

v

AN ABSTRACT OF THE THESIS OF

Mohammed Ali Serhan

for

Master of Engineering Major: Electrical Engineering

Title: Maximum Power Point Tracking System: An Adaptive Control Algorithm for Solar Panels.

Energy is fundamental to the wellbeing of our society—it powers our homes,  businesses, and industries. However, energy, obtained from fossil fuels is presenting challenges to many nations; not only these energy resources are depletable but are also major contributors to atmospheric pollution and global warming. ‘Renewable Energy’ is a new trend in clean energy production. This includes power generated from water, wind, solar radiation, biomass and other resources. This development of renewable power sources will save fossil fuel resources, and help improve the quality of our environment. One of the renewable energy sources, Photovoltaic systems have a great potential  because it makes use of the most abundant energy on earth that is sunlight. As the maximum power operating point (MPP) of the PV module changes with atmospheric conditions, e.g. solar radiation and temperature, an important consideration in the design of efficient PV system is to track the MPP correctly. The objective of this thesis is to design and build a Maximum Power Point Tracker (MPPT) to charge a lead acid battery. The design consists of a PV panel, a 12V battery, H-bridge converter and a control module that uses the PIC16F874 microcontroller. The controller obtains the current and voltage values from the PV array and performs pulse width modulation (PWM) on the converter to charge the battery with maximum available power. Battery’s state of charge is also controlled by the microcontroller to protect the battery from being overcharged. The Perturb and Observe (PAO) method is used as an algorithm to track the maximum power point of the PV array. The performance of the PAO algorithm in tracking maximum power point has been improved by implementing an adaptive  perturbation scheme to track correctly the MPP in case of rapidly varying weather conditions and to get high conversion efficiency.

vi

CONTENTS

Page

ACKNOWLEDGEMENTS ...………………………………..…………

v

ABSTRACT…...……………………………………….……………….….…

vi

LIST OF ILLUSTRATIONS……………….…………………...………

x

LIST OF TABLES.........................................................................................

xv

Chapter

1. INTRODUCTION…….….…………………………………………...

1

1.1. An Overview ……………………..…………..…….……….....

1

1.2. Brief Background ………….…………………...…………….....

1

1.3. Problem definition and motivation …...……………………..…..

2

1.4. Scope ………………………………………………………………

3

2. LITERATURE REVIEW ………………………………………….

4

2.1 Maximum Power Point Tracker …..………….......................

4

2.2. Switched-Mode Converters….…………….........................

5

2.3. Controller ………….…………………………………………....

5

2.3.1 Voltage feedback control …………………………….. 2.3.2 Power feedback control ……………………………….

5 6

2.4. MPPT control Algorithms ………………………………….......

6

2.4.1 Perturb and Observe technique ……………………….. 2.4.2 Incremental Conductance technique ………………….. 2.4.3 Constant Reference Voltage ………………………….. 2.4.4 Other techniques: CMPPT, VMPPT……………………

6 8 10 11

2.5. Comparative Study……………………………………………….

12

vii

2.6. Contribution of this Thesis…………………………………………

13

3. SYSTEM COMPONENTS MODELING ............…………...

14

3.1. Photovoltaic ………..……………………………………....……..

14

3.1.1 Solar Cells ………………………………………………. 3.1.2 Photovoltaic effect …………… ………………………… 3.1.3 Electric Model of the PV cell …………………………… 3.3.4 Irradiation and cell Temperature effect ………………. 3.3.5 PV models and PV arrays ……………………………….

14 15 15 17 18

3.2. Battery …………………………………………………………….

18

3.2.1 Lead Acid battery ………………………………………. 3.2.2 Battery Chemistry ……………………………………. 3.2.3 Amp-Hour Capacity and Charge Rate ……………….. 3.2.4 State of Charge 3.2.5 Deep cycles vs. starter batteries ……………………… 3.2.6 Lifespan of batteries ……………………………………. 3.2.7 Battery hazards ………………………………………….

19 19 20 20 21 22 22

3.3. DC-DC Converters …………………………….…………………

23

3.3.1 Switching converter Topologies ……………………….. 3.3.2 Non-Isolated Switching converters ……………………..

23 24

3.3.2.1 Buck Converter 3.3.2.2 Boost Converter 3.3.2.3 Buck-Boost Converter 3.3.3 Isolated DC-DC Converters ……………………………. 3.3.3.1 Flyback Conveter 3.3.3.2 Forward Converter 3.3.3.3 H-bridge Converter 3.4. Zero Voltage Switching ……………………..……………………

4. MPPT SIMULINK MODEL …………………………………

24 32 34 35 36 37 38 39 42

4.1. Introduction……………………………....…….…………………..

42

4.2. Simulink Blocks …………….…………………………………….

42

4.3. What is an S-Function ……………………………………………

43

4.4. Implementation of PV cell using S-Function ………………….…

44

viii

4.5 Converter and Controller Blocks …………………………………

45

4.6 Battery Block …………………………………………………….

49

5. MPPT SYSTEM IMPLEMENTATION

……………………

52

5.1. Introduction ………………………………………………………..

52

5.2. MPPT System ……………………………………………………… ..

52

5.2.1 Microcontroller …………………………………………. 5.2.2 PV-PIC Interface Circuit ………………………………. 5.2.3 Buck-Boost Converter …………………………………. 5.2.4 PIC-Converter Interface Circuit ……………………..

53 54 54 54

5.3. Hardware Design ……………..…………………………………..

55

5.3.1 Controller and Converter Design ……………………. 5.3.2 Phase Splitter circuit …………………………………. 5.3.3 Switch Driver ‘A’ and ‘B’ …………………………… 5.3.4 H-Bridge …………………………………………………. 5.3.5 Transformer, Rectifier and Filter ……………………….

55 59 60 62 63

5.4. Software Design …………………………………...……………...

66

5.4.1. Main Program …………………………………………. 5.4.2. Charging-Tracking mode ………………………………

66 67

 

6. SYSTEM RESULTS AND DISCUSSION………………....

74

6.1. Introduction ……………………………..…..….………………...

74

6.2. PV model Validation ……………………..……………………....

74

6.3. Simulink Simulation Results …………………………….……..…

78

6.4. Hardware Results …………………………………………………

81

6.5. Comparison of Tracking algorithm ………….…………………..

85

6.5.1 Minor change in the weather conditions ………………. 6.5.2 Major change in the weather conditions ……………….

85 87

6.6. Power Budget .................................................................................

88

6.6.1. Inductor conduction loss 6.6.2. Diode conduction loss 6.6.3. MOSFET conduction loss 6.6.4. Transformer power loss ix

88 89 89 90

6.6.5. Other power factor factors

7. CONCLUSIONS AND FUTURE WORK …......................... 7.1. Summary ………………………………………………………... 7.2. Testing Environment ……………………………………………… 7.3. Better Tracking Algorithm ……………………………………….. 7.4. Simulink Model ………………………………………………….. 7.5. Future Work ………………………………………………………

92 94 94 94 95 96 96

APPENDIX A……..…………………………………………………………..

98

1. Matlab program code ……………………………………………...

98

APPENDIX B………………………………………………………………….

102

1. PCB circuit design …………………………………………….....

102

APPENDIX C………………………………………………………………….

105

1. Assembly program code ………………..……………………….....

105

APPENDIX D………………………………………………………………..

130

1. Datasheet ………………………………………………………...

130

REFERENCES……..………………………………………………………

x

132

ILLUSTRATIONS

Figure 1.1.

2.1.

Page (a) The I-V characteristic curve, (b) The PV panel Maximum Power Point..........................................................................................................

2

(a) PV panel Insolation characteristics (b) PV panel Temperature characteristics ………………………………………………………….

4

2.2.

PAO technique ……………………………............................................

7

2.3.

Deviation of the PAO technique from the MPP ......................................

8

2.4.

The slope ‘conductance’ of the P-V curve ……………………………

8

2.5

Flow chart of ICT algorithm……………………………………………

9

2.6.

MPPT control system with constant voltage reference ...........................

11

2.7.

The conventional MPPT controller using open circuit voltage (Voc) ...

12

3.1.

The PV cell ……......................................................................................

14

3.2.

Model for a PV cell .................................................................................

15

3.3.

(a) Effect of Varied Irradiation, (b) Effect of Varied Temperature on the PV cell …………….…………………………………………….

17

3.4.

(a) PV Module, (b) PV Array …………………....................................

18

3.5.

Buck Converter ……..............................................................................

24

3.6.

Voltage and current changes …………………………………………..

25

3.7.

Inductor current for (a): continuous mode (b): discontinuous mode …

27

3.8.

Buck Converter at Boundary ……...........................................................

27

3.9.

Buck Converter - Discontinuous Conduction .........................................

28

3.10.

Output Voltage vs Current ……..............................................................

30

3.11.

Output voltage ripple in a step-down converter ......................................

31

3.12.

Boost Converter Circuit …………….......................................................

32

xi

3.13.

Voltage and current waveforms (Boost Converter) …………………….

33

3.14.

Schematic for buck-boost converter ........................................................

34

3.15.

Waveforms for buck-boost converter ………………………………….

35

3.16.

Flyback converter ………………………….………………...................

36

3.17.

Forward Converter …………..................................................................

37

3.18.

H-bridge Converter ..................................................................................

39

3.19

Waveforms ……………………………………………………………..

39

3.20.

Power loss associated with high switching frequencies .........................

40

3.21.

ZVS resonant-switch dc-dc converter …………....................................

41

4.1.

PV array 'MPPT' system ……………………..………...........................

43

4.2.

S-Function block with three inputs and two outputs …...........................

43

4.3.

Model for a PV cell .................................................................................

44

4.4.

PV Cell S-Function block ……...............................................................

45

4.5.

Buck converter and Controller blocks .....................................................

46

4.6.

Controller Block Implementation ……………........................................

46

4.7.

MPP tracking algorithm Flow Chart ………….......................................

47

4.8.

Different current levels with respect to variable duty cycle ...................

48

4.9.

MPPT tracking scheme using a variable step size …………………….

49

4.10.

Battery Model Block ……………………….........................................

50

4.11.

PV array 'MPPT' system ……………………………………………….

50

5.1.

The PV maximum power point tracking system …………………........

53

5.2.

Converter and Controller ………………………………………………

55

5.3.

(a) 50% duty cycle switching (b) variable duty cycle switching………

56

5.4.

Bridge output due to small and large phase difference ……………….

56

xii

5.5.

Case of zero phase difference between V1 and V2 …………………….

57

5.6.

Case of V1 and V2 being out of phase ………………………………..

57

5.7.

PWM output controls the Bridge output ………………………………

58

5.8.

PWM, Bridge, Rectified and Filtered voltage waveforms ……………

58

5.9.

Phase splitter output waveforms ……………………………………..

59

5.10.

Phase splitter schematic diagram …………………………………….

60

5.11.

Driver A output waveforms …………………………………………..

60

5.12.

Driver ‘A’ schematic diagram ………………………………………..

61

5.13.

Charging and discharging stages ……………………………………..

62

5.14.

Bridge Converter schematic diagram …………………………………

63

5.15.

Transformer, Rectifier and Filter waveforms ………………………..

64

5.16.

Main Program Flow Chart …………………………………………….

67

5.17.

The conventional PAO algorithm Flow Chart ………….………….…

68

5.18

Scanning with small step in case of varying weather conditions ……..

69

5.19

The Adaptive PAO algorithm Flow Chart …………………………….

70

5.20.

Hunting with large step size ∆  ……………………………………….

70

5.21.

Hunting with smaller step size ∆/2 …………………………………..

71

5.22.

MPP scanning direction ………………………………………………

72

5.23.

Locking on the MPP with duty-cycle ratio 1/255 ……………………

72

5.24.

Scanning in case of varying weather conditions ……………………..

73

6.1.

I-V characteristic curves for different Insolation levels ………………

75

6.2.

P-V characteristic curves for different Insolation levels ……………..

75

6.3.

I-V characteristic curves for different temperatures ………………….

76

6.4.

P-V characteristic curves for different temperatures …………………

76

6.5.

Load circuit schematic diagram ………………………………………

77

 

xiii

6.6.

PV characteristic curves under different Insolation levels ………….

77

6.7.

Characteristic curves of the 'BP 380' PV module using the load circuit

78

6.8.

Characteristic curves of the 'BP 380' module using the Simulink model

78

6.9.

MPPT Simulink Model ………………………………………………...

79

6.10.

P-V characteristic curve of the PV array at 800W/m2, 27oC ………….

79

6.11.

Switching Power, Voltage, and Current supplied to the converter ……

80

6.12.

Power, Voltage, and Current delivered to the battery …………………

80

6.13.

Characteristic curves: (a) I-V curve, (b) P-V curve …………………..

81

6.14.

VB performance monitor …………………………………………….

82

6.15

Tracking the MPP in case of varying Insolation level ……………….

84

6.16

Tracking scheme for minor change in the weather conditions ……….

86

6.17

Tracking scheme for major change in the weather conditions ……….

88

6.18

Primary winding current waveform……………………………………

90

6.19

Waveforms across the terminals of the transformer …………………

90

6.20.

Diodes’ current waveform during different intervals …………………

91

6.21.

Transformer windings contribution to power loss ……………………

92

xiv

TABLES

Table

Page

6.1.

MPP readings on a sunny day in October……........................................

81

6.2.

Snapshots of MPP Recorded Data............................................................

83

6.3.

MPP Daily Average Recorded Data 2004…............................................

83

6.4.

Tracking with adaptive incremental step ∆a ………………………..……..

87

6.5.

Scanning with adaptive incremental step ∆a ………………………..……..

88

6.6.

Power Budget……………………...........................................................

93

xv

To M y Family … ..  A ND To A ll Palestinians Who Strug g le For Freedom!

CHAPTER 1 INTRODUCTION

1.1. An Overview

As green house effects and environmental issues become more of a concern, renewable energy is one of the options in reducing pollution. Furthermore, fossil fuel resources used in the production of power are dwindling and becoming more expensive; ‘Renewable Energy’ is the new trend in energy production to reduce emission in the long run. This includes power generated from water, wind, solar radiation, biomass and other resources. These resources are considered to be clean and continuously found in nature. PV modules used to be expensive, but in recent years, their price has been slowly dropping, and as they become increasingly economical, they will be used in more applications. In the U.S. the cost of installing solar had fallen from $55 per peak watt in 1976 to about $4 per peak watt in 2001 [1]. PV modules output efficiency has also increased in recent years. PV cells, having power conversion efficiencies as high as 31%, have been developed in a laboratory environment over the last decade [2]. With these growths in photovoltaic technology, there is no doubt that PV will have a good stand in the near future. However in this thesis, the emphasis is on the study of PV system control part.

1.2. Brief Background

The world trend nowadays is to find a non-depletable and clean source of energy. The most effective and harmless energy source is probably solar energy, which 1

for many applications is so technically straightforward to use. Use of solar energy instead of fuel combustion, particularly for simple application like low and medium temperature water heating and for stand alone PV systems in rural areas, can reduce the load on the environment. Solar energy for electricity generation can be harvested by the use of  photovoltaic (PV) array, which has an optimum operating point called the maximum  power point (MPP) as shown in Fig. 1.1. This MPP varies depending on cell temperature and the present insolation level [3]. To get the maximum power from the PV, a maximum power point tracker (MPPT) must be used.

Fig. 1.1 (a) The I-V characteristic curve, (b) The PV panel Maximum Power Point

1.3. Problem Definition and Motivation

Several maximum power point tracker (MPPT) algorithms are implemented to track this MPP, yet many research works to implement a low-cost highly efficient MPPT algorithm are being conducted. This algorithm should respond in a short time to the change in the atmospheric conditions to avoid energy loss. Moreover it should not

2

 be stuck in local power peaks if any; this happens in case of partial shadowing or dust on the PV panel. Furthermore, the converter has to be very efficient, in order to transfer more energy to the load. This is achieved by using a simple soft-switched topology. Much higher conversion efficiency at lower cost will then result, making the MPPT an affordable solution for small PV energy systems.

1.4. Scope

The objective of this thesis is to design and build an experimental model, develop a Simulink model of a stand-alone photovoltaic system with an MPPT controller, and to analyze its operation. Chapter 2 reviews the various literature of maximum power point tracking algorithms. Perturb and Observe, Incremental conductance, Constant reference voltage and other algorithms are presented in this chapter. Chapter 3 will highlight the equations that are needed to implement the MPPT system. PV cells electrical representation and current-voltage relation, Lead acid battery chemistry and hazards, and dc-dc converters are presented in this chapter. Chapter 4 and Chapter 5 show the Simulink block and the experimental model that were implemented. Chapter 6 will discuss the simulated and experimental results. In this chapter the hardware model data for changing weather conditions are evaluated. Chapter 7 will conclude the thesis and will look on the future development of the thesis. References and appendices are attached at the end of this thesis report.

3

CHAPTER 2 LITERATURE REVIEW

2.1. Maximum Power Point Tracker

Solar energy can be harvested by the use of a photovoltaic (PV) array, which has an optimum operating point called the maximum power point (MPP) as s hown in Fig. 1.1(b). The I-V curve will change as the tempera ture and insolation levels change as shown in Fig. 2.1, thus the MPP will vary accordingly [4]. So we need to control either the operating voltage or the current to get maximum power from the PV panel at the prevailing temperature and insolation conditions using a maximum power point tracker (MPPT) which should meet the following conditions [5]: •

Operate the PV system as close as possible to the MPP irrespective of the

atmospheric changes. •

Have low cost and high conversion efficiency.



Provide an output interface compatible with the battery-charging

requirement.

Fig. 2.1 (a) PV panel Insolation characteristics (b) PV panel Temp characteristics [4]

4

The MPPT consists of two basic components: a switched-mode dc-dc converter and a controller.

2.2. Switched-mode dc-dc converter

The origins of switched-mode converters are linked with the developments in inverter circuitry. An inverter is a processor for generating AC from DC and is, therefore, a constituent of some forms of switched-mode power supplies. The DC-DC converter will change the energy at one potential, stored as magnetic energy in an inductor, to another potential. Different topologies can be used to construct DC-DC converters: step down converter (buck converter), s tep up converter (boost converter), or a combination of both step up- step down converter (buck-boost converter). The converter in MPPT will adjust the PV array output voltage to the battery voltage while driving the PV panel at its MPP.

2.3. Controller

The controller should keep testing if the PV system is operating at the PV maximum power point; it should force the system to t rack this MPP. This could be done  by continuously measuring the voltage and current from the PV array, and then  performing either voltage or power feedback control [6].

 2.3.1 Voltage feedback control The control variable here is the PV array terminal voltage. The controller forces the PV array to operate at its MPP by changing the array terminal voltage.

5

However it has a major drawback where it neglects the variation in the temperature and insolation level [6, 7].

 2.3.2 Power feedback control The control variable here is the power delivered to the load. To achieve maximum power the quantity dp dv  is forced to zero. This control scheme is not affected by the characteristics of the PV array, yet it maximizes power to the load and not power from the PV array [6, 7].

2.4. MPPT controller Algorithms

Several algorithms were proposed to accomplish MPPT controller. Published MPPT methods include: (1) Perturb and Observe (PAO) [3], (2) Incremental Conductance Technique (ICT) [3], and (3) Constant Reference Voltage/Current [3, 5].

 2.4.1. Perturb and Observe (PAO) The Perturb and Observe method has a simple feedback s tructure and few measured parameters. It operates by periodically perturbing (i.e. incrementing or decrementing) the duty cycle controlling the array c urrent as shown in Fig. 2.2 and comparing the PV output power with that of the previous perturbation cycle . If the  perturbation leads to an increase (or decrease) in array power, the subsequent  perturbation is made in the same (or opposite) direction. In this manner, the peak power tracker continuously seeks the peak power condition. The flow chart for this algorithm will be discussed in chapters 4 and 5.

6

Fig. 2.2 PAO technique [5]

The PAO technique is easily implemented, costs the least among the other available techniques, and is considered to be a very efficient scheme in terms of power  being extracted from the PV array [8]. However the PAO technique will be tricked in catching the MPP under rapid varying solar radiation [3]. If the Insolation level increases ( I 2 > I 1) then the controller will assume that the incremental step should keep moving in the same direction toward point direction at point

when the new MPP is really in the other

as shown in Fig. 2.3 [3]. So for the PAO algorithm, the power

has increased because the new MPP is toward the right whereas it has already been  passed at point

. In the following perturbation the PAO algorithm will increment

the array operating voltage further right, point

. In this way the PAO algorithm will

continue to deviate from the actual MPP, with a corresponding power loss, until the solar radiation change slows or settles down. [3]

7

Fig. 2.3 Deviation of the PAO technique from the MPP [3]

 2.4.2. Incremental Conductance Technique (ICT) The basic idea is that the derivative of the power with respect to the voltage ( dp dv ) vanishes at the MPP since it is the maximum point on the curve as shown in Fig. 2.4. It is also noticeable from Fig. 2.4 that to the right of the MPP the derivative is decreasing while to the left of the MPP it is increasing.

Fig. 2.4 The slope ‘conductance’ of the P-V curve [9]

8

Furthermore the derivative dp dv can be written as: dP  dV   = d ( I .V ) dV  = I  + V dI  d V  ; where ∆G = dI  d V   is the incremental conductance. Hence: (

1 V 

) dP  dV  =

 I  V 

+ dI  d V  ; where G =

So at the MPP ( dp dv =0), we get dI  d V  =

 I  V 

 I 





 is the source conductance.

 i.e. G = -  ∆G.

The ICT algorithm checks for MPP by comparing dI  d V  against

 I 





till it

reaches the voltage operating point at which the incremental conductance is equal to the source conductance [3, 10]. The flow chart for the ICT algorithm is shown in Fig. 2.5.

Fig. 2.5 Flow chart of the ICT algorithm [3]

9

The algorithm starts by obtaining the present values of I and V , then using the corresponding values stored at the end of the preceding cycle, I b and V b, the incremental changes are approximated as: dI = I – I b, and dV =V - V b and according to the result of this check, the control reference signal Vref  will be adjusted in order to move the array voltage towards the MPP voltage. At the MPP, dI  d V  =

 I 





, no control action is

needed, therefore the adjustment stage will be bypassed and the algorithm will update the stored parameters at the end of the cycle as usual. Another check is included in the algorithm to detect whether a control action is required when the array was operating at the previous cycle MPP (dV  = 0); in this case the change in weather condition will be detected using (dI ≠ 0) [3]. This technique offers good performance under varying atmospheric conditions contrary to the PAO technique. However it requires complete mat hematical model for the topology used and its complex circuitry adds to the cost of the MPPT controller [9].

 2.4.3. Constant Reference Voltage One very common MPPT technique is to compare the PV array voltage (or current) with a constant reference voltage (or current), which corresponds to the PV voltage (or current) at the maximum power point, under specific atmospheric conditions Fig. 2.6. The resulting difference signal (error signal) is used to drive a power conditioner, which interfaces the PV array to the load. Although the implementation of this method is simple, the method itself is not very accurate, since it does not take into account the effects of temperature and irradiation variations [5].

10

Fig. 2.6 MPPT control system with constant voltage reference [5]

 2.4.4. Other techniques Other techniques exist such as current-based maximum power point tracker ‘CMPPT’ and voltage-based maximum power point tracker ‘ VMPPT’ [9]. Employed numerical methods show a linear dependence between the “cell currents corresponding to maximum power” and the “cell-short circuit currents”. The current IMPP operating at the MPP is calculated using the following equation:  I  MPP = M C I    SC

(2.1)

where M C   is called the ‘current factor’ and differs from one panel to another. This factor  M C   differs from one panel to another and is affected by the panel surface conditions, especially if partial shading covers the panel [11]. Similarly the MPP operating voltage is calculated directly from VOC: V  MPP  = M V V    OC

(2.2)

where MV is the ‘voltage factor’. The open circuit voltage V OC  is sampled by analogue sampler, and then VMPP is calculated by equation (2.2). This operating V MPP voltage is the reference voltage for the voltage control loop as shown in Fig. 2.6. This method always, “results in a 11

considerable power error because the output voltage of the PV module only follows the unchanged reference voltage during one sampling period” [12].

Fig. 2.7 The conventional MPPT controller using open circuit voltage Voc [12]

Others argue that these two techniques are considered to be “fast, practical, and powerful methods for MPP estimation of PV generators under all insolation and temperature conditions” [13].

2.5. Comparative Study

A comprehensive experimental comparison between different MPPT algorithms was prepared at South Dakota State University [14]. After presenting the advantages and disadvantages of each algorithm, a n experiment for the same PV array setup was run. Results showed that the ICT method has the highest efficiency (98%) in terms of power extracted from the PV array, next is the PAO technique efficiency (96.5%), and finally the Constant Voltage method efficiency (88%). Although the ICT method offers good performance under rapidly changing weather conditions and seems to provide the highest tracking efficiency, four sensors are required to perform the measurements for computations and decision making [3]. If the system requires more conversion time in tracking the MPP, a large amount of power loss will occur [6]. On the contrary, if the sampling and execution speed of the 12

 perturbation and observation method is increased, then the system loss will be reduced. Moreover, this method only needs two sensors, which results in t he reduction of hardware requirement and cost. Thus, the complexity of the ICT algorithm and the increased cost of its circuitry, “encourage all to implement the PAO technique” [14].

2.6 Contribution of this Thesis

In this thesis, a hardware MPPT system and a Simulink MPPT model are designed and tested for different PAO algorithms. The conventional PAO algorithm is enhanced in a way to overcome the loss in the solar power tracking efficiency associated with being misled by the scanning direction under rapidly varying weather conditions. So an adaptive PAO algorithm, which forces the system to r espond faster to any changes in the insolation level irrespective of where the previous operating point MPP was and without deteriorating the tracking efficie ncy, is implemented. Chapter 5 discusses the implementation of this algorithm.

13

CHAPTER 3 SYSTEM COMPONENT MODELING

3.1. Photovoltaic

The word photovoltaic is a combination of the Greek word f or light and the name of the Italian physicist Alessandro Volta. It refers to the direct conversion of sunlight into energy by means of solar cells. The conversion process is based on the  photoelectric effect discovered by Alexander Becquerel in 1839.

 3.1.1. Solar Cells A solar cell is a device that uses the photoelectric effect to generate electricity from light. Over 95% of all the solar cells produced worldwide are composed of the semiconductor material Silicon (Si) with efficiency up to about 17% [15]. However solar cells, having power conversion efficienci es as high as 31%, have been developed over the last decade in laboratory environment [2]. It consists of a moderately p-doped  base substrate and a thin heavily n-doped top layer. Thin metal contacts on the surface and a plain metal layer on the back connect this photovoltaic element to the load as shown in Fig. 3.1.

Fig. 3.1 The PV cell [16] 14

 3.1.2. Photovoltaic Effect The photovoltaic effect is a basic physical process through which a PV cell converts sunlight into electricity. Sunlight is composed of photon-packets of solar energy, which contain different amounts of energy that correspond to different wavelengths of the solar spectrum. When photons strike a PV cell, they may be reflected or absorbed, or they may pass right through. Absorbed photons, with energy greater than the band-gap energy of the semiconductor, generate electron-hole pairs. The created charge carriers in the depletion region are separated by the existing electric field. This leads to a forward bias of the p-n junction and builds up a voltage potential. When a load is connected to the cell, this voltage will cause a current to flow through the load.

 3.1.3. Electric Model of the PV cell A solar cell equivalent electrical circuit can be represented by a current source in parallel with a diode as shown in Fig. 3.2. This is a simplified PV model where the shunt resistance R sh is neglected [17].

Fig. 3.2: Model for a PV cell [17]

15

The model contains a photocurrent source I  ph, one diode and a series resistance RS , which represents the series resistance inside each cell. Thus the Load current I  L is the difference between the photocurrent I  ph and the normal diode current I  D.

 I  L = I  ph -  I  D = I  ph – I 0 (exp

q(V  + I  L R S  ) mkT 

- 1)

(3.1)

 I  ph = I  ph(T 1 ) (1 + K 0 (T – T 1 ))

(3.2)

 I  ph(T 1 ) = G * I  sc(T 1 ,nom) / G(nom)

(3.3)

 K 0 = (I  sc(T 2 ) - I  sc(T 1 ) ) / (T 2 -T 1 )

(3.4)

 I 0 = I 0(T 1 ) * (T/T 1 )3/n * e-qVg / nk * (1/T – 1/T1)

(3.5)

 I 0(T 1 ) = I  sc(T 1 ) / (e-qVoc(T1) / nkT1 – 1)

(3.6)

Where m is the ideality factor (ranges between 1 and 2), k  is the Boltzmann’s constant, T  is the absolute temperature of the cell, q is the electronic charge and V is the voltage across the cell. I0 is the dark saturation current and it depends on the temperature, G is the Insolation level, K 0 is the temperature coefficient at Isc, V  g is the  band gap voltage and T1 is a reference temperature supplied by the manufacturer [18]. The most important parameters for PV cells are the short circuit current  'I SC ', the open-circuit voltage 'V OC ', and the maximum power point 'MPP'. The short circuit current ( I  sc ≈ I  ph) is the greatest current value generated by the cell under short circuit conditions (V =0). The open circuit voltage (V OC ), is the voltage across the p-n  junction/diode when I  L=0 and when I  D = I  ph. It represents the voltage of the cell when it

16

is in the dark. The maximum power point (MPP) is the point on the (I-V) characteristic curve of a PV cell, where power is maximum, as shown earlier in Fig. 1.1.

 3.1.4. Irradiation and Cell Temperature Effect on the I-V characteristic curve Using equation (3.1), we can draw the (I-V) characteristic curves for different irradiation levels and for different temperature values as shown in Fig. 3.3. It can be easily interpreted that the open circuit voltage increases logarithmically while the short circuit current increase linearly as the insolation level increases [18]. Also increasing the cell’s temperature, decrease the open circuit voltage, thus the cell is less efficient in terms of power level. The short circuit current increases slightly with cell temperature.

Fig. 3.3 (a) Effect of Varied Irradiation, (b) Effect of Varied Temperature on the PV cell

17

 3.1.5. PV Modules Modules and PV Arrays Arrays Single PV cells are combined into PV modules that are usually supplied with  NP parallel branches each with NS solar cells in series as shown in Fig. 3.4 (a). Yet in  photovoltaic energy systems PV modules are connected in arrays. Fig. 3.4 3.4 (b) shows an array of the modules with MP parallel branches each with MS modules in series.

Fig. 3.4 (a) PV Module, (b) PV Array [18]

3.2. Battery

The purpose of a battery is to store chemical energy and to convert this chemical energy into electrical energy when the need arises. Batteries are divided in two ways, by application (what they are used for) and construction (how they are built). The major applications are automotive, marine, and deep-cycle. The major construction types are flooded (wet), gelled, and AGM (Absorbed Glass Mat). In solar systems it is

18

important to note that nearly all of the batteries commonly used are deep cycle c ycle LeadAcid batteries [19].

 3.2.1. Lead Acid Acid Batteries A lead-acid battery is an electrical storage device that uses a reversible chemical reaction to store energy. It uses a combination of lead pla tes or grids and an electrolyte consisting of a diluted sulfuric acid to convert electrical energy into potential chemical energy and back again. A battery consists of a series of cells where each cell  provides about two volts. Connected in series, these cells will provide the desired  battery output voltage.

 3.2.2. Battery Chemistry Chemistry A voltaic cell develops a potential difference when electrodes of two different metals are immersed in an electrolyte. One electrode accumulates a positive charge while the other accumulates negative charge. The potential difference is due to the difference in charge between the two electrodes [20]. The chemical equation for a lead-acid battery during discharge is: PbO   + Pb + 2H SO   discharge →  2PbSO + 2H O 2

2

4

4

2

The chemical equation for a lead-acid battery during charge is: PbO + Pb + 2H SO   2

2

4

charge ←

2PbSO4 + 2H O 2

The lead-acid battery uses dilute sulfuric acid for the electrolyte, lead for the anode, and lead oxide, PbO2, for the cathode. The sulfuric acid diss ociates into hydrogen and sulfate ions. The sulfate ion reacts with the the lead anode to form lead sulfate and releases two electrons through the external circuit. This is the oxidation 19

reaction. At the cathode, the two electrons cause a reaction to create lead sulfate and water. This is the reduction reaction. The half-cell reactions are:

Pb + SO42-=PbSO42- (sol) + 2 ePbO2 + 4 H+ + 2 e- + SO42-=PbSO42- (sol)

At full discharge, both anode and cathode are covered with lead sulfate, and the electrolyte is mostly water. Reversing the current flow reverses the reactions, recharging the battery.

 3.2.3. Ampere-Hour Ampere-Hour Capacity and Charge Rate The Ampere-hour The Ampere-hour (Ah) Capacity of Capacity of a battery tries trie s to quantify the amount of usable energy it can store at a nominal voltage. All deep cycle batteries are rated in ampere-hours. An ampere-hour is one ampere for one hour, or 10 A for 1/10 of an hour and so forth [21]. A good charge rate is approximately 10% of the the total capacity (of the  battery) per hour (i.e. 200 amp hour battery charged at 20 amps.) amps.) This will reduce electrolyte loss and damage to the plates. [20]

 3.2.4. State of Charge Charge The State of Charge describes how full a battery is. This can be determined det ermined by one of three ways:

• Voltage measurement, for a battery at 'rest' this method can show the state of charge by comparing the voltage to a chart showing the percentage of charge relative to voltage.

20

• Electrolyte density measurement, a sample of the electrolyte is drawn into a hydrometer, which shows the density of the liquid. The heavier the electrolyte (higher gravity), the more acid in solution, the higher the state of charge.

• Ampere-hour metering, this method uses an ampere-hour meter, which is set using the specifications of a new battery at full charge. It measures and records power going into and coming out of the battery and keeps an electronic balance sheet.

 3.2.5. Deep Cycle versus Starter Batteries Batteries are typically built for specific purposes and they differ in construction accordingly. Broadly speaking, there are two applications that manufacturers build their  batteries for: Starting and Deep Cycle discharge. As the name implies, Starter Batteries are meant to get combustion engines going. They have many thin lead plates, which allow them to discharge a l ot of energy very quickly for a short amount of time. However, they do not tolera te being discharged deeply, as the thin lead plates needed for starter currents degrade quickly under deep discharge and re-charging cycles. Most starter batteries will only tolerate being completely discharged a few times before being irreversibly damaged.  Deep Cycle batteries have thicker lead plates that make them tolerate deep discharges better (in many cases down to 20% of capacity). They cannot dispense charge as quickly as a starter battery but can also be used to start combustion engines.. The thicker the lead plates, the longer the life span, all other things being equal. Battery weight is a simple indicator for the thickness of the lead plates used in a battery. The heavier a battery for a given group size, the thicker the plates, and the bette r the battery will tolerate deep discharges. [20]

21

 3.2.6. Lifespan of Batteries The lifespan of a battery will vary considerably with how it is used, how it is maintained and charged, temperature, and other factors. Battery manufacturers define the end-of-life of a battery when it can no longer hold a proper charge (for e xample, a cell has shorted) or when the available battery capacity is 80% or less than what the  battery was rated for. The life of Lead Acid batteries is usually limited by several factors: Cycle Life is a measure of how many charge and discharge cycles a battery can take before its lead-plate grids/plates are expected to collapse and short out. Moreover the greater the average depth-of-discharge, the shorter the cycle life [20].  Age also affects batteries as the chemistry inside them attacks the lead plates. The healthier the "living conditions" of the batteries , the longer they will serve you. Lead-Acid batteries like to be kept at a full charge in a cool place. Sulfation is a constant threat to batteries that are not fully re-charged. A layer of lead sulfate can form in these cells and inhibit the electro-chemical reaction that allows you to charge/discharge batteries.

 3.2.7. Battery Hazards Both electrodes dissolve into the electrolyte during the discharge reaction. When charged the reverse reactions occur. Overcharge will lead to the electrolysis of water and consequent production of (hazardous) H 2 (gas) at the cathode. Precautions must be routinely practiced to prevent explosions from ignition of the flammable gas mixture of hydrogen and oxygen formed during overcharge of lead-acid cells.

22

3.3. DC-DC Converters

A DC-to-DC converter is a device that accepts a DC input voltage and  produces a DC output voltage, which is at a different voltage level than the input. DCDC converters are widely used in regulated switch-mode dc power supplies and in dcmotor drive applications. These converters are usually used with an electrical isolation transformer in the switch mode dc power supply, and without an isolation transformer in case of dc-motor drive [22].

 3.3.1. Switching Converter Topologies Topology refers to the various configurations of power-switching and energystorage elements that can be used to transfer, control and regulate power (voltage) from an input voltage source. The many different switching-regulator topologies can be grouped into two basic categories: non-isolated, in which the i nput source and the output load share a common current path during operation, and isolated, in which the energy transfer is achieved by a mutually-coupled magnetic element (a transformer), and the coupling from the source to the load is achieved by means of a magnetic flux rather than a common current. One topology is selected over a nother based upon the cost goals, performance objectives and input-line/output-load characteristics of the system in which it is to operate. Any one topology is not “better” than another in all respects. Each has desirable characteristics and shortcomings, and selection is a matter of properly applying the correct power converter to the syste m requirement.

23

 3.3.2. Non-Isolated Switching Converters There are four, non-isolated, switching-regulator topologies applicable to modular DC/DC converters. They are the buck, or step-down converter, the boost, or step-up converter, the buck-boost converter, and the Cuk converter.

3.3.2.1. Buck Converter (step-down converter) As the name implies, a step-down converter produces a lower average output voltage than the dc input voltage. Its operation is straightforward. When the switch T r,  in Fig. 3.5, is turned on, the input voltage is applied to inductor L and power is delivered to the output. This voltage will tend to cause the inductor current to rise. When the switch T r is OFF, the current will continue flowing through the inductor L but   now flowing through the diode.

Fig. 3.5 Buck Converter

To analyze the voltages of this circuit let us consider the changes in the inductor current over one cycle as shown in Fig. 3.6.

24

Fig. 3.6 Voltage and current changes [22]

The voltage across the inductor shown in Fig. 3.5 is given by

V  x − V o = L

di dt 

 

(3.8)

the change of current satisfies

⎛  I  1⎜ 2

 ⎞ ⎟ di = ⎜ ∫ (Vx − Vo )dt ⎟    L ⎜ ⎟  I  ⎝  1  ⎠

(3.9)

For steady state operation the current at the start and end of a period T  will not change. To get a simple relation between voltages we assume no voltage drop across transistor T r  or diode while ON and a perfect switch change. Thus during the ON time V  x=V in and in the OFF period V  x=0. Thus

25

t on

t on +t  off 

0

t on

0 = di = ∫ (V in − V o ) dt  +

∫ (−V o )dt  

(3.10)

which simplifies into

V o t  = on   where T = t on + t off V in T 

(3.11)

Defining "duty cycle" as

t   D = on T 

(3.12)

the input-output voltage relationship becomes Vo=D Vin

(3.13)

Since the circuit is lossless and the input and output powers must match on the average (V o* I o = Vin* I in). Thus the average input and output current must satis fy

 I in =D I o

(3.14)

These relations are based on the assumption that the inductor current does not reach zero.

•  Discontinuous-Conduction Mode Thus, the buck is a step-down type, where the output voltage is always lower than the input (Since D never reaches one). Varying the duty cycle of the switch  provides output voltage regulation. The LC arrangement provides very effective filtering of the inductor current. Hence, the buck and its derivatives all have very low output ripple characteristics. The buck is normally always operated in continuous mode (inductor current never falls to zero) where peak currents are lower as shown in Fig. 3.7,

26

and the smoothing capacitor requirements are smaller. There are no major control  problems with the continuous mode buck.

Fig. 3.7 Inductor current for (a): continuous mode (b): discontinuous mode [22]

•  Boundary Between Continuous and Discontinuous Conduction When the current in the inductor L remains always positive then either the transistor T r  or the diode D must be conducting. For continuous conduction the voltage V  x is either V in or 0. If the inductor current ever goes to zero then the output voltage will not be forced to either of these conditions. At this transition point the current just reaches zero as seen in Fig. 3.8.

27

Fig. 3.8 Buck Converter at Boundary

During the ON time V in-V o is across the inductor thus  I  L ( peak ) = (V in − V O ).

t on  L

 

(3.15)

The average current, which must match the output current, satisfies  I  L ( average) =

 I  L ( peak ) 2

= (V in − V o )

dT  2 L

=  I out (transition )  

(3.16)

If the input voltage is constant the output current at the transition point satisfies

 I out (transition ) = V in



(1 − d )d  2 L

T   

(3.17)

Voltage Ratio of Buck Converter (Discontinuous Mode) As for the continuous conduction analysis, the fact that the integral of voltage

across the inductor is zero over a cycle of switching T is used. The transistor OFF time is now divided into segments of diode conduction in Fig. 3.9. [22]

28

δd T  and

zero conduction

δoT  as

shown

Fig. 3.9 Buck Converter - Discontinuous Conduction

The inductor average voltage thus gives:

(V in − V o ) DT  + ( −V o )δ  d T  = 0  

(3.18)

Then

V o V in

=

d  d  + δ  d 

where d  + δ  d  < 1  

To resolve the value of

δ  d 

 consider the output current which is half the peak

when averaged over the conduction times

 I out  =

 I  L ( peak ) 2

(3.19)

d  + δ  d 

.

d  + δ  d   

(3.20)

Considering the change of current during the diode conduction time

 I  L ( peak ) =

V o (δ  d T )  L

 

(3.21)

29

Thus from equations (3.20) and (3.21) we can get

 I out  =

V oδ  d T ( d  + δ  d  ) 2 L

 

(3.22)

using the relationship in (3.19)

 I out  =

V in d δ  d T  2 L

 

(3.23)

and solving for the diode conduction

δ  d 

=

2 LI out  V in dT 

 

(3.24)

The output voltage is thus given as

d 2   = 2  LI  V in out  d 2 + ( ) V inT 

V out 

(3.25)

defining k  = 2 L/(V in T ), we can see the effect of discontinuous current on the voltage ratio of the converter.

30

Fig. 3.10 Output Voltage versus Current [22]

As seen in Fig. 3.10 once the output current is high enough, the voltage rati o depends only on the duty ratio "d". At low currents the disc ontinuous operation tends to increase the output voltage of the converter towards V in.



Output Voltage Ripple For continuous mode of operation the output ripple voltage can be c alculated

 by considering the waveform in Fig. 3.11. Assuming that the entire ripple component in iL flows through the capacitor and its average component flows through the load resistor, the shaded area in Fig. 3.11 represents an additional charge  ∆Q. Therefore, the  peak-to-peak voltage ripple  ∆V o can be written as:  ∆V o =

∆Q C 

=

1 1



C  2

=

∆ I  L T  ⋅   2

(3.26)

2

31

Fig. 3.11 Output voltage ripple in a step-down converter [22]

From Fig. (7) during t off 

∆ I  L =

V 0  L

(1 − D)T  

(3.27)

Then substituting ∆ I  L from Eq. 20 into previous equation, we get:

∆V 0 =



∆V 0 V 0

T  V 0 8C   L

=

(1 − D)T   

1 T 2 (1 − D) 8

 LC 

(3.28)

2

⎛  f   ⎞ = (1 − D)⎜⎜ c ⎟⎟   2 ⎝  f  ⎠ π 

2

where, f  = 1/T  is the switching frequency and  f c =

32

(3.29)

1 2π   LC 

 .

3.3.2.2. Boost Converter (step-up converter) The schematic in Fig. 3.12 shows the basic boost converter. This circuit is used when the output voltage is required to be higher than the input..

Fig. 3.12 Boost Converter Circuit

While the switch T r r is ON then V  x =V   =V in   in, and in the OFF state the inductor current flows through the diode giving V  x =V o. For this analysis it is assumed that the inductor current always remains flowing (continuous conduction). The voltage across the inductor is shown in Fig. 3.13 and the average must be zer o for the average current to remain in steady state.

Fig. 3.13 Voltage and current waveforms (Boost Converter). 33

Thus

= 0  V in t on + (V in − V o )t  off 

(3.30)

This can be rearranged as V o T  1   = = V in t  (1 − D ) off 

(3.31)

and for a lossless circuit the power balance ensures  I o = (1 − D )    I in

(3.32)

Since the duty ratio "D" is between 0 and 1 the output voltage must always be higher than the input voltage in magnitude. The negative sign indicates a reversal of sense of the output voltage.

3.3.2.3. Buck-Boost Converter A buck-boost converter can be obtained by cascading the step-down converter and the step-up converter. The cascade casca de connection can be combined into the topology of the buck-boost converter using a single switch as shown in Fig. 3.14.

Fig. 3.14 schematic for buck-boost converter

34

With continuous conduction for the Buck-Boost converter V  x =V   =V in in when the transistor is ON and V  x =V o when the switch (T  (T r r ) is OFF. For zero net current change over a period the average voltage across the inductor is zero as shown in Fig. 3.15. Thus:

=0  V in t on + V o t  off 

(3.33)

Fig. 3.15 Waveforms for buck-boost converter

Which gives the voltage ratio V o V in

=−

 D 1 − D

 

(3.34)

and the corresponding current  I o  I in

=−

1 − D  D

 

(3.35)

Since the duty ratio " D"  D" is between 0 and 1 the output voltage can vary  between lower or higher than the input voltage in magnitude. magnitude. The negative sign indicates a reversal of sense of the output voltage. 35

 3.3.3. Isolated DC-DC Converters In many DC-DC applications, multiple outputs are required and output isolation may need to be implemented depending on the application. In addition, input to output isolation may be required to meet safety standards and / or provide impedance matching. There are several isolated switching converter topologies; however, three will  be discussed, which are the flyback, forward and H-bridge power converters. For these circuits, all energy transfer from the input power source to the load is achieved via a transformer or other flux-coupled magnetic element.

3.3.3.1. Flyback Converter The flyback switching regulator converts an input voltage into a regulated, lower or higher-valued output voltage depending on its transformer’s turns r atio. The flyback converter can be developed as an extension of the Buck-Boost converter Fig. 3.14. A simplified circuit diagram is shown in Fig. 3.16.

Fig. 3.16 Flyback converter Concerning the input-to-output transfer function, the on-time energy is given by:  E on = (V in / N ) t on

(3.36)

and the off-time energy is given by:  E off  = (V o) t off

(3.37)

36

 Where t off  = T – t on and N is the transformer’s turns ratio. Substituting yields: (V in /N ) t on = V o (T – t on)

(3.38)

(V  IN ) t on = N V o (T – t on)

(3.39)

V o = (V in) t on /( N T – N t on)

(3.40)

t on /T = D

(3.41)

V o /V in = D / ( N – N D)

(3.42)

V o / V in = (1 / N ) (D / (1 – D))

(3.43)

 but

where

3.3.3.2. Forward Converter The forward switching regulator converts an input voltage into a regulated, lower or higher-valued output voltage depending on its transformer’s turns ratio. A simplified circuit diagram is shown in Fig. 3.17.

Fig. 3.17 Forward Converter In determining the input-to-output transfer function, the on-time energy is given by:

37

Eon = (V in / N – V o) t on,

(3.44)

and the off-time energy is given by:  E off  = (V o) t off ,

(3.45)

where t off  = T – t on and N is the transformer’s turns ratio. Substituting yields: (V in / N – V o) t on = V o (T – t on)

(3.46)

V o = (V in / N )(t on / T )

(3.47)

V o / V in = (1 / N ) D

(3.48)

3.3.3.3. H-bridge Converter The H-bridge inverter changes a dc input voltage into a symmetrical ac output voltage of desirable magnitude and frequency. The output voltage could be fixed or variable at a fixed or variable frequency. A variable output voltage can be obtained by varying the gain of the inverter, which is normally done by pulse-width-modulation (PWM) control within the inverter. Then the rectifier, and filter circuit is used to extract the average value (dc) of the voltage and current. A simplified circuit diagram is shown in Fig. 3.18. When switches S 1 and S 4 are turned on simultaneously, the input voltage V s appears across the terminals (A & B) of the transformer T . If switches S2 and S3 are turned on at the same time, the voltage V AB is reversed and is - V s. The waveform for the output voltage is shown in Fig. 3.19. The rms output voltage can be found from:

38

⎛  2 V o = ⎜ ⎜ T  ⎝  0

 ⎞ 2 ⎟ ∫ V  s dt ⎟ 0  ⎠

T 0

1/ 2

= V  s

(3.49)

Fig. 3.18 H-bridge Converter

Fig. 3.19 Waveforms

This type of converters was shown for the hardware design because it employs electronic switches that are driven by square wave signals (50% duty cycle). This

39

 permits good operation at high frequencies, avoiding problems problems that may arise when using simple buck converter topology with variable duty cycle switching. This is illustrated in Chapter 5, section 5.3.1.

3.4. Zero Voltage Switching

Switching frequencies in the megahertz range are a re being contemplated to reduce the size and the weight of transformers and filter components and hence to reduce the cost as well as the size and the weight of power electronics converters. Realistically, the switching frequencies can be increased increase d to such high values if the problems of switch s witch stresses, switching losses, and EMI associated with the switch-mode converters can be overcome. Therefore, to realize high switching frequencies in converters, the aforementioned shortcomings are minimized if each switch in a converter changes its status (from on to off and vice versa) when the voltage across it ‘V  ‘V  s’ and/or the current through it ‘is’ is zero at the switching instant. Otherwise power loss PS in the switch,  being proportional to the switching frequency limits how high the switching frequency can be pushed, without significantly degrading the system efficie ncy. The power loss P S in the switch during turn-off and turn-on is shown in Fig. 3.19.

Fig. 3.20 Power loss associated with high switching frequencies.

40

In these converters, the resonant capacitor Cr produces a zero voltage across the switch at which instant the switch can be turned on or off. Such a step-down converter circuit is shown in Fig. 3.20, where a diode Dr is connected in antiparallel with the switch [22].

Fig. 3.21 ZVS resonant-switch dc-dc converter [22]

After implementing this type of ZVS buck converters in the hardware model, the power electronics efficiency decreased severely. After all, the implemented system switching frequency (40khz) is much less than megahertz a nd the resonant inductor L r  added more power loss in the form of heat dissipation. So the resonant elements were removed and an H-bridge converter was built. The H-bridge converter is discussed in chapter 5.

41

CHAPTER 4 MPPT SYSTEM SIMULINK MODEL

4.1. Introduction

In this chapter, the mathematical models of the MPPT system implemented in Simulink will be highlighted. Simulink is a platform for multi-domain simulation and model-based design of dynamic systems. It provides an interactive graphical environment and a customizable set of block libraries that let you accurately design, simulate, implement, and test control, signal processing, communications, power electronics and other time-varying systems. Simulink has an advantage when building hierarchical model system because of the possibility to test the system at different levels. It also provides the possibility to  build modular models, which means that models can be easily connected to simulate certain system.

4.2. Simulink Blocks

Simulink possesses a variety of block libraries to represent time varying systems. However present Simulink libraries don’t include one for PV systems; there is no solar cell equivalent block. However at one university, a PV toolbox with a PV module, battery, and battery charge controller had been designed and is being tested [20]. Fig. 4.1 shows the PV array MPPT system block that includes: PV cell block, converter block, controller block and the battery load block.

42

In the next few sections, these blocks will be discussed individually. The sections will investigate how the models are implemented.

Fig. 4.1 PV array 'MPPT' system

4.3. What is An S-Function

An S-Function is a mechanism that allows the user to implement Matlab source code as a Simulink compatible block. The S-function block is always drawn with one input port and one output port, regardless of the number of inputs and outputs of the contained subsystem. To have access to more than one input and output through an sfunction block, a multiplexer and a de-multiplexer are respectively used as shown in Fig. 4.2.

Fig. 4.2 S-Function block with three inputs and two outputs

43

4.4. Implementation of PV cell using S-Function

One can use the circuit model shown in Fig. 4.3 to represent the solar cell using the 'SimPower System’ library, or can develop a solar cell block using S-function Block. Testing the circuit model during initialization, it was difficult to set I ph and ID values with respect to varying Insolation and temperature values respectively. Moreover during simulation, it was also difficult to control these two values while varying the converter duty cycle using the circuit model.

Fig. 4.3 Model for a PV cell

So using the S-Function approach, a model for the PV cell was developed as 2 o shown in Fig. 4.4. The inputs are the Insolation level ( W/m ), the Temperature ( C ), and

the current I in (A) absorbed by the load. The code, implemented in the PV cell block, defines the set of equation that describes the voltage and current relations as given in Chapter 3. This code is given in Appendix A.

44

Fig. 4.4 PV Cell S-Function block

4.5. Converter and Controller Blocks

It was decided to use a buck converter as the integrated MPPT's converter. The  buck converter features "low ripple and switching device currents compared to other converter topologies" [24]. The buck converter model is built using the 'SimPower System' Simulink library as shown in Fig. 4.5. The power MOSFET is chosen as a switching device since it has higher switching speed capabilities as compared to BJTs. It has four pins, where the g pin represents the gate terminal, d  the drain, and s the source. The m pin is used for measurements so it is connected to a terminator box. The diode model is selected from the Simulink power electronics library. A snubber resistance (500 ohm), connected in parallel with the diode, is used to reduce the switching current overshoots. The inductor that maintains current continuity is placed in  parallel with a 10-k  resistance to agree with the Simulink environment. The values of the inductor 200µH and capacitor 220 µF are calculated using equations 3.26 and 3.27. The procedure, used to calculate these values, is present in Chapter 5

45

Fig. 4.5 Buck converter and Controller blocks

To complete the system, a model for the controller, to drive the switching mechanism of the power MOSFET, was also developed as shown in Fig. 4.6. The PAO control algorithm varies the duty cycle of the input current, supplied by the PV cell, to allow the maximum power point (MPP) to be reached. Fig. 4.6 illustrates how the controller system was built.

Fig. 4.6 Controller Block Implementation The saw-tooth signal is compared to a controlled constant level with threshold value k . This level value k  will vary according to the algorithm implemented in the Sfunction block named threshold level.

46

The PAO algorithm depends on the present value of the current  I , and voltage V , and on the previous value of the threshold value k , and the power Pr  supplied by the

PV cell. The voltage V  and current I  are directly supplied to the 'threshold level' block while the constant k  and the power Pr  values are passed first through a delay box,  present in the Simulink library and labeled with

1  z

, to supply their previous values to

the 'threshold level' block as shown in Fig. 4.6. If this delay box is not inserted, the  present value of the power (I.V) will be compared with itself instead of being compared to the previous power Pr  value. The flow chart, describing the PAO tracking algorithm implemented in the Sfunction block named threshold level, is shown in Fig. 4.7. If the present value of the  power P(n) is greater than the previous value P(n-1), then the threshold value k  is incremented by an incremental step delta; this means that the duty cycle of the rectangular signal is increased. Otherwise the threshold value k  is decremented by delta; this means that the duty cycle d  of the rectangular signal is decreased.

Fig. 4.7 MPP tracking algorithm Flow Chart

47

Moreover as the duty cycle d  increases, then the average current I avg increases and vice versa. This is illustrated in Fig. 4.8 where the level value k 2 is larger than k 1, thus the duty cycle d 2 is larger than d 3. Therefore the average current I avg2 is greater than I avg1. The algorithm will keep changing the duty cycle until the MPP is reached. The matlab code for this algorithm is given in Appendix A.

Fig. 4.8 Different current levels with respect to variable duty cycle

To illustrate more on the PAO algorithm, consider the tracking scheme  presented in Fig. 4.9. The algorithm starts hunting for the maximum power point by changing the duty cycle d in a series of relatively large steps ∆. After each new step, it measures the voltage V s and current I s, multiplies their values, and compares the newly obtained power level Pn with the former value Pn-1. Two cases may arise as a result of this comparison: •

If the newly obtained power Pn is larger, the algorithm continues changing

the duty cycle d monotonically in the same direction, using the same step size delta ( ∆). •

If the newly obtained power Pn is lower, the algorithm reverses the direction ∆

of changing the duty cycle d, and divides the step size delta by two ( ) . 2 48

Eventually, the algorithm will reach a stage in its search for the maximum power point, where it jumps around the maximum power point in very fine steps. The algorithm should keep scanning, since the MPP is expected to vary due to changes of illumination and temperature depending on daytime, weather conditions, and shadow effects.

Fig. 4.9. MPPT tracking scheme using a variable step size

4.6. Battery Block

The load, in our case a battery, is approximated by a dc voltage source  V b in series with a small resistance r . The dc voltage source V b is set to 12V and the resistance r  is set to 0.01 Ω as shown in Fig. 4.10. The battery output voltage V out  will increase as

more current passes through the resistance r .

49

Fig. 4.10 Battery Model Block

Thus the over all, maximum power point tracking (MPPT), system is shown in Fig. 4.11. The Insolation value ( 1000 W/m2) and the temperature (22 oC ) are introduced as de-multiplexed inputs to the PV cell block using s-function constant value blocks.

Fig. 4.11 PV array 'MPPT' system

The current I in is also fed as an input to the PV cell; the load nature will force a current to flow through, after applying a voltage across the load. The current  I in is  passed first through a delay block to guarantee that the controller algorithm will compare the present value of the power with that of the previous (delayed) power; else the system simulation will not converge. With these three inputs ( I n, T , I s), the PV cell block will supply the output voltage V s. The controller will force the buck converter to draw more current  I in from

50

the PV cell until the MPP is reached. This way the buck converter will charge the  battery with maximum, PV cell, available power.

51

CHAPTER 5 MPPT SYSTEM IMPLEMENTATION

5.1. Introduction

In this chapter, the hardware and software design of the MPPT system is  presented and discussed. The system consists of a PV module, an H-bridge converter, a 12-volts lead acid battery, and a control circuit that uses the PIC16F874 microcontroller. The controller obtains the information (current and voltage) fro m the PV array through the microcontroller’s analog and digital (A/D) ports. The microcontroller performs the  pulse width modulation (PWM) to the dc-dc converter through its PWM built-in special register. It then finds the duty cycle at which the converter loads the PV module at the maximum power point (MPP) when charging the battery. The battery’s sta te of charge is also controlled by the microcontroller to protect the battery from being overcharged.

5.2. MPPT System

The complete solar MPPT system is shown in Fig. 5.1. However the most critical section of the MPPT system is that of the controller and converter. The controller should keep track and force the system to operate at the maximum power  point of the PV array as the weather conditions change. The dc-dc converter will charge the battery with maximum power available so any resistance or loss in the converter will contribute to power loss of the system.

52

 5.2.1. Microcontroller PIC16F874 microcontroller is used in the control section. This microcontroller is responsible for different tasks. The MPP tracking algorithm is implemented in the microcontroller. So it computes where the MPP of the PV array is and accordingly control the PWM scheme of the converter. It controls the A/D converter ports to represent the analog voltage V s and current I s of the PV array in digital format. It also monitors the state of charge of the battery to prevent overcharge damage. The PIC16F874 is a perfect combination of features, performance, and low power consumption for this application. It has 4K x 14 bits of flas h memory, 192 x 8 bytes of data memory (RAM), two D/A and five A/D channels.

Fig. 5.1 The PV maximum power point tracking system

53

 5.2.2. PV Array to PIC Interface Circuit The PV-PIC interface circuit shown in Fig. 5.1 provides the microcontroller with appropriate voltages that it can endure. The PV output voltage V s is fed to the microcontroller using a voltage divider circuit. The current  I s is fed to the microcontroller after passing through a 0.01 ohm resistance r s to get a voltage representation of the current. These analog voltages are fed to the microcontroller via two built in A/D channels to represent digitally the voltage V s and current I s of the PV array.

 5.2.3. H-bridge Converter The converter transfers energy from the PV array to the battery by regulating its output voltage to essentially match that of the battery. Since energy will flow in the converter, resistance heat loss, and switching losses should be minimized. To reduce these loses an H-bridge converter is used. The H-bridge reduces to and operates as a buck converter during each half switching cycle [22]. The H-bridge is discussed in the Hardware Design section.

 5.2.4. PIC-Converter Interface Circuit The PIC-Converter interface circuit is used to control the PWM scheme needed to drive the dc-dc converter. This board will include a phase splitter and a driver circuit that will provide the right signals to control the switching scheme of t he bridge. These signals should have the appropriate voltages to turn on or off the bridge switches.

54

5.3. Hardware Design

The schematics design and operation of the MPPT hardware system are discussed in the following sections. The PCB layouts are given in Appendix B.

 5.3.1. Controller and Converter Design The H-bridge converter that was discussed in Chapter 3 (pp. XX) was implemented as shown in Fig. 5.2. It employs electronic switches that are driven by square wave signals (50% duty cycle). This permits good operation at high frequencies, avoiding problems that may arise when using simple buck converter topology with variable duty cycle switching; after all the switch may fail to turn off when the off time Toff is small incase of a variable duty cycle switching as shown in Fig. 5.3 (b). Due to the ideality of the components, a simple buck converter was used in the Simulink model  because the case where the switch fails to turn off does not exist.

Fig. 5.2 Converter and Controller

55

Fig. 5.3 (a) 50% duty cycle switching (b) variable duty cycle s witching

The square wave signals that drive the bridge switches are phase-shifted by an amount equal to the turn-on time of the PWM microcontroller’s output. The control of the output voltage (V 1 – V 2) of this converter depends on controlling the phase difference between the voltages V 1 and V 2. This difference (V 1 – V 2) is the output of the switch bridge. Fig. 5.4 shows the impact of phase difference between V1 and V2, on the output of the bridge for a small and large phase difference. Fig. 5.5 and Fig. 5.6 show the bridge output when the phase difference is zero and 180o respectively. However in the software design, the duty cycle has an upper and lower limit as discussed later in the Software Design section.

Fig. 5.4 Bridge output due to small and large phase difference

56

Fig. 5.5 Case of zero phase difference between V1 and V2

Fig. 5.6 Case of V1 and V2 being out of phase

A phase splitter circuit is designed to generate the phase difference between V 1 and V 2. This circuit is controlled by the width of the pulses generated by the PWM output of the microcontroller. V 1 changes (inverts) its value with each rising edge of the PWM output (from 0 volts, to VDD). V 2 changes its value to follow that of V 1 with each falling edge of the PWM output (from VDD to 0 volts). This causes the output of the  bridge to become nonzero with the rising edge of the micro-controller’s PWM output, and zero with the falling edge. Fig. 5.7 below shows the rela tionship between the PWM waveform, and the waveforms of V 1 and V 2.

57

Fig. 5.7 PWM output controls the Bridge output

The output of the bridge is then rectified and filtered to give as a final result, a DC voltage that is directly proportional to the phase difference between V 1 and V 2 (subsequently proportional to the pulse width of the micro-controller’s PWM output). Fig. 5.8 shows the relationships between these s ignals.

Fig. 5.8 PWM, Bridge, Rectified and Filtered voltage waveforms

58

 5.3.2. Phase Splitter Circuit The phase splitter circuit provides two outputs. The first output (Square wave output A) changes with each rising edge of the micro-controller’s PWM output. The second output (Square wave output B) changes with the falling edge of the PWM output as shown in Fig. 5.9.

Fig. 5.9 Phase splitter output waveforms

To construct this circuit, two type–D edge–triggered flip–flops are used (7474). One (FF1) is used to toggle with each rising edge of the PWM output, as shown below in Fig. 5.10. The second (FF 2) is forced to follow the change of the first with each falling edge (rising edge of the inverted PWM wave). Changing the pulse width of the PWM output changes the phase difference between the output A and the output B.

59

Fig. 5.10 Phase splitter schematic diagram

 5.3.3. Switch Drivers ‘A’ and ‘B’ The bridge consists of four switches T 1, T 2, T 3, and T 4. These switches are, in fact, MOSFETs having high current handling capability (IRFZ46). To provide these MOSFETs with the right signals to turn on or off, a driver circuit is designed. T 1 and T 2 form a switch pair that controls the voltage V 1 and are driven by the

driver circuit ‘A’. T 3 and T 4 switch pair similarly controls the voltage V 2, and are driven  by the driver circuit ‘B’. The operation of the driver circuit A is next explained. The operation of the driver circuit B will be similar to that of driver circuit A.

Fig. 5.11 Driver A output waveforms 60

Switches T 1 and T 2 are operated by anti–phase driving signals (when T 1 is closed, T 2 is open and vice versa) as shown in Fig. 5.11. Furthermore, the anti – phase signals should provide a dead – time interval during the transitions to permit the complete turn OFF of the switch (that was ON), before turning ON the other switch; this is necessary to avoid the flow of excessive currents in the transition interval, due to  both switches being ON at the same time as shown in Fig. 5.12.

Fig. 5.12 Driver ‘A’ schematic diagram

The driver circuit shown in Fig. 5.12 provides driving pulses to the gates of transistors T 1 and T 2, with an amplitude of 12 volts to ensure the complete turn ON of the switch that should be in the active mode (to have a low ON state resistance), and a fast turn OFF of the switch that should be deactivated. The comparators are used to convert the 5 volts logic levels (microcontroller output) to the 12 volts logic levels used to drive the gates of the MOSFETs. The MOSFETs are driven with two anti-phase signals. The 1 k Ω and the 1 nF capacitors are

61

used to delay the turn ON of each transistor, for an interval sufficient to make sure that the other transistor reaches the OFF state, when turned OFF. The clearance interval (dead time) is labeled by T d  in Fig. 5.12. Quick turn OFF is achieved by rapidly discharging the gate capacitance, and the 1nf capacitor, using a diode (D 1 and D2) that  provides low resistance path for discharging current. Fig. 5.13 shows the details of operation for the gate circuit. The MOSFET will not turn ON, till the voltage between the gate and source reaches the threshold value (about 3 volts).

Fig. 5.13 Charging and discharging stages

 5.3.4. H-bridge The standard H-bridge transformer coupled converter is shown in Fig. 5.14. Switches T 1 and T 2 are driven by anti – phase signals generated by the driver circuit A. Similarly switches T 3 and T 4 are driven by anti – phase signals generated by the driver circuit B. These switches are n-channel enhanced mode power MOSFETs IRFZ46 that are characterized with its high speed-switching capabilities [23]. The device is rated at 50V and 50A, which means that the rating is well above maximum operating voltage

62

and current which are 20 V and 6 A of the converter. It has a maximum leakage current of only 100 nA and very low on state resistance of 0.024Ω and hence small conduction loss that makes it a highly efficient switching device.

Fig. 5.14 Bridge Converter schematic diagram

Although not shown in figure, each transistor is equipped with a built – i n fast  – recovery power diode that provides a path for free – wheeling currents that flow during certain phases of operation.

 5.3.5. Transformer, Rectifier, and Filter Circuit Fig. 5.15 shows the schematics for the transformer, rectifier and filter with the voltage waveforms present at each stage. The transformer used here has a voltage

63

transformation ratio of 1:1.5. Fast recovery diodes are used to rectify the bridge output  by providing a unidirectional voltage. This voltage is then filtered to produce DC output that is equal to the average value of the pulse train.

Fig. 5.15 Transformer, Rectifier and Filter waveforms

The elements of the rectifier and filter are chosen on the following basis. •

 Inductor

Inductor design is almost the hardest among the other elements since there is no variety of inductor values in the market. The inductor has a certain number of turns winded around a coil to establish the inductance needed f or the converter. However any additional turn (additional wire length) will add to the coil resistance value. This additional value will contribute to resistance loss. The value of inductance is calculated by considering the extreme case; when the PV array operates at its maximum capacity (70 Watts). Therefore the output current can be calculated by using the equation Pout  = V o × I o Hence, Io = Po / Vo = 70 / 12 = 5.8 Amps

64

As discussed in section 3.3.2.1, the amplitude of the inductor current ripple is selected to be 10% of its dc value. (i.e. ∆ I  L = Io × 0.1 = 5.8 × 0.1 = 0.58A). If the converter is assumed to operate at frequency 40 kHz (i.e. Ts = 25 µs), and the inductor current is assumed to be equal to the output current having 10% current ripple. Equation (3.27) gives:  L =

V 0 ∆ I  L

(1 − D)T s

where D is the duty cycle and is calculated using equation (3.13) D = Vo/Vd = 12/18 = 0.65 Thus the inductance value is L = (12 × 0.35 × 25 × 10 -6) / (0.58) = 181µH This is the least inductance value that can endure a current of 5.8 A, so an inductor of 200µH is chosen for the converter.



Capacitor

To obtain a desired output voltage ripple, the capacit or value is determined. Once again, the extreme case is considered. The output current is 4.1A, D = 0.65, Ts = 25µs. Assume that the output voltage ripple is 0.1% of its dc value (i.e. ∆Vo = 0.012V). Equation (3.26) gives: C=

=

1 ∆Vo



1 2



∆ I  L

2





2

Then C = (0.58 × 25 × 10 -6) / (8 × 0.012) = 150 µF The minimum capacitance value needed for the converter is 150µF. Hence, a 220µF is chosen for the design smooth more the ripple voltage.

65



 Diode

Diode choice is a trade off between forward bias voltage, and speed. Higher forward bias voltage will result in more power dissipation and loss. Moreover, a fast diode that can switch at high frequencies is needed. If the diode is slow to react, the efficiency of the converter will drop. The best diode combining these features, that could be found, was the STPS3045CPI from SGS-THOMSON. It has 0.57v of forward drop at the expected currents of 15A.

5.4. Software Design

The next step in the design is to implement the MPP tracking algorithm on the microcontroller chip. The PIC16F874 microcontroller is used to carry out the algorithm function. It operates at speed of 10MHz so each instruction code will be executed at 0.4µs. The program is written in assembly language and is given in Appendix C. A new strategy in programming the PIC 16F874 chip to track the MPP is adopted. This new strategy is based on the Perturb and Observe (PAO) technique using an adaptive incremental step scheme. The maximum power point is quickly hunted using a variable step size. This adaptive technique reduces the number of iterations needed to catch this MPP, thus resulting in much faster tracking compared to conventional methods [24].

 5.4.1. Main Program The main program flow chart is shown in Fig. 5.16. The program starts by initializing the A/D module and the PWM module. Then the battery s tate of charge is checked to prevent overcharge damage. The PWM module is turned off at this stage and the program runs A/D conversion to measure the bat tery voltage. The measured

66

voltage is then compared to a predefined value (13.8V) to determine the state of charge of the battery. If the battery voltage is greater than 13.8V (almost fully c harged) the  program goes to sleep for 1 second and then goes back to measure the battery voltage again. If the battery voltage is less than 13.8V the program goes to the ChargingTracking mode.

Fig. 5.16 Main Program Flow Chart

 5.4.2. Charging-Tracking mode The microcontroller has a PWM output, having a duty cycle that is controllable  by the microcontroller’s software. The micro-controller provides a duty – cycle ratio limited to the range [1/255

254/255]. The microcontroller starts hunting for the

maximum power point by changing the duty cycle in a series of relatively large steps. After each new step, it measures the solar voltage V s and current I s using the PIC built in

67

A/D channels, multiplies their digital representation, and compares the newly obtained  power level with the former value. The flow chart for the conventional PAO algorithm is shown in Fig. 5.17. If the newly obtained power  Pn is larger than the previous power value Pn-1, the microcontroller continues changing the duty cycle d  monotonically in the same direction, using the same step size delta (∆). Otherwise the microcontroller reverses the direction of changing the duty cycle, and divides the step s ize delta by two (



2

). The

microcontroller will finally lock on the MPP with fine step size as shown before in Fig. 4.9.

Fig. 5.17 The conventional PAO algorithm Flow Chart

This algorithm showed good performance for stable weather conditions where the tracking efficiency ξTr  reached 95%. However, this algorithm fails to track the MPP

68

correctly in case of rapidly varying weather conditions where ξTr  deteriorated to less than 85%. This is due to the small incremental step that was reached while tracking the old MPP. This small incremental step would continue to be used when searching for the new MPP as shown in Fig. 5.18, which will increase the number of ite rations needed to lock on the new MPP. When frequent weather changes occur, the s ystem will not be able to track and lock onto the new MPP.

Fig. 5.18 Scanning with small step in case of varying weather conditions

To improve the performance of the conventional PAO algorithm, an adaptive PAO algorithm is implemented. The flow chart for the adaptive PAO algorithm is shown in Fig. 5.19. The micro-controller provides a duty–cycle ratio limited to the range [1/255

254/255]. The microcontroller starts with a duty–cycle ratio of 1/255. It

increments the duty cycle in steps of 32/255 as long as it detects that the power extracted from the PV module increases with each step (∆). When power drop is detected, the software starts decrementing the duty cycle. However the new step size (



2

) is half the step size used in the previous stage. The process of reversing the

69

scanning direction, while decrementing the duty cycle, continues until the step size reaches the value 1/255.

Fig. 5.19 The adaptive PAO algorithm flow chart

Three different cases may arise:



Starting up from zero power conditions

The microcontroller starts with a duty–cycle ratio of 1/255. It increments the duty cycle in steps of 32/255 as long as it detects that the power extracted from the PV module increases with each step (∆) as shown in Fig. 5.20.

70

Fig. 5.20 Hunting with large step size



However, when a power drop is detected, the software starts decrementing the duty cycle with a new step size (



2

) that is half the step size used in the previous stage.

As long as the power increases, the microcontroller continues to decrement the dutycycle ratio as shown in Fig. 5.21.

Fig. 5.21 Hunting with smaller step size



2

When another power drop is detected, the software increments its duty-cycle ratio with a new step size equal to half the previous step size. The process of reversing the scanning direction, while decrementing the duty cycle, c ontinues until the step size reaches the value 1/255 as shown in Fig. 5.22. In summary, the algorithm starts by increasing the duty cycle by a given step size ∆. For each increment, power is calculated

71

so that when a power drop is detected the scanning direction is reversed and the duty cycle is decreased by a new step size ∆/2 equal to half the previous step.

Fig. 5.22 MPP scanning direction



 Hunting around the peak power point

As long as the illumination condition does not change, the microcontroller’s software keeps hunting around the MPP with increments/decrements of 1/255, as shown in Fig. 5.23.

Fig. 5.23 Locking on the MPP with duty-cycle ratio 1/255

72



Changes in the illumination condition

Illumination will vary due to changing weather conditions (presence or a bsence of clouds). Hunting for the MPP, the microcontroller detects the power change while changing the pulse width. If the power increases, as shown in Fig. 5.24(a), the microcontroller continues to change the pulse width in the s ame direction causing this  power increase. After four consecutive steps in the same direction, the microcontroller doubles the step size to speed up the process of tracking the new MPP. Similarly, if power decreases the microcontroller starts scanning by a small step. After four consecutive steps in the same direction, it doubles the step size to speed up the  process of tracking the new MPP as shown in Fig. 5.24(b).

Fig. 5.24 Scanning in case of varying weather conditions

73

CHAPTER 6 SYSTEM RESULTS AND DISCUSSION

6.1. Introduction

The objective of this thesis is to evaluate the model that represents a standalone PV system charging a lead acid battery through Simulink simulation and present results of the experimental setup. The Simulink and experimental part consists of the BP380 solar module (Appendix D), an H-bridge converter, a controller, and a 70Ah  battery that were discussed in Chapters 4 and 5. Results will be presented to assess how efficient is the algorithm, implemented in the controller, in tracking the MPP; i.e. how much power is extracted from the PV array. The model will also examine the power electronics efficiency; i.e. how much power is delivered to the battery.

6.2. PV Model Validation

The PV Simulink model is tested under different atmospheric conditions to  prove its validity. It is first simulated for different insolation levels while keeping the temperature constant (23oC ) as shown in Fig. 6.1 and Fig. 6.2. Then it is tested for 2

different temperatures while keeping the Insolation constant (1000 W/m ) as shown in Fig. 6.3 and Fig. 6.4 [9]. To draw the real life characteristic curves, the 'BP 380' PV module was subjected to a variable load circuit shown in Fig. 6.5. The computer issues a series of increasing digits that are converted to analog voltages using a D/A converter (R-2R ladder). These increasing digits will load the PV module with increasing current  I T = 4 I C  ≈ 4 I  E  = V* / R ≈ V in / R). Recording the values of the PV value I T (where  

currents I T and their respective PV voltages V T,  the module characteristic curves were   74

drawn as shown in Fig. 6.6, where this model also proved its vali dity under the influence of varied insolation levels and different cell temperatures.

Fig. 6.1 I-V characteristic curves for different Insolation levels

Fig. 6.2 P-V characteristic curves for different Insolation levels

75

Fig. 6.3 I-V characteristic curves for different temperatures

Fig. 6.4 P-V characteristic curves for different temperatures

It was observed that the short circuit current I sc of the PV module depends linearly on the irradiation , while the open-circuit voltage V oc increases logarithmically

76

with irradiation, as shown in Fig. 6.1 [25]. Increasing the cell temperature would decrease the open circuit voltage V oc. The results relates to the theory that can be found in chapter 3 [2] .

Fig. 6.5 Load circuit schematic diagram

Fig. 6.6 PV characteristic curves under different Insolation levels

To test if the Simulink model and the hardware model match, the characteristic curves of BP380 solar panel were first drawn using the load circuit as shown in Fig. 6.7, where the reported radiation flux and temperature were 523.44W/m 2 and 16.81 oC respectively on the eleventh of January, 2005 at 2:33 pm. Then these curves were drawn, for the same data, using the Simulink model as shown in Fig. 6.8. The MPP 77

reading of the hardware model was 40.42W, and that of the Simulink model was 40.76W, which shows that they agree fairly well.

Fig. 6.7 Characteristic curves of the 'BP 380' PV module using the load circuit

Fig. 6.8 Characteristic curves of the 'BP 380' PV module using the Simulink model

6.3. Simulink Simulation Results

The MPPT Simulink model shown in Fig. 6.9 was simulated for different temperature and insolation level values. After each run the power, extracted by the MPPT system, was recorded and then compared to the PV module maximum affordable  power. Fig. 10 shows the P-V characteristic curve of the PV module for an Insolation level 800W/m2 and temperature 27oC. The graph readings of the MPP, are:  I mpp = 3.59A, V mpp= 18V and Pmpp= 64.7W.

78

Fig. 6.9 MPPT Simulink Model

With the adaptive PAO algorithm implemented in the controller, the MPPT system was simulated for the same input data (T = 27oC  and I n = 800W/m2). The average values of the switching current, voltage and power were recoded as follows: Pavg = 62.5W , I avg = 3.8 A and V avg = 16.4V  as shown in Fig. 6.11. These recorded values prove that the PAO algorithm tracking efficiency is about 96% ( ξT = 62.5/ 64.7 = 0.96).

Fig. 6.10 P-V characteristic curve of the PV array at 800W/m2, 27oC

79

The power electronics efficiency in the Simulink model is also assessed. The  power delivered to the battery, for the same case, came to be 48W, which means that the  power electronics efficiency is only 80% (ξPE = 50/62.5 = 0.8) as shown in Fig. 6.12.

Fig. 6.11 Switching Power, Voltage, and Current supplied to the converter

Fig. 6.12 Power, Voltage, and Current delivered to the battery 80

6.4. Hardware Results

The MPPT hardware system was also examined for different weather conditions. First the variable load circuit was used to record the MPP data of the PV module on a clear sunny day at noontime in October as shown in Table 6.1. The MPP readings came to be: I mpp = 4.13A, V mpp= 13.6V and Pmpp= 56.16W. The characteristic curves were also plotted as shown in Fig. 6.13.

Fig. 6.13 characteristic curves: (a) I-V curve, (b) P-V curve

Table 6.1 MPP readings on a sunny day in October

81

Immediately after recording the MPP data, the MPPT hardware system was set into action. The visual basic VB program, developed to draw the voltage, current, and  power versus time during tracking action, recorded the following data: Psavg = 53.4W ,  Isavg = 4.1A and Vsavg = 13V  as shown in Fig. 6.14, where Psavg is the power extracted

form the solar panel. Then the tracking efficiency was calculated as: ξT = Psavg / Pmpp = 53.4 / 56.168 = 0.95. The power electronics efficiency was also measured: ξPE  = Pb / Psavg =43.3/ 53.4 = 0.81 , where Pb is the average voltage delivered to the battery.

Fig. 6.14 VB performance monitor

Table 6.2 shows a few selected results taken on various dates and different daytimes for few minutes of MPPT system operation. It is worth mentioning that as the solar current I s increases, the power electronics efficiency decreases. This is due to the fact that the power losses in the hardware design are calculated as the square of the solar current I s multiplied by the equivalent resistance (Ploss = I 2 R), while the input power is directly proportional to the current and voltage (Pinput= I V ). Table 6.3 presents the daily average reading obtained between 10:00 am and 5:00 pm for the various mentioned 82

dates. The average value for the tracking efficiency was recognized at 95% while the  power electronics efficiency at 80% only.

Table 6.2 Snapshots of MPP Recorded Data Date-Hour 29/4/2004 12:50 pm 29/4/2004 3:40 pm 30/4/2004 3:30 pm 30/4/2004 5:13 pm 20/10/2004 11:35 am 20/10/2004 11:55 am 23/11/2004 10:30 am 23/11/2004 10:40 am

Weather condition

Pmmp (W)

 I s (A)

V s (V)

Ps (W)

Pb (W)

Sunny day Few clouds Sunny day Few clouds Sunny day Few clouds Sunny day Few clouds Hot Sunny day Hot Sunny day Cold Sunny day Cold Sunny day

53.4

3.28

15.37

50.42

50

3.0

15.77

51

3.18

46.4

ξT

ξPE 

39.8

% 94.4

% 78.9

47.32

38

94.6

80.3

15.12

48.09

38.48

94.3

80

2.85

15.51

44.21

36

95.2

81.4

56

3.4

15.51

52.75

41.8

94.2

79.2

58

3.3

16.82

55.68

45.34

96

81.4

49.79

3.06

15.68

48

38.7

96.4

80.6

50.5

3.06

15.68

48

38.7

95

80.6

Table 6.3 MPP Daily average Recorded Data 2004 Date 29/4/2004 30/4/2004 20/10/2004 23/10/2004 23/11/2004 24/11/2004

Weather condition Sunny day Few clouds Sunny day Few clouds Hot Sunny day Hot Sunny day Cold Sunny day Cold Sunny day

Pmmp(W)

Ps(W)

Pb (W)

ξT %

ξPE  %

49.9

47.47

37.97

95

80

49.8

47.2

38.2

94.7

81

54.7

52.32

42

95.6

80.3

54.4

51.8

41

95.2

79

62.7

59.7

48.9

95.2

82

60.4

57.5

46.2

95.2

80

95

80

Average value

83

On a cold sunny day, the average power extracted from the PV module is greater than that of a hot sunny day. This is due to the fact that V oc increases as temperature decreases. Consequently the MPP value is raised as shown in Fig. 6.4. Fig. 6.15 shows how fast is the PAO algorithm, implemented inside the controller, in tracking the MPP in case of changing weather conditions (varying insolation level due to the presence of clouds).

Fig. 6.15 Tracking the MPP in case of varying Insolation level

The peaks, present inside the circled region, occur when the MPPT system starts up and quickly searches for the duty cycle, which loads the PV module at the MPP. These peaks are issued due to the VB software failure in interpreting the first input byte by the micrcontroller at startup. These peaks are present for just few microseconds. Curve (a) represents the PV module varying MPP values due to changing

84

weather conditions while curve (b) represents the power extracted from the PV module. Still the tracking efficiency ξTr  was 95% on average.

6.5. Comparison of Tracking Algorithms

The adaptive PAO algorithm showed better performance than t he conventional PAO described in the literature [ 14] under varying weather conditions  because it can lock on the new MPP with less time than the conventional PAO can. To compare between the two algorithms, two cases are considered. The first case compares  between the speeds of the algorithms for a minor change in the weather conditions while the second compares between the speeds for a major change in the weather conditions.

6.5.1. Minor change in the weather conditions The conventional PAO algorithm locks on the MPP with a small incre mental step size ∆c of value 1/255. So if a quick change in the weat her conditions occurs, the conventional PAO algorithms starts searching for the new MPP with this small incremental step as shown in Fig. 6.16. In the shown case the old MPP readings were recognized at 50.76W and 2.75A for a 600W/m 2 radiation flux and 27 oC temperature, while the new MPP readings at 77.86W and 4.14A for a 900W/m 2 radiation flux and 27oC temperature. The current values for the old and new MPP on the 255 scale are 117 and 176. For the conventional PAO method, 60 iterations are needed to lock on the new MPP (176-117= 59, 59+1=60). In the adaptive PAO method, the incremental step

∆a

is

doubled after four consecutive increasing power steps. This way the number of iterations is reduced to 21 based on the tracking scheme shown in Table 6.4. This table

85

shows how the incremental step is changing as the power is increasing or decreasing. The initial incremental step ∆a is taken to be 1 assuming that system was locking on a MPP. So after four consecutive steps the current is 121 (=117 + 1 × 4). Since the power is still increasing the incremental step is doubled (2×1) and after four consecutive steps the current is 129 (=121+4 ×2). The scanning method will continue until a power drop is sensed, where the scanning direction will be reversed, the incremental step is halved and the increments will be changed into decrements and vice versa. When the value of the current reaches 177, a power drop is sensed so the direction of scanning is reversed, the incremental step is halved (4), and the current is decremented. After one iteration the value of the current reaches 173 (=177 – 1 × 4)) where another power drop is detected, so again the direction of scanning is reversed, the incremental step is halved (2), but now the current is incremented. This tracking scheme will continue until the incremental step ∆a reached the smallest value i.e. one at the MPP. This means that the adaptive PAO scheme is 2.875 (60/21) times faster than the conventional one. Thus the tracking efficiency was increased by 10% using this adaptive technique where it was 85% on the best estimate for the conventional algorithm.

Fig. 6.16 Tracking scheme for minor change in the weather conditions 86

Table 6.4 Tracking with adaptive incremental step ∆a ∆a

value 

1

Previous current value 117

 Number of iterations 4

 Number of increments 4

 New current value 121

Power condition increase

2

121

4

8

129

increase

4

129

4

16

145

increase

8

145

4

32

177

drop

4

177

1

-4

173

drop

2

173

2

4

177

drop

1

177

2

-2

175

drop

Total number of iterations

21

6.5.1. Major change in the weather conditions In this case the old MPP readings were recognized at 22.4W and 1.36A for a 300W/m2 radiation flux and 30 oC temperature, while the new MPP readings at 82.4W and 4.56A for a 1000W/m 2 radiation flux and 30 oC temperature as shown in Fig. 6.17. The current values for the old and new MPP on the 255 scal e are 58 and 194. For the conventional PAO method, 137 iterations are needed to lock on the new MPP (194-58= 136, 136+1=137). In the adaptive PAO method, the number of iterations is reduced to 33 based on the tracking scheme shown in Table 6.5 where exactly t he same procedure is followed as in the previous case. So the adaptive PAO scheme is 4.1 (=137/ 33) ti mes faster than the conventional one in this case. Therefore the adaptive PAO algorithm reacts faster than the conventional one, especially under quickly varying weather conditions where the conventional technique fails to track the MPP correctly.

87

Fig. 6.17 Tracking scheme for major change in the weather conditions

Table 6.5 Scanning with adaptive incremental step ∆a

value 

∆a

1

Previous current value 58

 Number of iterations 4

 Number of increments 4

 New current value 62

Power condition increase

2

62

4

8

70

increase

4

70

4

16

86

increase

8

86

4

32

118

increase

16

118

4

64

182

increase

32

182

1

32

214

drop

16

214

2

-32

182

drop

8

182

2

16

198

drop

4

198

2

-8

190

drop

2

190

3

6

196

drop

1

196

3

-3

193

drop

Total number of iterations

33

88

6.6. Power Budget

The power losses in the whole design system is calculated and summarized in Table 6.6. The MPPT system was assumed to operate at MPP (70W) and the switching frequency f  of 40 kHz ( T  = 1/ f  = 25µs) with the duty cycle  D set to 65%. The load current I  L was 5.8A and a battery voltage of 12V.

6.6.1. Inductor conduction loss The conduction loss in the inductor can be found by considering the load current and the winding copper resistance. The measure d inductor current is equal to 5.8A and the measured inductor resistance is 0.03Ω. Therefore, the power loss due to the conduction loss in the inductor is: Pind = I 2ind  . Rind  = 1.009W 6.6.2. Diode conduction loss The diode conduction loss can be calculated using the following equation: Pd  = I  L . V  f  = 3.306W

where, from data sheet the forward bias of the diode, V  f  = 0.57V.

6.6.3. MOSFET conduction loss

Fig. 6.18 shows the waveform for the current  Ip that flows in the primary winding of the transformer T 5 shown before in Fig. 5.14. Since the transformer turns ratio is 1:1.5, then:  Ipon = 1.5  I  L = 8.7A.

89

Fig. 6.18 Primary winding current waveform

The power loss due to the MOSFETs conduction loss is cal culated by considering the switching current waveforms for each pair of switches as shown in Fig. 6.19. 2

PTr  = (Ipon) . Ron. t on  /(2T) = 0.59W

Where, D = t on / T and from data sheet the on resistance of the MOSFET, R on = 0.024Ω. Then the power loss PTR for the four MOSFETs is: PTR = 4.PTr = 2.36W

Fig. 6.19 Waveforms across the terminals of the transformer

90

6.5.4. Transformer power loss The measured resistance for the primary winding R pri is 0.0053Ω while that of the secondary winding  Rsec is 0.012Ω. The waveforms for the current that flows in the secondary winding of the transformer and the rectifying diodes ( D1 and D2) are shown in Fig. 6.20.

Fig. 6.20 Diodes’ current waveform during different intervals

Thus the average power loss in the transformer windings over one cycle can be divided into two intervals t 1 and t2. During interval t1, only diode  D1 of Fig. 5.14 is conducting so the primary winding and half of the secondary winding contribute to power loss as shown in Fig. 6.21(a). During interval t 2, both diodes are conducting so only the secondary winding contribute to the power losses as shown in Fig. 6.21(b). These two intervals will repeat  but for the next MOSFETs switching period where diode  D2 will be conducting as shown in Fig. 6.21(c).

91

Fig. 6.21 Transformer windings contribution to power loss

Thus the energy loss in the transformer during interval t1 can be calculated as: 2

2

 E t1  = [(Ipon)  . R pri + (I  L) . Rsec ]. t on

During interval t2 the energy loss is calculated as: 2

 E t2  = 2 . [(I  L /2) . Rsec] . (T-t on)

The average power loss in the transformer Ptrans over one period T  is given by: Ptrans = (E t1  + E t2  )/ T  = 0.594W

6.5.5. Other power loss factors Other factors contribute to power loss, among which are the voltage and current sensing circuit, the microcontroller circuit, the printed copper track resistances and copper wiring resistance. A rough estimate calculation was made for the power loss due to these factors and was found to be 6W.

92

Table 6.5 Power Budget

Component BP380 Solar Panel

Power Budget Input Power

Power Loss

70W

Inductor

1.009W

Diode

3.306W

MOSFETs

2.36W

Transformer

0.594W

Other Factors

6W

Balance

70W- 13.27W= 56.73W

Power electronics efficiency

ξPE = 56.73/ 70 = 81%

93

CHAPTER 7 CONCLUSION AND FUTURE WORK 7.1. Summary

Photovoltaic power production is gaining more significance as a renewable energy source due to its many advantages. These advantages include pollution free energy production scheme, ease of maintenance, no noise and direct sunbeam to electricity conversion [29]. However the high cost of PV installations still forms an obstacle for this technology. Moreover the PV array output power fluctuates as the weather conditions, such as the Insolation level, and cell temperature. In order to make use of the high initial cost it is very important to extract maximum power from the solar  panels for all weather conditions [30]. Stand-alone PV systems cannot supply enough energy all day long or when no or little solar irradiation exits. Battery storage capabilities are required in these systems. So when the PV array is used as a source of power supply to charge a 12V lead acid battery, it is necessary to use the MPPT to get maximum power from the PV array. In this work, the MPPT is implemented by using an H-bridge converter, which is designed to operate under continuous conduction mode and a microcontroller to control the PWM signals to the converter and also to monitor the state of charge of the battery. The Perturb and Observe Algorithm is used as the control algorithm for the MPPT.

7.2. Testing Environment

The solar system consists of an 80W PV module, a converter, a controller and a 70Ah battery. The system was designed, built and tested for a period of ten months and

94

for different weather conditions. As the main system component, an H-bridge converter was constructed for the design. By changing the transformer windings ratio, this bridge can be easily made to work as either a buck or a boost converter. A turn ratio greater than one means that the output signal will be amplified resulting in a boosted signal, whereby a turn ratio smaller than one will result in reducing the output signal amplitude which is the case of buck converter. Moreover unlike the buck converter, the H-bridge converter operates with 50% duty cycle driving signals, which reduces the switching failure associated with the buck converter during the turning on or off transitions for small or large duty cycle driving signals. However the H-bridge converter has four switching devices while the buck converter has only one. Having an excellent combination of features, performance, and low power consumption, the PIC16F874 microcontroller is used in the control section. It has 4K x 14 bits of flash memory, 192 x 8 bytes of data memory (RAM), two D/A and five A/D channels. The tracking algorithm is implemented in the microcontroller where it senses the present values of the solar current and voltage and compares resultant power with the previous power and accordingly controls the PWM scheme of the converter.

7.3. Better Tracking Algorithm

The Perturb and Observe, Incremental Conductance, and other maximum  power point tracking algorithms were reviewed and discussed. Although the ICT technique offers higher tracking efficiency, the PAO algorithm was chosen to track the MPP since it has lower cost, easier circuitry and less complicated algorithm. However the conventional PAO was developed to respond faster for quickly varying weather conditions. An adaptive incremental step was introduced where the performance of the

95

algorithm was 2.5 to 4 times faster than the conventional one depending on the location of the new MPP with respect to the old one. Moreover experimental results have shown that the MPPT using an adaptive PAO has a tracking efficiency of 95% with a converter efficiency examined and measured to be 80%.

7.4. Simulink Model

The solar system was also designed and simulated using the matlab Simulink environment. A model that represents the solar module was created using the Simulink S-function capability. The controller was also implemented with the help of the Sfunction block. The converter and battery were modeled using the Simulink power electronics library. To match the hardware system and the Simulink software simulation model, both were tested for a specific flux density and temperature. The MPP reading of both systems showed that they match up as high as 99%.

7.5. Future Work

The MPPT system that was designed and tested can achieve 76% of total conversion efficiency so it is still possible to improve its efficiency. The component choice is very important in the design of the MPPT system. Higher power conversion efficiency can be achieved by using rectifying diodes with less forward bias voltages, inductors of lower resistive material, transformer with high magnetic flux density, and MOSFETs with lower on-state resistance. Moreover the size of the MPPT could be more compact if surface mount devices SMDs are used and if the system is to operate at higher switching frequencies where the size of the inductor and transformer will be reduced. This is part of what should be done in the future for a simple stand-alone PV

96

system. However to build a complete system utilizing solar energy for power generation, a highly efficient dc-ac converter should be implemented. Now instead of controlling four, six switches should be driven by the control section where it should keep supplying the correct phase (120 o) between the lines. Moreover the transformerwinding ratio should be carefully chosen to provide 220V on the secondary windings.

97

APPENDIX A MATLAB PROGRAM CODE function k = pulse01(t,x,u)

k(1) I V Pr delta Pn

= u(1); = u(2); = u(3); = u(4); = u(5); = I * V;

if(delta > 0.000000001) if (Pn >= Pr) k(1) = k(1) + delta; if (k(1) < 3) k(1) = 3; end if (k(1) > 24) k(1) = 23; end

elseif (Pn < Pr) delta = delta/2; k(1) = k(1) - delta; if (k(1) < 3) k(1) =3; end if (k(1) > 24) k(1) = 23; end end end k(3) = (delta); Pr = Pn;

98

k(2) = Pr;

function [sys,x0,str,ts]= pulse01_s(t,x,u,flag) switch flag, case 0 %

Initialization

s = simsizes; s.NumContStates s.NumDiscStates s.NumOutputs s.NumInputs s.DirFeedthrough s.NumSampleTimes

= 0; = 0; = 3; = 5; = 1; = 1;

% dynamically sized % dynamically sized % has direct feedthrough

sys = simsizes(s); x0 = []; str = []; ts = [-1 0]; % inherited sample time

case 3 sys= pulse01(t,x,u); case { 1, 2, 4, 9 } sys=[]; otherwise error(['Unhandled flag = ',num2str(flag)]); end

99

% this mfile represents the PV module voltage and current relations. % it has three inputs which are the insolation G, the temperature T and the current I function V = PV_Cell(t,x,u)

G= u(1); %here is the 1st input G T= u(2); %here is the 2nd input T I= u(3); %here is the 3rd input I

Rs=0.1; Rsh=10000; Gnom=1000; k=1.38e-23; q=1.6e-19; A=1.5; Vg=1.12;  Ns=36; Voc_T1=22.1/Ns; T1=273+25; T3=273+75; Isc_T1=4.8; Isc_T3=5.04; T0=273+T ; %T k0=(Isc_T3-Isc_T1)/(T3-T1); I0_T1=Isc_T1/(exp((q*Voc_T1)/(A*k*T1))-1);  b=(Vg*q)/(A*k);  b1=q/(A*k*T0); Iph_T1=Isc_T1*G/Gnom; %G Iph=Iph_T1*(1+k0*(T0-T1)); I0=I0_T1*[(T0/T1)^ (3/A)]*[exp(-b*[(1/T0)-(1/T1)])]; Isc=(k0*(T0-T1)+Isc_T1); % Output Voltage: if (I >= Iph) V=0; else V=(1/b1)*[log(((Iph-I)/I0)+1)]*36; end

100

function [sys,x0,str,ts]= PV_Cell_s(t,x,u,flag) switch flag, case 0 % Initialization ; s = simsizes; s.NumContStates = 0; s.NumDiscStates = 0; s.NumOutputs = 1; % dynamically sized s.NumInputs = 3; % dynamically sized s.DirFeedthrough = 1; % has direct feedthrough s.NumSampleTimes = 1; sys = simsizes(s); x0 = []; str = []; ts = [-1 0]; % inherited sample time

case 3 sys= PV_Cell(t,x,u); case { 1, 2, 4, 9 } sys=[]; otherwise error(['Unhandled flag = ',num2str(flag)]); end

101

APPENDIX B PCB CIRCUIT DESIGN

Current and voltage sensing circuitry

102

H-Bridge circuit

103

Transformer, Rectifier, Filter circuit

Load circuit

104

APPENDIX C ASSEMBLY PROGRAM CODE #INCLUDE<P16F874A.INC> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;registers LOOP COUNTER VACCUH VACCUL IACCUH IACCUL REFH REFL

EQU

EQU EQU

H'20' EQU H'21' EQU H'22' EQU H'23' EQU H'24' EQU H'25' H'26' H'27'

TESTH EQU H'28' TESTL EQU H'29' DIRECTION EQU H'2A' STEP EQU H'2B' SAME EQU H'2C' RESULT EQU H'2D' OUTPUTVALEQU H'2E' SCRATCHH EQU H'2F' SCRATCHL EQU TEMPO SHFTCOUNT EQU ACCUH

H'30' EQU H'31' H'32' EQU H'33'

ACCUL SHIFTH SHIFTL ROTATERI

EQU H'34' EQU H'35' EQU H'36' H'37'

EQU

FLAG EQU H'38' VAVERAGE EQU H'39' IAVERAGE EQU H'3A' PERIOD EQU H'3B'

105

DEFAULTTIME EQU H'3C' SCRATPER EQU H'3D' SCRAT1PER EQU H'3E' RIPPLEREG EQU H'3F' DELDUMMY EQU H'40' VOREG EQU H'41' PARAMETERTURN EQU H'42' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;constants VPOINTER EQU H'81' IPOINTER EQU H'89' VOPOINTER EQU H'91' RIPPLEINP EQU H'99' IOINP EQU H'A1' MINIDUTYCYC MAXDUTYCYC

EQU H'01' EQU H'FE'

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;startup vector ORG H'0000' GOTO MAIN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;interrupt vector ORG H'0004' GOTO ISR ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; main

;precautions MOVLW MOVWF MOVWF

H'00' PORTD PORTB

106

;preparing variables ;loop register CLRF LOOP ;defaulttime register MOVLW MOVWF

H'04' DEFAULTTIME

;same register (no. of passes before incrementing step) MOVLW MOVWF

H'07' SAME

;initialization of step register by 32 decimal (H'20') MOVLW MOVWF

H'20' STEP

;initialization of direction register CLRF DIRECTION ;initialization of reference register CLRF REFH CLRF REFL ;initialization of result register MOVLW MOVWF

H'30' RESULT

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;port configuration BSF

STATUS,RP0

;A - analog input MOVLW MOVWF

H'FF' TRISA

107

;B - digital output - duty cycle variable MOVLW MOVWF

H'00' TRISB

;C - pin no.1: capture input ;C - pin no.2: pwm output ;C - pin no.6: serial communication with pc (TX)(PROJECTED) ;C - pin no.7: serial communication with pc (RX)(PROJECTED) MOVLW MOVWF

H'B3' TRISC

;E - analog input MOVLW MOVWF

H'07' TRISE

;D - digital output MOVLW MOVWF BCF

H'00' TRISD

STATUS,RP0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;pwm preparation ;setting timer2 period BSF

STATUS,RP0

MOVLW MOVWF BCF

H'40' PR2

STATUS,RP0

;setting a dummy pulse width for startup MOVLW MOVWF

H'20' CCPR1L

;activate timer 2 with zero prescaling on input and output MOVLW

H'04'

108

MOVWF

T2CON

;setting pwm mode for module 1 MOVLW MOVWF

H'0F' CCP1CON

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;capture preparation ;setting the mode of timer1 MOVLW MOVWF

H'05' T1CON

;preparing module 2 to operate as a capture module on rising edge MOVLW MOVWF

H'05' CCP2CON

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;timer0 preparation ;initializing the period register (used by TMR0) MOVLW MOVWF

H'C3' SCRATPER

COMF SCRATPER,F INCF SCRATPER,F ;scratper by now, contains the exact number needed by TMR0 at 50 Hz. MOVF SCRATPER,W MOVWF PERIOD

;initializing TIMER0 BSF

STATUS,RP0

MOVLW MOVWF

H'C2' OPTION_REG

109

BCF

STATUS,RP0

;presetting timer0 with the default value MOVF PERIOD,W MOVWF TMR0 ;initializing the same register CLRF SAME ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;preparing the a/d conversion module

;configuring analog pins, and output data format in ADRESH, and ADRESL BSF

STATUS,RP0

MOVLW MOVWF BCF

H'00' ADCON1

STATUS,RP0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;arranging for interrupts globally ;enabling TIMER0 interrupts BSF

INTCON,T0IE

;enabling capture interrupts BSF

STATUS,RP0

BSF

PIE2,CCP2IE

BCF

STATUS,RP0

;enabling peripheral interrupts

110

BSF

INTCON,PEIE

;enabling interrupts globally BSF

INTCON,GIE

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;serial communications preparation BSF

STATUS,RP0

MOVLW MOVWF

H'40' SPBRG

MOVLW MOVWF

H'26' TXSTA

BCF

STATUS,RP0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TRAPLOOP CLRWDT GOTO TRAPLOOP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;interrupt subroutine root ISR

BTFSC GOTO

INTCON,T0IF ;check whether TMR0 interrupt occured TMR0SR

BTFSC GOTO

PIR2,CCP2IF ;check whether a capture interrupt occured CAPTINT

RETFIE

;false interrupt indication (normally unreachable)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

111

;capture interrupt branch CAPTINT

CLRF TMR1L CLRF TMR1H BCF

PIR2,CCP2IF

MOVF CCPR2H,W MOVWF SCRAT1PER COMF SCRAT1PER,F INCF SCRAT1PER,F MOVF SCRAT1PER,W MOVWF PERIOD MOVLW MOVWF

H'04' DEFAULTTIME

RETFIE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;timer 0 interrupt branch ;recharge timer with period value TMR0SR

MOVF PERIOD,W MOVWF TMR0 ;clear timer0 overflow flag BCF

INTCON,T0IF

INCF LOOP,F ;check turn of sumup,communication,or normal MOVF LOOP,W SUBLW H'80' BTFSC STATUS,Z GOTO SUMUP BTFSC STATUS,C GOTO NORMAL

112

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;collecting data for i and v averages  NORMAL

MOVLW MOVWF

VPOINTER ADCON0

CALL WAITACQ BSF ADCON0,2 WAIVOL

BTFSC ADCON0,2 GOTO WAIVOL

;add the resulting voltage sample to the voltage accumulator (data available in adresh) CALL ADDVACCU MOVLW MOVWF

IPOINTER ADCON0

CALL WAITACQ BSF ADCON0,2 WAICURR

BTFSC ADCON0,2 GOTO WAICURR CALL ADDCURRACCU GOTO FUNNEL1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SUMUP

DECFSZ

DEFAULTTIME,F

GOTO

BULK

MOVF SCRATPER,W MOVWF PERIOD ;obtaining averages BULK

MOVLW

H'07'

113

MOVWF SHIFTV

BCF RRF RRF

COUNTER

STATUS,C VACCUH,F VACCUL,F

DECFSZ COUNTER,F GOTO SHIFTV MOVF VACCUL,W MOVWF VAVERAGE CLRF VACCUL MOVLW MOVWF SHIFTI

BCF RRF RRF

H'07' COUNTER

STATUS,C IACCUH,F IACCUL,F

DECFSZ COUNTER,F GOTO SHIFTI MOVF IACCUL,W MOVWF IAVERAGE CLRF IACCUL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;performing multiplication CALL IVMULTIPL MOVF ACCUH,W MOVWF TESTH MOVF ACCUL,W MOVWF TESTL ;compare the new test value with the refference VALUE MOVF REFH,W SUBWF TESTH,W ;TESTH = REFH?

114

BTFSC STATUS,Z GOTO HEQUAL TESTL and REFL

;TESTH = REFH, continue comparing

;testh not equal to REFH. find which is greater. BTFSC

STATUS,C

GOTO TESTGTREF ;test is greater than refference GOTO REFGTTEST ;refference is greater than test

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HEQUAL

MOVF REFL,W SUBWF TESTL,W ;TESTL = REFL? BTFSC

STATUS,Z

GOTO

TESTGTREF ;behave as if test is greater than refference

BTFSC

STATUS,C

GOTO TESTGTREF ;test is greater than refference GOTO REFGTTEST ;refference is greater than test ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; REFGTTEST INCF DIRECTION,F

;reorient the direction of search

;divide step by 2 BCF RRF

STATUS,C STEP,F

;reset the same register CLRF SAME ;goto next stage GOTO FUNNEL2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

115

TESTGTREF INCF SAME,F ;check whether the step remained in the same direction for more than 4 times MOVLW

H'07'

SUBWF

SAME,W

BTFSS STATUS,C ;not yet GOTO FUNNEL2 ;same greater than or equal to H'07' CLRF SAME ;multiply step by 2 BCF

STATUS,C

RLF

STEP,F

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;check whether step is within boundaries (1<=step<=32) FUNNEL2

MOVLW

H'01'

SUBWF

STEP,W

BTFSS STATUS,C ;less than 1 GOTO EQUALIZE1 MOVF STEP,W SUBLW H'20' BTFSS STATUS,C ;greater than h'20'

116

GOTO EQUALIZE32 ;within boundaries GOTO CONTINUE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;load step with h'01' EQUALIZE1 MOVLW

H'01'

MOVWF

STEP

GOTO CONTINUE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;load step with h'20' EQUALIZE32 MOVLW

H'20'

MOVWF

STEP

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;decide whether to increment or decrement CONTINUE BTFSS DIRECTION,0 GOTO ADDSTEP GOTO SUBSTEP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADDSTEP

MOVF STEP,W ADDWF

RESULT,F

BTFSS STATUS,C GOTO FUNNEL3 ;result exceeds H'FF' MOVLW

H'FF'

117

MOVWF

RESULT

;change the direction of scanning INCF DIRECTION,F GOTO FUNNEL3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SUBSTEP

MOVF STEP,W SUBWF

RESULT,F

BTFSC

STATUS,C

GOTO FUNNEL3 ;result is less than H'00' CLRF RESULT ;change the direction of scanning INCF DIRECTION,F ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;set recent test values as future refference values FUNNEL3

MOVF TESTH,W MOVWF

REFH

MOVF TESTL,W MOVWF

REFL

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;result correction if output voltage exceeds maximum value FUNNEL1

MOVLW

VOPOINTER

MOVWF

ADCON0

118

CALL WAITACQ BSF

ADCON0,2

;wait for A/D process completion WAIVO

BTFSC ADCON0,2 GOTO WAIVO MOVF ADRESH,W ;;;;;;;;;;;;;;;; MOVWF VOREG ;;;;;;;;;;;;;;;; SUBLW H'80' BTFSS STATUS,C GOTO VOGTLIMIT GOTO VOLTLIMIT

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;decrement duty cycle VOGTLIMIT MOVLW

H'08'

SUBWF

RESULT,F

BTFSC

STATUS,C

GOTO EXOUT MOVLW

H'01' ;set the minimum. subject to change

MOVWF

RESULT

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EXOUT

MOVF RESULT,W MOVWF

OUTPUTVAL

GOTO FUNNEL4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

119

VOLTLIMIT MOVLW MOVWF

RIPPLEINP ADCON0

CALL WAITACQ BSF

ADCON0,2

MORETIME BTFSC ADCON0,2 GOTO MORETIME MOVF ADRESH,W MOVWF

RIPPLEREG

SUBLW

H'80'

BTFSC

STATUS,Z

GOTO EQUAL BTFSC

STATUS,C

GOTO RECLTREQ GOTO REQLTREC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EQUAL

MOVF RESULT,W MOVWF

OUTPUTVAL

GOTO FUNNEL4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RECLTREQ MOVF RIPPLEREG,W SUBLW

H'80'

MOVWF

OUTPUTVAL

MOVF RESULT,W

120

ADDWF

OUTPUTVAL,F

BTFSS STATUS,C GOTO FUNNEL4 MOVLW

H'FF'

MOVWF

OUTPUTVAL

GOTO FUNNEL4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; REQLTREC MOVLW

H'80'

SUBWF

RIPPLEREG,W

SUBWF

RESULT,W

BTFSS STATUS,C GOTO ADJUSTOUT MOVWF

OUTPUTVAL

GOTO FUNNEL4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADJUSTOUT MOVLW MOVWF

H'00' OUTPUTVAL

GOTO FUNNEL4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;checkpoint for final values to be outputted FUNNEL4

MOVLW

MINIDUTYCYC

SUBWF

OUTPUTVAL,W

BTFSC

STATUS,C

121

GOTO SECONDTEST MOVLW

MINIDUTYCYC

MOVWF

OUTPUTVAL

GOTO EXPORT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SECONDTEST

MOVF OUTPUTVAL,W

SUBLW

MAXDUTYCYC

BTFSC

STATUS,C

GOTO EXPORT MOVLW

MAXDUTYCYC

MOVWF

OUTPUTVAL

GOTO EXPORT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EXPORT

MOVF OUTPUTVAL,W ;export the value through the portb MOVWF

PORTB

;prepare the number to be exported through the duty cycle register MOVWF

SCRATCHH

CLRF SCRATCHL ;shift two times BCF RRF RRF

STATUS,C SCRATCHH,F SCRATCHL,F

BCF RRF

STATUS,C SCRATCHH,F

122

RRF

SCRATCHL,F

BCF

STATUS,C

;prepare the two least significant bits RRF BCF

SCRATCHL,F STATUS,C

RRF BCF

SCRATCHL,F STATUS,C

MOVLW ANDWF

H'30' SCRATCHL,F

MOVF CCP1CON,W ANDLW

H'CF'

IORWF MOVWF

SCRATCHL,W CCP1CON

MOVF SCRATCHH,W ANDLW H'3F' MOVWF CCPR1L MOVF STEP,W MOVWF

TEMPO

MOVLW ANDWF

H'3F' TEMPO,F

BTFSS DIRECTION,0 GOTO DISPRES GOTO DISPSET DISPRES

BCF TEMPO,6 GOTO STATION2

DISPSET

BSF

TEMPO,6

STATION2

BSF

TEMPO,7

MOVF TEMPO,W

123

MOVWF

PORTD

RETFIE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;subroutines ;IV multiplication subroutine IVMULTIPL MOVLW MOVWF

H'08' SHFTCOUNT

CLRF ACCUL CLRF ACCUH CLRF SHIFTH MOVF VAVERAGE,W MOVWF SHIFTL MOVF IAVERAGE,W MOVWF ROTATERI ;;;;;;;;;;;;;;;; BACKAA

BCF RRF

STATUS,C ROTATERI,F

BTFSC STATUS,C CALL ADD_SR CALL SHIFTSR DECF SHFTCOUNT,F BTFSS STATUS,Z GOTO BACKAA RETURN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADD_SR

CLRF FLAG MOVF SHIFTL,W ADDWF BTFSC

ACCUL,F STATUS,C

INCF FLAG,F

124

MOVF SHIFTH,W ADDWF BTFSC

ACCUH,F FLAG,0

INCF ACCUH,F RETURN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SHIFTSR

BCF STATUS,C RLF SHIFTL,F RLF SHIFTH,F RETURN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WAITACQ

MOVLW MOVWF

H'0E' DELDUMMY

DELBACK

DECFSZ DELDUMMY,F GOTO DELBACK

RETURN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADDVACCU MOVF ADRESH,W ADDWF VACCUL,F BTFSC STATUS,C INCF VACCUH,F RETURN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADDCURRACCU MOVF ADRESH,W ADDWF IACCUL,F BTFSC STATUS,C INCF IACCUH,F RETURN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

125

;communications subroutine COMMUNICAT MOVF LOOP,W ANDLW H'07' SUBLW H'04' BTFSS STATUS,Z GOTO FUNNELEX MOVF LOOP,W MOVWF PARAMETERTURN MOVLW ANDWF BCF RRF BCF RRF BCF RRF BCF

H'78' PARAMETERTURN,F

STATUS,C PARAMETERTURN,F STATUS,C PARAMETERTURN,F STATUS,C PARAMETERTURN,F STATUS,C

MOVLW ANDWF

H'0F' PARAMETERTURN,F

MOVF PARAMETERTURN,W SUBLW BTFSC

H'00' STATUS,Z

;export average input voltage GOTO EXPOVAVERAGE MOVF PARAMETERTURN,W SUBLW H'01' BTFSC

STATUS,Z

;export average input current GOTO EXPOIAVERAGE MOVF PARAMETERTURN,W

126

SUBLW

H'02'

BTFSC

STATUS,Z

;export lower byte of power output GOTO EXPOPL MOVF PARAMETERTURN,W SUBLW H'03' BTFSC

STATUS,Z

;export upper byte of power output GOTO EXPOPH MOVF PARAMETERTURN,W SUBLW H'04' BTFSC

STATUS,Z

;export output voltage value GOTO EXPOVO MOVF PARAMETERTURN,W SUBLW H'05' BTFSC

STATUS,Z

;export duty cycle GOTO EXPODUTY MOVF PARAMETERTURN,W SUBLW H'06' BTFSC

STATUS,Z

;export step GOTO EXPOSTEP MOVF PARAMETERTURN,W SUBLW H'07'

127

BTFSC

STATUS,Z

;export direction register GOTO EXPODIR MOVF PARAMETERTURN,W SUBLW H'08' BTFSC

STATUS,Z

;export output current GOTO EXPOIO MOVF PARAMETERTURN,W SUBLW H'0F'

BTFSC STATUS,Z ;export zero flag GOTO EXPOZERO

;export flag (H'FF') GOTO EXPOFLAG ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EXPOVAVERAGE MOVF VAVERAGE,W MOVWF TXREG GOTO FUNNELEX EXPOIAVERAGE MOVF IAVERAGE,W MOVWF TXREG GOTO FUNNELEX EXPOPL

MOVF TESTL,W MOVWF TXREG GOTO FUNNELEX

EXPOPH

MOVF TESTH,W MOVWF TXREG GOTO FUNNELEX

128

EXPOVO

MOVF VOREG,W MOVWF TXREG GOTO FUNNELEX

;************************************ EXPOIO

MOVLW MOVWF

IOINP ADCON0

CALL WAITACQ BSF ADCON0,2 WAK

BTFSC ADCON0,2 GOTO WAK MOVF ADRESH,W MOVWF TXREG GOTO FUNNELEX

;************************************ EXPOFLAG MOVLW H'FF' MOVWF TXREG GOTO FUNNELEX EXPOZERO MOVLW H'00' MOVWF TXREG GOTO FUNNELEX EXPODUTY MOVF RESULT,W MOVWF TXREG GOTO FUNNELEX EXPOSTEP

MOVF STEP,W MOVWF TXREG GOTO FUNNELEX

EXPODIR

MOVF DIRECTION,W MOVWF TXREG GOTO FUNNELEX

FUNNELEX RETURN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; END

129

APPENDIX D

130

131

REFERENCES

[1] Wikipedia, Encylopedia; accessed 1 July 2004.

http://en.wikipedia.org/wiki/Solar_panel;

Internet;

[2] Berkeley Lab; http://www.lbl.gov/msd/pis/walukiewicz/02\02_8_full_solar_spectrum.html; Internet; accessed 1 July 2004 [3] Hussein K.H., Muta I. , Hoshino T. , and Osakada M., “Maximum photovoltaic  power tracking: an algorithm for rapidly changing atmospheric conditions”,  IEE- Proceeding. Generation, Transmission, and Distribution, Vol. 142, No. 1, January 1995. [4] Johan H., Enslin R., Mario S. Wolf, Dani¨el B. Snyman, and Wernher Swiegers "Integrated Photovoltaic Maximum Power Point Tracking Converter",  IEEE Transactions on Industrial Electronics, Vol. 44, no. 6, December 1997 [5] Koutroulis E., Kalaitzakis K., and Voulgaris N. C., “Development of a Microcontroller-Based, Photovoltaic Maximum Power Point Tracking Control System”, IEEE Transactions on Power Electronics, Vol. 16, No. 1, January 2001. [6] Hua C. and Shen C., “Comparative Study of Peak Power Tracking Techniques for Solar Storage System”, IEEE  Applied Power Electronics Conference and  Exposition, Vol. 2, February 1998, pp. 679-685. [7] Hua C. and Lin J., "DSP-Based Controller in Battery Storage of Photovoltaic System", IEEE IECON 22nd  International Con ference on Industrial Electronics, Control, and Instrumentation, Vol. 3, 1996, pp. 1705-1710. [8] Yu G., Jung Y., Chol J., Choy I. , Song J., and Kim G., “A Novel Two-Mode MPPT Control Algorithm Based On Comparative Study of Exisiting Algorithms”, IEEE Photovoltaics Specialists Conference, May 2002 pp. 1531-1534. [9] Shengyi Liu, "Maximum Power Point Tracker Model", Control model, University of South Carolina, May 2000. Available from: http://vtb.engr.sc.edu/modellibrary_old/; Internet; accessed 5 June 2004. [10] K. K. Tse, Henry S. H. Chung*, S. Y. R. Hui, and M. T. Ho, “A Novel Maximum Power Point Tracking Technique for PV Panels”,  IEEE Power  Electronics Specialists Conference, Vol. 4, June 2001, pp. 1970-1975. [11]  Noguchi T., Togashi S., and Nakamoto R., “Short-Current Pulse-Based Maximum-Power-Point Tracking Method for Multiple Photovoltaic-andConverter Module System”, IEEE Transactions on Industrial Electronics, Vol. 49, No. 1, February 2002.

132

[12] Lee D., Noh H. , Hyun D. , and Choy I., “An Improved MPPT Converter Using Current Compensation Method for Small Scaled PV-Applications”,  Applied Power Electronics Conference and Exposition (APEC’03), Vol. 1, February 2003, pp.540-545 [13] Masoum M. Dehbonei H., and Fuchs E., “Theoretical and Experimental Analyses of Photovoltaic Systems With Voltage- and Current-Based Maximum Power-Point Tracking”,  IEEE Transactions Conversion, Vol. 17,  No.4, December 2002. [14] Hohm D., and Ropp M., “Comparative Study of Maximum Power Point Tracking Algorithms Using an Experimental, Programmable, Maximum Point Tracking Test Bed”, IEEE Photovoltaics Specialists Conference, September 2000, pp.1699-1702. [15] Moller H., Semiconductors for Solar Cells. London: Artech House, Inc, 1993. [16] Howstufffworks; http://science.howstuffworks.com/solar-cell5.htm; Internet; accessed 1 July 2004. [17] Walker G., “Evaluating MPPT Converter Topologies using a Matlab PV Model”,  Journal of Electrical and Electronics Engineering , Australia, IEAust, Vol. 21, No. 1, 2001, pp. 49-56. [18] Anca D. Hansen et al, "Models for a Stand-Alone PV System", Technical Report, Risǿ National Laboratory, Roskilde, Norway, December 2000. Available from: http://www.risoe.dk/solenergi/rapporter /pdf/sec-r-12.pdf ; Internet; accessed 5 August 2004. [19] Enslin J., and Snyman D., “Combined Low Cost, High Efficient Inverter, Peak Power Tracker and Regulator for PV Applications”,  IEEE Transactions on Power Electronics, Vol. 6, No. 1, January 1991. [20] Linden D., Handbook Of Batteries.  New York: McGraw-Hill, 1995. [21] Jian W., Jianzheng L., Libo W., and Zhengming Z., “Optimal Control of Solar Energy Combined with MPPT and Battey Charging”, Proceedings of IEEE  International Conference on Electrical Machines and Systems , Vol. 1, November 2003, pp. 285-288. [22] Mohan N., Undeland T., Robbins W. Power electronics: Converters,  Applications and Design, DC-DC Switch-Mode Converter. NJ: John Willey & Sons, 1989. [23] Sheriff1 F., Turcotte D. and Ross M., “PV Toolbox: A Comprehensive Set of PV System Components for the Matlab/Simulink Environment”. CANMET Energy Technology Center-Varennes , August 2003. Available from: http://cetcvarennes.nrcan.gc.ca/eng/publication/r2003-055e.html/; Internet; accessed 5 July 2004.

133

[24] Sweigers W., and Enslin J., “An Integrated Maximum Power Point Tracker for Photovoltaic Panels”, Proceedings of IEEE International Symposium on  Industrial Electronics. ISIE’98 , Vol. 1, July 1998, pp. 40-44. [25] Chen Y., Smedley K., Vacher F., Brouwer J., “A New Maximum Power Point Tracking Controller for Photovoltaic Power Generation”,  IEEE Applied Power  Electronics Conference and Exposition, Vol. 1, February 2003, pp. 58-62. [26] Rashid M., Power Electronics: Circuits, Devices and Applications. Englewood Cliffs: Prentice Hall, 1993. [27] Jain S., and Agarwal V., “A New Algorithm for Rapid Tracking of Approximate Maximum Power Point in Photovoltaic Systems”,  IEEE Power Electronics  Letters, Vol. 2, No. 1, March 2004. [28] Whitaker C., Townsend T., Newmiller J., Engineering E., King D., Boyson W., Kratochvil J., Collier D., and Osborn D., “Application And Validation Of A  New PV Performance Characterization Method”, Photovoltaic Specialists Conference, September 1997, pp.1253 – 1256. [29] Chihchiang Hua C., Lin J., and Shen C., “Implementation of a DSP-Controlled Photovoltaic System with Peak Power Tracking”,  IEEE Transactions on  Industrial Electronics, Vol. 45, No. 1, February 1998. [30] Pacheco V., Freitas L., Vieira J., Coelho E. and Farias V., “Stand-Alone Photovoltaic Energy Storage System With Maximum Power Point Tracking”, IEEE  Applied Power Electronics Conference and Exposition , Vol. 1, February, 2003, pp. 97-102.

134

Sponsor Documents

Recommended


View All
Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close