48561377-modelling-a-pv-module-using-matlab.pdf

20
ELEC 5564M POWER GENERATION BY RENEWABLE SOURCES MODELLING A PV MODULE USING MATLAB Liena Vilde 200589145 MSc Electrical Engineering and Renewable Energy Systems University of Leeds

Upload: luysf5480

Post on 02-Nov-2014

111 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

ELEC 5564M

POWER GENERATION BY RENEWABLE

SOURCES

MODELLING A PV MODULE USING

MATLAB

Liena Vilde

200589145

MSc Electrical Engineering and

Renewable Energy Systems

University of Leeds

Page 2: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

2010

2

Page 3: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

1.Aims and Objectives

The aim of this exercise is to write a MATLAB program for simulating

a PV module consisting of 40 PV cells connected in series and 2 cells

connected in parallel, and observe the system response to various

weather conditions (change in ambient temperature and solar

irradiance).

The objectives of this assignment are learning to use MATLAB for

simulating I-V and P-V characteristics of a PV module, implementing

the Newton-Raphson method for solving the nonlinear equation to

obtain the I-V characteristic curve, and writing the MATLAB program

so that it can later be used for developing a complete system model

including a DC-DC converter.

3

Page 4: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

2.PV Cell Description

2.1.Operating Principle

A PV cell is a semiconductor p-n device that produces current when

irradiated. This is due to electron-hole pair forming in the

semiconductor material that absorbs photons with energy

exceeding the band-gap energy of the semiconductor material. The

PV cell consists of front and back contacts attached to the

semiconductor material, the contacts can collect the charge carriers

(negatively charged electrons and positively charged holes) from

the semiconductor p and n layers and supply the load with the

generated current (DC).

2.2.Equivalent Circuit Model

A PV cell can be represented by a current source connected in

parallel with a diode, since it generates current when it is

illuminated and acts as a diode when it is not. The equivalent circuit

model also includes a shunt and series internal resistance that can

be represented by resistors Rs and Rsh (Figure 1). Rsh and Rs can

be replaced with an equivalent junction resistor Rj for a simplified

model (Figure 2)

4

Vout

Page 5: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

Rsh

Rs

RlIsc

ma

k

D

Figure 1: Equivalent Circuit

5

Vout

Page 6: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

RlRjIsc

Figure 2: Simplified equivalent circuit

Connecting PV cells in parallel, as shown in Figure 3, increases the

total current

generated by the module (Iout=I1+I2+I3+…). The total current is

equal to the sum of current produced by each cell. To increase the

total voltage of the module, cells have to be connected in series as

in Figure 4 (Vout=V1+V2.+V3+…).

Rsh

Rs

Isc2Isc1Isc

ma

k

D2

ma

k

D1

ma

k

D

I s c 2

I s c 1

I s cm

ak

D 2

ma

k

D 1

ma

k

D

Figure 4 Figure 5

2.3.Mathematical Representation

The equivalent circuit in Figure 1 shows that the current generated

by each PV cell is

(1)

6

Page 7: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

Isc is dependant on weather conditions - ambient temperature TA,

irradiation G -, therefore it describes the spectral response of the PV

cell.

(2)

ISCR: short circuit current at Tr

ki: temperature coefficient of the short circuit current

Tr: reference temperature

(3)

IS: reverse saturation current

q: charge of an electron

A: junction ideality factor

K: Boltzmann constant

(4)

IOR: reverse saturation current at reference temperature

EG: band-gap of the semiconductor material

(5)

NOCT: Nominal Operating Cell Temperature

For np cells in parallel and ns cells in series, the total shunt and

series resistances are equal to:

7

Page 8: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

(6), (7)

Substituting equations (2) to (7) into equation (1), a mathematical

description for a PV module with np x ns cells can be obtained:

(8)

8

Page 9: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

3.Newton-Raphson Algorithm

Newton-Raphson method is used for finding roots of a non-linear

function by successively better approximations.

If f(x) is a non-linear function, the first step to find its roots (zeros) is

to calculate or evaluate its derivative f’(x). Next step is to choose an

initial x value xn . Each successive value of x closer to the value of x

for f(x)=0, can be calculated by:

(9)

Figure 5 shows a graphical representation of the Newton-Raphson

method and how each successive value of x is closer to f(x)=0. The

iteration can be continued until the absolute relative approximate

error ER is equal to pre-specified relative error tolerance ES:

(10)

9

Page 10: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

xn

xn+1E

S

10

xy

Page 11: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

Figure 5: Graphical Representation of Newton-Raphson Method

The I-V characteristic of the PV module in equation (8) can be

expressed as f(I):

(11)

The derivative of f(I) is equal to:

(12)

When V=0, I=ISC; when I=0, V=VOC.

The method for finding the I-V characteristic curve for a PV module

using the Newton-Raphson algorithm is described with the help of a

flow chart in the following page.

11

Page 12: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

12

Page 13: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

VPV

=V

IPV

=I(n+1)

STARTCalculate PV parameters from characteristic equations and specificationsV=0I=ISC

Find f(I) and f’(I)I≈I(n+1)

IPV

=0Increment VI=I

PV

I=I(n+1)END

13

YesYesNoNo

Page 14: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

14

Page 15: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

4.MATLAB Code for the PV Module Simulation

