Description Usage Arguments Details Value Optional graphical parameters Author(s) References See Also Examples
Calculates the shape parameters (k) and scale parameters (A) of the Weibull distribution per direction sector.
1 2 3 4 5 6 7 |
mast |
Met mast object created by |
v.set |
Set used for wind speed, specified as set number or set name (optional, if dir.set is given). |
dir.set |
Set used for wind direction, specified as set number or set name (optional, if |
num.sectors |
Number of wind direction sectors as integer value greater 1. Default is |
subset |
Optional start and end time stamp for a data subset, as string vector |
digits |
Number of decimal places to be used for results as numeric value. Default is |
print |
If |
x |
Weibull object, created by |
type |
Plot type - one of |
show.ak |
If |
... |
Arguments to be passed to methods. For optional graphical parameters see below. |
To evaluate the potential energy production of a site the observed data of a particular measurement period must be generalized to a wind speed distribution. This is commonly done by fitting the Weibull function to the data. The two-parametered Weibull distribution is expressed mathematically as:
f(v) = k/A*(v/A)^(k-1)*exp(-(v/A)^k))
where f(v) is the frequency of occurence of wind speed v, A is the scale parameter (measure for the wind speed) and k is the shape parameter (description of the shape of the distribution).
The resulting Weibull distribution characterizes the wind regime on the site and can directly be used for the calculation of the potential energy production of a wind turbine (see aep
).
Returns a data frame containing:
k |
Shape parameter of the Weibull distribution for each direction sector. |
A |
scale parameter of the Weibull distribution for each direction sector. |
wind.speed |
Mean wind speed of the Weibull distribution for each direction sector. |
frequency |
Frequency of the Weibull distribution for each direction sector. |
Graphical parameters to customize the histogram plot:
border
: Colour, used for the border around the bars – default is "white"
.
breaks
: A numeric vector giving the breakpoints between histogram cells.
bty
: Type of box to be drawn around the plot region. Allowed values are "o"
(the default), "l"
, "7"
, "c"
, "u"
, or "]"
. The resulting box resembles the corresponding upper case letter. A value of "n"
suppresses the box.
bty.leg
: Type of box to be drawn around the legend. Allowed values are "n"
(no box, the default) and "o"
.
cex
: Amount by which text on the plot should be scaled relative to the default (which is 1
), as numeric. To be used for scaling of all texts at once.
cex.axis
: Amount by which axis annotations should be scaled, as numeric value.
cex.lab
: Amount by which axis labels should be scaled, as numeric value.
cex.leg
: Amount by which legend text should be scaled, as numeric value.
col
: Colour, used to fill the bars.
col.axis
: Colour to be used for axis annotations – default is "black"
.
col.box
: Colour to be used for the box around the plot region (if bty
) – default is "black"
.
col.lab
: Colour to be used for axis labels – default is "black"
.
col.leg
: Colour to be used for legend text – default is "black"
.
col.ticks
: Colours for the axis line and the tick marks respectively – default is "black"
.
las
: Style of axis labels. One of 0
(always parallel to the axis, default), 1
(always horizontal), 2
(always perpendicular to the axis), 3
(always vertical).
legend
: If TRUE
(the default) a legend is drawn.
leg.text
: A character or expression
vector to appear in the legend.
line
: Colour, used for the Weibull fit line.
lty
: Line type of the Weibull fit line – see par
for available line types.
lwd
: Line width for the Weibull fit line – see par
for usage.
mar
: A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot (only for plots with one dataset) – default is c(4.5, 4.5, 1, 1)
.
mgp
: A numerical vector of the form c(label, annotation, line), which gives the margin line for the axis label, axis annotation and axis line. The default is c(2.2, 0.7, 0)
.
pos.leg
: Position of legend – one of "bottomright"
, "bottom"
, "bottomleft"
, "left"
, "topleft"
, "top"
, "topright"
, "right"
or "center"
. Use NULL
to hide the legend.
xlab
: Alternative label for the x axis.
ylab
: Alternative label for the y axis.
xlim
: Limits of the x axis, as vector of two values.
ylim
: Limits of the y axis, as vector of two values.
x.intersp
: Horizontal interspacing factor for legend text, as numeric – default is 0.4
.
y.intersp
: Vertical interspacing factor for legend text, as numeric – default is 0.8
.
Graphical parameters to customize the directional plot:
bty
: Type of box to be drawn around the plot region. Allowed values are "o"
(the default), "l"
, "7"
, "c"
, "u"
, or "]"
. The resulting box resembles the corresponding upper case letter. A value of "n"
suppresses the box.
bty.leg
: Type of box to be drawn around the legend. Allowed values are "n"
(no box, the default) and "o"
.
cex
: Amount by which text on the plot should be scaled relative to the default (which is 1
), as numeric. To be used for scaling of all texts at once.
cex.axis
: Amount by which axis annotations should be scaled, as numeric value.
cex.lab
: Amount by which axis labels should be scaled, as numeric value.
cex.leg
: Amount by which legend text should be scaled, as numeric value.
col
: Vector of colours for the sectoral distributions, with the length of sector number + 1, where the last colour is used for the general profile.
col.axis
: Colour to be used for axis annotations – default is "black"
.
col.box
: Colour to be used for the box around the plot region (if bty
) – default is "black"
.
col.lab
: Colour to be used for axis labels – default is "black"
.
col.leg
: Colour to be used for legend text – default is "black"
.
col.ticks
: Colours for the axis line and the tick marks respectively – default is "black"
.
las
: Style of axis labels. One of 0
(always parallel to the axis, default), 1
(always horizontal), 2
(always perpendicular to the axis), 3
(always vertical).
lty
: Vector of line types, assigned like col
. See par
for usage.
lwd
: Vector of line widths, assigned like col
. See par
for usage.
mar
: A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot – default is c(4.5, 4.5, 1, 1)
.
mgp
: A numerical vector of the form c(label, annotation, line), which gives the margin line for the axis label, axis annotation and axis line. The default is c(2.5, 0.7, 0)
.
pos.leg
: Position of legend – one of "bottomright"
, "bottom"
, "bottomleft"
, "left"
, "topleft"
, "top"
, "topright"
, "right"
or "center"
. Use NULL
to hide the legend.
xlab
: Alternative label for the x axis.
ylab
: Alternative label for the y axis.
xlim
: Numeric vector of the x limits of the plot.
ylim
: Numeric vector of the y limits.
x.intersp
: Horizontal interspacing factor for legend text, as numeric – default is 0.4
.
y.intersp
: Vertical line distance for legend text, as numeric – default is 0.8
.
Christian Graul
Brower, M., Marcus, M., Taylor, M., Bernadett, D., Filippelli, M., Beaucage, P., Hale, E., Elsholz, K., Doane, J., Eberhard, M., Tensen, J., Ryan, D. (2010) Wind Resource Assessment Handbook. http://www.renewablenrgsystems.com/TechSupport/~/media/Files/PDFs/wind_resource_handbook.ashx
Langreder, W. (2010) Wind Resource and Site Assessment. In: Wei Tong (Ed.), Wind Power Generation and Wind Turbine Design, Chapter 2, p. 49–87, Southampton: WIT Press
Weibull, W. (1951) A Statistical Distribution Function of Wide Applicability. Journal of Applied Mechanics – Trans. ASME 18(3), 293–297
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | ## Not run:
## load and prepare data
data("winddata", package="bReeze")
set40 <- set(height=40, v.avg=winddata[,2], dir.avg=winddata[,14])
set30 <- set(height=30, v.avg=winddata[,6], dir.avg=winddata[,16])
set20 <- set(height=20, v.avg=winddata[,10])
ts <- timestamp(timestamp=winddata[,1])
neubuerg <- mast(timestamp=ts, set40, set30, set20)
neubuerg <- clean(mast=neubuerg)
## calculate Weibull parameters
weibull(mast=neubuerg, v.set=1) # default
# if only one of v.set and dir.set is given,
# the dataset is assigned to both
weibull(mast=neubuerg, v.set=1)
weibull(mast=neubuerg, dir.set=1)
weibull(mast=neubuerg, dir.set="set1")
# change number of direction sectors
weibull(mast=neubuerg, v.set=1, num.sectors=16)
# data subsets
weibull(mast=neubuerg, v.set=1,
subset=c("2009-12-01 00:00:00", "2009-12-31 23:50:00"))
weibull(mast=neubuerg, v.set=1,
subset=c("2010-01-01 00:00:00", NA)) # just 'start' time stamp
weibull(mast=neubuerg, v.set=1,
subset=c(NA, "2009-12-31 23:50:00")) # just 'end' time stamp
# change number of digits and hide results
neubuerg.wb <- weibull(mast=neubuerg, v.set=1, digits=2, print=FALSE)
## plot weibull objects - histogram plot
plot(neubuerg.wb) # default
plot(neubuerg.wb, type="dir") # same as above
plot(neubuerg.wb, show.ak=TRUE) # show parameters in legend
# customize plot
plot(neubuerg.wb, bty="l", bty.leg="l", cex.axis=1.2, cex.lab=1.4, cex.leg=0.9,
col.axis="darkgray", col.box="darkgray", col.lab="darkgray", col.leg="darkgray",
col.ticks="darkgray", las=0, leg.text=c("measured", "calculated"),
mar=c(3,3,0.5,0.5), mgp=c(1.8,0.5,0), pos.leg="right", xlab="velocity [m/s]",
ylab="frequency [%]", xlim=c(0,20), ylim=c(0,15), x.intersp=1, y.intersp=1)
# customize bars
plot(neubuerg.wb, border="darkgray", breaks=seq(0,21,0.5),
col="lightgray")
# customize line
plot(neubuerg.wb, line="black", lty="dotdash", lwd=2)
## plot weibull objects - directional plot
plot(neubuerg.wb, type="dir")
# show parameters in legend
plot(neubuerg.wb, type="dir", show.ak=TRUE)
# customize plot
plot(neubuerg.wb, type="dir", bty="l", bty.leg="o", cex.axis=0.8, cex.lab=0.9,
cex.leg=0.7, col=c(rainbow(12), gray(0.4)), col.axis=gray(0.2), col.box=gray(0.4),
col.lab=gray(0.2), col.leg=gray(0.2), col.ticks=gray(0.2), las=0,
lty=c(rep(3, 12), 1), lwd=c(rep(1, 12), 2), mar=c(3,3,0.5,0.5), mgp=c(1.5,0.5,0),
pos.leg="right", xlab="velocity [m/s]", ylab="frequency [m/s]", xlim=c(0,15),
ylim=c(0,25), x.intersp=1, y.intersp=1)
## End(Not run)
|
This is bReeze 0.4-0
Type changes("bReeze") to see changes/bug fixes, help(bReeze) for documentation
or citation("bReeze") for how to cite bReeze.
Attaching package: 'bReeze'
The following objects are masked from 'package:stats':
frequency, profile, ts
The following object is masked from 'package:utils':
timestamp
Pattern found: %d.%m.%Y %H:%M
Cleaning set 1...
2938 samples lower than 0.4 replaced by 'NA' in average wind speed
Cleaning set 2...
3361 samples lower than 0.4 replaced by 'NA' in average wind speed
Cleaning set 3...
2896 samples lower than 0.4 replaced by 'NA' in average wind speed
2938 NA found and excluded from calculation
Weibull parameters
A k wind speed frequency
[m/s] [-] [m/s] [%]
N 6.601 2.296 5.848 28.161
NNE 4.668 2.366 4.137 6.144
ENE 4.387 1.97 3.889 3.145
E 3.452 1.829 3.067 1.636
ESE 3.75 1.688 3.348 1.699
SSE 3.298 1.641 2.95 4.189
S 3.744 1.618 3.353 11.378
SSW 5.925 1.463 5.365 15.412
WSW 6.747 1.729 6.014 16.165
W 4.235 1.701 3.779 6.061
WNW 2.146 1.409 1.954 2.109
NNW 3.586 1.541 3.227 3.901
all 5.389 1.604 4.831 100
call: weibull(mast=neubuerg, v.set=1, dir.set=1, num.sectors=12, subset=NA, digits=3, print=TRUE)
2938 NA found and excluded from calculation
Weibull parameters
A k wind speed frequency
[m/s] [-] [m/s] [%]
N 6.601 2.296 5.848 28.161
NNE 4.668 2.366 4.137 6.144
ENE 4.387 1.97 3.889 3.145
E 3.452 1.829 3.067 1.636
ESE 3.75 1.688 3.348 1.699
SSE 3.298 1.641 2.95 4.189
S 3.744 1.618 3.353 11.378
SSW 5.925 1.463 5.365 15.412
WSW 6.747 1.729 6.014 16.165
W 4.235 1.701 3.779 6.061
WNW 2.146 1.409 1.954 2.109
NNW 3.586 1.541 3.227 3.901
all 5.389 1.604 4.831 100
call: weibull(mast=neubuerg, v.set=1, dir.set=1, num.sectors=12, subset=NA, digits=3, print=TRUE)
2938 NA found and excluded from calculation
Weibull parameters
A k wind speed frequency
[m/s] [-] [m/s] [%]
N 6.601 2.296 5.848 28.161
NNE 4.668 2.366 4.137 6.144
ENE 4.387 1.97 3.889 3.145
E 3.452 1.829 3.067 1.636
ESE 3.75 1.688 3.348 1.699
SSE 3.298 1.641 2.95 4.189
S 3.744 1.618 3.353 11.378
SSW 5.925 1.463 5.365 15.412
WSW 6.747 1.729 6.014 16.165
W 4.235 1.701 3.779 6.061
WNW 2.146 1.409 1.954 2.109
NNW 3.586 1.541 3.227 3.901
all 5.389 1.604 4.831 100
call: weibull(mast=neubuerg, v.set=1, dir.set=1, num.sectors=12, subset=NA, digits=3, print=TRUE)
2938 NA found and excluded from calculation
Weibull parameters
A k wind speed frequency
[m/s] [-] [m/s] [%]
N 6.601 2.296 5.848 28.161
NNE 4.668 2.366 4.137 6.144
ENE 4.387 1.97 3.889 3.145
E 3.452 1.829 3.067 1.636
ESE 3.75 1.688 3.348 1.699
SSE 3.298 1.641 2.95 4.189
S 3.744 1.618 3.353 11.378
SSW 5.925 1.463 5.365 15.412
WSW 6.747 1.729 6.014 16.165
W 4.235 1.701 3.779 6.061
WNW 2.146 1.409 1.954 2.109
NNW 3.586 1.541 3.227 3.901
all 5.389 1.604 4.831 100
call: weibull(mast=neubuerg, v.set=1, dir.set=1, num.sectors=12, subset=NA, digits=3, print=TRUE)
2938 NA found and excluded from calculation
Weibull parameters
A k wind speed frequency
[m/s] [-] [m/s] [%]
N 6.763 2.328 5.992 24.894
NNE 5.013 2.539 4.45 6.733
NE 4.137 1.959 3.668 2.478
ENE 4.368 2.058 3.869 2.336
E 3.393 1.717 3.026 1.199
ESE 3.757 1.647 3.36 1.14
SE 3.632 1.704 3.24 1.627
SSE 3.211 1.683 2.867 4.305
S 3.636 1.654 3.251 8.709
SSW 5.123 1.456 4.642 10.283
SW 6.946 1.665 6.207 13.535
WSW 6.42 1.698 5.728 10.845
W 3.974 1.771 3.537 4.189
WNW 2.329 1.501 2.103 1.797
NW 2.096 1.253 1.951 1.553
NNW 4.345 1.763 3.868 4.377
all 5.389 1.604 4.831 100
call: weibull(mast=neubuerg, v.set=1, dir.set=1, num.sectors=16, subset=NA, digits=3, print=TRUE)
222 NA found and excluded from calculation
Weibull parameters
A k wind speed frequency
[m/s] [-] [m/s] [%]
N 7.436 2.348 6.59 24.061
NNE 4.502 2.328 3.989 5.502
ENE 3.457 2.346 3.063 2.55
E 2.704 2.868 2.41 1.535
ESE 3.162 1.972 2.803 1.44
SSE 4.335 1.95 3.844 5.124
S 5.638 1.928 5.001 14.05
SSW 8.735 1.86 7.757 21.039
WSW 8.402 1.871 7.46 17.119
W 4.501 1.447 4.082 3.896
WNW 2.488 1.63 2.227 1.842
NNW 2.737 1.544 2.463 1.842
all 6.725 1.647 6.015 100
call: weibull(mast=neubuerg, v.set=1, dir.set=1, num.sectors=12, subset=c("2009-12-01 00:00:00", "2009-12-31 23:50:00"), digits=3, print=TRUE)
Weibull parameters
A k wind speed frequency
[m/s] [-] [m/s] [%]
N NaN <NA> 0 0
NNE NaN <NA> 0 0
ENE <NA> <NA> 5.27 100
E NaN <NA> 0 0
ESE NaN <NA> 0 0
SSE NaN <NA> 0 0
S NaN <NA> 0 0
SSW NaN <NA> 0 0
WSW NaN <NA> 0 0
W NaN <NA> 0 0
WNW NaN <NA> 0 0
NNW NaN <NA> 0 0
all <NA> <NA> 5.27 100
call: weibull(mast=neubuerg, v.set=1, dir.set=1, num.sectors=12, subset=c("2010-01-01 00:00:00", "NA"), digits=3, print=TRUE)
There were 11 warnings (use warnings() to see them)
2415 NA found and excluded from calculation
Weibull parameters
A k wind speed frequency
[m/s] [-] [m/s] [%]
N 6.656 2.289 5.896 27.529
NNE 4.714 2.362 4.178 5.713
ENE 4.54 2.011 4.023 3.03
E 3.579 1.891 3.176 1.608
ESE 3.846 1.727 3.428 1.827
SSE 3.476 1.695 3.102 4.129
S 3.942 1.677 3.52 11.274
SSW 6.309 1.516 5.688 15.12
WSW 6.942 1.773 6.179 17.037
W 4.328 1.736 3.856 6.404
WNW 2.174 1.402 1.981 2.164
NNW 3.681 1.578 3.305 4.166
all 5.542 1.623 4.963 100
call: weibull(mast=neubuerg, v.set=1, dir.set=1, num.sectors=12, subset=c("NA", "2009-12-31 23:50:00"), digits=3, print=TRUE)
2938 NA found and excluded from calculation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.