# Wind Turbine Power Curves Based on the Weibull Cumulative Distribution Function
## Appendix A WindCurves: An R Package for Fitting Wind Turbine Power Curves
### Overview of WindCurves  
WindCurves [25] is used as a tool to fit WT power curves. As mentioned in the previous section, it can be useful for researchers, data analysts/scientists, practitioners, statisticians and students working on WT power curves. The most salient features of WindCurves are the following:  
1. It facilitates fitting the WT power curve with the Weibull CDF, the logistic function [7] and user-defined techniques. The user-defined techniques include a power curve fitting technique that has to be compared with the performance of the above-mentioned default methods. In other words, this tool can be utilized as a test bench on a similar principle as 'imputetTestbench' [26; 27] to compare the performance of distinct WT power curve fitting techniques. 2. It provides the visualization, information in the form of parametric equations and a comparison of fitted WT power curves in term of various error measures including RMSE, MAE and MAPE. Other user-defined error measures can be added in the comparison. 3. Datasets [21] on the power curves of the WT from four major manufacturers are available in the package: Siemens, Vestas, REpower and Nordex. The use of such datasets ensures the comparison study within an industry standard. These datasets represent wind WT power output in 'kW' against wind speed in'm/s'. 4. It provides a feature to extract/capture wind speed versus generated wind power discrete points from power curve images. It works on a similar principle as the 'digitize' package [28], but in updated form, more precisely for wind power curves along with a few additional features. The 'fitcurve()' function fits the power curves for given discrete values of wind speed and corresponding generated power. These values are accepted in the form of the data frame object having two columns, wind speed and generated power, respectively. The default methods of wind curve fitting included in 'fitcurve()' are the Weibull CDF and logistic function[7] methods. These methods have shown better accuracy in fitting the power curves in comparison to various piece-wise and other contemporary methods. The shape of a WT power curve is very similar to the shape of some CDFs. When using the Weibull CDF, a good approach is obtained by estimating two of the three parameters of a Weibull distribution, i.e., shape and scale parameters, to fit a WT power curve by means of such a function; whereas, in the logistic function, a three-parameter function obtained with the'stats'[29] package is used. Although only two methods are used in the function, these default methods are very efficient in fitting WT power curves. As noted below, the additional method can be added as needed. The 'fitcurve()' function has the following arguments:  
fitcurve(data, MethodPath, MethodName)  
data : A data frame object that will be evaluated. The input object is a dataset in the form of data frame having two columns, wind speed and its corresponding generated power. The example in the documentation uses the wind speed and wind power generated by the 'Nordex N90' WT[21], which is also available in 'WindCurves' in the 'pcurves' dataset. MethodPath : A character string for the sourced path of the user-defined function that includes a function passed to methods. This path can be absolute or relative within the working directory for the current R session. The 'fitcurve()' function uses the sourced path and adds the user-defined curve fitting function to the global environment. MethodName : A character string that represents the name for the user-defined function, which is added in the 'fitcurve()' function through the 'MethodPath' argument. Considering the default values of the above arguments, the 'fitcurve()' function returns the fitted model of the Weibull CDF and logistic functions with the corresponding calculated parameters and the fitted WT power curve values.