-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error checks for database specs #17
Comments
I may be interested in helping here. Could you point me to the workflow where the CEC data set is converted into the format used by SAM? I'm looking at this module data set. I'm wondering if might also be wise to just drop suspicious modules. |
Hi Allen, Thanks for offering to help! The process we use to build SAM's module and inverter libraries from the data in the CEC lists is:
I am happy to share the scripts we use and more details of the process. We have been wanting to convert these scripts from SAM's LK scripting language to Python with the PySAM package, but have not had time to do that. One other note is that the CEC Solar Equipment Lists website mentions that they are changing the format of the equipment lists after October 31, 2021, so we will likely need to update our process to work with the new format: https://www.energy.ca.gov/programs-and-topics/programs/solar-equipment-lists. Thanks, |
Hi Paul, I'd happily port the LK script into python. I have used PySAM to generate coefficients for the 6-parameter model in the past, so I feel comfortable picking this up. Could you share the LK scripts with me? If they aren't available on github, you can email me at [email protected]. |
@allenlawrence94 pvlib includes a function showing how to access the SDK functions to run the parameter estimation code. See A few years back @janinefreeman and I had some discussion about rehosting the parameter generation capability outside of SAM, and to smooth over some of the cracks between the SAM parameter files and other applications making use of those files. Some of that conversation is in this thread. We set up a project here to contain a parameter generation engine but didn't get past that point. For my part I'm happy to help build and maintain that engine. It is my opinion that a separate open-source engine translating the CEC database to model parameters would benefit the modeling community, including SAM developers and users. |
@cwhanse - I think having a separate open source engine for this is an awesome idea! I'm mid-way through a prototype script for pv modules. Once I get in working order, how about I open a PR to pvlib/pvmodules? Thanks for the guidance and support. |
Thanks! Here's a zip file with the LK script we use for the conversion, a SAM file with LK script we use to test the resulting parameters, and an MD file with notes and instructions. This is documented sufficiently for us to use internally, but I think should be clear enough for you to figure out. Please let me know if you need any help or have questions. I agree with @cwhanse that having this as a separate open source tool is a good idea. We are planning to release a new version of SAM in the beginning of December, so if this is ready by then we'll use it to generate the SAM libraries for that version. sam-cec-module-library-tools.zip Thanks so much for making this contribution! Paul. |
Thanks @cpaulgilman, this is super helpful. Do you also have similar scripts for inverters that you can share? |
@allenlawrence94 Here are scripts for inverters: sam-cec-inverter-library-tools.zip The CEC is switching over to a new "Energy Commission Solar Equipment Lists Home Web App," so your scripts should probably the Excel files from the new site. At first glance, they appear be similar to the ones we have been using. For modules, click the "Download Excel file" link at the top right of the page: https://solarequipment.energy.ca.gov/Home/PVModuleList And similarly for inverters, although there are three lists (hover over the "Inverters" link to see them): Grid Support Solar Inverter, Grid Support Battery Inverter, and Grid Support Solar/Battery. I think we would want the combined list with a field indicating whether it is a battery inverter. |
I was not aware that SAM SSC included code to calculate inverter model parameters. pvlib provides this function. It would be good to benchmark these two implementations against each other. |
@cwhanse The SSC code (C++) that calculates the inverter model parameters ("coefficient generator" or "cg" in SAM lingo) is here: https://github.com/NREL/ssc/blob/develop/ssc/cmod_inv_cec_cg.cpp The SSC code that calculates module model parameters for SAM's 6-parameter single-diode module model is here: https://github.com/NREL/ssc/blob/develop/ssc/cmod_6parsolve.cpp These are SSC compute modules, so they can be accessed using any of the following methods:
|
@allenlawrence94 Have you made any progress on this work? We were just updating the module and inverter libraries for SAM 2021.12.02 r1, and were reminded of how useful it would be to have this conversion process implemented in Python. Let me know if there's anything we can do to help. |
Sorry for the radio silence @cpaulgilman! @kanderso-nrel for visibility (thanks for reminding me about this). I have a simple (and messy) notebook that generates coefficients for the CEC modules dataset using PySAM, but I never figured out how to handle all the missing/erroneous data. I've had to shift focus away from this, but I'll clean up and push what I currently have to pvmodules in case someone else can pick up my slack before I come back to this. |
PR here: pvlib/pvmodules#11 |
Scripts and instructions for the process NREL uses to generate module and inverter library CSV files from CEC Excel workbooks are here: https://github.com/NREL/SAM/tree/develop/samples/CEC%20Module%20and%20Inverter%20Libraries |
NREL doesn't maintain the CEC module and inverter databases, but sometimes the specifications in the CEC databases are wrong. We encourage users to report the issues directly to the CEC; however, it might be nice to also have a few simple mechanisms in place to alert the user that the specs for the component they've chosen look suspicious.
For both the inverter and the modules, we could display some warnings (probably in the UI?) when specs are either not physical (negative or zero voltages, etc) or not self-consistent (voltage and current don't multiply to the same order of magnitude as power, etc). More thought is needed to figure out what we could check for, and how to best display it.
The text was updated successfully, but these errors were encountered: