-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 translator for OND files #1888
base: main
Are you sure you want to change the base?
Conversation
@cwhanse This is a very useful feature for us, we are working with this right now. So great that its being worked on, highly appreciated. In any case, I can pull the code here and implement it for our use case. If I see any improvements, I can post it here. |
Yes, only one OND file. That's all I had on hand. I suspect the algorithm will work as well for other OND files, and where it fails its probably more of a problem with the model being fitted, than this fitting process. Appreciate any help getting this to ready for merge! |
dc_power = np.array(dc_power) | ||
ac_power = np.array(ac_power) | ||
dc_voltage = np.array(dc_voltage) | ||
dc_voltage_level = np.array(dc_voltage_level) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the above could be useful for fitting another model too. Perhaps we could make that a separate function called extract_inverter_characteristics?
Nice work. (There might be a better place for it than hidden in a PR...) The CEC/Sandia parameters are based on independent labs tests (or at least the were in the past), whereas the PVsyst parameters are somehow derived from manufacturer data. That probably accounts for some of the differences. |
First off, great work, this is really helpful functionality! Echoing @adriesse, it would be great to have in
I've only come across UTF-8 encoded PAN/OND files, many with a BOM, It seems the change to
Whether its worth a breaking change is up to the maintainers, It might be nice to have the default functionality support "recent" files but I suspect there are a lot of older ones floating around. |
docs/sphinx/source/reference
for API changes.docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).remote-data
) and Milestone are assigned to the Pull Request and linked Issue.This discussion on the pvlib Google group showed code for translating the content of a PVsyst OND file to parameters for
inverter.sandia
. An OND file has sufficient information to fit thesandia
inverter model to get the four empirical parameters C0, C1, C2 and C3.Do we think a translator (
ond_to_sandia_inv
) is useful? I put it inpvlib.inverter
because the translation is specific to the target model (sandia) and would be different for the ADR inverter model.There are some content of the OND file (number of MPPT inputs, for example) that are useful but not for the inverter functions, rather, for the higher-level modeling objects (number of Arrays connected to an inverter). I'm not sure what to do with these (yet).
I don't know if this example OND file is typical of all files. Reading this file points out some possible improvements:
iotools.panond.read_panond
, the OND structure is returned in this pattern{'PVObject_': data}
, wheredata
is a dict that has actual values.read_panond
default to UTF-8 encoding?inverter.fit_sandia
says it accepts "array-like" inputs. Should "array-like" include lists? They don't work.