Skip to content

Urban-Microclimate-Prediction-Hybrid-LSTM-Transformer-Kriging

🌦️ Microclimate Prediction Model

🧭 Overview

This project introduces a hybrid machine learning approach for urban microclimate prediction. It integrates time series forecasting (using LSTM and Transformer architecture) with spatial interpolation (Kriging) to model environmental conditions across the urban canopy layer.

Key inputs include: - Meteorological data: temperature, humidity, dew point - Urban features: land cover, 3D elevation, surface materials, shadow coverage, sun angle


Work Distribution

We’d like to share a quick update on what the team has been working on. For our convenience in tracking files, please see the suggested file naming guide below. If possible, kindly consider revising your file names accordingly. However, if the file name cannot be changed for any reason, please feel free to let me know.

1_ExtractUrbanFeatures.ipynb -- /krishgupta-CE /Thanasarn-Changnawa

1_1_ExtractBuildings.ipynb -- /krishgupta-CE /Thanasarn-Changnawa

1_2_ExtractShadows.ipynb -- /daytss /Thanasarn-Changnawa

1_3_ExtractSurfaceMaterials.ipnb -- /BenjaminHansyun

2_TrainModel.ipynb -- /yupengtang /zeyujiang8800 /Thanasarn-Changnawa

2_1_LSTM_Model_Eval.ipynb

2_2_(Model Name)

3_Inference.ipynb -- /zeyujiang8800 /Thanasarn-Changnawa

🌐 Geospatial Feature Engineering

2D Spatial Data

  • 12 distance vectors per grid point to features such as buildings, parks, libraries, parking, footways, grass, fitness centers, woods, and wetlands
  • Data sourced from OSMnx and GT Tree Viewer
  • Returns .csv file: grid_analysis.csv

Building Elevation

  • Derived from DSM and DTM to compute building heights
  • Digital Terrain Model (DTM) for GT’s campus (.tif file) obtained through USGS EarthExplorer
  • Digital Surface Model (DSM) for GT’s campus (.tif file) obtained through OpenTopography
  • Returns .csv file: grid_with_ground_and_building_elevation.csv

Building Area Density

  • Utilizes osmnx to find total building footprint per spatial unit
  • Returns .csv file: squares_with_building_areas.csv

Surface Materials

  • OSM map tiles converted to material categories by pixel color

Shadow Coverage

  • Calculated using Pybdshadow and Astral for sunlight/shadow estimation

Sun Angle Dynamics

  • Sun angle included as a physical feature for seasonal generalization

📁 Project Structure

  • Data Collection: Automated via Selenium
  • Feature Engineering: Spatial and environmental attributes
  • Modeling: Temporal Fusion Transformer with LSTM-Attention Encoder (TFT-LAE)
  • Training: Adam optimizer + MSE loss + early stopping
  • Evaluation: RMSE, MAPE, R², residual tracking

🧠 Model Architecture: TFT-LAE

  • VSN: Variable Selection Network
  • Time2Vec: Temporal embedding module
  • LSTM + Attention: Captures time dependencies
  • GRN Decoder: Multi-step forecast generation

Workflow: Input → VSN → Time2Vec → LSTM+Attention → GRN → Output


🧮 Feature Engineering & Selection

Selected Features: - Meteorological: RH, DewPt, Azimuth, Altitude, ΔTemp - Temporal: hour_sin, hour_cos - Scaled with MinMaxScaler to ensure consistency


🏋️‍♂️ Training Process

  • Loss: MSE
  • Optimizer: Adam with weight decay
  • Early stopping: Prevents overfitting
  • Logging: tqdm + best model saving

🌍 Evaluation Process

Data Sources

Source Use Location
Atlanta Weather Train time series Atlanta, GA
Singapore Grid Train spatial Kriging Singapore
GT Campus Final test Georgia Tech

Tools

  • Selenium for data scraping
  • Python for processing

Workflow

  1. Scrape and clean data
  2. Train time series model (Atlanta)
  3. Train spatial interpolation (Singapore)
  4. Apply both to Georgia Tech data
  5. Evaluate with real measurements

📊 Evaluation and Prediction

Functions: - predict_and_plot, plot_full_sequence

Metrics: - RMSE, MAPE, R²

Residuals: - Histogram and time-series plots to detect bias

Overfitting: - Train/test error comparison


🐞 Problem: Outlier Distortion

Initial training data contained extreme values: - -51°C to 174°C

Distorted MinMaxScaler and flattened predictions.

Solution

  • Filtered to -15°C to 40°C
  • Result: Better scaling, more generalization

Lesson: Always validate input ranges before normalization.


📉 Post-Fix Evaluation

  • Residuals became balanced and centered
  • Predictions improved but remained smooth
  • Future work: increase expressiveness and precision

✅ Summary

This workflow combines spatial and temporal modeling for urban microclimate forecasting using: - Deep learning (TFT-LAE) - Spatial Kriging interpolation - Automated feature extraction and evaluation

It provides a framework for scalable, data-driven urban climate resilience solutions.

Presentation

Team

Name Seniority Major School # Semesters GitHub Handle
Han‑Syun Shih Masters Architecture (HBP) ARCH 2 Benjaminhansyun
Thanasarn Changnawa PhD Architecture ARCH 2 Thanasarn‑Changnawa
Krish Gupta Junior Civil Engineering CEE 2 krishgupta‑CE
Yupeng Tang Masters Computer Science SCS 1 yupengtang
Dayeon Song Freshman Industrial Engineering ISYE 1 daytss
Ze Yu Jiang Junior Computer Science SCS 3 zeyujiang8800