Streamflow Prediction Using Hybrid AI Model
Description
In recent years, the need for accurate streamflow prediction has grown immensely, especially in regions like Gilgit-Baltistan where water availability is highly dependent on rainfall and snowmelt. Our final year project aimed to meet this need by developing an AI-powered predictive system that not only estimates daily streamflow but can also be adapted to other regions and simulate future changes due to climate scenarios.
Objectives
The primary aim of our project is to improve streamflow prediction using artificial intelligence (AI), enabling water resource managers, planners, and local stakeholders to make informed decisions. We had three core objectives: 1. Development of a Hybrid AI Model: We wanted to build a predictive system that could accurately estimate daily streamflow based on weather and hydrological inputs. Instead of relying on one algorithm, we created a hybrid model by combining an Elman Neural Network (ENN) with ensemble machine learning models like Random Forest and XGBoost. This combination allowed us to capture both temporal dependencies and feature-level insights, leading to robust and accurate predictions. 2. Transfer Learning to Apply Across Watersheds: Collecting large volumes of data for every river basin isn’t always feasible. We used transfer learning to make our model adaptable across regions. After training our AI model on historical data from the Astore watershed, we successfully transferred it to the Gilgit watershed using only two years of data. This approach showcased the model’s versatility and minimized the need for extensive retraining. 3. Scenario-Based Climate Simulations: Future climate variability poses major risks to water availability. We simulated several climate scenarios—such as increased precipitation, reduced snowmelt, and extreme events—by modifying the model inputs. These simulations helped us understand how streamflow might change under shifting climatic conditions, providing early warnings for both scarcity and flooding risks.
Socio-economic benefit
Predicting streamflow accurately is not just a technical challenge; it's a societal necessity. Our work brings a range of socio-economic benefits: 1. Better Water Resource Management: Water distribution, reservoir operations, and irrigation planning rely heavily on streamflow estimates. Accurate forecasts help avoid overuse or shortages and contribute to more equitable water sharing among agriculture, urban use, and hydropower sectors. 2. Disaster Preparedness and Mitigation: Although our project doesn’t focus on flood forecasting directly, knowing when and how streamflow will rise is critical. Our system provides early warnings that can help authorities make decisions to minimize the impacts of extreme events. 3. Cost-Effective Planning: Building physical infrastructure like dams and canals costs millions. A reliable prediction system supports data-driven planning and can significantly reduce the cost of trial-and-error approaches. 4. Local Empowerment Through GUI: Our graphical user interface allows non-technical users to interact with the system easily. Local engineers, planners, and even farmers can use it to predict streamflow based on available weather data, making the technology accessible to the people who need it most. 5. Contribution to SDGs: Our work supports several Sustainable Development Goals (SDGs), including SDG 6 (Clean Water), SDG 11 (Sustainable Cities), SDG 13 (Climate Action), and SDG 15 (Life on Land). It promotes sustainable use of water resources and builds climate resilience.
Methodologies
Our methodology was divided into three main parts, each corresponding to one objective. Objective 1: Hybrid AI Model Development 1. Data Collection and Preprocessing: We collected daily streamflow, precipitation, maximum temperature, and minimum temperature data from multiple stations in the Astore watershed between 1995 and 2018. We cleaned the data and handled missing values carefully to ensure consistency. 2. Feature Engineering: To help the model learn better, we added lagged versions of streamflow and climate data (1-day, 7-day, and 30-day lags). We also added seasonal indicators like month and day-of-year. 3. Wavelet Transform: We applied the Discrete Wavelet Transform to key variables to break them down into different frequency components. This helped the model learn both sudden spikes and smooth variations in streamflow. 4. Model Architecture: • Elman Neural Network (ENN) to capture temporal patterns • Random Forest and XGBoost for ensemble learning from feature-rich data • Ensemble Output: We combined all predictions using weighted averaging based on RMSE values of individual models. 5. Training and Evaluation: The model was trained on 60% of the data, tested on 20%, and validated on the remaining 20%. We used R², RMSE, MAE, PBIAS, and NSE to evaluate performance. Our hybrid model achieved 98% R² on the test set. Objective 2: Transfer Learning to Gilgit Watershed 1. Fine-Tuning Astore Model: We reused the trained model architecture and weights from the Astore model and applied them to Gilgit data. Only two years of Gilgit data were available. 2. Input Expansion: We created polynomial features and used mutual information regression to select the most important ones. We padded and reshaped data to fit the model input. 3. Model Extension: We added residual blocks and dropout layers to improve generalization and reduce overfitting during retraining. 4. Evaluation: We achieved 84% R² in testing. Peak flood prediction error was under 22%. Despite limited training data, performance was robust. Objective 3: Climate Scenario Simulations 1. Scenario Design: We defined 4 key scenarios: • Increased precipitation (40% higher) • Reduced snowmelt (increased temperature, reduced rainfall) • Extreme events (random high precipitation days) • Gradual climate change (temperature rise over time) 2. Input Manipulation: We modified input data accordingly and ran the hybrid model to see how streamflow changes. 3. Visualization: We used time-series plots, flow duration curves, and cumulative volume plots to visualize changes. 4. Findings: The results showed shifts in flow volume and timing. Some scenarios indicated earlier or reduced streamflow, which could affect reservoir filling and water availability.
Outcome
The outcomes of our project were highly promising and exceeded our expectations: 1. High Model Accuracy: With R² values of 0.98 for Astore and 0.84 for Gilgit, the model proved its capability in handling different watershed data. 2. Strong Generalization: The transfer learning framework showed that the model can be adapted to new locations using limited data. 3. Climate Insight: Our simulation tool offers a glimpse into how climate variations might affect water flow, supporting future planning. 4. Usable Interface: The GUI allows users to enter weather data and instantly see predictions and performance metrics. It's intuitive and can be used in real-world applications. 5. Visual Insights: We developed rich visualizations—time series, scatter plots, residuals, spider charts, etc.—to help users understand model behavior. 6. Research Contribution: Our hybrid architecture and climate simulations can serve as a blueprint for similar applications in other river basins. 7. Real-World Potential: The system can be integrated with real-time data sources and used by local governments, hydropower planners, or disaster risk managers.
Gallery
More from Civil Engineering
Influence of Crumb Rubber as a Partial Replacement of Sand on the Mechanical Properties of…
This project investigates the use of crumb rubber, derived from recycled waste tires, as a partial replacement…
Supervisor: Raja Tasaddiq
Monitoring Construction Progress by Integrating 4D BIM and Business Intelligence Data Anal…
Modern construction projects face increasing complexity due to growing client demands, stakeholder expectation…
Supervisor: Dr. Hassan Ashraf
DURABILITY ASSESSMENT OF CONCRETE INCORPORATING RECYCLED E-PLASTICS & GNMPs
Our project titled "Durability Assessment of Concrete Incorporating Recycled E-plastics & GNMPs (Graphite Nano…
Supervisor: Dr. Rana Faisal Tufail
Evaluation of Air Conditioner condensed water with respect to Quality and social prospects…
1) Atmospheric Water Harvesting (AWH):2) Defined as the process of collecting water from air moisture.3) A sus…
Supervisor: Engineer Waleed Tariq