Package 'ddiv'

Title: Data Driven I-v Feature Extraction
Description: The Data Driven I-V Feature Extraction is used to extract Current-Voltage (I-V) features from I-V curves. I-V curves indicate the relationship between current and voltage for a solar cell or Photovoltaic (PV) modules. The I-V features such as maximum power point (Pmp), shunt resistance (Rsh), series resistance (Rs),short circuit current (Isc), open circuit voltage (Voc), fill factor (FF), current at maximum power (Imp) and voltage at maximum power(Vmp) contain important information of the performance for PV modules. The traditional method uses the single diode model to model I-V curves and extract I-V features. This package does not use the diode model, but uses data-driven a method which select different linear parts of the I-V curves to extract I-V features. This method also uses a sampling method to calculate uncertainties when extracting I-V features. Also, because of the partially shaded array, "steps" occurs in I-V curves. The "Segmented Regression" method is used to identify steps in I-V curves. This material is based upon work supported by the U.S. Department of Energy’s Office of Energy Efficiency and Renewable Energy (EERE) under Solar Energy Technologies Office (SETO) Agreement Number DE-EE0007140. Further information can be found in the following paper. [1] Ma, X. et al, 2019. <doi:10.1109/JPHOTOV.2019.2928477>.
Authors: Wei-Heng Huang [aut] , Xuan Ma [aut] , Jiqi Liu [aut] , Menghong Wang [ctb] , Alan J. Curran [ctb] , Justin S. Fada [ctb] , Jean-Nicolas Jaubert [ctb] , Jing Sun [ctb] , Jennifer L. Braid [ctb] , Jenny Brynjarsdottir [ctb] , Roger H. French [aut, cph] , Megan M. Morbitzer [ctb, cre]
Maintainer: Megan M. Morbitzer <[email protected]>
License: GPL (>= 2)
Version: 0.1.1
Built: 2025-01-12 03:50:01 UTC
Source: https://github.com/cran/ddiv

Help Index


Damp Heat Plus Dynamic Mechanical Load Indoor Accelerated Test I-V Curve.

Description

The I-V curve data is provided by UL for MLEET (Module Level Exposure and Evaluation Test) project funded by DOE (Department of Energy). It was taken from some commercial brand full size PV (photovoltaic) module under dampheat + DML (Dynamic Mechanical Load) indoor accelerated test. Each I-V curve has about 3800 points. This data set is a study of IV curve with 1 step. The first column is voltage(V) and the second column is current(I).

Usage

data(IV_4K)

Format

A data frame with 3637 rows and 2 variables:

V

increasing vector

I

decreasing vector

Source

Solar Durability and Lifetime Extension (SDLE) Research Center, Case Western Reserve University


I-V Curves from External Solar Testing Laboratory.

Description

These 2 IV curves are from an external solar module testing facility. 2 full sized modules are featured, a standard poly-Si AL-BSF module and a similar PERC mono-Si module. The PERC module has a clearly higher power output compared to the Al-BSF module given the higher voltage and current output with a similar fill factor. This data set is a study of IV curve with 1 step. The first column is voltage(V) and the second column is current(I).

Usage

data(IV_5M_1)

Format

A data frame with 478 rows and 2 variables:

V

increasing vector

I

decreasing vector

Source

Solar Durability and Lifetime Extension (SDLE) Research Center, Case Western Reserve University


I-V Curves from External Solar Testing Laboratory.

Description

This data set is a study of IV curve with 1 step. The first column is voltage(V) and the second column is current(I).

Usage

data(IV_5M_2)

Format

A data frame with 476 rows and 2 variables:

V

increasing vector

I

decreasing vector

Source

Solar Durability and Lifetime Extension (SDLE) Research Center, Case Western Reserve University


Outdoor Time Series I-V Curve Data from SDLE SunFarm.

Description

This dataset comes from SDLE SunFarm, which provides extensive outdoor exposure capabilities, including mini-modules and full size modules mounted on both dual axis trackers fixed racks. Modules are individually controlled and operated by Daystar multi-tracer system at their peak power during daylight hours. Data acquired include time-series I-V curve data taken every 10 minutes, and time series power, voltage, current and weather data collected every minute. This data set is a study of IV curve with 1 step. The first column is voltage(V) and the second column is current(I).

