You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mapping out how a fixed tilt bifacial PV system would be represented, here's a summary of my approach:
System description : add attributes to PVSystem for array racking geometry: number of array racks, distance between racks, height of rack above the ground, number of module rows on each rack, orientation of modules on the rack (landscape or portrait), spacing between modules (probably the rack area occupied by a module, rather than a distance between module edges), fraction of rear-surface module area 'obscured' by racking (this will be a derate on the rear irradiance), DC optimizers (module or cell level). Perhaps we should use a new class as a child of PVSystem to contain these attributes?
A new database for bifacial module parameters that support only PVWatts. Bifacial modules have unique characteristics that aren't present in the SAPM or CEC datasets. We have only measured a few bifacial modules so we're mostly providing a pattern to follow, not a dataset. Bifacial parameters include: bifaciality (ratio of rear to front power), temperature coefficient of power, rated power, length and width dimension, transparency factor (the fraction of front side irradiance that can pass through the module), cell array (number along length, number along width).
Irradiance functions. Two primary functions, one for rearside irradiance, and one for total effective irradiance. The rearside irradiance returns the rearside irradiance for each row of cells along the vertical dimension of the rack. This is a port and cleanup of the NREL bifacialvf code.
A total irradiance function which returns the per-cell-row irradiance, front + rear, modified for 1) bifaciality factor, 2) soiling, 3) reflection, 4) rear-side shading, and 5) spectral effects.
A bifacial power function which calculates per-cellrow power from total irradiance and temperature, using PVWatts - I believe this is already pvwatts_dc.
A string power function which operates on per-cellrow power, DC optimizer settings, and string geometry (which I haven't figured out) to return power per string of modules. I think this is in place of scale_voltage_current_power but I'm not clear on this point.
Getting the irradiance on different surfaces right seems to be the biggest challenge here. With the expectation of having different levels of irradiance on different cells (or rows of cells) some kind of mismatch model might be helpful too.
Many of those racking parameters could be useful for (unimplemented) features for standard PV systems.
Easy to add a database to the pvlib/data directory.
I'm not familiar with the bifacialvf code, but that generally makes sense. Thinking dimensions... D_out = D_in x N_rows ?
Are the soiling and spectral effects unique to the bifacial nature of the system? I can imagine that they are.
Yes, it sounds like you could call pvwatts_dc on your D_in x N_rows array.
Maybe you need some combination of summing along the output array and using scale_voltage_current_power?
I do think a new subclass of PVSystem would be useful for standardizing the process. It would override the PVSystem.get_irradiance method and implement new methods specific to the bifacial functions.
pvsystem.py is already a big module. I wonder if we'd be better off putting most of the new stuff in e.g. bifacial.py.
ModelChain can probably accommodate this with very few changes.
@cdeline thanks for sharing -- I didn't realize it was on github. Dare I ask what the license is? I am not a lawyer, but if the license is not BSD 3 compatible then I think we need to stick to working off of papers or similar instead of from code.
I should have asked first, thanks @wholmgren for bringing this up. @cdeline good to here. We'll keep prominent comments maintaining attribution and the supporting reference papers.
@cwhanse is right. Updating bifacial PV system modeling to PVlib will be a great job. I have been working on this topic recently, I can contribute and there is a lot to learn about bifacial systems and how it differs from standard PV. The issue of bifacial energy yield prediction is of interest nowadays.
@anomam There isn't an open PR. I have a conversion of NREL's bifacialvf.py package to pvlib about 50% done. There's still substantial work left on that project. I glanced through the pvfactors package. Two concerns we should discuss as we consider a merge into pvlib, or another path to more closely linking pvfactors with pvlib:
how much overhead is incurred to define the system? I am not familiar with the geopandas package but it looks like it brings a number of significant dependencies with it that haven't yet found use in pvlib.
with the radiosity approach, what is the anticipated performance for simulating irradiance on a small array for ~8000 time steps? I'm asking because we have choices for a 'default' bifacial modeling component, and I would guess that most users would value speed over model completeness.
If we decide to go forward with an import (e.g., make pvfactors into pvlib.bifacial.py) we should talk about the API before you get started.
Curious, why convert NREL bifacialvf to pvlib? IMHO it would be better to leave it as an external dependence if possible. Ditto for other packages.
Imo Easier to maintain IMO.
In my opinion (but I've heard agreement from others) pvlib would benefit from an integral bifacial component (I could use it for our work at the lab). The NREL code will be difficult to maintain in its current state, and isn't really interfaced well with pvlib. So we thought it worth the effort to migrate.
@cwhanse thanks a lot for the replies. To answer your questions:
geopandas is indeed the underlying structure that's used to build the "registry", where the inputs/outputs and geometries are stored during the calculations. But it's used essentially as a convenient open-source wrapper around pandas that integrates shapely geometries, the real core package of the model. Originally when I created the algorithm, I was using simple dictionaries and lists. I'm sure there are much smarter and more efficient ways to do this, and it wouldn't be very difficult to change the nature of the registries, and use something more native to Python.
you're very right about the overhead though. Using shapely geometries makes building the PV geometries and calculating the view factors very intuitive and easy to maintain: since the 2D geometry is handled by the package, the view factor formulas look like these, and you can visualize the PV array and shades on a plot at any point. Besides, the way pvfactors accounts for reflections is through a linear system of equations for all the surfaces in the PV array.
But the cost for this is the computation speed: on my machine (i7 processors) it takes about 1 min and a half for 8760 points, and ~50s on a better machine when I was running batch simulations. Apart from model parametrization (which works very well btw), I haven't spent time thinking about replacing shapely with something that would make the computation faster.
Speed is a top priority for me as well. And maintainability and simplicity are big ones too .
I was also planning on looking at bifacialvf because I heard it can run in 4 or 5 seconds, so I'd like to offer some help and contribute to the conversion of that package if that can accelerate its implementation in pvlib.
Let me know!
@anomam we can add models to pvlib that depend on external packages. For pvfactors, I'd recommend making it an optional dependency, but I'll have to look at your package more carefully if we want to pursue this.
No reason we can't implement/wrap several bifacial algorithms in pvlib if there is community interest. We have multiple clear sky algorithms, transposition models, solar position models, pv models, etc.
@anomam 2 minutes for an 8760 is OK for me, for a bifacial simulation. If we can not have the geopandas dependency I think in the long run we'll be happier, since that package is low versioned and brings a chain of dependencies, I worry about maintaining the connection.
I'd say go ahead with preparing a pull request. I really like the use of shapely and I think it will open possibiltiies for pvlib we haven't yet considered.
I will learn how to create a repository and get my partial translation of bifacialvf up, and I'd welcome help getting this project finished.
@cwhanse@wholmgren Thanks a lot for the feedback!
Agreed, I will try to come up with something better than geodataframes for pvfactors before opening a PR.
Hi @cwhanse@wholmgren , I removed the geopandas dependency in pvfactors, but I haven't made any new release yet. I was hoping to get additional feedback from you if possible to integrate your requests into the next release before opening a PR in pvlib. Is there any chance you could spare some time looking at the pvfactors package and let me what changes you would like to see? Any feedback would be much appreciated
Activity
adriesse commentedon Feb 12, 2018
Is this your practice problem, Cliff?!?
cwhanse commentedon Feb 12, 2018
uh no this will be a big lift :) #423 is a good practice problem.
cwhanse commentedon Feb 12, 2018
Mapping out how a fixed tilt bifacial PV system would be represented, here's a summary of my approach:
pvwatts_dc.scale_voltage_current_powerbut I'm not clear on this point.Interested in your thoughts.
adriesse commentedon Feb 13, 2018
Getting the irradiance on different surfaces right seems to be the biggest challenge here. With the expectation of having different levels of irradiance on different cells (or rows of cells) some kind of mismatch model might be helpful too.
wholmgren commentedon Feb 13, 2018
Regarding each numbered item:
pvwatts_dcon your D_in x N_rows array.scale_voltage_current_power?I do think a new subclass of
PVSystemwould be useful for standardizing the process. It would override thePVSystem.get_irradiancemethod and implement new methods specific to the bifacial functions.pvsystem.pyis already a big module. I wonder if we'd be better off putting most of the new stuff in e.g.bifacial.py.ModelChaincan probably accommodate this with very few changes.cdeline commentedon Feb 15, 2018
Thanks everyone - are you planning to work off the existing Python code in the github.com/NREL/bifacialvf repository?
cwhanse commentedon Feb 15, 2018
Yes, but substantially refactored to integrate with the rest of pvlib, for transparency and hopefully less maintenance risk.
wholmgren commentedon Feb 15, 2018
@cdeline thanks for sharing -- I didn't realize it was on github. Dare I ask what the license is? I am not a lawyer, but if the license is not BSD 3 compatible then I think we need to stick to working off of papers or similar instead of from code.
adriesse commentedon Feb 15, 2018
Cool, I wasn't aware of it either. I suspect the pvlib version will look different enough that copyright will not be a problem.
cdeline commentedon Feb 15, 2018
cwhanse commentedon Feb 15, 2018
I should have asked first, thanks @wholmgren for bringing this up. @cdeline good to here. We'll keep prominent comments maintaining attribution and the supporting reference papers.
wholmgren commentedon Feb 15, 2018
@cdeline thanks for clarifying!
dberrian commentedon Feb 16, 2018
@cwhanse is right. Updating bifacial PV system modeling to PVlib will be a great job. I have been working on this topic recently, I can contribute and there is a lot to learn about bifacial systems and how it differs from standard PV. The issue of bifacial energy yield prediction is of interest nowadays.
1 remaining item
cwhanse commentedon Jun 20, 2018
@anomam There isn't an open PR. I have a conversion of NREL's bifacialvf.py package to pvlib about 50% done. There's still substantial work left on that project. I glanced through the pvfactors package. Two concerns we should discuss as we consider a merge into pvlib, or another path to more closely linking pvfactors with pvlib:
how much overhead is incurred to define the system? I am not familiar with the
geopandaspackage but it looks like it brings a number of significant dependencies with it that haven't yet found use inpvlib.with the radiosity approach, what is the anticipated performance for simulating irradiance on a small array for ~8000 time steps? I'm asking because we have choices for a 'default' bifacial modeling component, and I would guess that most users would value speed over model completeness.
If we decide to go forward with an import (e.g., make
pvfactorsintopvlib.bifacial.py) we should talk about the API before you get started.mikofski commentedon Jun 20, 2018
Curious, why convert NREL bifacialvf to pvlib? IMHO it would be better to leave it as an external dependence if possible. Ditto for other packages.
Imo Easier to maintain IMO.
cwhanse commentedon Jun 20, 2018
In my opinion (but I've heard agreement from others) pvlib would benefit from an integral bifacial component (I could use it for our work at the lab). The NREL code will be difficult to maintain in its current state, and isn't really interfaced well with pvlib. So we thought it worth the effort to migrate.
mikofski commentedon Jun 20, 2018
Ok
anomam commentedon Jun 21, 2018
@cwhanse thanks a lot for the replies. To answer your questions:
geopandas is indeed the underlying structure that's used to build the "registry", where the inputs/outputs and geometries are stored during the calculations. But it's used essentially as a convenient open-source wrapper around pandas that integrates
shapelygeometries, the real core package of the model. Originally when I created the algorithm, I was using simple dictionaries and lists. I'm sure there are much smarter and more efficient ways to do this, and it wouldn't be very difficult to change the nature of the registries, and use something more native to Python.you're very right about the overhead though. Using
shapelygeometries makes building the PV geometries and calculating the view factors very intuitive and easy to maintain: since the 2D geometry is handled by the package, the view factor formulas look like these, and you can visualize the PV array and shades on a plot at any point. Besides, the waypvfactorsaccounts for reflections is through a linear system of equations for all the surfaces in the PV array.But the cost for this is the computation speed: on my machine (i7 processors) it takes about 1 min and a half for 8760 points, and ~50s on a better machine when I was running batch simulations. Apart from model parametrization (which works very well btw), I haven't spent time thinking about replacing
shapelywith something that would make the computation faster.Speed is a top priority for me as well. And maintainability and simplicity are big ones too .
I was also planning on looking at
bifacialvfbecause I heard it can run in 4 or 5 seconds, so I'd like to offer some help and contribute to the conversion of that package if that can accelerate its implementation in pvlib.Let me know!
wholmgren commentedon Jun 21, 2018
@anomam we can add models to pvlib that depend on external packages. For pvfactors, I'd recommend making it an optional dependency, but I'll have to look at your package more carefully if we want to pursue this.
No reason we can't implement/wrap several bifacial algorithms in pvlib if there is community interest. We have multiple clear sky algorithms, transposition models, solar position models, pv models, etc.
cwhanse commentedon Jun 21, 2018
@anomam 2 minutes for an 8760 is OK for me, for a bifacial simulation. If we can not have the geopandas dependency I think in the long run we'll be happier, since that package is low versioned and brings a chain of dependencies, I worry about maintaining the connection.
I'd say go ahead with preparing a pull request. I really like the use of
shapelyand I think it will open possibiltiies for pvlib we haven't yet considered.I will learn how to create a repository and get my partial translation of
bifacialvfup, and I'd welcome help getting this project finished.anomam commentedon Jun 25, 2018
@cwhanse @wholmgren Thanks a lot for the feedback!
Agreed, I will try to come up with something better than geodataframes for pvfactors before opening a PR.
anomam commentedon Aug 1, 2018
Hi @cwhanse @wholmgren , I removed the
geopandasdependency inpvfactors, but I haven't made any new release yet. I was hoping to get additional feedback from you if possible to integrate your requests into the next release before opening a PR inpvlib. Is there any chance you could spare some time looking at the pvfactors package and let me what changes you would like to see? Any feedback would be much appreciatedcwhanse commentedon Aug 1, 2018
@anomam happy to.