Content uploaded by Md. Osman Ali
Author content
All content in this area was uploaded by Md. Osman Ali on Oct 02, 2022
Content may be subject to copyright.
Modeling of Solar Photovoltaic System Using
MATLAB/Simulink
Md. Shohag Hossain, Naruttam K. Roy and Md. Osman Ali
Department of Electrical and Electronic Engineering,
Khulna University of Engineering & Technology (KUET),
Khulna-9203, Bangladesh.
shohag-eee2k11@hotmail.com, nkroy@yahoo.com, osman2k11@yahoo.com
Abstract—This work presents a Simulink-based model of a
photovoltaic (PV) system using a single-diode and two-diode
model of solar cell. A comparison between two diode model and
single diode model of PV cell has been illustrated. In addition,
output of series-parallel connection of PV cells has been examined.
In the model, series and shunt resistances are calculated by an
efficient iteration method based on open-circuit voltage, short-
circuit current and irradiance values. The PV module
implemented in Simulink/MATLAB is a five parameters model.
Approximate parameters are obtained from the manufacturer`s
datasheets. The model includes light intensity and ambient
temperature as input. Power, cell temperature and voltage as well
as any measurements of interests are output. For the grid
connection of solar cell inverter, filter and a step-up transformer
is utilized. The performance of the model is found satisfactory.
Keywords—Irradiance, Temperature, Resistance, Series-parallel,
Solar PV.
I. INTRODUCTION
The renewable energy sources are playing an important role
in power systems and the use of solar energy is increasing day
by day. Solar power is generated from solar photovoltaic (PV)
arrays and electric inverter. PV array is formed by series/parallel
combination of PV solar modules [1]. The output power
generated from the solar panels is intermittent in nature and
varies with the irradiance level, temperature, different
orientations, panel aging, and so on [1-3]. A PV system is the
most cost effective in many applications especially in remote
areas, such as power for remote telecommunications, remote
lighting and signs, remote homes and recreational vehicles [4].
This work demonstrates the basic combination of PV array
and discusses different output characteristics of PV array in
various conditions such as irradiance change, temperature
variations and different internal resistance to demonstrate the
different effects for series-parallel PV array. For modelling of a
PV cell based on the Shockley diode equation in MATLAB is
discussed [5-7]. A comparison between PV cell such as single
diode and two diode model has been discussed. Overall, a detail
model of PV cell with inverter, filter, and step-up transformer
has been designed in this work.
II. BASIC OF PV CELL
A. Operating Principle
A photovoltaic (PV) cell produces current when sun light is
irradiated upon on it and produces electron-hole pair as PV cell
materials absorb photons that cause energy exceeding the band-
gap of the material [8]. These generated carriers are swept apart
by the internal electric fields of this cell and they contribute to
current if the cell is connected with external circuit.
B. Equivalent Circuit of a PV Cell
A solar cell can be represented by a widely accepted
equivalent circuit shown in figure 1 and 2 [8].
Figure 1 Single diode circuit. Figure 2 Two diode circuit
When the cell is exposed to light, direct current is generated
that varies linearly with solar radiation. The model can be
improved by including the effects of a shunt resistance (RP) and
another in series (Rs) [9]. Here,
s
R
is introduced for considering
the voltage drops and internal losses due to flow of current and
p
R
takes into account the leakage current to the ground when
the diode is reverse biased.
C. Comparison Between Single and Two Diode Model
Two diode model takes into account the effect of
recombination between electron-hole pair. However, in two
diode model, the number of equations and unknown parameters
increases, thereby making calculations little bit more complex
but gives much more accurate curve characteristics as
compared to single diode model. Considering mathematical
computations and number of iterations, computational errors
are less in single diode model and it turns out to be faster than
two diode model due to less complex equations [9].
III. BASIC SIMULINK MODELING
The fundamental equation of PV cell can be derived from
the theory of Shockley diode equation and semiconductor
theory [10]. The single diode Simulink model is given in figure
3. The fundamental equations [5] are needed to design a PV
cell are given below:
Using KCL in figure 1 we get
D
IIphI
(1)
As we know Shockley diode equation
1exp
0Tnk
IRVe
II
B
sp
D
(2)
Now putting this value into equation (1) we get
1exp
0Tnk
IRVe
III
B
sp
ph
(3)
And finally we get output current from equation
1exp
0Tnk
IRVe
III
B
sp
ph
p
sp
R
IRV
(4)
Now the output current at the standard test conditions (STC)
is:
1exp
,0,
ref
p
refrefph a
V
III
(5)
If we consider short circuit condition, V=0 we get
refph
ref
refrefphrefsc I
a
III ,,0,, 1
0
exp
(6)
But photo current depends on light intensity and temperature.
Therefore, equation of photocurrent may be defined as
TI
G
G
Iscrefph
ref
ph .
,
(7)
Where, G=Irradiance,
ref
G
=Irradiance at STC,
T
=
refc TT
(Kelvin),
ref
T
=Cell temperature at STC = 25 + 273 =
298,: Coefficient temperature of short circuit current (A/K),
provided by the manufacturer,
refph
I,
: Photocurrent (A) at STC.
Finally, by simplification we get reverse saturation current
refc
G
ref
c
ref TTKA
q
T
T
II 11
.
exp
3
,00
(8)
In order to design this model more accurate we used
s
R
and
p
R
by Newton-Raphson method such that we get maximum
power from the cell. Now for findings
s
R
and
p
R
at STC
refmp
refmp
refmp V
P
I
,
,
,
=
1
.
exp ,,
,0, a
RIV
II srefmprefmp
refrefph
(9)
Putting the value of
0
I
and
refph
I,
finally we get
refmp
refmp
a
V
refscrefscrefsc
srefmprefmp
p
V
P
IBII
RIV
R
refc
,
,
,,,
,,
,0
expexp
.
(10)
Where, B=
a
VRIV refsrefmprefmp ,0,, .
,
q
TKAN
acs ...
IV. SIMULATION RESULT
A. Effect of different irradiance on a single PV cell
Figure 4 and 5 show the effect of variation of solar irradiance
on the I-V and P-V curves. As the irradiance decreases, photo
current () also decreases. The photo current varies linearly
with irradiance level. From figure 4, it is observed that photo
current is 3.11A when irradiance is 1000 W/m2 and 0.7 A when
irradiance is 200 W/m2. From figure 5, it is observed that output
power decreases when irradiance decreases. It is found that
when irradiance is 1000w/m2 power is 49.3 W but for 200 w/m2
decreases with increasing temperature. As can be seen in figure
6, the power is reduced by approximately 7 Watts with an
increase in 75 temperature. In this model, the temperature is
varied from 25 to 500. From Fig. 6 maximum power
output is 49.3 W when temperature is 25 . In figure 7, it is
observed that output voltage decreases from 26.5V to 21.5A as
the temperature is increased from 25 to 500
respectively. Power is approximately 8 W.
B. Effect of different temperature on a single PV cell
Figures 6 and 7 demonstrate the effect of the ambient
temperature on the P-V and I-V characteristics. Maximum
power output decreases with increasing temperature.
Figure 3 Simulink model of a single diode PV cell
Figure 4 Irradiance effect on I-V curve
Figure 5 Irradiance effect on P-V curve
Figure 6 Temperature effect on P-V
Figure 7 Temperature Effect on I-V
Figure 8 Rs effect on I-V curve
Figure 9 Rs effect on P-V curve
Figure 10 Rp effect on P-V curve
Figure 11 Rp effect on I-V curve
Figure 12 Current vs Time
Figure 13 Voltage vs Time
Figure 15 Output current vs Time for series-parallel connection
Figure 14 Series- parallel connection of PV cell
Figure 16 Output Voltage vs Time for series-parallel connection
Fig.
Figure 17 Current vs Time after filtering
Figure 18 Voltage vs Time after filtering
Figure 19 Voltage vs Time after 220V/2200V step-up transformer
Two diode model
Single diode model
Two diode model
Single diode model
C. Effect of different Rs and Rp on a single PV cell
Figure 8 and 9 demonstrate the effect of variation of
the series resistance & parallel resistance on the
output of solar cell. The higher the value of the series
resistance, the lower the output current as well as the
maximum power. It is also found that lower parallel
resistance decreases output power. Therefore,
suitable values of Rs (Rs=0.56) & Rp (Rp=790)
have been calculated by Newton Raphson iteration
method that gives more accurate result at maximum
power point. From figure 8, it is observed that photo
current decreases from 3.11 to 2.6 as series
resistance is varied from 0.06 Ω to 0.76. Also, the
output power increase from 21W to 49.3W as the
parallel resistance is varied from 10 Ω to 790 Ω. The
effects of parallel resistance on P-V and I-V curves
are shown in figure 10 and 11 respectively. Table I
shows the simulation result. In this study, for the
same approximation method, we got 49.3W whereas
manufactures got 50W experimentally.
TABLE I. PWX 500 PV MODULE (50W)
CHARACTERISTICS [5]
Name
(Unit)
Experimental
Values
Simulated
Values (single
diode)
(W)
(V)
(A)
(V)
(A)
50 W
17.2 V
2.65 A
21.6 V
3.11 A
49.3 W
17 V
2.9 A
26.5 V
3.11 A
D. Simulation Result of single diode model and two
diode model
Figure 12 & 13 demonstrates the comparison
between two diode model and single diode model.
Figure 12 shows that two diode model output current
is 3.67A whereas simulated single diode model
output current is 3.11A. From figure 13, it is
observed that two diode model output voltage is
36.7V which is greater than simulated output voltage
26.5V of a single diode model.
E. Simulink Model of Series- Parallel Connection
of PV Cell
The output current, voltage and power of a single
solar cell is very low. For getting desired output
power solar array is created by connecting solar cells
in series and parallel. Figure 14 shows the Simulink
model of a series parallel connection which contains
six series and six parallel combinations of solar cell.
It is noted from figure 15 that the output current
increases from 1.5 A to 8.057 A. Also, the output
voltage increases from 15.3 V to 87.67 V as shown
in figure 16.
F. DC to AC Conversion & Simulation Result:
First of all, solar cells tend to produce power at fairly
low voltages, and it is very difficult to step up DC
and transmitting DC power at low voltage is
uneconomical. However, it is necessary to bring our
power at any significant distance. Modern inverters
and transformers are really pretty efficient.
Therefore, it's likely to be more energy efficient to
invert it and step it up before we transmit [11]. The
inverted output of current and voltage are shown in
figure 17 & figure 18. In this study, single phase
pulse width modulation (PWM) inverter has been
used. Harmonics is generated in inversion process.
Therefore, to reduce harmonics, first order low pass
filter has been used. In figure 18 current is 3.11 A and
in figure 18, voltage is found 210V without any
harmonics.
G. Simulated result of Step-up Transformer
The PV array Simulink model shown in figure 20
is maintained at 1000 W/m2 and 25. The array is
connected with a single phase PWM inverter, a step
up three phase two winding transformer whose
ratings is 100kVA, 220V/2200V. The output voltage
210V is stepped up to approximately 2000V using
step up transformer which is shown in figure 19.
V. CONCLUSION
Solar cell performance depends primarily on
weather conditions. However, the field tests can be
highly expensive. Therefore, it is necessary to have
simulation models to enable work at any time.
Therefore, it is designed and implemented under
MATLAB/Simulink environment. A Simulink
implementation based on the five parameter diode
PV model has been constructed. The effects of
variation of model parameters and the effect of
different solar light intensity (200-1000 w/m2) and
ambient temperature (25-500˚C) have been
demonstrated. The PV model can be automatically
modified to simulate configurations ranging from a
single PV cell to a string of modules. Comparison of
single diode model photovoltaic cell and two diode
model cell has been demonstrated. To acquire
desired performance, two diode model shows
greater efficiency 9.73% than 4.93%. In case of
PWX 500 PV module gives 4.505% efficiency
whereas simulated model has given 4.935%
efficiency. Therefore, we concluded that our
proposed model has given slightly higher efficiency
than manufacturer value. Series and parallel
combination of cells for getting desired output are
designed and simulated. Finally, complete modeling
and analysis of single diode and two diode model
and comparison between them have been discussed
in this work in Simulink environment.
References
[1] K. Ding, X. Bain and H. Liu, "Matlab-Simulink Based
Modeling to Study the Influence of Nonuniform Insolation
Photovoltaic Array," Power and Energy Engineering
Conference (APPEEC), 2011 Asia-Pacific, Wuhan, 2011,
pp. 1-4.
[2] A. N. R. Ahmed, K. Nowaz, J. Tasnim and N. Afroze, "A
complete modeling and analysis of solar system
(cell/module/array) based on MATLAB,"International
Conference on Electrical & Electronic Engineering
(ICEEE), Rajshahi, 2015, pp. 149-152.
[3] Biju K,Rijil Ramchand “Modeling and simulation of a
novel solar PV/ battery hybrid energy system with a single
phase five level inverter,” 2015 IEEE International
Conference on Signal Processing, Informatics,
Communication and Energy Systems (SPICES),Kozhikode
2015, pp. 1 – 5.
[4] Du Yun-Fen, Mei ying, “Dynamic Modeling and
Simulation of Photovoltaic Energy Conversion System,”
7th International Conference on Wireless Communications,
Networking and Mobile Computing (WiCOM), Wuhan
2011 , pp. 1 - 6
[5] H. Bellia, R. Youcef, M. Fatima, “A detailed modeling of
photovoltaicmodule using MATLAB,”NRIAG Journal of
Astronomy and Geophysics (2014), vol. 3, pp. 53–61.
[6] X. Wang and H. Liang, "Output Characteristics of PV Array
under Different Insolation and Temperature,"Asia-Pacific
Power and Energy Engineering Conference, Shanghai,
2012, pp. 1-4.
[7] Villalva, Marcelo Gradella, Gazoli, Jonas Rafael, Filho
andErnesto Ruppert. 2009. Comprehensive approach to
modeling and simulation of photovoltaic arrays, IEEE
Trans. Power Electron 24 (5) 1198–1208.
[8] Håvard Breisnes Vika, “Modelling of Photovoltaic
Modules with Battery EnergyStorage in Simulink/Matlab,”
june(2014)Trondheim Norwegian University of Science
and Technology.
[9] J.A. Ramos-Hernanz, J.J. Campayo , J. Larranaga , E.
Zuluet, O. Barambones ,J. Motrico, U. Fernandez Gamiz,
I. Zamora , “Two photovoltaic cell simulation models in
matlab/simulink,”International Journal on “Technical and
Physical Problems of Engineering” (IJTPE), Iss. 10, Vol. 4,
No. 1, Mar. 2012
[10] Villalva MG, Gazoli JR and Filho ER, “Comprehensive
approach to modeling and simulation of photovoltaic
arrays,” IEEE Trans Power Electron 2009;vol. 24: pp.
1198–1208.
[11] https://www.quora.com/Why-convert-DC-to-AC-when-
using-solar-power