Algorithms - POSOCO/wind-forecast GitHub Wiki

Using Wind Forecast and installed capacity

  1. Let a generating plant have an installed capacity of I1 MW.
  2. Let the speed of wind at a particular instant of time be v1 Km/hr
  3. Then the power generation g1 per unit installed capacity would be a function of v1 and I1 as follows
g1 = (a1*v1^3 + b1*v1^2 + c1*v1 + d1) = f1(v1)

and so the total plant generation would be

G1 = g1*I1 = f1(v1)*I1
  1. Now using historical data of wind speeds, plant generation for say 1 month, we can use polynomial regression to derive the values of a1, b2, c2, d2
  2. Hence we have fit a polynomial regression model to convert a plant wind speed to MW
  3. Using weather forecast APIs we can get the wind speed at the generating plant for tomorrow
  4. We will feed this wind speed to the regression model and derive the MW generation for tomorrow
  5. For a complete state, we can add all the generator equations to get the state wind energy
  6. Therefore State wind energy is
G = G1 + G2 + ... + Gn = f1(v1)*I1 + f2(v2)*I2 + f3(v3)*I3 + ... + fn(vn)*In

Using Historical Data

  1. Let us take last k days for forecasting
  2. Calculate n-1 to n-k days avg_mw and do weighted average to forecast nth day avg_mw
  3. Calculate 'block mw factor' as 'block mw/day avg mw' for n-1 to n-k th days
  4. Calculate 'block mw factor' of nth day as weighted avg of block mw factors of n-1 to n-k days
  5. Calculate the 'forecasted block mw of nth day' as block mw factor of nth day * forecasted nth day avg mw
  6. If forecast error in the recent 3rd block is greater than 150 MW, then add the error50% to the forecasted value. But if error50% is greater than 20% of forecasted value, limit the correction to forecast*20%
  7. Special thanks to Shri Janardhan Reddy Asudi of SRLDC for sharing this algorithm with us

Pseudo Code for historical day ahead forecast (Runs every day once at 00 hrs)

  1. Initialize k, n, n_blocks, same_day_forecast_error_threshold_mw, error_influence_perc, same_day_forecast_modify_threshold_perc
  2. Initialize day_avg_mw_weights_array[n-k], block_mw_weights_array[n-k]
  3. Fetch MW[n-k][n_blocks] values for k days for all n_blocks
  4. For 1 to k; AVG_MW[n-k] = Sigma(MW[n-k][n_blocks])/n_blocks
  5. Calculate AVG_MW_N = Sigma(AVG_MW[n-k] * day_avg_mw_weights_array[n-k])/Sigma(day_avg_mw_weights_array[n-k])
  6. For 1 to k; For 1 to n_blocks; BLOCK_MW_FACTOR[n-k][n_blocks] = MW[n-k][n_blocks]/AVG_MW[n-k]
  7. For 1 to k; For 1 to n_blocks; BLOCK_MW_FACTOR_N[n_blocks] = Sigma(BLOCK_MW_FACTOR[n-k][n_blocks] * block_mw_weights_array[n-k])/Sigma(block_mw_weights_array[n-k])
  8. For 1 to n_blocks; MW_N[n_blocks] = BLOCK_MW_FACTOR_N[n_blocks] * AVG_MW_N

Pseudo Code for historical same day forecast correction (runs at each block)

  1. For 1 to current_block - 1; Fetch ACTUAL_MW_N[current_block - 2]
  2. Calculate forecast_error = Absolute(MW_N[current_block - 2] - ACTUAL_MW_N[current_block - 2]))
  3. If forecast_error > same_day_forecast_error_threshold_mw continue else return
  4. Calculate correction[n_block] = Math.Min(forecast_error*error_influence_perc*0.01, MW_N[n_block]*same_day_forecast_modify_threshold_perc*0.01)
  5. Calculate forecasted_MW_N[n_block] = MW_N[n_block] - correction[n_block]