@@ -861,3 +861,73 @@ def _pwr_optfcn(df, loc):
861861 df ['resistance_shunt' ], df ['nNsVth' ])
862862
863863 return current * df [loc ]
864+
865+
866+ def batzelis_keypoints (photocurrent , saturation_current , resistance_series ,
867+ resistance_shunt , nNsVth ):
868+ """
869+ Estimate maximum power, open-circuit, and short-circuit values
870+ using Batzelis's method.
871+
872+ This method is described in Section II.B of [1]_.
873+
874+ Parameters
875+ ----------
876+ photocurrent : numeric
877+ Light-generated current. [A]
878+
879+ saturation_current : numeric
880+ Diode saturation current. [A]
881+
882+ resistance_series : numeric
883+ Series resistance. [Ohm]
884+
885+ resistance_shunt : numeric
886+ Shunt resistance. [Ohm]
887+
888+ nNsVth : numeric
889+ The product of the usual diode ideality factor (n, unitless),
890+ number of cells in series (Ns), and cell thermal voltage at
891+ specified effective irradiance and cell temperature. [V]
892+
893+ Returns
894+ -------
895+ dict
896+ The returned dict-like object contains the keys/columns:
897+
898+ * ``p_mp`` - power at maximum power point. [W]
899+ * ``i_mp`` - current at maximum power point. [A]
900+ * ``v_mp`` - voltage at maximum power point. [V]
901+ * ``i_sc`` - short circuit current. [A]
902+ * ``v_oc`` - open circuit voltage. [V]
903+
904+ References
905+ ----------
906+ .. [1] E. I. Batzelis, "Simple PV Performance Equations Theoretically Well
907+ Founded on the Single-Diode Model," Journal of Photovoltaics vol. 7,
908+ no. 5, pp. 1400-1409, Sep 2017, :doi:`10.1109/JPHOTOV.2017.2711431`
909+ """
910+ # convenience variables
911+ Iph = photocurrent
912+ Is = saturation_current
913+ Rsh = resistance_shunt
914+ Rs = resistance_series
915+ a = nNsVth
916+
917+ # Eqs 3-4
918+ isc = Iph * Rsh / (Rs + Rsh )
919+ voc = a * np .log (Iph / Is )
920+
921+ # Eqs 5-8
922+ w = lambertw (np .e * Iph / Is ).real
923+ #vmp = (1 + Rs/Rsh) * a * (w - 1) - Rs * Iph * (1 - 1/w) # not needed
924+ imp = Iph * (1 - 1 / w ) - a * (w - 1 ) / Rsh
925+ vmp = a * (w - 1 ) - Rs * imp
926+
927+ return {
928+ 'p_mp' : imp * vmp ,
929+ 'i_mp' : imp ,
930+ 'v_mp' : vmp ,
931+ 'i_sc' : isc ,
932+ 'v_oc' : voc ,
933+ }
0 commit comments