Spectral mismatch calculation
See original GitHub issueIs your feature request related to a problem? Please describe.
Currently the only function in pvlib that uses spectral irradiance is spectrl2
.
Describe the solution you’d like This feature will provide a function to calculate the spectral mismatch for a given spectral response and spectral irradiance in relation to the reference spectrum. Its intended application is to estimate module performance gains or losses due spectral irradiance in the field differing from the reference spectrum used in the lab for module power rating.
Additional context Efforts are ongoing to assemble and publish both spectral irradiance and spectral response data, such as: https://datahub.duramat.org/project/about/spectral-irradiance-data-and-resources The new feature will make it easier to make use of those spectral resources.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:18 (17 by maintainers)
Top GitHub Comments
FYI cool educative video on calculating M https://www.youtube.com/watch?v=398v4irJsKw&t=4s
IIRC, the issue between the IEC and ASTM standards had to due with the “tail” of the spectral irradiance past 4 microns. In IEC, the tail function was not provided, but it’s integral was (i.e., the energy in the tail of the distribution). In ASTM, the tail function and energy were both left essentially undefined. This typically led to a discrepancy when using broadband cavity radiometers for primary reference cell calibrations. For most spectral mismatch calculations the tail indeed did not matter, as you point out. In any case, I’m 99% sure that ASTM addressed the discrepancy after I discovered it at NREL 😃.
In addition to issues of extrapolation below 280 nm and above 4 micron, another issue that I have with the standards is that they do NOT define an interpolation scheme between points, so essentially the spectra are not fully defined, which raises all sorts of inter-comparison questions. For an arbitrary standard spectrum with a reasonably dense partition, I see no harm in the standard DEFINING the curve to be piecewise-linear (or using a PCHIP if they want more smoothness and to respect the extrema in the data points). In addition, they should defined the low wavelength (in the UV) where the spectrum becomes zero and stays zero, and I have already mentioned above the problem of defining the full spectrum out to very large wavelengths.
Of course, the measured quantum efficiencies are certainly NOT piecewise-linear in reality, and we cannot simply define them to be that. In my code, I made the assumption that QE measurements are typically sufficiently dense so that the piecewise-linear interpolation is sufficiently accurate, which has a beneficial numerical advantage of producing an analytic and fast-to-compute summation formula for the common refinement of the partitions of the two functions being multiplied and integrated.
I realistically cannot take a look at the PR until next week, but I would be happy to do so! I am very interested in running inter-comparison calculations for the benefit of validating both methods. It was also on my roadmap for PVfit to accommodate additional interpolation schemes, although that was low priority,