Skip to content

Conversation

LauraMaier
Copy link
Contributor

This closes #1575

We added a new PV model to the IBPSA library.
The model has the following characteristics:

  • The model is based on two different approaches for the I-V- characteristic: a single- and two-diode approach.
  • We included three modeling approaches to calculate the cell temperature depending on the PV mounting: open rack, close-to-ground, and in-contact-with-ground
  • The model was validated using measurement data from a rooftop PV system in Berlin, Germany. Further information can be found here: http://www.solar-rooftop.de

LauraMaier and others added 30 commits June 13, 2022 12:12
The proper way to load files is with Modelica.Utilities.Files.loadResource
Copy link
Contributor

@mwetter mwetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LauraMaier : Pleae see the inline comment for the required changes. I still need to run the model (which fail in Dymola 2024x and Optimica, see inline comment for the cause).

Comment on lines 73 to 94
HGloHor=realPassThroughHGloHor.y;

solHouAng = realPassThroughSolHouAng.y;
solDec=realPassThroughSolDec.y;
cloTim=realPassThroughCloTim.y;

k_t =if HGloHor <= 0.01
then 0
else min(1, max(0, (HGloHor/(GSC*(1 + 0.033*
cos(360*(Modelica.Constants.pi/180)*cloTim/24/60/60/365)*
(cos(lat)*cos(solDec)*cos(solHouAng) + sin(lat)*sin(solDec)))))))
"Factor needed for Erbs diffuse fraction relation";

// Erbs diffuse fraction relation
HDifHor = if HGloHor <= 0.01
then 0
elseif k_t <= 0.22
then (HGloHor)*(1.0 - 0.09*k_t)
elseif k_t > 0.8
then (HGloHor)*0.165
else (HGloHor)*
(0.9511 - 0.1604*k_t + 4.388*k_t^2 - 16.638*k_t^3 + 12.336*k_t^4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these assignments in the variable declaration so that we don't mix connect statements with assignments, and use regularization (also as it is only an example, regularization is less critical here).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done except for regularization since I would need support here because I tried but did not get it running.

@LauraMaier
Copy link
Contributor Author

@mwetter After some months, I started working on this model again. I was trying to implement regularization but failed to do so since it changed the model output. Would you mind implementing a best practice in one line of code so that I can adapt it to the other equations requiring regularization? That support would be highly appreciated :)

@mwetter
Copy link
Contributor

mwetter commented Oct 10, 2025

@LauraMaier : Nice to see that we can work toward completion of this. Please point me to the code, and ideally also to the actual equation if it is a complicated one so I fully understand what the physics is. It may take a while as I will be out of office most of the next two weeks.

@LauraMaier
Copy link
Contributor Author

@mwetter:
Here are some examples where you said that regularization would be helpful:

IBPSA/Electrical/DC/Sources/Validation/BaseClasses/partialPVValidation.mo
IBPSA.Electrical.DC.Sources.Validation.BaseClasses.partialPVValidation
lines 29 ff.

and
IBPSA.Electrical.BaseClasses.PV.PVElectricalSingleDiodeMPP
lines 71 ff.

I really just need one examplary line of code to understand the desired implementation.
Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add simplified PV system model based on 5p analytical modeling approach

4 participants