 # Modeling of Photovoltaic Module Using the MATLAB

## Article info

Volume         9

Pages             59-69

DOI                10.5027/jnrd.v9i0.06

Published     01/12/2019

Keywords    Solar module, Optimization, I-V characteristics, Performance prediction, Modeling

## Author

Divine Atsu ab , Alok Dhaundiyal *a

a Doctoral School of Mechanical Engineering, Szent Istvan University, Godollo, Hungary

b Koforidua Technical University, Koforidua, Ghana

* Corresponding author: alok.dext@hotmail.com

## Abstract

This paper presents the modeling and simulation of the characteristics and electrical performance of photovoltaic (PV) solar modules. Genetic coding is applied to obtain the optimized values of parameters within the constraint limit using the software MATLAB. A single diode model is proposed, considering the series and shunt resistances, to study the impact of solar irradiance and temperature on the power-voltage (P-V) and current-voltage (I-V) characteristics and predict the output of solar PV modules. The validation of the model under the standard test conditions (STC) and different values of temperature and insolation is performed, as well as an evaluation using experimentally obtained data from outdoor operating PV modules. The obtained results are also subjected to comply with the manufacturer’s data to ensure that the proposed model does not violate the prescribed tolerance range. The range of variation in current and voltage lies in the domain of 8.21 – 8.5 A and 22 – 23 V, respectively; while the predicted solutions for current and voltage vary from 8.28 – 8.68 A and 23.79 – 24.44 V, respectively. The measured experimental power of the PV module estimated to be 148 – 152 W is predicted from the mathematical model and the obtained values of simulated solution are in the domain of 149 – 157 W. The proposed scheme was found to be very effective at determining the influence of input factors on the modules, which is difficult to determine through experimental means.

## 1. Introduction

The Sun, a silent, a free and non-polluting source of energy, is responsible for all forms of life on earth. The potential to harness the sun’s energy, both as a source of heat and light, is almost unlimited. Solar energy is becoming the most promising energy alternative to meet the challenges of this millennium. The Sun is responsible for virtually all other energy sources; all other energy sources derive their energies from the Sun (Xiao, Dunford, & Capel, 2004).

The bulk of the world’s energy is derived from fossil fuels, mainly from the burning of coal. Fossil fuels, together with other non-renewable energy sources, are gradually depleting. The negative impacts of these energy sources has also become a concern that has necessitated the exploitation of clean energy sources (Dhaundiyal & Tewari, 2015).

Renewable energy is growing actively, increasing its share within the power sector. In the evolving transition scenario of the British Petroleum (BP) Energy Outlook, 2018, renewables in the power generation sector are the fastest growing energy source at 7.5% per annum, accounting for over 50% of the increase in power generation. This growth is a result of the competitiveness of solar and wind power. Solar power is thus rapidly becoming a vital source of electricity and emerging as a contributor to the world’s power supply (BP Energy Outlook, 2018). Out of the newly installed renewable power capacity in 2016, with 161 gigawatts (GW) added, Solar PV was the highest performer, accounting for 47% of the total additions (REN 21, 2017).

Drivers for renewable energy growth have been the call for mitigation of climate change, reducing local air pollution and its accompanying health problems, energy security, reduction in the cost of some technologies as well as the creation of jobs through the deployment of renewables. The growth in solar PV installations was significantly seen in the development of grid-connected PV systems (REN 21, 2017).

The basic unit of a solar PV system is the solar PV cell. The PV cell consists of semiconductor materials and it absorbs solar radiation in the form of photons and converts the energy into electricity (DC). The process requires materials in which the absorption of the solar radiation raises electrons to a higher energy level, causing the subsequent movement of the high energy electrons into an external circuit. The electrons, after dissipating the energy into an external circuit, return to their ground state. The basic structure of the solar cell is shown in Figure 1.

Silicon-based solar cells still dominate the solar PV market; however, their preparation and usage still have some limitations such as the poor absorption of solar radiation, its large thickness (~300 μm), complexity in the design and fabrication of the solar cell wafer (Karazhanov & Kharton, 2018). Recent years have seen the development of non-silicon based solar cells including dye-sensitized solar cells, thin-film inorganic solar cells based on Cadmium tellurid, perovskite solar cells, oxide-based and organic solar cells, copper indium gallium selenide, copper zinc tin sulfide etc. (Karazhanov & Kharton, 2018). The solar cell can be considered as a p-n junction and the current-voltage (I-V) curve provides information on the performance of the solar cell. The I-V curve shows the relationship between the current and voltage output of the cell, module or array. This curve also provides other essential characteristics of the solar cell or module such as the short circuit current (Isc), open circuit voltage (Voc), maximum power and maximum power point, maximum point voltage (Vmp) and current at maximum point (Imp) (Prasanth et al., 2018). Figure 2 presents typical I-V and P-V characteristic curves for a solar PV cell/module. Solar cells are wired in series to form a PV module to meet the required voltage. These modules, when connected in series and parallel, form the PV array. The two main applications of solar PV are the stand-alone PV system (off grid) and the grid-connected PV system. Network connected PV systems are designed to operate with and interconnected to the electrical utility grid.

The grid-connected inverter is the primary component in a grid-connected PV system and it converts the DC power produced by the PV array into AC power that is consistent with the voltage and power quality requirement of the utility grid. The stand-alone PV system; however, does not communicate with the electric grid. Electricity generated is supplied directly to the loads via the controller and the DC-AC inverter.

Accurate modeling and extraction of the characteristics of solar PV modules have become crucial to the design and performance prediction of solar modules and the satisfactory operation of PV systems (Watson & Arrillaga, 2003).

Several studies have been conducted both online and offline to extract the characteristics and investigate the performance of solar PV modules. The advantage of the online method is its ability to obtain the PV module characteristics based on conditions that are site-specific and that it is able to diagnose faults in the PV system. However, the limitations are the switching losses, its inability to extract characteristics from large systems and that it is time-consuming (Duran et al., 2008; Khatib et al., 2018). Offline methods for determining PV module characteristics are fast and accurate but are unable to diagnose faults in PV systems because they are performed offline.

Methods that have been employed in the offline extraction of module characteristics include the use of artificial intelligence-based methods such as Genetic Algorithm (Ismail, Moghavvemi & Mahlia, 2013; Appelbaum & Peled, 2014), Particle Swarm Optimization Algorithm (Ye, Wang, & Xu, 2009), and Evolutionary Algorithms (Siddiqui & Abido 2013; Muhsen et al., 2015). Artificial neural network methods (ANN) used to extract the characteristics of PV modules mostly make use of historical data; however, some parameters are assumed (Bonanno et al., 2012). Lopez-Guede et al. (2017) used a dual model-oriented modeling approach based on ANN to study the electrical behavior of monocrystalline solar modules.

MATLAB Simulink subsystems have also been used to model PV modules and arrays (Zhou, Yang, & Fang, 2007; Pandiarajan & Muthu, 2011). Mittal et al. (2018) employed feedforward neural networks to predict I-V curve parameters as a function of input irradiance and temperature. K- Fold cross-validation was used to validate model accuracy for determination of the I-V curve parameters. An enhanced seven-parameter model is a recent attempt of parameter extraction of PV modules (Siddiqui & Abido, 2013; Elbaset, Ali, & Abd-El Sattar, 2014). However, this approach requires comprehensive computation efforts to predict seven unknown parameters. Furthermore, these seven parameters are highly sensitive to the changes in outdoor conditions (Muhsen et al., 2015).

In this study, mathematical modeling of a PV module is performed to predict the behavior of PV systems under relative variation of parameters. The PV system is then optimized to obtain the best output under the given constraints. Iterative programming has been developed to create an interface between the experimental data and the calculated power.

## 2. The PV Cell and Array Model

