Research design
The project follows design science research: a useful artifact is built to solve a real problem, then evaluated against that problem. The artifact here is HydroSight, an analytics and alerting system for one real plant. The work moved through six phases, similar to CRISP-DM.
Understand the plant
Study the 49.9 kW site, its sensors and its operating context on an agricultural channel.
Prepare the data
Profile 590,674 records, fix sentinels and dead channels, fill gaps and flag every change.
Model
Virtual flow sensor, bearing health model, Isolation Forest and forecasts.
Translate
Alert rules and natural-language messages for operators, managers and government.
Build
Responsive web app with a replay simulator, PHP API and assistant.
Evaluate
Backtest alarms on five years, test forecasts on unseen 2026 data, review insights.
System architecture
Data and cleaning
The source is the plant's own log: 590,674 five-minute records from 11 March 2021 to 30 October 2026 with 22 columns. Profiling found six kinds of problem, and each was fixed with a rule that leaves a trace in a quality flag.
- Missing intervals. 2,132 records were missing in 14 gaps (longest 24 hours). The timeline was rebuilt on a complete 5-minute grid and gaps were filled by time-based linear interpolation.
- Sentinel values. The "currently generating power" channel reads about 654 kW whenever the plant is offline (56,977 records), and generator power overflows to about 6,550 kW in 144 records. These were treated as invalid. When stopped, power was set to zero; when running, grid power was rebuilt from generator power using a fitted inverter relationship.
- Frozen inverter data. In 12 periods (82 hours) power, voltage, speed and the energy counter all stopped changing while pressure and temperature kept updating. The energy counter barely moved, so these are hidden stops, not running time. They are classed as HELD, with power set to zero and voltage marked unavailable, and they raise their own alert.
- Dead channels. Frequency is always 60 Hz, and water level, flow rate and efficiency are always zero. They were dropped and replaced with physics-based estimates.
- Sensors not yet installed. Bearing temperatures read zero until 24 June 2021 and were marked as unavailable.
- Counters. Daily energy was recomputed from the cumulative counter so it stays consistent across gaps.
Physics-informed virtual sensing
Without a working flow meter the plant cannot report how much water it uses or how efficiently. Penstock friction solves this. The more water flows, the more head is lost before the turbine, so the measured head falls as output rises. A curve was fitted to the median head in each 1 kW power bin.
The head loss grows with the square of flow, \(H_0-H=K\,Q^2\). Calibrating \(K\) so that design flow (0.11 m³/s) gives the measured loss at rated output (3.31 m) lets flow and efficiency be estimated from every record:
Performance and loss accounting
Bearing health model
A gradient-boosting regressor learned how bearing 1 temperature normally depends on bearing 2 temperature, current and 6-hour load and time of day during 2021-22, before the typhoon. It was trained to 30 June 2022 and checked on July to mid-September 2022 (mean absolute error 2.3 °C). Applied to later years, the difference between actual and expected temperature becomes a health indicator.
Multivariate anomaly detection
An Isolation Forest looks at eleven signals together. Unusual combinations are easier to separate from the rest with random splits, so they end up with short paths in the trees. Signals were first scaled with the median and median absolute deviation so outliers do not distort the scale.
Forecasting
Gradient-boosting models predict the change from the current output at 1, 6 and 24 hours ahead, using recent lags, rolling means, head, guide vane and calendar features. Quantile models give the 10th and 90th percentiles for an 80% band. Training used 2021-2025 and testing used only 2026.
Alarm management
Fourteen rules turn signals into alerts. Following the ANSI/ISA-18.2 alarm-management standard, each rule needs the condition to hold for a minimum time (on-delay), must cross a separate clear level to reset (deadband), and cannot re-alarm within a cooldown period. Readings that are frozen are never alarmed on. Alerts that depend on the unit running close quietly when it stops, and a lower-priority alert on the same signal is suppressed while a higher one is active.
Natural-language generation
Messages are produced with the classic data-to-text pipeline. Content selection picks the alert, the reading and the context. Aggregation combines alerts raised in the same five-minute step into one SMS. Lexical choice adapts wording to the reader: short imperative SMS for staff (single 160-character segment where possible), structured e-mail with causes and actions from the knowledge base for managers, and formal notices for the government energy office. Realization fills templates with formatted values and units. Daily briefs at 07:00 and weekly reports on Monday mornings are generated from the day's statistics.
Language-model assistant
The "Ask the plant" box and the Explain button always give a deterministic answer first, built from live values and the closest knowledge-base entries (keyword scoring over titles, tags and summaries). When the PHP server has an API key, the same question, the telemetry snapshot and the retrieved entries are sent to a large language model through its HTTP API. A system prompt limits answers to the supplied data, asks for plain English under 160 words with numbered actions, and puts safety first. Requests are rate-limited per client, and the page falls back to the knowledge-base answer if the model is unavailable.
Visualization design
The interface follows overview first, zoom and filter, then details on demand. Key numbers sit in tiles at the top, trends and limits sit in small charts, and details live in tooltips, the alert log and the e-mail view. The visual language is a light adaptation of the Linear design system: white cards with hairline borders, Inter type, one lavender accent for data, and red and amber kept for limits and alerts so they stand out.
Limitations and ethics
- There is no measured flow, so the virtual sensor depends on the nameplate calibration. A prefectural case sheet lists a larger intake flow (0.186 m³/s), which would change absolute flow and efficiency values but not the trends.
- No maintenance log was available, so causes of outages are inferred from data and public weather records.
- Forecasts are only as good as persistence until rainfall and channel-level data are added.
- SMS and e-mails are simulated. Phone numbers are masked and addresses use reserved example domains.
- The telemetry belongs to the plant operator and is used here only for academic analysis.