Two Diode Solar Cell/Panel Model
Updated 7 May 2010
First of all you should gather the information from your solar panel datasheet/manual:
1)Short Circuit Current
2)Maximum Power Point Current @ STC
3)Open Circuit Voltage
4)Maximum Power Point Voltage @ STC
5)Thermal coefficient of Short Circuit Current
6)Thermal coefficient of Open Circuit Voltage
To model the solar panel there is a function of the form I=f(V).
If you take a look to the math expression you would see some constants and two variables (the global solar irradiation and ambient temperature) which play a role in the function.
The constants are determined from the above information. Use the file "twoDiode.mdl" to calculate them.
What you have now is the I-V characteristic of the solar panel which is depended from solar irradiation and ambient temperature. The I-V characteristic of your solar panel is implemented in the file "solarpanel.mdl". So you double click the model to define the constants and then you see three inputs. 1)global irradiation 2)temperature 3)Voltage. And you get the current.
For example you keep global irradiation and temperature steady and change the voltage from 0 to the open circuit voltage and you get the nice I-V curve that you would see in your datasheet or manual of your solar panel product.
If you want to connect this box with some resistance or a more complex circuit you would get the electrical behaviour of your solar panel.
But in case you are only interested in power I have also uploaded the file "solarpanel_power.mdl" which has only two inputs: 1) global irradiation and 2) temperature. The solar panel is supposed to be working at Maximum Power Point instantaneously all of the time.
Ok now let's see why we got in all this trouble.
Let's say that your panel has a peak performance of 15%. But noone really cares about STC conditions. In case your country is a bit north maybe there not any time in the year where solar irradiation is 1000W/m^2 so your solar panel would never reach this performance. What you really care is the mean performance for your own territory.
This is easy. You simple go to this website: http://www.soda-is.com/
You get fill a form of where you live and in what inclination you have installed your panels and you get the irradiation that the surface of your panels receive in a hourly basis for all the year. Yes you get 8760 values. And another 8760 values for the temperature.
There you have to play a little bit with Matlab to extract the values from the excel. Use the xlsread(). Don;t worry you only do this once unless you move to a different area or change the inclination of your panels.
Time to get the results.
Use the irradiation and temperature values as inputs and let the Simulink simulate your solar panel for a whole year. As output is the power of your panel at each time. Try to integrate that (use the integration block) and you get the energy that came out of your solar panel in a year period. The energy that was received is the integration of solar irradiation. But this is expressed in W/m^2 so calculate it with your solar panel's area (width x length).
So now the REAL mean efficiency of this solar panel in YOUR specific area of the world is Energy Out/Energy In
I do not know if have been more thorough or less than I should have but I believe this is good way to compare solar panels.
Get the info and calculate the constants from first solar panel and then simulate to get real mean efficiency.
Do the same for the second, third etc solar panel of the market.
Compare the efficiencies and choose the one with the best efficiency!
Be ware that efficiency is not the only factor. A good guarantee of 25years of operation should be preferred than a 20 years guarantee with slightly less performance!
george12thd P (2023). Two Diode Solar Cell/Panel Model (https://www.mathworks.com/matlabcentral/fileexchange/27528-two-diode-solar-cell-panel-model), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.