lslog {loadshaper}R Documentation

Logistic Method for Matching Peak and Load Factor

Description

Logistic Method for Matching Peak and Load Factor

Usage

lslog(
  x,
  target_max = 10000,
  target_lf = 0.7,
  k = 1,
  inf_pos = 0.5,
  iter = 500,
  def_l = 1
)

Arguments

x

A numeric array, representing reference load shape. All values must be strictly positive containing no NA(s). The length of x must be > 167.

target_max

Target peak value of resultant load shape, must be > 0.

target_lf

Target load factor of resultant load shape, must be numeric in between 0 and 1 (exclusive).

k

Steepness parameter, must be a positive number. See "Details".

inf_pos

Inflection point parameter. See "Details".

iter

Number of iterations for solving certain parameter. Must be >= 30. See "Details".

def_l

Start parameter for solving l, must be a positive numeric.

Details

The algorithm first evaluates the load factor of the reference load shape x, which is defined by the ratio of average to peak value. If the target load factor is greater than reference level, then all base values are multiplied by a number > 1. If the target load factor is less than reference level, then all base values are multiplied by a number < 1. The multipliers increase or decrease with a sigmoid pattern.

The sigmoid function is a transformed version of

f(x)=\frac{L}{1 - exp(-k(x-x_0))}

Parameter k is shape parameter, shaping the "sigmoidness" of the function. Larger value of k indicates more steepness in the function and lower value results in changes in multipliers in more linear fashion.

Location parameter x_0 controls the inflection point of the function and derived from inf_pos. inf_pos = 0.5 indicates the inflection point of the sigmoid multipliers is halfway.

The L parameter in the sigmoid is numerically solved. The number of iterations is equal to the iter argument, optimized based on the minimum difference between the derived and target load factor.

The return object contains a data frame df, having the following columns:

Value

A list of class "lslog", having following elements:

See Also

lslin, print.lslog, summary.lslog, plot.lslog, lscore

Examples

loads <- ercot[ercot$Year == 2019, ]$COAST
plot(loads, type = "l")
logistic_loadshape <- lslog(loads, target_lf = 0.50, k = 0.5)
summary(logistic_loadshape)
#---------------------------------------------------
loads2 <- ercot[ercot$Year == 2020, ]$ERCOT
plot(loads2, type = "l")
logistic_loadshape2 <- lslog(loads2, target_lf = 0.6,
                            k = 0.5, inf_pos = 0.4)
summary(logistic_loadshape2)
#---------------------------------------------------
loads3 <- ercot[ercot$Year == 2020, ]$ERCOT
plot(loads3, type = "l")
logistic_loadshape3 <- lslog(loads3, target_lf = 0.9)
summary(logistic_loadshape3)







[Package loadshaper version 1.1.1 Index]