Usually, the manufacturer’s conditions are provided for a module, which are neither optimized nor cost-effective. Therefore, an attempt was made to derive the optimal values by modeling the PV module. The Genetic Algorithm tool is used to determine the optimal conditions to enhance the quality of energy obtained while minimizing the number of cells in a PV module. Figure 3 presents the iterative flow chart of the presented methodology. The reference values are used to determine the output power. The Newton-Raphson method is employed to determine whether the given values pass the permissible tolerance. Once the obtained value is specified, it is further processed using genetic coding.

A functional constraint is imposed while solving the given program. The genetic algorithm is based on the process of natural selection; hence it repeats the sequence every time. It repeatedly modifies the population of the provided solutions. In this way, the optimized solution is derived. To verify the validity of the parameters, the genetic algorithm is used in the proposed numerical solution. The results are shown in Table 1. The manufacturer’s information on the PV module given at STC and other required data are listed in Table 2.

This study adopts the single diode approach for the extraction of PV module parameters. The equivalent circuit of a PV generator is shown in Figure 4 (Kesraoui, Lazizi, & Chaib, 2016). The function which models a PV cell is derived from the physics of p–n junction and is extended to obtain the module output characteristics (Lasnier & Ang, 1990; Samanta, Dash, & Rayaguru, 2014).

#### 2.1 Modeling of the PV module

To demonstrate the modeling of the PV module, assume the total thermal voltage of the PV module to be: where Ns is the number of cells in the module, VT is the thermal potential of the module, and A is the ideality factor. Using the equivalent circuit of a solar PV generator as shown in Figure 3 and applying Kirchhoff’s law at the nodes A and B, we obtain:     where Iph is the photocurrent, Id is the diode current and Ip is the current through the shunt resistance. Eq. (3) gives the photocurrent as: where Tc is the actual cell temperature, Tc,ref is the reference cell temperature, Iph,ref is the reference photocurrent, σsc is the temperature coefficient of short circuit current, and G and Gref are the actual irradiation and the reference irradiation, respectively. The reverse saturation current which varies with temperature can be obtained, as written in Eq. (4): where ISC,ref is the reference short circuit current, Eg is the band gap energy [eV], VOC is the open circuit voltage, αref is the temperature coefficient of open circuit voltage at reference conditions, and α is the actual temperature coefficient of the open circuit voltage. The expression for the diode current is based on the Shockley diode equation: The model contains both series (Rs) and shunt (Rshunt) resistances, and the output current is expressed as: Here, Proposition A. If Rs→0, Eq. (6) can be written as, Applying the boundary conditions of short circuit I=ISC , at V=0, the output current is obtained as shown in Eq. (8): Since ISC,ref ≈ Iph,ref, the photocurrent at reference conditions is obtained by Eq. (10): Proposition B. In practical conditions, Rshunt→∞; hence Ip→0 and Rs→0

Applying the boundary condition of open circuit I=0 and V=VOC in Eq. (2), we derive the expression: Eq. (11) can be rewritten as: The diode diffusion factor (D) can be eliminated by substituting the reference condition in Eq. (13) and dividing the reverse saturation current at an arbitrary value by it. Substituting the value of I0,ref from Eq. (11) into Eq. (12): The current at the maximum power can be estimated by Eq. (14): Power can be defined as: Substituting the expression for Imp,ref from Eq. (14) into Eq. (15), we get: Isc,ref and VOC,ref may change as the irradiance and the cell temperature vary. The corresponding values of Vmp,ref and Imp,ref will also shift if irradiance and the cell temperature vary.

Eqs. (17) and (18) express the module power output and the shunt resistance, respectively: Figure 3 shows the iterative approach used for determining the characteristics of the PV module.

## 3. Results and Discussion

#### Prediction of Mathematical Model