%PV Module Specifications:A=1.72; %Ideality factorq=1.6e-19; %Charge of 1 electron [Coulomb]k=1.380658e-23; %Boltzmann constant [J/K]Eg=1.1; %Band gap energy [eV]Ior=19.9693e-6; %Reverse saturation current at Tr [A]Iscr=3.3; %Short circuit current generated at Tr [A]ki=1.7e-3; %Temperature coefficient of short circuit current [A/K]ns=40; %Number of cells connected in seriesnp=2; %number of cells connected in parallelRs=5e-5; %Internal series resistance of a cell [Ohm]Rp=5e5; %Internal parallel resistance of a cell [Ohm]Tr=301.18; %Reference temperature [K] %Initialise the parameters for I-V characteristic calculation:V=0; %Initially, I=Isc -> V=0Vinc=0.01; %V incrementEs=0.01; %Relative error toleranceEr=5000; %1st relative error valueloop=0; %Initial number of loops %Typical NOCT [C], ambient temperature in Kelvins (Ta), insolation in kW/m^2 (G) values:NOCT=44; G=1;Ta=298.15; %Cell temperature:Tc=((NOCT-20)*G/0.8)+(Ta); %Reverse saturation current for Tr:Is=(Ior*((Tc)/Tr)^3)*exp(((q*Eg)/(k*A))*((1/Tr)-(1/Tc))); %Short circuit current:Isc=(Iscr+ki*(Tc+273.15-Tr))*G; %Equivalent shunt resistance:Rsht=(np/ns)*Rp; %Equivalent series resistance:Rst=(ns/np)*Rs; %Calculating P to make F1 subscript indices real and positive%integersP=q/(A*k*Tc);It=np*Isc; I=Isc; %Initialise I=Isc when V=0:Vval=V; %Set of voltage valuesIval=Isc*np; %Set of current values while (I>0) %I=0 -> V=Voc, calculating V for all values of

Isc>I>0

15

Page 16: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

%Using Newton-Raphson algorithm for calculating I while (abs(Er)>Es) %While absolute relative approximate error %bigger than specified error tolerance loop=loop+1; %Increase loop count F1=(I)*(1+(Rst/Rsht))-It+(np*Is*exp(P*((V/ns)+I*Rst))+(V/(ns*Rsht))); Fdash=(1+(Rst/Rsht))+np*P*Rs*Is*exp(P*((V/ns)+I*Rst)); Inext=I-(F1/Fdash); %Next value of I for the next loop Er=((Inext-I)/Inext)*100; %New error value to be compared to

Es I=Inext; %Set I to be the new value of I if (I<0) %Only allowing I values to be

positive I=0; %End algorithm when I<0 break; end; if (loop==50000) %End calculations after 50 000

positive break; end; end; Ival=[Ival,I]; %Obtain the set of I values Er=1000; %Re-set the error value for the

algorithm to work if (I==0) Vval=[Vval,V]; %After I=0, obtain the set of V

values

break; else Vval=[Vval,V]; %If Isc>I>0, continue calculating V V=V+Vinc; end;end;P=[Ival.*Vval];M=max(P);

figure(1); %Plot the I-V characteristic curveplot(Vval,Ival);grid;hold on; figure(2); %Plot the P-V characteristic curve

16

Page 17: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

plot(Vval,Ival.*Vval);grid;hold on;

Results

5.Results

Figure 6 (a) shows how the I-V characteristic changes depending on

irradiation G (in kW/m2) when Ta=25°C. ISC=3.8A, given that np=2,

Imax of the PV module is 7.6A, Vmax=19.25V. Since ISC is directly

proportional to G, the characteristic curves in Figure 6 show the

predicted response to the change of irradiation. There is a change in

VOC as G reduces from 1 to 0.2, but this is not as considerable as the

change in IOC from 7.6 to 1.5A.

Figure 6 (a)

Graph in Figure 6 (b) shows how the I-V curve changes when

ambient temperature Ta increases and when G is constant (1

kW/m2). Ta has an effect on VOC: VOC of each cell reduces by

approximately 0.23mV for every 1°C increase of Ta. ISC increases

slightly as Ta increases, but not enugh to compensate the power

loss due to decreasing VOC.

17

Page 18: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

Figure 6 (b)

The graphs in Figures 7 (a) and (b) show the P-V characteristic

curves for the PV module, and their dependence on irradiation G (in

kW/m2) and Ta (°C). Both sets of curves show the expected results,

which correspond to the I-V characteristics. With reduction of G,

power decreases due to decrease in current (100W to 20W) and

increase of Ta reduces power due to decrease in V (106W to 80W).

Figure 7 (a)

18

Page 19: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

Figure 7 (b)

G, kW/m2

1.0 0.8 0.6 0.4 0.2PMPP, W 99.57 80.83 61.07 40.48 19.46

Ta, °C15 25 35 45 55

PMPP, W 106.20 99.57 92.95 86.36 79.80

6.Conclusions

The disadvantage and limiting factor of using the Newton-Raphson

method for solving non-linear equations such as f(I), is the fact that

it uses approximation, therefore the accuracy of the method is

determined by the pre-set relative error tolerance. The smaller the

error tolerance, the more accurate the result, but this also increases

the processing time during a simulation. In systems where quick

response and small processing time is of importance, there will be a

trade-off between time and accuracy.

7.References

1. Getting Started with MATLAB, The MathWorks, 2007

19

Page 20: 48561377-Modelling-a-PV-Module-Using-Matlab.pdf

2. Power Generation by Renewable Sources, Dr L. Zhang, 2010

20