WindCurves: A Tool to Fit Wind Turbine Power Curves

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Introduction:

This is a Vignettes of R package, WindCurves. The package WindCurves is a tool used to fit the wind turbine power curves. It can be useful for researchers, data analysts/scientist, practitioners, statistians and students working on wind turbine power curves. The salient features of WindCurves package are:

Instructions to Use:

library(WindCurves)
data(pcurves)
s <- pcurves$Speed
p <- pcurves$`Nordex N90`
da <- data.frame(s,p)
x <- fitcurve(da)
x
validate.curve(x)
plot(x)
random <- function(x)
{
  data_y <- sort(sample(1:1500, size = 25, replace = TRUE))
  d <- data.frame(data_y)
  return(d)
}
dump("random")
rm(random)
library(WindCurves)
data(pcurves)
s <- pcurves$Speed
p <- pcurves$`Nordex N90`
da <- data.frame(s,p)
x <- fitcurve(data = da, MethodPath = "source('dumpdata.R')", MethodName = "Random values")

## The user can specify .R files from other locations as:
# x <- fitcurve(data = da, MethodPath = "source('~/WindCurves/R/random.R')", MethodName = "Random values")
validate.curve(x)
plot(x)

Consider error() is a function which uses two vectors as input and returns a error value with a specific error measure, such as RMSE or MAPE as shown below:

# PCV as an error metric
error <- function(a,b)
{
d <- (var(a) - var(b)) * 100/ var(a)
d <- as.numeric(d)
return(d)
}
dump("error")
rm(error)

The effect of this function can be seen in the results obtained with Validate.curve() function as:

library(WindCurves)
data(pcurves)
s <- pcurves$Speed
p <- pcurves$`Nordex N90`
da <- data.frame(s,p)
x <- fitcurve(da)
validate.curve(x = x, MethodPath = "source('dumpdata.R')", MethodName = "New Error")
plot(x)

Similarly, user can compare various techniques used for wind turbine power curve fitting.

data(pcurves)
pcurves
#img2points("image.jpeg")

where, image.jpeg is the name of power curve image from which discrete points are to extracted. The procedure of extraction is as follows:

References

[1] D. Villanueva and A. E. Feij´oo, “Reformulation of parameters of the logistic function applied to power curves of wind turbines,” Electric Power Systems Research, vol. 137, pp. 51–58, 2016.(via)

[2] Iain Staffell, “Wind turbine power curves, 2012” (via)



Try the WindCurves package in your browser

Any scripts or data that you put into this service are public.

WindCurves documentation built on May 1, 2022, 9:05 a.m.