Skip to content

About

LSTM+Attention based motion prediction for segmented spine exoskeletons with soft-rigid coupling control 刚柔并"脊"——新一代万向刚柔耦合仿生外骨骼运动预判系统

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

SoftRigid Coupling Exoskeleton

刚柔并"脊"——新一代万向刚柔耦合仿生外骨骼运动预判系统

License Python PyTorch

> College Students' Innovation and Entrepreneurship Competition Project | Real-time human motion prediction for soft-rigid coupled exoskeletons
> https://github.com/ShBWei/SoftRigid-Coupling-Exoskeleton/

Overview

A physics-guided deep learning system for real-time prediction of spinal posture and rigidity states in segmented exoskeletons.

  • Input: 12 IMU streams @ 60Hz, 24-frame (400ms) observation window
  • Output: 12-frame (200ms) future prediction of posture + mode + switch probability
  • Response target: delay under 200ms (aligned with plan section 3.2.4)

12-IMU Configuration

We use a 12-node full-body kinematic chain instead of the sparse 8-node setup to enable closed-loop drift correction and bilateral symmetry constraints.

Node Location Role Channels
0 Cervical (C4-C6) Head-neck reference 6
1 Thoracic (T6-T8) Thoracic kyphosis monitoring 6
2 Lumbar (L2-L4) Lumbar lordosis core 6
3 Sacral (S1-S3) Fixed base, zero-drift anchor 6
4 Left Shoulder Upper limb chain start 6
5 Right Shoulder Bilateral pair 6
6 Left Elbow Elbow flexion axis 6
7 Right Elbow Bilateral pair 6
8 Left Hip Lower limb chain start 6
9 Right Hip Bilateral pair 6
10 Left Knee Knee flexion axis 6
11 Right Knee Bilateral pair 6
Total 72 ch/frame

Input tensor: 12 x 6 x 24 = 1728 dimensions.

Four-Segment Spine Structure

[Cervical x7] -- [Thoracic x12] -- [Lumbar x5] -- [Sacral fused]
   C1-C7             T1-T12            L1-L5         fixed base

The sacral node serves as the kinematic root to eliminate integration drift. Bilateral shoulder/elbow/hip/knee pairs enforce symmetry consistency during training.

Model Outputs

  • Posture head: 23 x 3 joint angles
  • Mode head: rigid/flexible classification (0/1)
  • Switch head: switching probability (0-1)
  • Physics layer: differentiable soft ROM constraints + hard clipping + bilateral symmetry loss

Data and Validation

Current release uses synthetically generated biomechanical data for algorithm closed-loop verification. The data is constrained by anatomical ROM (ISB coordinate system), four-segment spine coupling covariance, bilateral symmetry (< 3 deg deviation), and inverted-pendulum gait templates.

Scenario distribution in the validation set:

Scenario Samples Ratio Mode
Normal gait 360 60% flexible
Scoliosis simulation 60 10% flexible -> rigid
Load lifting 120 20% rigid
Fall-prevention 60 10% transition

Reference baseline: The reported cohort effect (ROM +42%, burden -65%) is derived from published meta-analyses on exoskeleton-assisted rehabilitation, not from an independent clinical trial of this project.

Training Metrics

  • MPJPE (pose error proxy)
  • Mode-switch accuracy / F1
  • Ratio of response delay &lt; 200ms
  • ROM violation rate
  • Bilateral symmetry error

Quick Start

git clone https://github.com/ShBWei/SoftRigid-Coupling-Exoskeleton.git
cd SoftRigid-Coupling-Exoskeleton
pip install -r requirements.txt

# Edit config.py to set IMU nodes, sample size, epochs, etc.
# Then run the full pipeline:
python main.py

Generated outputs in results/:

  • medical_data_12imu.npz — synthetic dataset
  • baseline_best.pth, ours_best.pth — model weights
  • learning_curves.png
  • fig1_spine_segment.png
  • fig2_symmetry.png
  • fig3_fall_timeline.png
  • table_comparison.tex

Comparison Snapshot (Lightweight Run)

Experiment Metric Baseline-8 Baseline-12 Ours-12
Normal gait MPJPE (deg) 3.24 2.74 2.22
Scoliosis MPJPE (deg) 3.85 2.89 2.45
Load lifting ROM violation (%) 1.87 0.43 0.00
Fall-prevention Response delay (ms) 198 185 167

Note: This is a quick end-to-end verification run. Paper-grade significance requires repeat_seeds&gt;=5 and longer training (epochs&gt;=30).

Project Structure

SoftRigid-Coupling-Exos/
├── results/                    # Output directory (figures, tables, checkpoints)
├── config.py                   # Hyperparameters and IMU configuration
├── data_generator.py           # Biomechanical synthetic data generation
├── main.py                     # End-to-end pipeline entry
├── training_framework.py       # Model training, validation, and testing
├── visualization.py            # Result plotting and figure export
├── requirements.txt
├── LICENSE
└── README.md

Disclaimer

  1. Project nature: This is a college student innovation and entrepreneurship training program project for algorithm exploration. It does not constitute a medical device, clinical diagnostic tool, or therapy system.
  2. Data: All current results are based on synthetic biomechanical data for architecture validation. No clinical cohort has been enrolled or tested.
  3. Performance: The metrics above are from lightweight training configurations and lack statistical significance for clinical claims.
  4. Safety: Any hardware deployment of exoskeleton control requires mechanical safety assessment, ethical review (IEC/IRB), and real-time redundancy testing. The authors assume no liability for direct or indirect use.
  5. Citation: If referenced in academic or competition contexts, please state clearly that the algorithm is in research preview and results are simulation-based.

Citation

@misc{softrigid2026,
  title={SoftRigid Coupling Exoskeleton: A 12-IMU Full-Body Kinematic Chain with Physics-Guided Spatiotemporal Networks},
  author={ShBWei},
  year={2026},
  howpublished={\url{https://github.com/ShBWei/SoftRigid-Coupling-Exoskeleton/}},
  note={College Student Innovation and Entrepreneurship Training Program. Results based on synthetic biomechanical data.}
}

License

This project is licensed under the MIT License.

About

LSTM+Attention based motion prediction for segmented spine exoskeletons with soft-rigid coupling control 刚柔并"脊"——新一代万向刚柔耦合仿生外骨骼运动预判系统

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages