Skip to content

Add pvl_robustfit #4

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

Merged
merged 7 commits into from
Aug 18, 2016
Merged

Add pvl_robustfit #4

merged 7 commits into from
Aug 18, 2016

Conversation

cwhanse
Copy link
Collaborator

@cwhanse cwhanse commented Jun 22, 2016

Added pvl_robustfit.m to provide an option for
pvl_desoto_parameter_estimation and pvl_PVsyst_parameter_estimation that
doesn’t rely on the Matlab Statistics Toolbox. Added py_rlm.py which is
the Python code used if the Statistics Toolbox is not present.

Added parameter estimation for the Huld model.

Correction to the SNL inverter model.

cwhanse added 3 commits June 22, 2016 15:07
Added pvl_robustfit.m to provide an option for
pvl_desoto_parameter_estimation and pvl_PVsyst_parameter_estimation that
doesn’t rely on the Matlab Statistics Toolbox.  Added py_rlm.py which is
the Python code used if the Statistics Toolbox is not present.
change ACPower(ACPower<Ps0)= -1.*abs(Pnt); to ACPower(DCPower<Ps0)=
-1.*abs(Pnt);
@cwhanse
Copy link
Collaborator Author

cwhanse commented Jun 22, 2016

Ok I'm learning this Github thing. Closing this pull request so I can bundle it with some other commits I've made.

@cwhanse cwhanse closed this Jun 22, 2016
@cwhanse
Copy link
Collaborator Author

cwhanse commented Jun 22, 2016

Oh wait it's already found and included my three commits.

@cwhanse cwhanse reopened this Jun 22, 2016
@DanRiley
Copy link
Collaborator

DanRiley commented Jun 22, 2016

Assuming one does not have that stats MATLAB toolbox installed, does pvl_robustfit require a particular python package? If so, is the package specified? Such that the users can ensure that they have the appropriate package.

@cwhanse
Copy link
Collaborator Author

cwhanse commented Jun 23, 2016

Pvl_robustfit using the Matlab robustfit function if its available. Otherwise, if a python installation is found, the code launches a python process that uses a function in the python statsmodels package. The comments in the pvl_robustfit.m code identify these requirements.

From: DanRiley [mailto:[email protected]]
Sent: Wednesday, June 22, 2016 4:10 PM
To: sandialabs/MATLAB_PV_LIB [email protected]
Cc: Hansen, Clifford W [email protected]; State change [email protected]
Subject: [EXTERNAL] Re: [sandialabs/MATLAB_PV_LIB] Add pvl_robustfit (#4)

Assuming one does not have that stats MATLAB toolbox installed, does pvl_robustfit require particular python package? If so, is the package specified? Such that the users can ensure that they have the appropriate package.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com//pull/4#issuecomment-227893042, or mute the threadhttps://github.com/notifications/unsubscribe/AFJNL3tuNGvVpQb2KylwySun_rJKnHUuks5qObK6gaJpZM4I8OX8.

cwhanse added 3 commits June 24, 2016 12:04
@cwhanse
Copy link
Collaborator Author

cwhanse commented Jun 27, 2016

I've uploaded code for the clear-sky GHI detection algorithm. It operates on GHI and a clear sky model.

@wholmgren
Copy link

Sweet! Some thoughts regarding the clear sky detection algorithm...

It will probably come as no surprise that, at least for Python, I'd prefer a simple function that's independent of Location (see e.g. pvlib/pvlib-python#199). In the interest of consistency between libraries, I'll propose there could be two matlab functions: pvl_detect_clear_times (just core algorithm) and pvl_detect_clear_times_location. Here's what I'm thinking for Python:

detect_clear_times(ghi, ghi_clearsky, elevation, win_length, sample_interval)

# automatically calculates clear sky, solar position 
Location.detect_clear_times(ghi, win_length, sample_interval, clearsky_model=ineichen)

The existing pvl_detect_clear_times function has no way of allowing a user to start with measured turbidity/pw/aod. Using measured data may make the simple scaling parameter more robust and reduce the need for the "more refined calibrations". My proposed detect_clear_times function would allow the user make the ghi_clearsky data however he/she chooses. Making the same work in my Location.detect_clear_times method would need some keyword argument trickery that I have to think more about.

I would lean towards keyword arguments instead of hardcoded thresholds in Python.

@cwhanse
Copy link
Collaborator Author

cwhanse commented Jun 28, 2016

Good input, Will. I like all of your suggestions.

pvl_detect_shadows identifies shadows from nearby objects such as wires
and poles in a time series of GHI data.
@cwhanse cwhanse merged commit 0d96587 into sandialabs:master Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants