- Overview
- Abstract
- Features
- Installation
- Quick Start
- Usage
- Results
- Project Structure
- Contributing
- Citation
- License
This repository implements Long Short-Term Memory (LSTM) networks for surrogate modeling of nonlinear structural systems under seismic excitation. The project addresses the computational challenges in performance-based seismic design (PBSD) by providing fast, accurate, and reliable surrogate models for structural response prediction.
Performance-based seismic design (PBSD) of structural systems relies on computationally expensive high-fidelity finite element (FE) models to predict how structures will respond to seismic excitation. For risk-based assessments, FE response simulations must be run thousands of times with different realizations of the sources of uncertainty. Consequently, data-driven machine learning (DDML) surrogate models have gained prominence as fast emulators for predicting seismic structural responses in probabilistic analyses.
This paper leverages deep Long Short-Term Memory (LSTM) networks, known for their powerful and flexible framework for time series prediction tasks. The advantages of using LSTM networks include:
- β Continuous-time modeling of structural dynamics
- β Adaptive temporal resolution handling
- β Implicit memory of past information
- β Complex nonlinear dynamics modeling
- β Interpolation and extrapolation capabilities
- β Robust noise handling
- β High-dimensional dataset scalability
The effectiveness of the proposed method is validated through three proof-of-concept studies:
- Linear elastic 2D 8-degree-of-freedom (DoF) shear building model
- Nonlinear single degree of freedom system (NL-SDoF)
- 2D nonlinear 3DoF shear building model
- π Modular Architecture: Clean, maintainable code structure
- π§ Multiple Model Types: Base, Model A, and Model B architectures
- π A/B Testing: Compare different model architectures
- π Training Visualization: Real-time loss plotting and history tracking
- πΎ Model Persistence: Save and load trained models and scalers
- ποΈ Configurable Parameters: Easy hyperparameter tuning
- π Comprehensive Logging: Detailed training progress and metrics
- Python 3.8 or higher
- pip package manager
-
Clone the repository
git clone https://github.com/ymorsi7/SeismicLSTM.git cd SeismicLSTM
-
Install dependencies
pip install -r requirements.txt
-
Verify installation
python -c "import tensorflow as tf; print(f'TensorFlow version: {tf.__version__}')"
Train a base LSTM model with default parameters:
python main.py --data_file data_2DOF_SB_BWWN.mat --model_type base --epochs 10
Compare Model A and Model B architectures:
python main.py --data_file data_2DOF_SB_BWWN.mat --ab_test --epochs 10
Argument | Type | Default | Description |
---|---|---|---|
--data_file |
str | data_2DOF_SB_BWWN.mat |
Path to MATLAB data file |
--model_type |
str | base |
Model type (base , A , B ) |
--epochs |
int | 10 |
Number of training epochs |
--batch_size |
int | 5 |
Batch size for training |
--ab_test |
flag | False |
Perform A/B testing |
--save_dir |
str | results |
Directory to save results |
# Train Model A with custom parameters
python main.py --model_type A --epochs 20 --batch_size 10
# Train Model B and save to custom directory
python main.py --model_type B --save_dir my_results
# Quick A/B test with 5 epochs
python main.py --ab_test --epochs 5
The results demonstrate the effectiveness of LSTM networks for seismic structural analysis across different structural configurations:
SeismicLSTM/
βββ π src/ # Source code
β βββ π data/ # Data handling
β β βββ data_loader.py # Data loading and preprocessing
β βββ π models/ # Model architectures
β β βββ lstm_models.py # LSTM model definitions
β βββ π utils/ # Utilities
β βββ training.py # Training utilities
βββ π files/ # Documentation and images
β βββ π paper.pdf # Research paper
β βββ πΌοΈ testbed.png # Test-bed structures
β βββ πΌοΈ lstm.png # LSTM architecture
β βββ πΌοΈ 1.png # Linear elastic results
β βββ πΌοΈ 2.png # SDOF results
β βββ πΌοΈ 3.png # MDOF results
β βββ πΌοΈ ab.png # A/B testing results
βββ π main.py # Main training script
βββ π requirements.txt # Python dependencies
βββ π .gitignore # Git ignore rules
βββ π README.md # This file
For comprehensive analysis and detailed results, please refer to our research paper:
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
If you use this code in your research, please cite our paper:
@article{seismiclstm2024,
title={Application of Long Short-Term Memory (LSTM) Networks-Based Surrogate Modeling for Nonlinear Structural Systems},
author={Coulibaly, Abdoul Aziz Sandotin and Zeballos, Enrique Simbort and Morsi, Yusuf and Sarange, Ramin},
journal={Journal of Structural Engineering},
year={2024},
doi={10.1000/xyz}
}
This project is licensed under the MIT License - see the LICENSE file for details.
- Abdoul Aziz Sandotin Coulibaly - Lead Researcher
- Enrique Simbort Zeballos - Research Contributor
- Yusuf Morsi - Research Contributor
- Ramin Sarange - Research Contributor