For control of run-of-river hydroelectric facilities, the author proposes use of a matrix methodology to replace the typical proportional-integral-derivative (PID) loop. This methodology allows for operational adjustments at set intervals and is particularly useful at plants where site-specific real-time information is not readily available or suitably accurate.
By Michael A. Chmielewski
This article has been evaluated and edited in accordance with reviews conducted by two or more professionals who have relevant expertise. These peer reviewers judge manuscripts for technical accuracy, usefulness, and overall importance within the hydroelectric industry.
There are many ways to program a hydro site for automated run-of-river operation. One more ubiquitous method is use of a proportional-integral-derivative control (PID) loop within a programmable logic controller (PLC). With real-time sensing inputs and site-specific hydrological data, a PLC's mathematical capabilities can be used to provide a flow control regime in which net flow in the river is periodically determined and turbine outputs are regulated to consume that flow at maximum head and minimal spillage.
However, this approach has stringent requirements that are difficult and likely impractical to meet at older facilities that lack state-of-the art equipment and precise site-specific data. To properly engineer a PID loop for run-of-river automation, the following is required:
- Real-time sensing of gate and blade positions, with a turbine flow calculation programmed into the PLC over the full range of heads;
- Real-time sensing of the water level at the dam, with a weir calculation programmed into the PLC to obtain resulting flow over the dam;
- Accurate means for calculating any additional flows through sluices and/or other spillage; and
- Real-time sensing of upstream water levels and data regarding associated storage capacity.
The author worked for a company that owned 12 small plants that were "older facilities that lack state-of-the art equipment and precise site-specific data." Without this critical information, the company could not tune the PID loops to control the plants as desired, regardless of how much trial and error was applied. The upstream reservoirs had unacceptable fluctuations, units were starting and stopping more frequently than necessary, and components were wearing out too quickly.
To determine how to best "smooth out" operations, the company began to dissect the operation of a PID loop in a hydro application. The objective was to minimize unit gate fluctuations and the frequent starting/stopping the company was experiencing because controls that were set too "tightly" were mimicking upstream fluctuating operations and exacerbating them. The company was willing to sacrifice some lost water over the dam to minimize wear and tear on equipment and have a more widely dampened unit response.
Applying a PID loop
A PID controller is a generic loop feedback mechanism in which the controller attempts to correct the error between a measured process variable and desired set point by calculating and then outputting a corrective action that can adjust the process.
A simple analogy is a familiar PID loop application: vehicle cruise control. Say the cruise control is set at 60 miles per hour (mph). If vehicle speed drops below 60 mph, the PID loop sends a signal for more gas. If vehicle speed passes 60 mph, the PID loop sends a signal for less gas.
For a run-of-river plant that contains a single unit, headwater level is analogous to the vehicle speed. Opening the wicket gates is analogous to giving it more gas, and closing the wicket gates is analogous to easing up on the gas.
However, even with a stilling well and highly resolute level sensor, basing control on headwater level provides too much fluctuation. A fluctuation of just 0.02 foot is enough to significantly impair a level control algorithm. Before a PID loop can succeed, this noise has to be filtered out of the system. To accomplish this, the company developed a subroutine that continuously averages the headwater level signal and produces values every minute. These values are then averaged over 10-minute intervals, which ensures the headwater level reading is ready for control algorithm processing.
Because the company did not have all the data needed to properly engineer the PID loop parameters, personnel retuned the loops using a systematic trial and error method.
Using cruise control to illustrate, say the vehicle starts up an incline, which results in reduced speed and increased gas flow. If the proportional gain in the PID loop is set high enough, the vehicle will exceed 60 mph, causing gas flow to decrease. As long as the incline is constant and the integral and derivative values are set to zero, the proportional value can be adjusted so that the vehicle will overshoot and then undershoot 60 mph by the same amount. Adjusting this proportional value determines whether vehicle speed will range (for example) from 58 mph to 62 mph or from 50 mph to 70 mph. Ideally, this value should provide a steady oscillation slightly above and below the set point. Once a steady sine wave is achieved, the integral value can be increased to dampen the oscillation and end up right at 60 mph. Lastly, increasing the derivative value will shorten the time required for the vehicle to equalize at 60 mph.
The limiting factor is that this tuning methodology assumes a controlled rate of change (the vehicle is on a constant incline). Trying to tune this loop while randomly encountering hills, valleys, and flat surfaces will result in haphazard, frustrating, and inconclusive guessing.
However, this tuning method can only be used in a hydro application if there is a controlled flow change. With a controlled change, it is possible to achieve consistent oscillation in the headwater level with the proportional gain, dampen the overshoot with the integral value, and quicken the return to dam crest with the derivative value. This process is rarely going to be reliable unless you own the plant upstream or have some means of definitive flow control for loop tuning.
Let's consider the input the PID loop processes. Basically, the values can be quantified as:
- Difference between the set point and actual value; and
- Rate of change of the actual value over a period of time.
A PID loop is constantly processing these two values. The company determined that this constant processing was overkill. Personnel needed to determine a new method that would eliminate fast and dramatic unit responses, replacing the algorithm with one that was more heavily dampened and intuitively controlled.
Presenting an alternative
The first step in this proposed methodology is to select a timeframe for plant control. A rule of thumb is 20 minutes, primarily because river flow does not change dramatically in less than this time.
The next step is to program a subroutine into the PLC that looks at the two aforementioned parameters every 20 minutes. This subroutine simply looks at a matrix of values to alter the gate setting that is based on how far away the headwater level is from the set point and how quickly the level is rising or falling.
For this illustration, river flow is constant and water is within the dead band between +/- 0.02 foot of the dam crest. A Francis unit is running at 50 percent of gate. It starts to drizzle upstream. After 20 minutes, headwater level rises 0.03 foot (see Figure 1 on pg. 46). The water level has not yet risen enough to warrant a gate change. The drizzle continues, and headwater level rises another 0.03 foot to 0.06 foot over the dam crest. The subroutine tells the gate to open 5 percent. The drizzle stops, and in the next 20 minutes the headwater level stays at 0.06 foot over the dam crest. However, because this level is still significantly above the dam crest, the subroutine opens the gate another 3 percent. With no more precipitation, the level drops 0.02 foot over the next 20 minutes, bringing the level to 0.04 foot over the crest, resulting in no gate change.
In this example, the unit has equalized with flow at 58 percent of gate and will remain there until there is more precipitation or the river flow wanes. Obviously, as flow subsides, the subroutine reduces the gate setting in similar fashion.
To allow easy access to this information, the gate adjustments and time intervals, including the next anticipated gate change and countdown to that change, can appear as settings and variables in a supervisory control and data acquisition (SCADA) screen (see Figure 2 on pg. 47). Anyone who is familiar with the river and plant can tweak these settings. All of this is easily programmable into any PLC through a timer and a series of greater than, less than, and equal to functions.
In Figures 1 and 2, the change in water level along the X and Y axes are in ranges of 0.03 foot. This range can be set according to the particular hydro plant and river characteristics (the accuracy and resolution of the headwater level sensor plays a critical role).
It should be noted that the values within the control matrix do not need to be symmetrical. In the example, water generally rises faster than it falls, so the gate changes are more pronounced as water rises.
Dispatching multiple units
Dispatching multiple units at a single facility is arguably one of the most challenging aspects of automatic programming. To determine how many units should be on line and at what output, the plant owner could use a dedicated PID loop for each unit or a single master PID loop with an arbitrary "points" system that ranges from all units off to all units on at full output. Either way, the unit dispatch function adds significant complication to PID loop programming and tuning.
Using this matrix methodology, the first step is to determine how to the units would be dispatched if the plant was being controlled manually. Once this is determined, an algorithm can be devised for conversion into a control system program so unit regulation can happen automatically. There is no "one size fits all" run-of-river control system. While efficiency curves, index test results, and/or detailed hydraulic river modeling information would be ideal to have, part of the point of developing the matrix methodology was to be able to work without them.
Consider a plant with two units of different size: one with a capacity of 1.5 MW and the other 500 kW. The large unit is a full Kaplan, and the small unit is a modified Kaplan with only blade control. To standardize this process, the discussion will involve just gate/blade settings in terms of 0 to 100 percent, ignoring corresponding blade settings on the full Kaplan. There is no turbine documentation available in terms of flow and efficiency curves, and information regarding pond surface area and storage volume is not accurate enough to be helpful.
In this scenario, the smaller unit will be dispatched first and run to full output in the lower flow ranges. However, when the 500-kW unit is at maximum capacity and flow increases, switching to the 1.5-MW unit at minimum setting (~400 kW) draws the pond down. The first attempts at automation of this facility yielded problematic hunting of the units, in repeatedly switching from small unit at maximum output to large unit at minimum output.
Ultimately, personnel realized it was most cost-effective to allow significant flow to pass over the dam with the small unit operating at 500 kW before bringing the larger unit on line and shutting down the smaller unit. The company determined that running the smaller unit at maximum capacity, with about 4 inches of water flowing over the dam, matched the flow of the larger unit when on line alone at about 525 kW. This became the point at which to swap units (see Figure 3). The amount of spill required before unit swap can be added to the SCADA screen as a control variable.
Without turbine documentation or index testing results, the flows on the X axis in Figure 3 were estimates. There was little head variation at this site, so unit flows at particular gate settings with water near the dam crest remained fairly constant.
In the situation outlined above, there was a period of time required for the 4 inches of flow over the dam to pass through the larger unit, allowing the water level to return to dam crest. To prevent unit hunting, the company added bits to the control program for "recently on" and "recently off." If a unit had just come on line, it would not be stopped (based on the controls algorithm) for a set period of time, which was adjustable. Conversely, if a unit had just been shut down, the controls would not restart it for that set period. This ensured that the river was allowed to equalize before unit swapping took place.
Restarting after a prolonged shutdown
Another advantage with the matrix methodology manifests itself in restarting after a prolonged shutdown. For this example, consider a plant with three identical units with the river at a constant flow and operations in a steady state. Two units are on-line at full output and water is right at the dam crest. An eight-hour shutdown is now required to perform maintenance, meaning the water that was passing through the two units now passes over the dam.
When maintenance is complete and it is time to restart units, a PID loop tuned for normal flow operations may react faster than desired when placed back into automatic mode, to recapture the flow spilling over the dam. Because this scenario does not represent a normal operating situation, the PID loop may quickly bring the two units back on line and overshoot by bringing a third unit on line if flows have not equalized. The units would then oscillate for a period until steady state could be reached again. Because the differential between the control variable and set point is artificially large, the PID loop could make a dramatic change in plant output over a short period of time to compensate for the adjustment the river made in spilling all flow over the dam during the eight-hour shut down. A dramatic change in output contradicts run-of-river theory.
Using the matrix methodology, there is a maximum change per the selected time period programmed into the algorithm. The river is allowed to settle for the specified period of time after each change, and the changes are limited in magnitude. While the matrix methodology may require a longer timeframe to return to steady state with two units on-line at full output, there will be no overshoot, and the river will experience a more gradual and controlled transition, consistent with run of river theory.
One other useful tool the company identified while trying to pinpoint causes in pond fluctuations and properly tweak the algorithms was to spend a 24 hour period locked into a constant plant output when the river was in a fairly steady state condition. Under these conditions, any fluctuations in headwater level must be a function of operations upstream. When beginning this 24 hour period, the company intentionally spilled water over the dam and monitored the plant closely to ensure water was not drawn below the dam crest.
It is relatively straightforward to accumulate and graph this data, making any variations easy to quantify using a weir equation for the water passing over the dam crest. This information could be useful in facilitating discussions with personnel at upstream facilities that may be making run-of-river programming more difficult.
At the three sites where this methodology was employed, it generally took a full calendar year to tweak the systems. Over the course of a year, the sites would experience the full gamut of flow possibilities, from spring floods to summer droughts to icy winter conditions. Choosing matrix settings that drove the units to respond as desired was best accomplished through observing and tweaking settings during all potential flow conditions.
A characteristic that distinguishes conventional hydro from its non-renewable energy generating counterparts is that one cannot schedule a date and time to commission the plant across the entire range of operations. Headwater level and gross head scenarios cannot be adequately simulated. Thus, the only true test of automated operations is to observe and document over a full range of flow scenarios, over time. This unpredictability highlights another advantage of having the ability to tweak the aforementioned parameters through the SCADA system, even remotely, as the many and varied flow conditions present themselves at all hours of the day, night, and week.
Again, this matrix methodology is an alternative to a PID loop, to be used at hydro plants where site-specific real-time information is not readily available or suitably accurate. As with the PID loop, the matrix methodology will work with any PLC. Only the syntax of the required logic will differ.
It is important to note that this methodology is only as good as the associated physical inputs and outputs. Relevant level sensor inputs must be calibrated and accurate. Gate and blade output controls must be calibrated and precise, and not drift. And, as mentioned, equipment will deteriorate over time, thus requiring the setting to be periodically checked and/or calibrated.
Mike Chmielewski, P.E., is engineering manager with engineering firm HDR|DTA. He assisted in the development of the methodology discussed in this article when he worked as operations manager for a company that owned and operated 12 small run-of-river hydro plants.