Hydroelectric Optimization with Graph Databases (I: Introduction)
During my internship at Tigergraph, I did a PoC (proof-of-concept) project with the hydroelectric division of Mercury, a New Zealand power company. The goal was to utilize Tigergraph’s graph database to simulate Waikato river, and use that to produce insights that can save money and produce more power with less flow.
For this PoC, one of the goals was to determine the maximum amount of power (in GWh) that could be generated given a time window and river setup.
First, let’s go over the basic river mechanics.
River Mechanics
River
The river that Mercury generates electricity from runs through a series of stations. It starts at Taupo gate, which doesn’t generate electricity, and only controls how much water flows through, and ends at Kairopori station(KPO).
Stations
Stations have a headwater level (HWL), which is determined by the inflow (flow from the upstream station + tributaries) and outflow (flow from this station + spill). Higher inflows increase the HWL, while higher outflows lower the HWL and increase the tailwater level (TWL). Stations have a minimum and maximum HWL, which cannot be exceeded during operation.
Maurati (MTI)
The MTI station is two stations running on parallel rivers. This means that their tailwater levels are calculated separately. Since they share the same lake, they will share the same headwater level.
Units
Each station has multiple units, which can be turned on or off. When a unit is off, 0 flow goes through the unit, and 0 MW is produced. When a unit is turned on, a base rate of flow must flow through the unit, and each additional MW requires additional cumecs of flow.
Efficiency Curves
Each unit has an efficiency curve. Efficiency curves look approximately linear, except at the higher MW levels. Efficiency curves can be assumed to be convex, which means that more flow is needed to produce each additional MW.
Head Levels
Each station has a head water level (HWL) and a tailwater level (TWL). The gross head of a station is calculated by HWL-TWL. Each unit has a different efficiency curve at different gross head levels. The higher the gross head, the less flow that is required to produce the same amount of MWs.
Unit Types
Multiple units at a station might be of the same type, which means that they are identical and have the same efficiency curves.
Basic Schema
This is the schema used in GraphStudio. A basic description of key attributes of each vertex is listed below.
Vertices
Station
- Travel_Time: The time it takes for water to travel from the upstream station to this station, in hours. When calculating headwater level, we should use the flow from the upstream station at the timestamp current_time — travel_time.
- Normal_Minimum_Operating_Level: Minimum headwater level, in meters.
- Fill_Factor: Represents the size of the lake, used to calculate headwater levels. A larger fill factor means that more flow is needed to raise the headwater level by the same amount.
Substation: All stations except MTI will only have one substation per station. MTI has two substations. Each substation will calculate its own TWL independently.
- TWL_Type: Each station will calculate its TWL in one of two ways. Which equation is used is represented by either 1 or 0.
- TWL_A/B/C/D/E: Constants used in calculating the TWL
Unit
- Unit_Order: The index of the unit for the station. The first unit at station ARA will have a unit order of 1.
Unit_Type: Represents each unit type.
- Min_Generation: Minimum amount of MWs that a unit can generate.
- Max_Generation: Maximum amount of MWs that can be generated
- Head_Step: Each unit type has an efficiency curve for every gross head level. The gross heads are spaced by head step. For unit type A, there is an efficiency curve for each gross head at a 0.2m interval. For a given gross head, the efficiency curve can be found using floor(head/headstep+0.5)*headstep
Unit_Head_Efficiency_Curve: Represents an efficiency curve for a given unit type and head level
- Gross_Head: The head level that this efficiency curve is for, in meters.
- MW: Gives the MW output corresponding to each value in Flow_Index
- Flow_Index: Gives a flow index corresponding to each value in MW. Flow_Index is spaced at 2 cumec intervals.
- Flow: Gives a flow input corresponding to each value in MW_Target
- MW_Target: Gives a MW target corresponding to each value in Flow. MW Target is spaced at either 0.5 or 1 MW intervals.
Unit_Record: The historic data for a unit at a given minute
- Time: Time of the record
- GADS: State of the unit. “GN” means that the unit is on, everything else means that the unit is off.
- MW: The actual MW output of the unit
- MW Setpoint: The MW target that the unit is supposed to produce.
Substation_Record
- TOTPF: Penstock flow (flow at this substation)
- TWL: Tailwater level
Station_Record
- HWL: Headwater level
- TRIB: Incoming tributary flow, in cumecs
- SF: Spilled flow from this station, in cumecs
- TOTF: Total flow from this station
- Water_Balance: This is a correction value that is calculated in order to account for tributary measurement errors, used to better match up the simulation with historic data. It is aggregated by day.
Using this schema, we can generate station efficiency curves, which will be done in the next section.