Real-Time Forecasting of Deep Creek Hydro Operations, Part 2

Real-Time Forecasting of Deep Creek Hydro Operations - Part 2

Preface

This is Part 2 of Real-Time analysis.

Introduction

In Part I I’ve developed various concepts that are of interest in developing a real-time analysis tool for forecasting water releases from the Deep Creek Hydro project. Here we continue the development of the various elements that are needed to be able to do such.

Analysis

In part 1 we explored how to extract data from the Internet in an automated way. I developed a technique to determine how much water is available at any point in the day that can be used for predicting releases through the turbine generators. So that the computations can proceed with the appropriate information I recap the model as it stands right now.

# Define the function that computes the lower rule-band value at any given date.
lower_rule_band <- function(dt)  {
# Computes the lower rule band value at a specified date, dt
#
# dt is the date in the format shown: "3/22/2016"
# Usage:    x <- rule_band(dt)
#           returns lower.rb

    require(lubridate)
    # The origin of time for the time functions
    t.origin <- "1970-01-01 00:00:00"
    
    # The number of days per month
    days.per.month <- c(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
    tmp <-  as.Date(dt,'%m/%d/%Y') 
    date.year <- as.numeric(format(tmp,'%Y'))
    if((date.year %% 4) == 0) days.per.month[2] <- 29
    

    # Lowest and highest desirable at the end of the month [brookfield permit-2011jun.pdf]
    # There are 13 month values listed.  The first is the same as the last
    lower.ruleband <- c(2455.0, 2455.0, 2456.0, 2458.0, 2459.6, 2460.0, 2460.0, 2459.0, 2458.0, 2457.0, 2456.0, 2455.0, 2455.0)

    d1 <- as.POSIXlt(dt, format="%m/%d/%Y")

    month1 <- month(d1)

    days1 <- day(d1)
        
    lrb <- lower.ruleband[month1] + days1/days.per.month[month1] * (lower.ruleband[month1+1] - lower.ruleband[month1])

    return(lrb)
}

# Read the current lake level as saved from the data collection process
file1 <- "./results/levelboxitems.txt"
level.data <- readLines(file1)
x <- unlist(strsplit(level.data, split="  "))
lake.level <- as.numeric(x[4])
s <- unlist(strsplit(x[3], split=" "))
dt <- unlist(s[1])
lrb.level <- as.numeric(lower_rule_band(dt))
delta <- as.numeric(format(round(lake.level - lrb.level, 2), nsmall = 2))
print(paste("Lake Level = ", lake.level, "  Lower Rule Band = ", lrb.level, "  delta = ", delta, sep=""))

[1] “Lake Level = 2458.53 Lower Rule Band = 2456.83870967742 delta = 1.69”

# The lake volume function as a function of water elevation
lake_volume <- function(L){
    # V = Lake Volume, acre-feet
    # L = Lake Level, ft ASL
    V <- 1.0511e+07 - 8696.8 * L + 1.7989 * L^2
    V <- V * 1.0e+06/43560   # Conversion from cubic feet to acre-feet
    return(V)
}

L1 <- lake.level
L2 <- as.numeric(format(round(lrb.level, 2), nsmall = 2))
print(L1)

[1] 2458.53

print(L2)

[1] 2456.84

print(L1 - L2)

[1] 1.69

v1 <- lake_volume(L1)
v2 <- lake_volume(L2)

volume <- v1 - v2
print(format(round(volume, 1), nsmall = 1))

[1] “5643.4” So we now have the amount of water available for releases in acre-feet. What does that mean in terms of the number of hours that the generators can operate?

During normal operation at full power conditions the two generators consume around 620 cfs combined. The literature shows various values around this number, but for our current effort we shall use this number. It can always be changed. This is a simple computation.

# 1 acrefeet = 43560 cubic feet
hrs.operation <- (volume * 43560) / (620 * 3600)
hrs.operation

[1] 110.137

typical.releases <- hrs.operation / 3
typical.releases

[1] 36.71235

Around 38 releases, each lasting approximately 3 hrs, a typical duration, that can be made without accounting for additional rain and evaporation!

So, how do we move forward? This will be addressed in Part 3 of the report.


Author: PLV
First Published: March 3, 2018
FILE: 2018-03-03-Real-Time Automated Analysis, Part 2
2018 PLV Some Rights Reserved
Contact: pete@senstech.com

Back to the Top