How effectively a Sigmoid function curve can be fitted with a scaled Weibull Cumulative Distribution Function (CDF)?

WindCurves: A tool to fit wind turbine power curves

Neeraj Dhanraj
9 min readJun 13, 2020

Sigmoid function, Wind Turbine Power Curves, and Weibull distribution:

A sigmoid function is an “S” shaped mathematical function, also known as a sigmoid curve. A common example of a sigmoid function is the logistic function. The sigmoid function is a very popular mathematical expression because of its applications. The use of sigmoid function in Artificial Neural Networks made it a widely used mathematical curve. Also, it helped in solving many scientific problems related to audio signal processing, biochemistry, agriculture, renewable energy, and many more. The application of Sigmoid functions that I liked personally is its use in wind turbine (WT)power curves. The WT Power curves are the relation between the amount of wind power generated with the WT and the wind speed faced by the same WT. Generally, this relation of WT power curves is naturally occurred as an “S”-shaped Sigmoid function. Achieving higher accuracy in fitting the WT power curve is a very crucial process in operating the Wind Farms (WF) for improving efficiency in wind power generations.

The WT power curves are used in different calculation algorithms, especially when the users have a certain knowledge about wind speed, and the corresponding power value is needed. An example of this is load flow analysis in those electrical power systems where wind farms (WF) account for an important part of the load. More specifically, in probabilistic load flow (PLF) analysis, with the help of Monte Carlo (MC) simulations, such operations must be done repeatedly.

In the literature, there are several proposals for WT power curve models. They have frequently been represented by means of different groups of functions, either piece-wise or continuous. Among continuous ones, logistic functions have been very popular. Continuous representations of power curves seem to be advantageous when they must be included in algorithms with a very high number of operations, where power values have to be deduced from wind speeds. For instance, when MC simulations are needed in PLF analysis, the use of continuous functions can simplify operations. Logistic functions have proven to be very accurate according to simulations validated with the help of power curves given by several manufacturers. Furthermore, there several modifications in Logistic models, such as 3-parameters, 4-parameters models.

Summarizing, it can be said that logistic approaches achieve a high degree of accuracy, although they require several parameters and a certain degree of complexity during the fitting process. A further step consists of simplifying such a process, i.e., of achieving functions that provide a similar degree of accuracy, but easier to deal with.

In this post, an alternative method to fit a Sigmoid function like curves with the scaled Weibull Cumulative Distribution Function (CDF). Weibull distributions have often been used for representing the behavior of wind speed in a cumulative way. So far, the Weibull distribution is used in applications such as the synthetic generation of wind speed time series and prediction of wind power/speed time series. The fact that wind speed in a given location can be cumulatively modeled by means of such a distribution has been generally accepted. The shape of those curves is of interest in this work due to its similarity with WT power curves. This observation induces researchers to think about the possibility of fitting Weibull functions, by means of finding their appropriate parameters, to WT power curves. To the best of my knowledge, this is the first attempt to accommodate the power curve feature into a form of Weibull CDF expressions.

The motivation behind the use of Weibull CDF function to fit the WT power curve is the similarity of the curves representing these entities, as shown below:

Wind Turbine Power Curve (Source: Article)
Weibull CDF function (Sorce: Website)

Weibull CDF Model to fit Sigmoid functions (WT power curves):

The CDF of the Weibull distribution is expressed as:

where F(v) represents the CDF of the wind speed series, k is the shape parameter and C is the scale parameter.

Following the proposed analogy, the power generated by a WT, P, as a function of the wind speed at hub height, v, can be expressed as:

where Pmax is the maximum WT power.

The parameters of the Weibull distribution can be obtained from the data given by the manufacturer, by interpreting the power values as frequencies. The procedure for wind speed series against frequencies and is briefly explained in the following lines. With the double logarithmic action on both sides of the above equation, it can be operated to be written as:

In order to simplify the process, the values of power, P, can be normalized, i.e., the process is presented in per-unit values (p.u.).

The range of values of P, [Pmin, Pmax], can be transformed into the interval [0, 1], according to:

In the case of wind power curves, Pmin can be assumed to equal zero, because it is the minimum value for the wind, since dealing with negative values does not make any sense.

Eventually, the above two equations are further modified as:

This equation can be represented in the form of a straight line, as illustrated in the following figure:

By solving the above equation, the parameters k and C can be calculated. With the known values of k and C, the relationship between p and i is given by:

Finally, the wind power values can be reconstructed within their actual range with the denormalization process, and this constitutes the final proposal for the power curve expression.

WindCurves: An R Package for Fitting Wind Turbine Power Curves:

Here, WindCurves, an R package, is presented that makes it easy to obtain Weibull functions for fitting WT power curves. One of the advantages of the package is that it allows using the graph obtained by the manufacturer’s data as an input, while the output is the continuous function that fits that curve.

In such a study, R users will have a software tool that makes it easier for the use of power curves. The only thing a researcher will need is to have a set of pairs of points (wind speed, generated power), and the package will do its work and will provide a continuous function, based either on a logistic approximation or a Weibull cumulative distribution function (CDF).

WindCurves 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, 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’ 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 terms of various error measures including RMSE, MAE, and MAPE. Other user-defined error measures can be added in the comparison.

3. Datasets 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, but in updated form, more precisely for wind power curves along with a few additional features.

The ‘fitcurve()’ Function:

The ‘fitcurve()’ function fits the power curves for given discrete values of wind speed and the 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 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 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’ 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 a data frame having two columns, wind speed, and the corresponding generated power. The example in the documentation uses the wind speed and wind power generated by the ‘Nordex N90’ WT, 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.

Analyzing Results from ‘fitcurve():

Apart from this, the ‘validatecurve()’ function presents the accuracy of curve fitting methods compared to the object generated by the ‘fitcurve()’ function. This function returns the comparison of different curve fitting methods with various error metrics. The default error metrics available in the ‘validatecurve()’ function are root-mean-squared error (RMSE), mean absolute error (MAE), mean absolute percent error (MAPE), R squared values (R2) and correlation coefficients (COR). Apart from these, the additional error metrics can be added in the ‘validatecurve()’ analysis as user-supplied functions using the ‘MethodPath’ and ‘MethodName’ arguments. These arguments are similar to the ‘MethodPath’ and ‘MethodName’ arguments used in the ‘fitcurve()’ function, except for their intention to include new error metrics in the analysis. Considering the default values for the input arguments, the ‘validatecurve()’ function returns the comparison of the fitted wind curve in terms of distinct error metrics as follows.

Concluding remarks:

This post concludes that the scaled Weibull CDF function can be used in achieving accuracy in the wind power curve fitting process with a comparatively less complex approach. The scaled Weibull CDF function shows comparable accuracy with three and four-parameter logistic functions. Further investigation into Weibull CDFs, parameter estimation techniques, and corresponding improvement in curve fitting accuracy can motivate the use of the proposed function. Further, a software package makes it easy to obtainWeibull functions for fitting WT power curves. A detailed study is available here.

Author:

Dr. Neeraj Dhanraj Bokde,

Postdoctoral Researcher,

Aarhus University, Denmark

https://www.researchgate.net/profile/Neeraj_Bokde

--

--