reV.losses.power_curve.PowerCurveLosses
- class PowerCurveLosses(power_curve, wind_resource, weights=None, site=None)[source]
Bases:
object
A converter between annual losses and power curve transformation.
Given a target annual loss value, this class facilitates the calculation of a power curve transformation such that the annual generation losses incurred by using the transformed power curve when compared to the original (non-transformed) power curve match the target loss as close as possible.
The underlying assumption for this approach is that some types of losses can be realized by a transformation of the power curve (see the values of
TRANSFORMATIONS
for details on all of the power curve transformations that have been implemented).The advantage of this approach is that, unlike haircut losses (where a single loss value is applied across the board to all generation), the losses are distributed non-uniformly across the power curve. For example, even in the overly simplified case of a horizontal translation of the power curve (which is only physically realistic for certain types of losses like blade degradation), the losses are distributed primarily across region 2 of the power curve (the steep, almost linear, portion where the generation rapidly increases). This means that, unlike with haircut losses, generation is able to reach max rated power (albeit at a greater wind speed).
- power_curve
The original Power Curve.
- Type:
- wind_resource
An array containing the wind speeds (i.e. wind speed distribution) for the site at which the power curve will be used. This distribution is used to calculate the annual generation of the original power curve as well as any additional calculated power curves. The generation values are then compared in order to calculate the loss resulting from a transformed power curve.
- Type:
- weights
An array of the same length as
wind_resource
containing weights to apply to each generation value calculated for the corresponding wind speed.- Type:
- Parameters:
power_curve (
PowerCurve
) – The “original” power curve to be adjusted.wind_resource (array_like) – An iterable containing the wind speeds measured at the site where this power curve will be applied to calculate generation. These values are used to calculate the loss resulting from a transformed power curve compared to the generation of the original power curve. The input values should all be non-zero, and the units of should match the units of the
power_curve
input (typically, m/s).weights (array_like, optional) – An iterable of the same length as
wind_resource
containing weights to apply to each generation value calculated for the corresponding wind speed.site (int | str, optional) – Site number (gid) for debugging and logging. By default,
None
.
Methods
Calculate the annual losses from a transformed power curve.
fit
(target, transformation)Fit a power curve transformation.
Attributes
Total power generation from original power curve.
- annual_losses_with_transformed_power_curve(transformed_power_curve)[source]
Calculate the annual losses from a transformed power curve.
This function uses the wind resource data that the object was initialized with to calculate the total annual power generation with a transformed power curve. This generation is compared with the generation of the original (non-transformed) power curve to compute the total annual losses as a result of the transformation.
- Parameters:
transformed_power_curve (
PowerCurve
) – A transformed power curve. The power generated with this power curve will be compared with the power generated by the “original” power curve to calculate annual losses.- Returns:
float – Total losses (%) as a result of a the power curve transformation.
- fit(target, transformation)[source]
Fit a power curve transformation.
This function fits a transformation to the input power curve (the one used to initialize the object) to generate an annual loss percentage closest to the
target
. The losses are computed w.r.t the generation of the original (non-transformed) power curve.- Parameters:
target (float) – Target value for annual generation losses (%).
transformation (PowerCurveTransformation) – A PowerCurveTransformation class representing the power curve transformation to use.
- Returns:
numpy.array
– An array containing a transformed power curve that most closely yields thetarget
annual generation losses.- Warns:
reVLossesWarning – If the fit did not meet the target annual losses to within 1%.
Warning
This function attempts to find an optimal transformation for the power curve such that the annual generation losses match the
target
value, but there is no guarantee that a close match can be found, if it even exists. Therefore, it is possible that the losses resulting from the transformed power curve will not match thetarget
. This is especially likely if thetarget
is large or if the input power curve and/or wind resource is abnormal.