The test process of the model was performed with the modeling of the module using the datasheet values given at STC and by extracting the P-V characteristics, I-V characteristics, and power-current (P-I)characteristics of the PV module. In an attempt to maximize the output from the PV module, the series resistance was varied within the power tolerance limit of the module given by the manufacturer.

Figure 5 and Figure 6 respectively, present the simulated P-V and P-I curves under standard conditions with varying series resistances of Rs = 0.0028 Ω, Rs = 0.8 Ω and Rs = 1 Ω, showing their impact on the module characteristics. Figure 5 and Figure 6 show a decrease in power, voltage and current at an increased value of Rs. The model successfully predicts the I-V, P-V characteristics of the module. With a series resistance of Rs = 0.0028 Ω, the maximum power (Pmax) of 266 W and voltage of 31.4 V were obtained, demonstrating that, at low Rs values, the PV module characteristics approach the ideal cell values.

Within the given power tolerance of the module, the highest possible value of the series resistance to obtain a characteristic curve is found to be Rs = 1 Ω. With this value of Rs, the obtained Pmax and voltage are 250.6 W and 30.34 V, respectively. However, there is a notable decrease in the power output as Rs is increased from the optimized value of Rs = 0.0028 Ω to Rs = 1 Ω. The impact of the Rs on current output is evident in Figure 6; the current decreases from 7.725 A at Rs = 0.0028 Ω to 6.212 A at Rs = 1 Ω. Choosing a suitable value of Rs is therefore of vital importance for PV system models.

Similarly, the influence of Rs on the characteristics of the PV module is again demonstrated in the extraction of the I-V curve shown in Figure 7. The values of Voc for Rs = 0.0028 Ω, 0.8 Ω and 1 Ω are found to be 37.82 V, 30.84 V and 29.96 V, respectively. The corresponding Isc values are 9.309 A, 9.28 A and 9.27 A, respectively.

The impact of cell temperature on the I-V and P-V characteristics of the module was also investigated using the model. The results are shown in Figure 8 and Figure 9, respectively. I-V curve and P-V curve characteristics of the module were studied with varying cell temperatures of Tc = 40 °C, 50 °C, and 60 °C, considering the outdoor operating conditions of a solar system. Figure 8 shows that an increase in the cell temperature decreases the output power of the module as a result of the drop in output voltage which decreases logarithmically with an increase in cell temperature. However, output current increases marginally with an increase in temperature. At the maximum power point, Vmp values were found to be 32.36 V, 34.69 V and 36.24 V and the corresponding Imp values were 9.094 A, 9.079 A and 9.064 A, for cell temperatures of 40 °C, 50 °C, and 60 °C, respectively.

The impact of varying solar radiation on the performance of the PV module was also studied. The study was performed for a series resistance of Rs = 0.0028 Ω, at which the maximum power was obtained at STC (as shown in Figure 5). The results in Figure 10 and Figure 11 demonstrate that the current output of the PV module is highly dependent on the level of irradiation. Thus, there is a corresponding linear relationship between current output and irradiation.

On the other hand, the effect of solar radiation on the voltage output is marginal. An increase in the level of irradiation generates a marginal increase in the voltage output of the PV module. Results show that there is a corresponding change in the power output of the system with a change in the level of irradiation. As the irradiation level increases, the power output also increases as a result of the rise in the voltage and current output. At 800 W/m2, 700 W/m2 and 600 W/m2, the corresponding power outputs were found to be 265.6 W, 231.4 W and 197.3 W, respectively.

The model was used to optimize the parameters of the PV module to obtain the same maximum power of 270 W The results are shown in Table 1.       #### Validation of Scheme with Experimental Data (Manufacturer’s Criteria)

The behavior of the predicted model with respect to the conducted experimental model is illustrated in Figure 12 and Figure 13. At the beginning of the experiment, the current fluctuated as voltage increased, whereas the predicted solution showed good agreement at the initial phase of current variation. The effect of the shunt and series resistances is assumed to be constant with time, hence the variation of experimental current versus voltage curve deviated as time proceeded; however, at the later stage, beyond the maximum power point, the behavior of both curves was similar. On the other hand, power variation of the experimental module with respect to voltage coincided with the numerical solution of the model, but the maximum power point and the open circuit voltage of the predicted model shifted to the right. The reason for this is essentially due to the constant behavior of shunt and series resistances. Table 3 presents the values of voltage and current of the predicted and experimental data.   ## 4. Conclusions

For accurate performance prediction of solar PV systems considering varying operational conditions, an effective model is required. This study presents the modeling and simulation of a solar PV module. The modeling and simulation were performed using the MATLAB software. The effects of temperature and irradiation on the characteristics of the PV module’s I-V and P-V curves were also illustrated. The system was optimized to obtain the best power output within the same constraints. Validation of the model was done using experimentally acquired data of solar radiation, ambient temperature, current and voltage. Model results showed a strong agreement with both datasheet values and experimental data. The presented methodology could be used to analyze the performance of solar PV modules as well as PV systems. The obtained solution is highly pragmatic for assessing other solar PV systems. Furthermore, genetic programming provides an advantage in minimizing the cost of solar PV modules. Similar power to that at STC can be obtained if the irradiance is reduced to 985 W/m2. Usually, the manufacturer does not optimize the testing condition, which results in the inflation of solar modules prices. The manufacturer used 60 cells to obtain 270 W, whereas the same output was derived by optimizing the characteristic parameters of the module. This study analyzed the effects of input parameters on the modules, which is a very costly and complicated process if carried out experimentally. Thus, a mathematical model provides a basis for assessing the practical details of differently manufactured modules.

Notes
The authors declare that there is no conflict of interest.

## References

Appelbaum, J., & Peled, A. (2014). Parameters extraction of solar cells – a comparative examination of three methods. Solar Energy Materials and Solar Cells, 122, 164–173. https://doi.org/10.1016/j.solmat.2013.11.011

Archer, M. D., & Green M. A. (2011). Clean Electricity from Photovoltaics, Series on Photoconversion of Solar Energy, vol. 4. https://doi.org/10.1142/p798

Bonanno, F., Capizzi, G., Graditi, G., Napoli, C., & Tina, G. (2012). A radial basis function neural network approach for the electrical characteristics estimation of a photovoltaic module. Applied Energy, 97, 956–961. https://doi.org/10.1016/j.apenergy.2011.12.085

Bouraiou, A., Hamouda, M., Chaker, A., Sadok, M., Mostefaoui, M., & Lachtar, S. (2015). Modeling and Simulation of Photovoltaic Module and Array Based on One and Two Diode Model Using Matlab/Simulink. Energy Procedia, 74, 864–877. https://doi.org/10.1016/j.egypro.2015.07.822

Dhaundiyal, A. & Tewari, P. C. (2015). Comparative analysis of pine needles and coal for electricity generation using carbon taxation and emission reductions. Acta Technologica Agriculturae, 18(2), 29–35. https://doi.org/10.1515/ata-2015-0007

Duran, E., Piliougine, M., Sidrach-de-Cardona, M., Galan, J., & Andujar, J. M. (2008). Different 394 methods to obtain the I-V curve of PV modules: a review. In: Proceedings of the 33rd IEEE 395 Photovoltaic Specialists Conference. San Diego, California, USA. https://doi.org/10.1109/pvsc.2008.4922578

Elbaset, A. A., Ali, H. & Abd-El Sattar, M. (2014). ‘Novel seven-parameter model for photovoltaic modules. Solar Energy Materials and Solar Cells, 130, 442-455. https://doi.org/10.1016/j.solmat.2014.07.016

Ismail, M. S., Moghavvemi, M., & Mahlia, T. M. I. (2013). Characterization of PV panel and global optimization of its model parameters using genetic algorithm. Energy Conversion and Management, 73, 10–25. doi: https://doi.org/10.1016/j.enconman.2013.03.033