Usage

data(IV_daystar)

Format

A data frame with 48 rows and 2 variables:

V

increasing vector

I

decreasing vector

Author(s)

Menghong Wang, Jiqi Liu, Jennifer L. Braid, Roger H. French

Source

Solar Durability and Lifetime Extension (SDLE) Research Center, Case Western Reserve University


A data frame of IV curve with 1 step.

Description

This data set is a study of IV curve with 1 step. The first column is voltage(V) and the second column is current(I).

Usage

data(IV_step1)

Format

A data frame with 41 rows and 2 variables:

V

increasing vector

I

decreasing vector

Source

Solar Durability and Lifetime Extension (SDLE) Research Center, Case Western Reserve University


A data frame of IV curve with 2 step.

Description

This data set is a study of IV curve with 2 step. The first column is voltage(V) and the second column is current(I).

Usage

data(IV_step2)

Format

A data frame with 41 rows and 2 variables:

V

increasing vector

I

decreasing vector

Source

Solar Durability and Lifetime Extension (SDLE) Research Center, Case Western Reserve University


A data frame of IV curve with 3 step.

Description

This data set is a study of IV curve with 3 step. The first column is voltage(V) and the second column is current(I).

Usage

data(IV_step3)

Format

A data frame with 41 rows and 2 variables:

V

increasing vector

I

decreasing vector

Source

Solar Durability and Lifetime Extension (SDLE) Research Center, Case Western Reserve University


Outdoor Time Series I-V Curve Data from SDLE SunFarm.

Description

This dataset comes from a long term time-series I-V curves dataset of full sized modules traced by ESL-Solar 500. Data acquired include outdoor time-series I-V curve data taken every 5 minutes from 2013-12-29 09:00:00 to 2013-12-29 13:55:00. This data set is an example of how to use I-V data for a timeseries. The first column is timestamp(tmst) and the second column is I-V curve data(ivdf) that can be separated into voltage(V) and current(I).

Usage

data(IV_timeseries)

Format

A data frame with 60 rows and 2 variables:

tmst

date and time of measurement

ivdf

I-V curve data points in a string format separated by "#" and voltage and current value separated by "*"

Author(s)

Jiqi Liu, Roger H. French, Megan M. Morbitzer

Source

Solar Durability and Lifetime Extension (SDLE) Research Center, Case Western Reserve University


IV feature extraction

Description

This function carries out IV feature extraction, by calculating steps then extract features for each step.

Usage

IVExtractResult(
  dat,
  k = 7,
  crt = 0.2,
  num = 75,
  crtvalb = 0.3,
  diff_slp = 0.01,
  plot.option = F
)

Arguments

dat

A dataframe of IV curve. The variable names should be "V" for voltage, and "I" for current. And rank with increasing voltage.

k

The number of equally-spaced values to supply as starting values for the breakpoints. The default is 7.

crt

A value to set for how large of regression coefficient change rate we use as not changing much. This is due to the value of IV curve, suggestion is to test this function with several IV curves for your data and find the proper value. The default is 0.2.

num

A value of number of data points. The default is 75.

crtvalb

A value to set the change of I(current) we want to use as changing very much (to detect the end of IV curve). Suggestion is to test this function with several IV curves for your data and find the proper value. The default is 0.3

diff_slp

The difference between the slope on the left and on the right of the change point. The default is 0.01.

plot.option

True/False, it plots the IV curve. The default is false.

Value

A list of the following items:

  • "step": a value that shows the number of steps in the IV curve

  • "Isc": short-circuit current, which is the current through the solar cell when the voltage across the solar cell is zero.

  • "Rsh": shunt resistance, which is the inverse slope of the IV curve near Isc.

  • "Voc": open-circuit voltage, which is the maximum voltage from a solar cell and occurs at zero current.

  • "Rs": series resistance, which is the inverse slope of the IV curve near Voc.

  • "Pmp": maximum power for a solar cell/PV module.

  • "Imp": current at maximum power.

  • "Vmp": voltage at maximum power.

  • "FF": fill factor, which is the ratio of maximum power from a solar cell to the product of Voc and Isc.

  • "Cutoff": a string of values (voltage) that shows the change point indicating steps. NA means that the IV curve has only one step and there is no change points.

