Skip to content

About

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.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Domain Adaptation Model for Structural Damage Detection

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.


Overview

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:

  1. Loads and preprocesses FE-simulated and experimental vibration data
  2. Uses bootstrapping to augment limited experimental samples
  3. Trains a 1D Convolutional Autoencoder to map FE data into the experimental domain
  4. Applies PCA for dimensionality reduction
  5. Trains Random Forest and SVM classifiers to predict debonding location and size

Problem Statement

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

Pipeline Architecture

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

File Structure

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.)

Dependencies

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

Model Architecture

Three domain adaptation models are defined in models.py:

Conv1D_DA2 (Active model — encoder-only mapping)

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

Conv1D_DA1 (Full autoencoder with decoder — defined but not active by default)

DNN_DA3 (Fully connected alternative — used in model comparison scripts)

Training settings (configurable in config.py):

  • Optimizer: Adam (lr=0.002, weight decay=1e-5)
  • Loss: MSE
  • Epochs: 51
  • Batch size: 1000

Key Steps

1. Feature Selection (preprocessing.py)

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.

2. Data Augmentation via Bootstrapping (preprocessing.py)

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.

3. Domain Adaptation Training (train.py)

The autoencoder learns a mapping:

FE noisy data (10,000 samples) → Experimental distribution (10,000 samples)

4. FE Data Transformation (domain_adaptation.py)

All 494 FE cases are passed through the trained model to produce experimentally-aligned feature vectors.

5. Classification (classification.py)

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.


Usage

Step 1 — Configure paths

Edit config.py to set correct paths for FE data and experimental scan directories.

Step 2 — (Optional) Generate experimental CSV files

If raw experimental scan .xlsx files are available, run:

python exp_data_generator.py

This generates the three damaged experimental CSV files used in training.

Step 3 — Run the full pipeline

python main.py

GPU is used automatically if available (cuda), otherwise falls back to cpu.

Running individual modules

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

Output

  • 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

Notes

  • All hyperparameters and file paths are centralized in config.py — no need to edit individual scripts.
  • MSD index ranges (IDX_RANGES in config.py) replace the previous eval()-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) and DNN_DA3 (fully connected) are available in models.py as alternatives to the default Conv1D_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.

Reference

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.

About

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.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages