IVfeature {ddiv} R Documentation

## 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)
```

[Package ddiv version 0.1.1 Index]