11"""
2- The ``power_curves`` module contains functions for applying calculations to the
2+ The ``power_curves`` module contains functions for applying alterations to the
33power curve of a wind turbine, wind farm or wind turbine cluster.
44
55"""
@@ -17,7 +17,7 @@ def smooth_power_curve(power_curve_wind_speeds, power_curve_values,
1717 standard_deviation_method = 'turbulence_intensity' ,
1818 mean_gauss = 0 , ** kwargs ):
1919 r"""
20- Smoothes the input power curve values by using a gaussian distribution.
20+ Smoothes the input power curve values by using a Gauss distribution.
2121
2222 Parameters
2323 ----------
@@ -27,18 +27,24 @@ def smooth_power_curve(power_curve_wind_speeds, power_curve_values,
2727 power_curve_values : pandas.Series or numpy.array
2828 Power curve values corresponding to wind speeds in
2929 `power_curve_wind_speeds`.
30- block_width : Float
30+ block_width : float
3131 Width of the moving block. Default: 0.5.
32- standard_deviation_method : String
33- Method for calculating the standard deviation for the gaussian
32+ wind_speed_range : float
33+ The sum in the equation below is taken for this wind speed range below
34+ and above the power curve wind speed. Default: 15.0.
35+ standard_deviation_method : string
36+ Method for calculating the standard deviation for the Gauss
3437 distribution. Options: 'turbulence_intensity', 'Staffell_Pfenninger'.
3538 Default: 'turbulence_intensity'.
39+ mean_gauss : float or integer
40+ Mean of the Gaus distribution in
41+ :py:func:`~.tools.gaussian_distribution`:. Default: 0.
3642
3743 Other Parameters
3844 ----------------
39- turbulence intensity : Float , optional
40- Turbulence intensity at hub height of the wind turbine the power curve
41- is smoothed for.
45+ turbulence intensity : float , optional
46+ Turbulence intensity at hub height of the wind turbine, wind farm or
47+ wind turbine cluster the power curve is smoothed for.
4248
4349 Returns
4450 -------
@@ -49,17 +55,36 @@ def smooth_power_curve(power_curve_wind_speeds, power_curve_values,
4955
5056 Notes
5157 -----
52- The following equation is used [1]_:
53- # TODO: add equation
58+ The following equation is used to calculated the power curves values of the
59+ smoothed power curve [1]_:
60+ P_{smoothed}(v_{std}) = \sum\limits_{v_i}^{} \Delta v_i \cdot P(v_i)
61+ \cdot \frac{1}{\sigma \sqrt{2 \pi}}
62+ \exp \left[-\frac{(v_{std} - v_i -\mu)^2}{2 \sigma^2} \right]
63+
64+ with:
65+ P: power [W], v: wind speed [m/s],
66+ :math:`\sigma`: standard deviation (Gauss), :math: `\mu`: mean (Gauss),
67+
68+ :math:`P_{smoothed}` is the smoothed power curve value,
69+ :math:`v_{std}` is the standard wind speed in the power curve,
70+ :math: `\Delta v_i` is the interval length between
71+ :math: `$v_\text{i}$` and :math: `$v_\text{i+1}$`
72+
73+ This way of smoothing power curves is also used in [2]_ and [3]_.
5474
5575 References
5676 ----------
5777 .. [1] Knorr, K.: "Modellierung von raum-zeitlichen Eigenschaften der
5878 Windenergieeinspeisung für wetterdatenbasierte
5979 Windleistungssimulationen". Universität Kassel, Diss., 2016,
6080 p. 106
81+ .. [2] Nørgaard, P. and Holttinen, H.: "A Multi-Turbine and Power Curve
82+ Approach". Nordic Wind Power Conference, 1.–2.3.2004, 2000
83+ .. [3] Kohler, S. and Agricola, A.-Cl. and Seidl, H.:
84+ "dena-Netzstudie II. Integration erneuerbarer Energien in die
85+ deutsche Stromversorgung im Zeitraum 2015 – 2020 mit Ausblick
86+ 2025". Technical report, 2010.
6187
62- # TODO: add references
6388 """
6489 # Specify normalized standard deviation
6590 if standard_deviation_method == 'turbulence_intensity' :
@@ -88,7 +113,7 @@ def smooth_power_curve(power_curve_wind_speeds, power_curve_values,
88113 wind_speed_range + block_width ,
89114 block_width ) +
90115 power_curve_wind_speed )
91- # Get standard deviation for gaussian filter
116+ # Get standard deviation for Gauss function
92117 standard_deviation = (
93118 (power_curve_wind_speed * normalized_standard_deviation + 0.6 )
94119 if standard_deviation_method is 'Staffell_Pfenninger'
@@ -102,7 +127,7 @@ def smooth_power_curve(power_curve_wind_speeds, power_curve_values,
102127 standard_deviation , mean_gauss )
103128 for wind_speed in wind_speeds_block )
104129 # Add value to list - add 0 if `smoothed_value` is nan. This occurs
105- # because the gaussian distribution is not defined for 0.
130+ # because the Gauss distribution is not defined for 0.
106131 smoothed_power_curve_values .append (0 if np .isnan (smoothed_value )
107132 else smoothed_value )
108133 # Create smoothed power curve DataFrame
@@ -115,10 +140,10 @@ def smooth_power_curve(power_curve_wind_speeds, power_curve_values,
115140
116141
117142def wake_losses_to_power_curve (power_curve_wind_speeds , power_curve_values ,
118- wake_losses_model = 'power_efficiency_curve' ,
119- wind_farm_efficiency = None ):
143+ wind_farm_efficiency ,
144+ wake_losses_model = 'power_efficiency_curve' ):
120145 r"""
121- Applies wake losses depending on the method to a power curve.
146+ Reduces the power values of a power curve by an efficiency ( curve) .
122147
123148 Parameters
124149 ----------
@@ -128,27 +153,23 @@ def wake_losses_to_power_curve(power_curve_wind_speeds, power_curve_values,
128153 power_curve_values : pandas.Series or numpy.array
129154 Power curve values corresponding to wind speeds in
130155 `power_curve_wind_speeds`.
156+ wind_farm_efficiency : float or pd.DataFrame
157+ Efficiency of the wind farm. Either constant (float) or efficiency
158+ curve (pd.DataFrame) containing 'wind_speed' and 'efficiency' columns
159+ with wind speeds in m/s and the corresponding dimensionless wind farm
160+ efficiency (reduction of power).
161+ Default: None.
131162 wake_losses_model : String
132163 Defines the method for talking wake losses within the farm into
133164 consideration. Options: 'power_efficiency_curve',
134165 'constant_efficiency'. Default: 'power_efficiency_curve'.
135- wind_farm_efficiency : Float or pd.DataFrame or Dictionary
136- Efficiency of the wind farm. Either constant (float) or efficiency
137- curve (pd.DataFrame or Dictionary) containing 'wind_speed' and
138- 'efficiency' columns/keys with wind speeds in m/s and the
139- corresponding dimensionless wind farm efficiency (reduction of power).
140- Default: None.
141166
142167 Returns
143168 -------
144169 power_curve_df : pd.DataFrame
145- With wind farm efficiency reduced power curve. DataFrame has
146- 'wind_speed' and 'power' columns with wind speeds in m/s and the
147- corresponding power curve value in W.
148-
149- Notes
150- -----
151- TODO add
170+ Power curve with power values reduced by a wind farm efficiency.
171+ DataFrame has 'wind_speed' and 'power' columns with wind speeds in m/s
172+ and the corresponding power curve value in W.
152173
153174 """
154175 # Create power curve DataFrame
0 commit comments