Examples

#this IV curve is of step=1
#load the data provided in the package
data(IV_step1)
IV1 <- data.frame(IV_step1)
result <- IVExtractResult(IV1, plot.option = FALSE)
#use the IV curve with step=2
data(IV_step2)
IV2 <- data.frame(IV_step2)
#with plot.option=TRUE, IV curve and steps are ploted
result2 <- IVExtractResult(IV2, plot.option = FALSE)
#use the IV curve with step=3
data(IV_step3)
IV3 <- data.frame(IV_step3)
IVExtractResult(IV3, plot.option = FALSE)

data("IV_timeseries")
df <- IV_timeseries
result <- data.frame()
for (i in 1:length(df$tmst)){
  IV = df$ivdf[i]
  IV <- as.character(IV)
  IV = data.frame(IV = strsplit(IV, '#'))
  names(IV) <- 'IV'
  IV$IV <- as.character(IV$IV)
  IV <- tidyr::separate(IV, "IV", into = c("V", "I"), sep = '\\*')
  IV <- IV[-1,]
  IV$V = as.numeric(as.character(IV$V))
  IV$I = as.numeric(as.character(IV$I))
  IV = IV[order(IV$V, decreasing = FALSE),]
  IV_frame <- data.frame(IV)
  trial = try(IVfeature(IV_frame$I, IV_frame$V), silent = TRUE)
  if ('try-error' %in% class(trial)){
    temp <- data.frame(NA, NA, NA, NA, NA, NA, NA, NA)
    names(temp) <- c('Isc', 'Rsh', 'Voc', 'Rs', 'Pmp', 'Imp', 'Vmp', 'FF')
  }else{
    temp <- data.frame(trial)
  }
  result <- rbind(result, temp)
}
result <- cbind(df, result)

Calculate IV feature from a IV curve

Description

Calculate IV feature from the given IV curve with one step

Usage

IVfeature(I, V, crt = 0.2, num = 75, crtvalb = 0.3)

Arguments

I

A vector of current values from IV data frame

V

A vector of voltage values from IV data frame

crt

A value to set for how large of regression coefficient change rate we use as not changing much. This is due to the value of IV curve, suggestion is to test this function with several IV curves for your data and find the proper value. The default is 0.2.

num

A value of number of consecutive data points in the moving window used to calculate the slope of the windows and flat areas for extracting Isc and Rsh. The default is 75.

crtvalb

A value to set the change of I(current) we want to use as changing very much (to detect the end of IV curve). Suggestion is to test this function with several IV curves for your data and find the proper value. The default is 0.3

Details

Note that IV curve should have voltage ordered from the smalles value to the largest value.

This function can gives result for IV curves with more than one steps, but the results are not accurate. To extract IV features for IV curves with more than one steps, or unsure about the steps of IV curves, please use IVExtractResult(). For IV curve has only one step, this function can be used.

Value

a list of the following items:

  • "Isc": short-circuit current, which is the current through the solar cell when the voltage across the solar cell is zero.

  • "Rsh": shunt resistance, which is the inverse slope of the IV curve near Isc.

  • "Voc": open-circuit voltage, which is the maximum voltage from a solar cell and occurs at zero current.

  • "Rs": series resistance, which is the inverse slope of the IV curve near Voc.

  • "Pmp": maximum power for a solar cell/PV module.

  • "Imp": current at maximum power.

  • "Vmp": voltage at maximum power.

  • "FF": fill factor, which is the ratio of maximum power from a solar cell to the product of Voc and Isc.

Examples

#this IV curve is of step=1
#if IV curve is of step>1, please use IVsteps to first find the number of
#steps and change points, then apply this function for each steps
#load the data provided in the package
data(IV_step1)
IV1 <- data.frame(IV_step1)
result <- IVfeature(IV1$I,IV1$V,crt=0.2,num=75,crtvalb=0.3)

data("IV_timeseries")
df <- IV_timeseries
result <- data.frame()
for (i in 1:length(df$tmst)){
  IV = df$ivdf[i]
  IV <- as.character(IV)
  IV = data.frame(IV = strsplit(IV,'#'))
  names(IV) <- 'IV'
  IV$IV <- as.character(IV$IV)
  IV <- tidyr::separate(IV,"IV",into = c("V","I"),sep = '\\*')
  IV <- IV[-1,]
  IV$V = as.numeric(as.character(IV$V))
  IV$I=as.numeric(as.character(IV$I))
  IV=IV[order(IV$V,decreasing=FALSE),]
  IV_frame <- data.frame(IV)
  trial=try(IVfeature(IV_frame$I,IV_frame$V),silent=TRUE)
  if ('try-error' %in% class(trial)){
    temp <-  data.frame(NA,NA,NA,NA,NA,NA,NA,NA)
    names(temp) <- c('Isc','Rsh','Voc','Rs','Pmp','Imp','Vmp','FF')
  }else{
    temp <- data.frame(trial)
  }
  result <- rbind(result,temp)
 }
 result <- cbind(df,result)

Calculate steps of IV curve

Description

Calculate steps of IV curve

Usage

IVsteps(I, V, k = 7, diff_slp = 0.01, plot.option = FALSE)

Arguments

I

A vector of current values from IV data frame

V

A vector of voltage values from IV data frame

k

The number of equally-spaced values to supply as starting values for the breakpoints. The default is 7.

diff_slp

The difference between the slope on the left and on the right of the change point. The default is 0.01.

plot.option

True/False, it plots the IV curve. The default is false.

Value

a list of the following items:

  • "step": a value that shows how many steps of IV curve

  • "xsep": a vector of values (voltage) that shows the change point indicating steps. NA means that the IV curve has only one step and there is no change points.

Examples

#this IV curve is of step=1
#load the data provided in the package
data(IV_step1)
IV1 <- data.frame(IV_step1)
result <- IVsteps(IV1$I,IV1$V)
#use the IV curve with step=2
data(IV_step2)
IV2 <- data.frame(IV_step2)
#with plot.option=TRUE, IV curve and steps are ploted
result2 <- IVsteps(IV2$I,IV2$V,plot.option=TRUE)

Uncertainty for IV feature extraction

Description

Calculate the uncertainty of this data driven IV feature extraction

Usage

IVuncertain(
  dat,
  k = 7,
  crt = 0.2,
  num = 75,
  crtvalb = 0.3,
  iter = 100,
  diff_slp = 0.01,
  plot.option = FALSE
)

Arguments

dat

A dataframe of IV curve. The variable names should be "V" for voltage, and "I" for current. And rank with increasing voltage.

k

The number of equally-spaced values to supply as starting values for the breakpoints. The default is 7.

crt

a value to set for how large of regression coefficient change rate we use as not changing much. Should be the same as using function "IVExtractResult". Default is 0.6.

num

a value of number of data points. The default is 25.

crtvalb

a value to set the change of I(current) we want to use as changing very much (to detect the end of IV curve). Suggestion is to test this function with several IV curves for your data and find the proper value. The default is 0.3

iter

number of iterations want to use to calculate uncertainty. Default is 100, takes about 2 minutes to finish calculation.

diff_slp

The difference between the slope on the left and on the right of the change point. The default is 0.01.

plot.option

True/False, it plots the IV curve. The default is false.

Value

a list of the following items:

  • "unct_Isc": uncertainty for short-circuit current, the number of variables is decided by the number of steps.

  • "unct_Rsh": uncertainty for shunt resistance, the number of variables is decided by the number of steps.

  • "unct_Voc": uncertainty for open-circuit voltage, the number of variables is decided by the number of steps.

  • "unct_Rs": uncertainty for series resistance, the number of variables is decided by the number of steps.

  • "unct_Pmp": uncertainty for maximum power for a solar cell/PV module, the number of variables is decided by the number of steps.

  • "unct_Imp": uncertainty for current at maximum power, the number of variables is decided by the number of steps.

  • "unct_Vmp": uncertainty for voltage at maximum power, the number of variables is decided by the number of steps.

  • "unct_FF": uncertainty for fill factor, the number of variables is decided by the number of steps.

  • "unct_Cutoff": uncertainty for change point indicating steps. NA means that the IV curve has only one step and there is no change points.

Examples

#this IV curve is of step=1
data(IV_step1)
IV1 <- data.frame(IV_step1)
IVuncertain(IV1)