A deep learning-based domain adaptation framework that bridges the gap between Finite Element (FE) simulated data and experimental vibration measurements for debonding detection in stiffened plates.
This project addresses the sim-to-real gap in structural health monitoring (SHM). FE simulations are cheap to generate but differ from real experimental measurements due to modelling assumptions, boundary conditions, and noise. This pipeline:
- Loads and preprocesses FE-simulated and experimental vibration data
- Uses bootstrapping to augment limited experimental samples
- Trains a 1D Convolutional Autoencoder to map FE data into the experimental domain
- Applies PCA for dimensionality reduction
- Trains Random Forest and SVM classifiers to predict debonding location and size
Detect and characterize debonding damage in a 330×530 mm stiffened plate:
- Debonding locations: 105 mm to 425 mm (20 mm step size, 17 locations)
- Debonding sizes: 10 mm to 150 mm (5 mm step, 29 sizes)
- Total FE cases: 493 combinations
- Excitation frequency: 46 Hz and 54 Hz
FE Simulated Data (494 cases)
│
▼
Feature Selection (Mahalanobis Distance-based indices) ← preprocessing.py
│
▼
Add Gaussian Noise (0.5%) → 10,000 noisy FE samples ← preprocessing.py
│
▼
1D Conv Autoencoder (Domain Adaptation) ← models.py + train.py
FE domain ──────────────────► Experimental domain
│
▼
Transformed FE Data + Experimental Data ← domain_adaptation.py
│
▼
PCA (16 components) ← classification.py
│
▼
Random Forest / SVM Classifiers ← classification.py
│
▼
Debonding Location & Size Prediction
project/
│
├── main.py # Full pipeline orchestrator
├── config.py # File paths and hyperparameters
├── data_loader.py # Load FE and experimental data
├── preprocessing.py # MSD feature selection, normalization, bootstrapping, noise
├── models.py # Conv1D_DA1, Conv1D_DA2, DNN_DA3, Fe_Exp_dataset
├── train.py # Training loop, save/load model
├── domain_adaptation.py # Transform FE data using trained model
├── classification.py # PCA, target labels, RF and SVM classifiers
├── exp_data_generator.py # Process raw experimental scans → CSV files
│
├── FE_data_105_10_to_425_150.xlsx # FE simulation data
├── New_Exp_2022/ # Experimental scan data (35 scans)
│ └── plate_dim_330x530_dam_at_265_000/
│ └── Scan_*_46_Hz_disp_abs.xlsx
├── x_dam_265_050_46Hz_sym2_100.csv # Experimental damaged data (50 mm deb.)
├── x_dam_265_100_54Hz_sym2_100.csv # Experimental damaged data (100 mm deb.)
└── x_dam_385_070_46Hz_sym2_100.csv # Experimental damaged data (70 mm deb.)
pip install numpy pandas matplotlib seaborn scipy scikit-learn torch torchsummary openpyxl| Package | Purpose |
|---|---|
numpy, pandas |
Data loading and manipulation |
matplotlib, seaborn |
Visualization |
scipy |
Statistical tests (Q-Q plots, z-scores) |
torch |
Deep learning (1D Conv Autoencoder) |
torchsummary |
Model architecture summary |
scikit-learn |
PCA, Random Forest, SVM, GridSearchCV |
Three domain adaptation models are defined in models.py:
Input: (batch, 1, 108)
└─► Conv1d(1→16, k=4, s=2) + BatchNorm
└─► Conv1d(16→32, k=4, s=2) + BatchNorm
└─► Conv1d(32→64, k=4, s=2) + BatchNorm
└─► Conv1d(64→128, k=4, s=2) + BatchNorm
└─► Flatten → Linear(512→108)
Output: (batch, 108) ← mapped to experimental domain
Training settings (configurable in config.py):
- Optimizer: Adam (
lr=0.002, weight decay=1e-5) - Loss: MSE
- Epochs: 51
- Batch size: 1000
Features with high Mahalanobis Distance (MSD) are selected using pre-defined index ranges defined in config.py (IDX_RANGES), reducing the feature space from 208 to 108 discriminative points.
With only 35 experimental undamaged scans, non-parametric bootstrapping (100 resamples × 35 = 3,500 samples) is used, then normal distributions are fitted per feature to generate 10,000 synthetic experimental samples.
The autoencoder learns a mapping:
FE noisy data (10,000 samples) → Experimental distribution (10,000 samples)
All 494 FE cases are passed through the trained model to produce experimentally-aligned feature vectors.
Two zone-based classification targets are defined:
- Location zones: 5 spatial zones along the plate
- Size zones: 7 size categories
Both Random Forest and SVM classifiers are tuned via GridSearchCV.
Edit config.py to set correct paths for FE data and experimental scan directories.
If raw experimental scan .xlsx files are available, run:
python exp_data_generator.pyThis generates the three damaged experimental CSV files used in training.
python main.pyGPU is used automatically if available (cuda), otherwise falls back to cpu.
Each module can also be run standalone for testing:
python data_loader.py # Test data loading
python preprocessing.py # Test MSD index generation
python models.py # Print model architecture
python classification.py # Verify target label generation- Training loss curve (log scale)
- PCA explained variance ratio plot
- Comparison plots of FE vs. experimental reconstructed signals
- Classification accuracy scores (train and test) printed to console
- Trained model weights saved as
Conv1D_DA2_trained.pth
- All hyperparameters and file paths are centralized in
config.py— no need to edit individual scripts. - MSD index ranges (
IDX_RANGESinconfig.py) replace the previouseval()-based dynamic variable access. - Symmetry of the plate is exploited: both halves (
sym1,sym2) are used independently and concatenated, effectively doubling the dataset. Conv1D_DA1(full autoencoder) andDNN_DA3(fully connected) are available inmodels.pyas alternatives to the defaultConv1D_DA2.- Legacy monolithic scripts (
main_domain_adaption_model.py,main_domain_adaption_model-2.py,main_domain_adaption_model-pca.py) are retained for reference.
- Original paper: Transforming Simulated Data into Experimental Data Using Deep Learning for Vibration-Based Structural Health Monitoring
This code is part of research on physics-informed domain adaptation for structural health monitoring using vibration mode shape data from FE simulations and laboratory experiments on composite stiffened plates.