From b8c98ee4c9485f02af7625f0fcab705c145a596f Mon Sep 17 00:00:00 2001
From: Laura Maier
Date: Tue, 17 Dec 2024 18:04:11 +0100
Subject: [PATCH] Add regularization and adapt wording #1575
---
.../PV/BaseClasses/PartialPVElectrical.mo | 2 +-
.../PV/PVElectricalSingleDiodeMPP.mo | 21 ++++++++-----------
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo
index 40b9e509fe..ad75442ec8 100644
--- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo
@@ -22,7 +22,7 @@ partial model PartialPVElectrical
final parameter Modelica.Units.SI.Energy Eg0 = dat.Eg0
"Band gap energy under standard conditions";
- Modelica.Units.SI.ElectricCurrent IPh "Photo current";
+ Modelica.Units.SI.ElectricCurrent IPh(min=0) "Photo current";
Modelica.Blocks.Interfaces.RealInput TCel(final unit="K",final displayUnit="degC")
"Cell temperature"
annotation (Placement(transformation(extent={{-140,20},{-100,60}})));
diff --git a/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo b/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo
index 62c41aba0c..2ac066c0b1 100644
--- a/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo
@@ -75,10 +75,9 @@ equation
RS = RS0;
- IPh =if absRadRat > 0 then absRadRat*(IPh0 + TCoeISC*(TCel - TCel0)) else 0;
+ IPh =absRadRat*(IPh0 + TCoeISC*(TCel - TCel0));
- RSh/RSh0 = if noEvent(absRadRat > Modelica.Constants.eps) then 1/absRadRat
- else 0;
+ RSh/RSh0 = 1/IBPSA.Utilities.Math.Functions.inverseXRegularized(x=absRadRat, delta=Modelica.Constants.eps);
// Simplified power correlations at MPP using Lambert W function (Batzelis et al., 2016)
@@ -89,15 +88,13 @@ equation
VOC = if IPh >= Modelica.Constants.eps*10 then a*log(abs((IPh/IS + 1))) else 0;
- w =if noEvent(VOC >= Modelica.Constants.eps) then
- IBPSA.Electrical.BaseClasses.PV.BaseClasses.lambertWSimple(exp(1/(a/VOC) + 1))
- else 0;
+ w =
+ IBPSA.Electrical.BaseClasses.PV.BaseClasses.lambertWSimple(exp(1/(a/IBPSA.Utilities.Math.Functions.inverseXRegularized(x=VOC, delta=Modelica.Constants.eps)) + 1));
// Efficiency and Performance
- eta=if noEvent(HGloTil <= Modelica.Constants.eps*10) then 0 else PMod/(
- HGloTil*APan);
+ eta=PMod/(IBPSA.Utilities.Math.Functions.inverseXRegularized(x=HGloTil, delta=Modelica.Constants.eps)*APan);
PMod = VMP*IMP;
@@ -115,15 +112,15 @@ equation
parameters following (DeSoto et al.,2006).
For more information on the 5-p modeling approach (single-diode PV cell approximation),
see model
-
-IBPSA.Electrical.DC.Sources.PVGenerators.PVGeneratorSingleDiode for more
+
+IBPSA.Electrical.DC.Sources.PVSingleDiode for more
information.
The final output of this model
is the DC performance of the PV array or module.
The parameters are first determined for standard boundary conditions denoted with index 0.
- The analytical approach bases on simplifications that result in explicit equations.
+ The analytical approach is based on simplifications that result in explicit equations.
These can be solved more easily by the solver resulting in higher simulation speed.
The resulting five unknown parameters at standard conditions basing non explicit functions are
the modified ideality factor
@@ -153,7 +150,7 @@ information.
Is,0 = Iph,0 e(-UL,0/a0+1).
- The system of equations bases on an approximation of the Lambert equation W at standard conditions
+ The system of equations is based on an approximation of the Lambert equation W at standard conditions
w0 = W(eUL,0/aL,0).