This repository contains the full implementation of Active Flux Pinning Dynamics, a hybrid control architecture combining:
- Classical suspension dynamics
- Quantum-inspired pinning stiffness and damping
- Nonlinear damping μ(v)
- Dual-input stiffness + damping control
- Active injection term F_inject
- Bayesian Optimization fine‑tuning
- Micro‑burst damping
- Stability‑bounded Ts‑priority search
The system is built to push a 1‑DOF toy model as close as possible to a triple‑metric win over passive quantum suspension:
| System | Settling Time | Overshoot | RMS Accel |
|---|---|---|---|
| Classical | ❌ Worst | ❌ Worst | ❌ Worst |
| Passive Quantum | Baseline | Baseline | Baseline |
| AFPD (tuned) | Better | Better | Better |
The full paper (active_flux_pinning_dynamics.md) describes the physics, math, and motivation behind the project.
-
Nonlinear stiffness control:
( k_{ ext{pin}}(t) ) driven by displacement, velocity, and actuator dynamics. -
Nonlinear damping μ(v):
( \mu_{ ext{eff}} = \mu_0 + \eta_x |x| + \eta_v rac{|v|}{1+�eta_\mu |v|} ) -
Active Injection Force:
( F_{ ext{inject}} = -k_F x - c_F v ) -
Micro‑Burst Damping:
Activated only during high‑frequency velocity spikes for rapid stabilization. -
Fully tunable Bayesian Optimization pipeline using scikit‑optimize.
-
Fast stable integrator suitable for stiff, nonlinear 1‑DOF motion.
Active_Flux_Pinning_Dynamics/
│
├── AFPD.py # Main simulation + tuning engine
├── active_flux_pinning_dynamics.md # Full theory + paper
├── example_outputs/ # Plots & tuned metrics
│ ├── displacement.png
│ ├── acceleration.png
│ ├── k_pin.png
│ ├── mu_pin.png
│ ├── metrics.json
│ └── ...
└── README.md # You are here
python AFPD.pypython AFPD.py --tuneRequires:
pip install scikit-optimizeSettling Time (Ts): 0.6097 (better than passive)
Overshoot (Mp): 0.5742 (better than passive)
RMS Accel: 2.3684 (better than passive)
Peak Accel: 100.0
This run shows the model achieving the desired triple‑metric win over passive.
- Extend from 1‑DOF toy model → full multi‑axis suspension
- Add thermal flux modulation
- Add vector‑field control for real flux tube geometry
- Train a reinforcement model to control stiffness & damping adaptively
- Integrate this into a full AFPD hardware demonstrator
Apache 2.0 — Free for use in research & engineering.
Pull requests welcome.
This project is actively expanding — from toy physics to real mechatronics.