Karazhanov, S., & Kharton, V. (2018). Novel materials for solar cells and related technologies, Materials Letters, 228, 450. https://doi.org/10.1016/j.matlet.2018.06.078

Kesraoui, M., Lazizi, A. & Chaib, A. (2016). Grid connected solar PV system: modeling simulation and experimental tests. Energy Procedia, 95, 181-188. https://doi.org/10.1016/j.egypro.2016.09.043

Khatib, T., Ghareeb, A., Tamimi, M., Jaber, M., & Jaradat, S. (2018). A new offline method for extracting I-V characteristic curve for photovoltaic modules using artificial neural networks. Solar Energy, 173, 462-469. https://doi.org/10.1016/j.solener.2018.07.092

Lasnier, F., & Ang, T. G. (1990). Photovoltaic engineering handbook (2nd ed.). Bristol, UK: Adam Hilger.

Lopez-Guede, J. M., Ramos-Hernanz, J. A., Zulueta, E. Fernandez-Gamiz, U. , & Azkune, G. (2017). Dual model oriented modeling of monocrystalline PV modules based on artificial neuronal networks. International Journal of Hydrogen Energy, 42, (28), 18103-18120. https://doi.org/10.1016/j.ijhydene.2017.02.062

Mittal, M., Bora, B., Saxena, S., & Gaur, A. M. (2018). Performance prediction of PV module using electrical equivalent model and artificial neural network. Solar Energy, 176, 104–117. https://doi.org/10.1016/j.solener.2018.10.018

Muhsen, D. H., Ghazali, A. B., Khatib, T. & Abed, I. A. (2015). Parameters extraction of double diode photovoltaic module’s model based on hybrid evolutionary algorithm. Energy Conversion and Management, 105, 552-561. https://doi.org/10.1016/j.enconman.2015.08.023

Pandiarajan, N., & Muthu, R. (2011). Mathematical modeling of photovoltaic module with Simulink. 1st International Conference on Electrical Energy Systems (ICEES). https://doi.org/10.1109/icees.2011.5725339

Prasanth, R. J., Manghani, H., Pillai, D. S., Babu T. S., Miyatake, M., & Rajasekar, N. (2018). Analysis on solar PV emulators: a review. Renewable Sustainable Energy Reviews, 81, 149-160. https://doi.org/10.1016/j.rser.2017.07.039

REN 21. (2017). Renewable 2017 Global Status Report. Renewable energy policy network for the 21st century. Retrieved from: https://www.ren21.net/wp-content/uploads/2019/05/GSR2017_Full-Report_English.pdf

Samanta, C., Dash, S., & Rayaguru, N. K. (2014). Control scheme of PV-battery integrated in a DC/AC Micro Grid. International Conference on Renewable Energy Utilization (ICREU), Coimbatore, India.

Siddiqui, M. U., & Abido, M. (2013). Parameter estimation for five and seven-parameter photovoltaic electrical models using evolutionary algorithms. Applied Soft Computing, 13(12), 4608-4621. https://doi.org/10.1016/j.asoc.2013.07.005

Watson, N. & Arrillaga, J. (2003). Power system electro-magnetic transients simulation. IEEE Power and Energy Series 39. Stevenage, UK.

Xiao, W., Dunford, W. G., & Capel, A. (2004). A novel modeling method for photovoltaic cells. IEEE 35th Annual Power Electronics Specialists Conference, (IEEE Cat. No.04CH37551). https://doi.org/10.1109/pesc.2004.1355416

Ye, M., Wang, X., & Xu, Y. (2009). Parameter extraction of solar cells using particle swarm optimization. Journal of Applied. Physics, 105(9). https://doi.org/10.1063/1.3122082

Zhou, W., Yang, H., & Fang, Z. (2007). A novel model for photovoltaic array performance prediction. Applied Energy, 84(12), 1187-1198. https://doi.org/10.1016/j.apenergy.2007.04.006